Exemple #1
0
 private void OnDestroy()
 {
     if (SaveMaster.DeactivatedObjectExplicitly(this.gameObject))
     {
         saveable.WipeData();
         instanceManager.DestroyObject(saveable);
     }
 }
 private void OnDisable()
 {
     // Ensure that it doesn't get toggled when the object is
     // deactivated /activated during scene load/unload
     if (SaveMaster.DeactivatedObjectExplicitly(this.gameObject))
     {
         isEnabled = false;
     }
 }
Exemple #3
0
 private void OnDestroy()
 {
     if (SaveMaster.DeactivatedObjectExplicitly(this.gameObject))
     {
         if (removeData)
         {
             SaveMaster.WipeSaveable(saveable);
             instanceManager.DestroyObject(this, saveable);
         }
     }
 }