// Use this for initialization private void Awake() { // Set singleton instance of this object _instance = this; //Sets reference to scenedata. _sceneData = GameData.SceneData; }
/// <summary> /// Occurs on awake /// </summary> void Awake() { // Set up persistent and scene data as necessary if (_isPersisentData) { // Peristent Data _persistentData = this; // Keep track of whenever a scene loads GameController.SceneManager.SceneLoadEnd += HandleSceneLoadEnd; } else { // Scene Data _sceneData = this; } }