Is it possible to have multiple scenes active at a time?

Hello. So I was wondering if it was possible to have the player enter one scene while another scene is active? Bascially what I mean is something like this : In scene 1, the player automatically gets 5 points per second, then the player goes to a different scene for 3 seconds, when he comes back to scene 1, he has 15 points. Is it possible to do this, or do I have to make all the events in the same scene?

Well, a scene is basically just a collection of GameObjects. The sum of everything you see in your Hierarchy comprises a ‘scene’. Loading a scene is to Destroy all the gameobjects you have, and load a bunch of new ones, to put it bluntly.

If you don’t want to destroy the ones you have, you can call LoadLevelAdditive instead, which will simply add all of Scene 2’s GameObjects to your Hierarchy without destroying those from Scene 1. But then you have to keep track of which gameobjects got added so you can destroy them manually again to return to scene 1.

It doesn’t sound like “multiple active scenes” is really the core of your problem, though. To me, it just sounds like you want to preserve the data that follows your main player. That is, when a scene change occurs, you don’t want your player’s score to reset. To accomplish that, you can put DontDestroyOnLoad(gameObject) into the Awake or Start method of your main player script, causing it to survive scene changes, including his score.

The only pitfall with that strategy is that the scene that initially creates the main player must be non-revisitable. If not, then you’ll get additional main player objects every time the user returns to that scene. :slight_smile:

ASync Additive Loading