docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkManager.ConnectionApprovalResponse

    Connection Approval Response

    Inheritance
    Object
    NetworkManager.ConnectionApprovalResponse
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Netcode
    Syntax
    public class ConnectionApprovalResponse

    Fields

    Approved

    Whether or not the client was approved

    Declaration
    public bool Approved
    Field Value
    Type Description
    Boolean

    CreatePlayerObject

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

    Declaration
    public bool CreatePlayerObject
    Field Value
    Type Description
    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
    Type Description
    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
    Type Description
    Nullable<UInt32>

    Position

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

    Declaration
    public Vector3? Position
    Field Value
    Type Description
    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
    Type Description
    String

    Rotation

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

    Declaration
    public Quaternion? Rotation
    Field Value
    Type Description
    Nullable<Quaternion>
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023