Skip to main content

Unity.Netcode.NetworkManager.ConnectionApprovalResponse

Connection Approval Response

Inheritance

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Inherited Members

Object.ToString()

Object.Equals(Object)

Object.Equals(Object, Object)

Object.ReferenceEquals(Object, Object)

Object.GetHashCode()

Object.GetType()

Object.MemberwiseClone()

Namespace: System.Dynamic.ExpandoObject

Assembly: Netcode.dll

Syntax

public class ConnectionApprovalResponse

Fields

Approved

Whether or not the client was approved

Declaration

public bool Approved

Field Value

TypeDescription
System.Boolean

CreatePlayerObject

If true, a player object will be created. Otherwise the client will have no object.

Declaration

public bool CreatePlayerObject

Field Value

TypeDescription
System.Boolean

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.

Declaration

public bool Pending

Field Value

TypeDescription
System.Boolean

PlayerPrefabHash

The prefabHash to use for the client. If createPlayerObject is false, this is ignored. If playerPrefabHash is null, the default player prefab is used.

Declaration

public uint? PlayerPrefabHash

Field Value

TypeDescription
System.Nullable\<System.UInt32>

Position

The position to spawn the client at. If null, the prefab position is used.

Declaration

public Vector3? Position

Field Value

TypeDescription
System.Nullable\<Vector3>

Reason

Optional reason. If Approved is false, this reason will be sent to the client so they know why they were not approved.

Declaration

public string Reason

Field Value

TypeDescription
System.String

Rotation

The rotation to spawn the client with. If null, the prefab position is used.

Declaration

public Quaternion? Rotation

Field Value

TypeDescription
System.Nullable\<Quaternion>