Prevent Object From Loading

Hello everybody,

I worked my way through Unity’s Execution Order at and wondered whether there is a possibility of preventing a given object from loading at the start of a scene.

To be more specific: My game requires scene transitions that return to previous visited scenes again and again. Some of these objects might have been destroyed in between, but would be loaded again as soon as the player returns. Our idea is to save the game state in form of conditions to a specific Manager object that has DontDestroyOnLoad called at the beginning of the game.

Next step would be to destroy these objects in Awake if these conditions hold true, but I’d prefer not even loading them… Any ideas?

Ususally for this kind of thing, I make an empty “void” scene which only contains the important stuff which shouldn’t get destroyed between levels (player info, game engine stuff), load it first, and then immediately load the actual scenes after setting ‘DontDestroyOnLoad’ for all my game engine stuff. I then never go back to the initial scene unless I want to do a full reset, in which case I manually delete the game engine bits, and reload from level 0.

Alright - but this approach has another drawback: Desingers and level artists are unable to check their work without starting the game over and over again…

Anyway, thanks for the answers! :slight_smile: