Get a scene Loaded in background for later switchings

Hello!
I made to 2 scenes for my game, one for overworld and other for turn based Battles, and want to make the battle scene loaded in the background for a more clean transition. But I don’t want to add it to the current scene to not have a problem with lights and other things. However I can’t find a feature related with this anywhere.
There is a feature related with this?

You want LoadSceneAsync. Here’s an example of how to use it to load a scene in the background, and then switch to it once it’s loaded.

1 Like

I want to the entire scene to remain loaded in the background ando don’t be destroyed if i’m using another (Something need to remain loaded for status or positions)
the ascync is a thing I will be using too but the main problem is the destruction of the other scene.
also i can set the allow activation to only when I need to change for the other scene too?

You can’t have two scenes open at once, what I suggest is to just have your battle “scene” inside of your overworld scene, and disable/enable it as needed.

1 Like

I see what you’re saying. It is something of a limitation with Unity’s scene system. I’m thinking you might want to load your content as prefabs instead. You can use the Addressables system to load a prefab representing your battle “scene” asynchronously, and then once it’s fully loaded into memory, instantiate it and simultaneously disable/destroy your overworld “scene.” The only thing I’m not sure about here is the lighting settings, but I’m sure there’s a way around it.

1 Like

I understand.
Thanks for the answer. Hope unity can Improve the scene system in future updates somehow (Although consoles like PS5 having a really quick file loading doens’t engage with that possibility). I will try to make it a way like you explained or some other manner to work with the scenes in individual, like a json data storage or something like that