Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to load multiple online scenes in unet multiplayer?

Discussion in 'UNet' started by Who-am-I, Jan 13, 2016.

  1. Who-am-I

    Who-am-I

    Joined:
    Mar 29, 2014
    Posts:
    73
    Hi,

    I am facing a problem in multiplayer(using by unet) game. I have 4 scenes in my game.

    Scene 0 - Menu
    Scene 1 - Level 1
    Scene 2 - Level 2
    Scene 3 - Level 3

    I assign menu and Level1 scene in Network Manager.
    Offline Scene = Menu Scene
    Online Scene = Level1 Scene

    When I click on host(as a client) online scene(Level1) loads.
    In Level1, I have a button in Scene-1(Level1) to load another scene(Level2).

    Code (CSharp):
    1. void OnClick()
    2. {
    3.    
    4. Application.LoadLevel(2);   //2 is my Level2 scene
    5. }
    After clicking on the button Network gets disconnected.
    How to load multiple online scenes in unet multiplayer?
     
  2. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
  3. Who-am-I

    Who-am-I

    Joined:
    Mar 29, 2014
    Posts:
    73
  4. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
    You're welcome, glad it helped :)