using UnityEngine; using UnityEngine.SceneManagement; namespace PashaBibko.PenguinChase.Core { public static class BootstrapLoader { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] private static void LoadBoostrapScene() { // Makes sure the game onto the first scene SceneManager.LoadScene(0); // Loads the bootstrap object GameObject go = Resources.Load("Bootstrap"); GameObject instance = Object.Instantiate(go); Object.DontDestroyOnLoad(instance); instance.name = "Bootstrap"; } } }