I'm using Unity 5. I have an object with a bunch of scripts that is DontDestroyOnLoad. Is there a way to detect that the current scene is ending and to have the scripts on this object do something at the end of the scene? I have found some information on doing things at the start of the scene but I would like to do some cleanup before the scene ends.
I am also unclear if this solution will work for a DontDestroyOnLoad object entering a new scene.
https://forum.unity.com/threads/how-to-use-scenemanager-onsceneloaded.399221/
↧