multi-level (map) setup?

It’s been a looooong time since I’ve done anything with Unity but am feeling the itch to get back into it. Hopefully I’m not forgetting something obvious.

This is kind of an abstract question but it keeps burning in my mind so I figured I’d toss it out here and see what sort of response I get.

I want to attempt to build an online shooter. My question is that by nature, these types of games usually have a ‘core’ gameplay (characters, HUD, scoring, etc) that is played out on a variety of maps/levels.

For maps, I’m planning on building them out using terrains as the base, with models creating the detail. I’m reading that I’d use scenes for this?

Here’s the rub… I would need to have a lot of things that are always there, regardless of which map is being played… HUD stuff, core gameplay code, characters, etc. From my understanding, each scene is it’s own entity. I’m trying to avoid having to include all of these things in each map (so that if I change the HUD, I don’t have to change it in each scene).

So does anyone have any insight as to how multiple maps/levels/scenes are handled?

What I’d do is put the “stuff” used for all levels into one or a few prefabs that you include in each scene. That way, while you do have “a few things” added in every scene, there are no problems when you do changes because those changes are automatically inherited to all scenes.

As an addendum to what Jashan wrote, for things like your player prefab, you can either recreate it at the beginning of each level, or specify GameObject.DontDestroyOnLoad(gameObject) somewhere on the prefab. You’d then move it to some spawn point specified in the scene in OnLevelWasLoaded(), if you want to keep track of what weapons are available to the player, what avatar they’ve chosen, and et&c. slightly more easily. It also saves you a Network.Instantiate() call.

Great! Thanks for the help. I do remember playing with prefabs a bit. Makes sense. My plan is to create one simple level and try to get the core gameplay working there, then I can consolidate what needs to be in prefabs and get it going across different scenes.