Fixed relay loading

This commit is contained in:
2026-05-20 11:19:41 +01:00
parent 470f1de835
commit 8d3998945a
15 changed files with 367 additions and 250 deletions

View File

@@ -1,4 +1,3 @@
using UnityEngine.SceneManagement;
using UnityEngine;
namespace PashaBibko.PenguinChase.Core
@@ -8,15 +7,11 @@ namespace PashaBibko.PenguinChase.Core
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void LoadBoostrapScene()
{
#if UNITY_EDITOR
// Stops loading in on the bootstrap scene
if (SceneManager.GetActiveScene().name == "Bootstrap")
{
SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
}
#endif // UNITY_EDITOR
SceneManager.LoadScene("Bootstrap", LoadSceneMode.Additive);
GameObject go = Resources.Load<GameObject>("Bootstrap");
GameObject instance = Object.Instantiate(go);
Object.DontDestroyOnLoad(instance);
instance.name = "Bootstrap";
}
}
}