Search Unity

How to properly create/bundle/load a new level scene?

Discussion in 'FPS.Sample Game' started by galactiform_joshua, Nov 9, 2018.

  1. galactiform_joshua

    galactiform_joshua

    Joined:
    May 16, 2018
    Posts:
    3
    First of all, thank you for creating and releasing this project; there is a lot of great stuff here! I'm currently digging through the project with the goal of isolating features I'd like to use or at least learn how they work, especially when it comes to networking. My approach is to create a new level scene so I can find the core features required to run. I was able to get a simple scene working in editor. Unfortunately, I can't seem to bundle the new level scene so I'm not able to test it with a server and multiple clients. Any help would be much appreciated.

    These are the steps I took to set up the level scene and bundle:

    1) Create a new empty scene then add a Quad (floor) and a Directional Light.
    2) Create a LevelInfo object named the same as the scene created above.
    3) In LevelInfo assign "Main_scene" to the one created above.
    4) In LevelInfo select "Gameplay" as the "Level Type".
    5) In the Project Tools window click "Update Registry" then reload the window if the new level scene doesn't automatically show in the list. (NOTE: I'm not sure this step was necessary but it's what I did)
    6) In the Project Tools window select "Single level building".
    7) Click the button that corresponds to bundling the new level scene created above.
    8) Notice the progress bar for building stops at about 25% and doesn't seem to show any info/errors in the editor console.

    Thanks,
    Joshua Thom
     
    Last edited: Nov 9, 2018
    sasa42 likes this.
  2. galactiform_joshua

    galactiform_joshua

    Joined:
    May 16, 2018
    Posts:
    3
    After some random poking I found that closing Unity and reopening allowed me to bundle the new level scene. I was then able to use the quickstart launcher to load it with a server and multiple clients.

    These are the new steps I used which are very similar but worked without relaunching Unity (so maybe the first bundle failure was a fluke):

    1) Create a new folder for your scene under "Scenes" and create a new scene within.
    2) With the new scene folder selected create a new LevelInfo object using Assets->Create->FPS Sample->Level->LevelInfo.
    3) Rename the LevelInfo object so that is has the same name as the scene created above.
    4) In LevelInfo assign the new scene created above to the "Main_scene" field.
    5) In LevelInfo ensure "Level Type" is set to "Gameplay".
    6) Open up the Project Tools window from FPS Sample->Windows->Project Tools.
    NOTE: If the Project Tools window was already open before you may need to relaunch it for your new level scene to show.
    7) Click the box to enable "Single level building".
    8) Click on the button to [force] bundle the new level scene.
    9) Once the new level scene is bundled you can select in the drop down under Quick Start -> Level.
    10) Run the game with your desired configuration and the new level scene should load as expected.

    This works for now but if anyone knows if the above steps are not quite correct or if it fails to bundle I'd love to know.

    Thanks,
    Joshua Thom
     
    Last edited: Nov 10, 2018
    sasa42 likes this.
  3. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Hello Joshua! I ran into a few issues and ended up making a youtube video on getting this going. I link-ed this post, and wanted to share and Thank you!



    Cheers -Micah
     
  4. galactiform_joshua

    galactiform_joshua

    Joined:
    May 16, 2018
    Posts:
    3
    Great idea to make a video Micah! Thanks for putting this together and sharing the knowledge.
     
    AggressiveMastery likes this.