mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Method parameters were changed in Mirror (#351)
Updated to match current Mirror
This commit is contained in:
parent
1a5ce38163
commit
d168903a3a
@ -26,11 +26,11 @@ using Mirror;
|
||||
|
||||
public class MyNetworkManager : NetworkManager
|
||||
{
|
||||
public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
|
||||
public override void OnServerAddPlayer(NetworkConnection conn)
|
||||
{
|
||||
GameObject player = (GameObject)Instantiate(playerPrefab, Vector3.zero, Quaternion.identity);
|
||||
player.GetComponent<Player>().color = Color.red;
|
||||
NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);
|
||||
NetworkServer.AddPlayerForConnection(conn, player, conn.playerControllerId);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user