docs.unity3d.com
    Show / Hide Table of Contents

    Class Player

    Inheritance
    Object
    Player
    Namespace: Unity.Services.Lobbies.Models
    Syntax
    [Preserve]
    public class Player

    Constructors

    Player(String, String, Dictionary<String, PlayerDataObject>, String, DateTime, DateTime)

    Information about a specific player creating, joining, or already in a lobby.

    Declaration
    [Preserve]
    public Player(string id = null, string connectionInfo = null, Dictionary<string, PlayerDataObject> data = null, string allocationId = null, DateTime joined = default(DateTime), DateTime lastUpdated = default(DateTime))
    Parameters
    Type Name Description
    String id

    The unique identifier for the player. If not provided for a create or join request, it will be set to the ID of the caller.

    String connectionInfo

    Connection information for connecting to a relay with this player.

    Dictionary<String, PlayerDataObject> data

    Custom game-specific properties that apply to an individual player (e.g. role or skill).

    String allocationId

    The allocationId from the Relay service which associates this player in this lobby with a persistent connection. When a disconnect notification is received, this value is used to identify the associated player in a lobby to mark them as disconnected.

    DateTime joined

    The time at which the player joined the lobby.

    DateTime lastUpdated

    The last time the metadata for this player was updated.

    Properties

    AllocationId

    The allocationId from the Relay service which associates this player in this lobby with a persistent connection. When a disconnect notification is received, this value is used to identify the associated player in a lobby to mark them as disconnected.

    Declaration
    [Preserve]
    public string AllocationId { get; }
    Property Value
    Type Description
    String

    ConnectionInfo

    Connection information for connecting to a relay with this player.

    Declaration
    [Preserve]
    public string ConnectionInfo { get; }
    Property Value
    Type Description
    String

    Data

    Custom game-specific properties that apply to an individual player (e.g. role or skill).

    Declaration
    [Preserve]
    public Dictionary<string, PlayerDataObject> Data { get; set; }
    Property Value
    Type Description
    Dictionary<String, PlayerDataObject>

    Id

    The unique identifier for the player. If not provided for a create or join request, it will be set to the ID of the caller.

    Declaration
    [Preserve]
    public string Id { get; }
    Property Value
    Type Description
    String

    Joined

    The time at which the player joined the lobby.

    Declaration
    [Preserve]
    public DateTime Joined { get; }
    Property Value
    Type Description
    DateTime

    LastUpdated

    The last time the metadata for this player was updated.

    Declaration
    [Preserve]
    public DateTime LastUpdated { get; set; }
    Property Value
    Type Description
    DateTime
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023