Proper scene data management for ongoing actions in multiple scenes

Hi everyone,

I would like to switch scenes from one to another, i.e. you are outside of a house and enter it. This already works for me.

Now, what I want is, while I’m inside the house, objects outside the house should continue/resume their usual behavior (imagine a butterfly passing by, you enter the house, exit the house and the butterfly has continued moving in the direction it was going).

The usual methods like PlayerPrefs and static variables/singleton are nice to store data and load it somewhen later, but it doesn’t solve the problem that everything should remain active and follow the respective behaviour.

I thought about DontDestroyOnLoad, but I cannot image it being wise to keep everything alive at any time.

What do I need to make this work?

Thanks for your help!

SceneManger.LoadScene("Bla", LoadSceneMode.Additive);

This will load new scene and keep other scenes open.

1 Like

Thanks. Doesn’t this lead to performance issues if multiple entire scenes are being processed simultaneously?

Also: How can I make all objects of the scene I came from invisible and impossible to interact with? (I hope not manually)

In addition, I would also need to prevent the objects of the original scene to interact with the ones from the new scene. There seems to be so much trouble with this approach.