Search Unity

Putting it all together

Discussion in 'General Discussion' started by davidjstringer, Sep 19, 2019.

  1. davidjstringer

    davidjstringer

    Joined:
    Mar 20, 2019
    Posts:
    6
    Building a single player fps game.

    How do you put all your scenes together? I have a main menu, once you enter the game you watch a animation a a shuttle landing on the top of a building, you the player then exit the shuttle game begins. your mission to steal documents located in the basement of this heavily guarded fortress. your dead scene, complete mission scene.
     
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,013
    Why do you need a scene for each one of these?

    The only time I use scenes is when I can imagine a reasonably lengthy loading screen in between two things. Like the main menu, and the gameplay, for example.

    There's no reason imo to have a new scene for a dead or mission complete event. Is there a need to load tons of stuff when this happens? If it's just a menu and a text banner, no reason for a new scene at all, just freeze time and show your menu.
     
    davidjstringer likes this.
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    Im confused as to what your question is, wouldnt the answer just be: Load and unload them when required?

    What do you mean "put all your scenes together". Are you talking about combining multiple scenes into a single scene at runtime, in editor, or something else entirely?

    Also unless your doing some seriously heavy async loading and unloading with big big assets and therefore require a loading screen, there isnt much point in splitting things up like that in my opinion.
     
    Joe-Censored likes this.
  4. davidjstringer

    davidjstringer

    Joined:
    Mar 20, 2019
    Posts:
    6
    Sorry for the confusion, I am a dyslexic game designer...I have designed the game in seperate scenes, and want to combining multiple scenes into a single scene. I am a beginner coder, but a seasoned designer, just not made a game before, been an ideas man for years, having learned animation, audio production , 3D Modeling and etc...wanted make a game myself.
     
    MadeFromPolygons likes this.
  5. davidjstringer

    davidjstringer

    Joined:
    Mar 20, 2019
    Posts:
    6
    Thx for The advice
     
  6. davidjstringer

    davidjstringer

    Joined:
    Mar 20, 2019
    Posts:
    6
    Thx for taking the time to reply l, I rely appreciate it. I have only been using unity for 6 months, but lack pieces of the the game production puzzle. Your advice will be tak2n on board
     
  7. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,979
    I think you should be able to just copy all the contents of each scene and paste it into the main master scene you want, and then you can load that in one go.

    Alternatively you can use https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadSceneAsync.html with the scene mode set to "additive" https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.Additive.html and then you can load the first scene and then incrementally load them in as you need them so they get added to the main scene.

    Or you could just load and unload scenes as you require them
     
    frosted likes this.
  8. davidjstringer

    davidjstringer

    Joined:
    Mar 20, 2019
    Posts:
    6
     
  9. davidjstringer

    davidjstringer

    Joined:
    Mar 20, 2019
    Posts:
    6
    Thx again for taking the time, I really do appreciate the advice.
     
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If you want to combine scenes, literally making them one scene, just load all the scenes you want to combine in the editor at the same time and just drag all the GameObjects in the hierarchy to the master scene.

    I am a fan though of keeping all functionality that is shared across all your levels in its own scene, then additive load/unload scenes which are level specific. For an FPS that would probably be all the UI and FPS functionality in its own scene, and all the terrain and level specific enemies in their own scenes. When you switch levels you unload the previous level scene, then load the new level scene. I only do this when the levels are pretty large.
     
    MadeFromPolygons likes this.