- Home /
UNet: NetworkManager is not automatically spawning the player prefab when a client connects (though it does spawn the host-player)
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.