Fixed relay loading
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user