"Dontdestroyonload" not appearing

When I tried testing out the Finish Line’s loading scene system everything seemed fine until after the scene loaded for the second time in which the restart scene scripts didn’t work and I think it might be a problem involving don’t destroy on load. Could someone please tell me how to implement it?

Hi Roi,

Welcome to our community! :slight_smile:

Do you call DontDestroyOnLoad in one of your scripts? If so, make sure the script is attached to the correct game object.

If you do not call DontDestroyOnLoad in your script, check your Hierarchy. Is there DontDestroyOnLoad? If so, which game objects are listed below it during runtime?

If you expect to see DontDestroyOnLoad because you used it in your code but it does not appear, there might be a typo in your code. Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?


See also:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms