Load required scenes when entering playmode

Hello!

I’m working on a project where I utilize additive scene loading to persist resources on level changes. It works well in builds, since my main “manager” scene is the first to load and it handles all other dependencies.

When working on level design however, it’s getting really tedious since I’m forced to load the scenes by “open scene additive” option. This would be fine on its own, but unfortunately things like navmesh generation and light baking take all open scenes into account, resulting in unwanted behavior.

For example, having loaded one manager scene without any renderers and one actual level, after navmesh baking it’s bound to both of them, which results in it not being cleared upon level change. To avoid that, I have to unload the manager scene every time when baking and load it again when entering play mode.

Is there a way to modify the standard enter play mode behavior? Something that would allow me to make sure the manager scene is always loaded. Adding an editor only script to each level would work I think, but maybe there’s a better way.

Thanks!

1 Like

This is probably the most flexible solution for this common problem:

That looks good, will give it a try, thanks!

1 Like