Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //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");
- }
Add Comment
Please, Sign In to add comment