// Start is called before the first frame update void Start() { syncFromClients = GetComponent <NetworkSyncToHost>(); // create host int playerNum = 0; hostPlayer = CreatePlayer(-1, ref playerNum); // create other players foreach (int peerID in GameController.Instance.host.Peers) { clientPlayers[peerID] = CreatePlayer(peerID, ref playerNum); } }
// Start is called before the first frame update void Start() { syncToHost = GetComponent <NetworkSyncToHost>(); }