Beispiel #1
0
 protected override void DisposeInternal()
 {
     base.DisposeInternal();
     if (Instance == this)
     {
         Instance = null;
     }
 }
Beispiel #2
0
        private void Awake()
        {
            instancesInScene++;
            if (Init(Instance))
            {
                Instance = this;
            }

            SceneManager.sceneLoaded += OnLevelWasLoadedNew;
        }