mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Fixed Migration guide.
This commit is contained in:
parent
98a0e23413
commit
71fa8c3281
@ -187,17 +187,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:
|
||||
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`:
|
||||
|
||||
```cs
|
||||
public override void OnServerAddPlayer(NetworkConnection conn, NetworkReader extraMessageReader)
|
||||
public override void OnServerAddPlayer(NetworkConnection conn, AddPlayerMessage extraMessage)
|
||||
{
|
||||
base.OnServerAddPlayer(conn, extraMessageReader);
|
||||
base.OnServerAddPlayer(conn, extraMessage);
|
||||
// your code
|
||||
}
|
||||
```
|
||||
|
||||
Note that in both UNet and Mirror the parameter "extraMessageReader" is optional.
|
||||
Note that in UNet the parameter "extraMessageReader" is optional, but in Mirror it is required.
|
||||
|
||||
### 10. Pick your transport
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user