Skip to main content

Unity.Netcode.NetworkManager.ConnectionApprovedDelegate

Delegate type called when connection has been approved. This only has to be set on the server.

Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
public delegate void ConnectionApprovedDelegate(bool createPlayerObject, uint? playerPrefabHash, bool approved, Vector3? position, Quaternion? rotation);
Parameters#
TypeNameDescription
System.Boolean*createPlayerObjectIf true, a player object will be created. Otherwise the client will have no object.
System.Nullable\<System.UInt32>*playerPrefabHashThe prefabHash to use for the client. If createPlayerObject is false, this is ignored. If playerPrefabHash is null, the default player prefab is used.
System.Boolean*approvedWhether or not the client was approved
System.Nullable\<Vector3>*positionThe position to spawn the client at. If null, the prefab position is used.
System.Nullable\<Quaternion>*rotationThe rotation to spawn the client with. If null, the prefab position is used.