Don't Destroy On Load Error

Hello, I just finished this course and have been using the same project that I used for the Core Combat and Inventory System Courses. In this course it doesn’t have us moving between any scenes and when I finished the course I went to play though my game and am now getting this DontDestroyOnLoad error that isn’t allowing the game to load on the next scene and isn’t transferring the saved data to the new scene either. What could be causing this error? I have deleted the save file and started fresh but still get the error and nothing will load properly. Any help is appreciated.

Sam mentioned it in the course. Portals have to be root objects in the hierarchy. They cannot be in another game object (the way you have them). Any object that will be marked with DontDestroyOnLoad must be root objects

Oh that’s right. I remember that now. I put them in an Empty for organization forgetting about that. Thank you so much!

It’s a common mistake. It’s good to organize your scene, but unfortunately, we can’t put the portals under other GameObjects.

1 Like

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

Privacy & Terms