Last active
December 14, 2017 17:27
-
-
Save Moe-Baker/b168a5060fd99244f671c8befac0398f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//gets called on the local instance from the OnGameLoad, will only be called once obviously | |
void Configure() | |
{ | |
Debug.Log("Manager Configured, Called Once The Game Loads, Right Before The Scene Load"); | |
SceneManager.sceneLoaded += OnSceneChanged; | |
} | |
//listener to scene change event, calls the Init method | |
private void OnSceneChanged(Scene scene, LoadSceneMode loadMode) | |
{ | |
Init(); | |
} | |
//gets called on scene change, should act as a replacement for a monobehaviour's Awake, Start, .... methods | |
void Init() | |
{ | |
Debug.Log("Manager Initilized, Called On Every Scene Load Including The Startup Scene"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment