Search Unity

Using Scenes in Unity. Do I need them?

Discussion in 'Getting Started' started by Sparticus, Nov 29, 2020.

  1. Sparticus

    Sparticus

    Joined:
    Mar 15, 2014
    Posts:
    149
    Hey guys,

    No matter how much I read about scenes in Unity I'm still lost.

    I am making a Tower Defense game. When you first load the game you will not be thrown right into a tower defense map.... instead you'll be at the home screen where you can view the store, view your profile, see daily quests, view a lobby or current maps to play, etc.

    I am still new to Unity and have never used scenes before. Is this where I should be using scenes? One scene would be all the menu stuff (visiting the store, view daily quests, etc).... and another scene would be the actual tower defense game where they build towers and shoot enemies.

    Seems obvious to use scenes here.... I think. But from what I've read passing data between scenes is not super trivial. In my game, when they are in the main lobby, I want them to "choose a map" which in turn would load a specific tower defense map. That means I'd need to pass all the details to the other scene so it would know what details to load from the server.

    So as you can see, although the lobby and the actual game are 2 different things, they will need to communicate easily between each other.

    Is this when scenes should be used? Or should I just make the menu/lobby/game all in the same scene and just enable/disable the parts I need at any specific time?

    Thanks!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes. Menu stuff in one scene, actual game in another.
     
    Joe-Censored likes this.
  3. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    @JoeStrout Did you get the PM I sent you last week?