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.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
359 People are following this question.
Can i Call Additive Scene On Network
Networking RPC sends to wrong target
Unity crashing efter losing connection to other Unity
WWW with https resulting in SSL: couldn't create a context
[UNET] Only spawn certain server objects on local client?