Skip to content

Commit 43b7f79

Browse files
committed
docs: Fixed ConnectionApproval arguments
Fixes: #293
1 parent 863af55 commit 43b7f79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/_docs/getting-started/connection-approval.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ private void ApprovalCheck(byte[] connectionData, ulong clientId, MLAPI.Networki
1717
{
1818
//Your logic here
1919
bool approve = true;
20+
bool createPlayerObject = true;
2021

2122
ulong? prefabHash = SpawnManager.GetPrefabHashFromGenerator("MyPrefabHashGenerator"); // The prefab hash. Use null to use the default player prefab
2223
2324
//If approve is true, the connection gets added. If it's false. The client gets disconnected
24-
callback(clientId, prefabHash, approve, positionToSpawnAt, rotationToSpawnWith);
25+
callback(createPlayerObject, prefabHash, approve, positionToSpawnAt, rotationToSpawnWith);
2526
}
2627
```
2728

28-
2929
### Connection data
3030
The connectionData parameter is any custom data of your choice that the client should send to the server. Usually, this should be some sort of ticket, room password or similar that will decide if a connection should be approved or not. The connectionData is specified on the Client side in the NetworkingConfig supplied when connecting. Example:
3131
```csharp

0 commit comments

Comments
 (0)