Code (CSharp):
- public class TestNetworkManager : NetworkManager {
- public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
- {
- GameObject proxyPlayer = (GameObject)Instantiate(playerPrefab,playerPrefab.transform.position,playerPrefab.transform.rotation);
- NetworkServer.AddPlayerForConnection(conn, proxyPlayer, playerControllerId);
- }
- }
Spawning clients with the correct rotation