Code (CSharp):
- private void OnServerAddPlayer(NetworkConnection networkConnection, short controllerId)
- {
- var go = (GameObject)Instantiate(_vehicle, _spawnPoint.position, _spawnPoint.rotation);
- NetworkServer.SpawnWithClientAuthority(go, networkConnection);
- }
I know that this is an expected behavior as stated in http://docs.unity3d.com/Manual/UNetSpawning.html...
hasAuthority returns false on host after using SpawnWithClientAuthority.