Class NetworkManager.ConnectionApprovalResponse
Connection Approval Response
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public class NetworkManager.ConnectionApprovalResponse
Fields
Name | Description |
---|---|
Approved | Whether or not the client was approved |
Create |
If true, a player object will be created. Otherwise the client will have no object. |
Pending | If the Approval decision cannot be made immediately, the client code can set Pending to true, keep a reference to the ConnectionApprovalResponse object and write to it later. Client code must exercise care to setting all the members to the value it wants before marking Pending to false, to indicate completion. If the field is set as Pending = true, we'll monitor the object until it gets set to not pending anymore and use the parameters then. |
Player |
The prefabHash to use for the client. If createPlayerObject is false, this is ignored. If playerPrefabHash is null, the default player prefab is used. |
Position | The position to spawn the client at. If null, the prefab position is used. |
Reason | Optional reason. If Approved is false, this reason will be sent to the client so they know why they were not approved. |
Rotation | The rotation to spawn the client with. If null, the prefab position is used. |