Skip to main content

Class NetworkManager.ConnectionApprovalResponse

Connection Approval Response

Inheritance#

System.Object

NetworkManager.ConnectionApprovalResponse

Inherited Members#

System.Object.Equals(System.Object)

System.Object.Equals(System.Object, System.Object)

System.Object.GetHashCode()

System.Object.GetType()

System.Object.MemberwiseClone()

System.Object.ReferenceEquals(System.Object, System.Object)

System.Object.ToString()

Namespace: Unity.Netcode#
Assembly: MLAPI.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>

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>