Exemplo n.º 1
0
        //void OnLevelWasLoaded(int level)
        //{
        //    Instance.GetCanvas.worldCamera = Camera.main;
        //}

        protected override void OnDestroy()
        {
            base.OnDestroy();

            //only if the original singleton is destroyed
            if (GetInstanceID().Equals(UID))
            {
                _instance         = null;
                _isSpawnedAlready = false;
            }
        }
Exemplo n.º 2
0
 protected virtual void OnApplicationQuit()
 {
     _instance = null;
 }