mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Updated Migration doc
This commit is contained in:
parent
096a23217e
commit
f855833c1c
@ -191,17 +191,17 @@ public override void OnServerAddPlayer(NetworkConnection conn, short playerContr
|
||||
}
|
||||
```
|
||||
|
||||
In your newly Mirror-capable NetworkManager, if you are using the `OnServerAddPlayer` override, remove the "playerControllerId" parameter from your override and the base call, and change the `NetworkReader` into `AddPlayerMessage`:
|
||||
In your newly Mirror-capable NetworkManager, if you are using the `OnServerAddPlayer` override, remove the "playerControllerId" and "extraMessageReader" parameters from your override and the base call:
|
||||
|
||||
```cs
|
||||
public override void OnServerAddPlayer(NetworkConnection conn, AddPlayerMessage extraMessage)
|
||||
public override void OnServerAddPlayer(NetworkConnection conn)
|
||||
{
|
||||
base.OnServerAddPlayer(conn, extraMessage);
|
||||
base.OnServerAddPlayer(conn);
|
||||
// your code
|
||||
}
|
||||
```
|
||||
|
||||
Note that in UNet the parameter "extraMessageReader" is optional, but in Mirror it is required.
|
||||
See [Custom Player Spawn Guide](../Guides/GameObjects/SpawnPlayerCustom.md) for details on how to submit custom characters now.
|
||||
|
||||
### 11. Pick your transport
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user