Search Unity

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

Question NetworkManager spawning players on the host\, but not the clients

Discussion in 'Multiplayer' started by mightybob, Apr 20, 2017.

  1. mightybob


    Mar 23, 2014
    I've got two scenes. Menu and Gameplay. Menu is set as the offline scene, Gameplay is the online scene. NetworkManager is on the Menu scene with DontDestroyOnLoad checked. Auto-spawn player is checked, and the player prefab is set. If you host a game, the player spawns just fine. However, when I connect as the client, the player doesn't spawn. I've tried it in the editor and checked the hierarchy, the client player is simply not there. No errors of any sort, and the client does indeed connect, it's just the client player is not spawning for some reason.

    I do have a few override function's in my NetworkManager, but after I'm done I do base.WhateverFunction(parameters), and since there are no errors there's no reason that base.WhateverFunction shouldn't be being called.

    Any possible reasons as to why this is happening? I am completely stumped. Thanks.

    Edit: After looking at this further, it looks like SyncVars and everything else will also not sync with the client. This only started happening after I moved from using one scene, to two scenes. (Menu and Gameplay) The NetworkManager doesn't touch any other script but itself, so I don't see why moving it would screw things up.
  2. lazy_clap


    Jul 9, 2021
    Hi mightybob,

    i am having what sounds like a similar issue, on my host game the client appears and stands still while i can control the host player as expected, but for some reason when i click my start client on the main menu, the client build doesnt spawn a player at all, this seems odd to me as the client connects to the host when i click start client but they dont have a player to control on the client side themselves. Any insight would be great. thanks