docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ConnectionEventData

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Netcode
    Assembly: Unity.Netcode.Runtime.dll
    Syntax
    public struct ConnectionEventData

    Fields

    ClientId

    The client ID for the client that just connected For the ClientConnected and ClientDisconnected events on the client side, this will be LocalClientId. On the server side, this will be the ID of the client that just connected.

    For the PeerConnected and PeerDisconnected events on the client side, this will be the client ID assigned by the server to the remote peer.

    Declaration
    public ulong ClientId
    Field Value
    Type Description
    ulong

    EventType

    Declaration
    public ConnectionEvent EventType
    Field Value
    Type Description
    ConnectionEvent

    PeerClientIds

    This is only populated in ClientConnected on the client side, and contains the list of other peers who were present before you connected. In all other situations, this array will be uninitialized.

    Declaration
    public NativeArray<ulong> PeerClientIds
    Field Value
    Type Description
    NativeArray<ulong>
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)