Search Unity

Help Wanted Switching Scenes

Discussion in 'Multiplayer' started by WaldoX, Sep 22, 2021.

  1. WaldoX

    WaldoX

    Joined:
    Sep 1, 2015
    Posts:
    38
    new to multiplayer in unity. I am trying to create a host button that makes it go to a different scene, where the player spawn in.
     
  2. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    130
    Code (Csharp):
    1.  
    2. SceneManagrer.LoadScene("Scene name here");
    3.  
     
  3. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    130
    Also, are you doing a mutiplayer game? If you are a begginer you shouldn't make one.
    I consider myself as a medium-advanced gamedev and I still have problems with multiplayer.
    Try out singleplayer
     
  4. somedevelopergg

    somedevelopergg

    Joined:
    Oct 29, 2020
    Posts:
    25
    its a complicated thing, i dont even know how exactly do it.
    but something like that:

    save the players data,
    delete the player,
    load another scene,
    spawn the players.

    there is many things to do it work, sadly.
     
  5. WaldoX

    WaldoX

    Joined:
    Sep 1, 2015
    Posts:
    38
    how do i spawn the player into a different scene.
    this is what i did but did not work. i made two C# one for host button where it start hosting the server and the second one is for changing the scene. but when i try clicking the button and load the scene but no player was not spawning.
     
  6. r31o

    r31o

    Joined:
    Jul 29, 2021
    Posts:
    130
    The problem will be that there is not any player in that scene.
     
  7. WaldoX

    WaldoX

    Joined:
    Sep 1, 2015
    Posts:
    38
    do i have to make a script where you have to delete the player from the main menu on to the level scene?
     
unityunity