public override void OnEnable() { base.OnEnable(); SceneManager.sceneLoaded -= RecordCurrentScene; SceneManager.sceneLoaded += RecordCurrentScene; PersistentDataManager.RegisterPersistentData(gameObject); }
public void OnEnable() { // This optional code registers this GameObject with the PersistentDataManager. // One of the options on the PersistentDataManager is to only send notifications // to registered GameObjects. The default, however, is to send to all GameObjects. // If you set PersistentDataManager to only send notifications to registered // GameObjects, you need to register this component using the line below or it // won't receive notifications to save and load. PersistentDataManager.RegisterPersistentData(this.gameObject); }
public void OnDisable() { if (languageIsChosen) { languageIsChosenInt = 1; } else if (!languageIsChosen) { languageIsChosenInt = 0; } PersistentDataManager.RegisterPersistentData(this.gameObject); }
public void OnEnable() { PersistentDataManager.RegisterPersistentData(this.gameObject); }
void OnDisable() { OnRecordPersistentData(); PersistentDataManager.RegisterPersistentData(this.gameObject); }
void OnDisable() { PersistentDataManager.RegisterPersistentData(this.gameObject); }
void OnEnable() { VariableName = name + transform.position.x.ToString("F2") + transform.position.ToString("F2"); print(VariableName); PersistentDataManager.RegisterPersistentData(this.gameObject); }
public void OnEnable() { LevelName = GameManager.Instance.LevelName; PersistentDataManager.RegisterPersistentData(this.gameObject); }
public override void OnDisable() { base.OnDisable(); PersistentDataManager.RegisterPersistentData(this.gameObject); }
void OnDisable() { PersistentDataManager.RegisterPersistentData(this.gameObject); GameManager.OnSceneChanged -= SceneChanged; GameManager.OnSceneUnloaded -= BeforeSceneChange; }
public void OnDisable() { // Unsubscribe the GameObject from PersistentDataManager notifications: PersistentDataManager.RegisterPersistentData(this.gameObject); }
public override void OnEnable() { base.OnEnable(); VariableName = name + transform.position.x.ToString("F2") + transform.position.ToString("F2"); PersistentDataManager.RegisterPersistentData(this.gameObject); }