Loading and handling different levels

How do you handle changing levels? I’ve been messing with unity a bit the past couple weeks, and I have a ‘door’ prefab where when my player collides with it, it loads a new scene, but I can’t figure out how to get the other scene to load the player or his state. I want to be able to collide this one door in the first scene, and have my player instantiate at a connecting door in a new scene.

And where this becomes more of a 2D issue: If I wanted to make more of an open world game (metroid-vania), how would you handle the transition between areas? It seems like you would have your current scene loaded, then when hitting the edge of the screen to start the transition, you would load the new scene, pan the camera over, then destroy the previous scene, but to my knowledge this isn’t possible in Unity. I suppose your whole game could be one giant scene, but this seems like a bad idea.

Well if you are using Unity Pro…

But I’m assuming you’re not using Unity Pro, so in this case you have 2 choices…

  1. Each level is contained within its own scene. Pros: automatic loading/unloading of resources. Cons: user has to wait for the next scene to load
  2. All levels are contained within the same single scene. Pros: No waiting and seamless transition between levels. Cons: manual loading/unloading of resources

I think you want to attempt #2 above. Well the tricky part will be that you will need to keep track of ALL objects in your game and know WHEN to unload them, then load new objects. You should also be able to REUSE some of the common objects across levels by simply re-positioning them in the correct spot for the next level.

If you’re interested in buying some plugins from the asset store to help you with this, just let me know.