Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to best handle different level/courses when loading a game

Discussion in 'Game Design' started by eliasjgnilsson, Nov 11, 2021.

  1. eliasjgnilsson

    eliasjgnilsson

    Joined:
    Mar 1, 2021
    Posts:
    77
    Hi all,

    I am developing a golf game where the player should be able to chose and play different courses. I currently have a main menu scene handling all the selecting stuff and when the user presses play he gets to the Course scene (I just have one course right now).

    The Course scene is structured like this:

    upload_2021-11-11_14-4-48.png

    What would you say is the best way to load different courses/maps? Here are my current options I am considering:

    1. Have one scene for each course with the COURSE X loaded. Then making all other stuff into a common-prefab which is loaded when the scene is loaded (so I don't have to change the same things in all scenes if I want to change for example the UI).

    2. Have the courses as different prefabs and load it in on start up.

    If it matters I use Photon PUN to make this into a multiplayer game and loading the scene with
    Code (CSharp):
    1. PhotonNetwork.LoadLevel("Course");
    from a Photon room.
     
  2. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    I’d do whatever is easiest in your workflow.

    Loading assets like a HUD isn’t worth the effort to code around.

    Just force the garbage collector at good times like when doing a flyby of the course.