Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How does FPS Sample menu load

Discussion in 'FPS.Sample Game' started by Yvaynne, Sep 26, 2019.

  1. Yvaynne

    Yvaynne

    Joined:
    Aug 30, 2019
    Posts:
    4
    Hi, so i'm fairly new to making multiplayer games and I wanted to dissect unity's FPS sample to give me a bit of insight to how this was made and my approach was going through the menus.

    So for the Level_Menu level I tried to find the UI Canvas for the game's menu but couldn't figure out how it was loading the "Don't Destroy On Load" despite me disabling all entities in the scene. (I was trying to figure out which object had the script to load the menu), does anyone know how this works? It might be a dumb question but it's better than knowing nothing.
     
  2. Aquastar

    Aquastar

    Joined:
    Jul 17, 2013
    Posts:
    25
    Do you mean

    Code (CSharp):
    1.  clientFrontend = go.GetComponentInChildren<ClientFrontend>();
    in Scripts/Game/Main/Game.cs?
     
  3. Yvaynne

    Yvaynne

    Joined:
    Aug 30, 2019
    Posts:
    4
    Thank you, but how does game.cs run/ get instantiated on some levels? Sorry it's just new to me.
     
  4. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    155
    Boot - There is a Boot Scene.

    When you run the game in the editor, you will see a bootstrapper scene which always gets loaded (game prefab inside that, drives the rest). Check that path out, and you will see how things go down.

    Sorry, I don't have time at the moment to go into more detail.

    CHeers
    Micah
     
    Yvaynne likes this.
  5. Yvaynne

    Yvaynne

    Joined:
    Aug 30, 2019
    Posts:
    4
    Thanks! that's the one
     
    AggressiveMastery likes this.