Esempio n. 1
0
 void OnDestroy()
 {
     SaveLoadManager.DeregisterSerializableGameObject(this);
 }
Esempio n. 2
0
 private void SetupSingleton()
 {
     if (instance == null)
         instance = this;
     else if (instance != this)
     {
         if (Application.isPlaying)
         {
             DaggerfallUnity.LogMessage("Multiple SaveLoad instances detected in scene!", true);
             Destroy(gameObject);
         }
     }
 }
Esempio n. 3
0
 public static bool FindSingleton(out SaveLoadManager singletonOut)
 {
     singletonOut = FindObjectOfType <SaveLoadManager>();
     return(singletonOut != null);
 }
Esempio n. 4
0
        public static bool FindSingleton(out SaveLoadManager singletonOut)
        {
            singletonOut = GameObject.FindObjectOfType(typeof(SaveLoadManager)) as SaveLoadManager;
            if (singletonOut == null)
                return false;

            return true;
        }
Esempio n. 5
0
 public static bool FindSingleton(out SaveLoadManager singletonOut)
 {
     singletonOut = FindObjectOfType(typeof(SaveLoadManager)) as SaveLoadManager;
     return(singletonOut != null);
 }