Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

Do something at the end of every scene in a DontDestroyOnLoad object

$
0
0
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/

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>