public override void OnEnable()
 {
     base.OnEnable();
     SceneManager.sceneLoaded -= RecordCurrentScene;
     SceneManager.sceneLoaded += RecordCurrentScene;
     PersistentDataManager.RegisterPersistentData(gameObject);
 }
예제 #2
0
 public void OnEnable()
 {
     PersistentDataManager.RegisterPersistentData(gameObject);
     listenForOnDestroy = true;
     // Waits one frame to allow all other components to finish their OnEnable() methods.
     if (trigger == DialogueSystemTriggerEvent.OnEnable)
     {
         StartCoroutine(StartAtEndOfFrame());
     }
 }
예제 #3
0
 /// <summary>
 /// Only listen for OnDestroy if the script has been enabled.
 /// </summary>
 public void OnEnable()
 {
     listenForOnDestroy = true;
     PersistentDataManager.RegisterPersistentData(gameObject);
 }
 protected virtual void OnEnable()
 {
     PersistentDataManager.RegisterPersistentData(gameObject);
 }
 /// <summary>
 /// Only listen for OnDestroy if the script has been enabled.
 /// </summary>
 protected virtual void OnEnable()
 {
     PersistentDataManager.RegisterPersistentData(gameObject);
     listenForOnDestroy = true;
 }
예제 #6
0
 /// <summary>
 /// Only listen for OnDestroy if the script has been enabled.
 /// </summary>
 public void OnEnable()
 {
     listenForOnDestroy = !awakeMarkedForDestroy;
     PersistentDataManager.RegisterPersistentData(gameObject);
 }