docs.unity3d.com
    Show / Hide Table of Contents

    Class Lobby

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

    Constructors

    Lobby(String, String, String, String, String, Int32, Int32, Boolean, Boolean, List<Player>, Dictionary<String, DataObject>, String, DateTime, DateTime)

    Data about an individual lobby.

    Declaration
    [Preserve]
    public Lobby(string id = null, string lobbyCode = null, string upid = null, string environmentId = null, string name = null, int maxPlayers = 0, int availableSlots = 0, bool isPrivate = false, bool isLocked = false, List<Player> players = null, Dictionary<string, DataObject> data = null, string hostId = null, DateTime created = default(DateTime), DateTime lastUpdated = default(DateTime))
    Parameters
    Type Name Description
    String id

    id param

    String lobbyCode

    A short code that can be used to join a lobby. This is only visible to lobby members. Typically this is displayed to the user so they can share it with other players out-of-game. Users with the code can join a lobby even when it is private.

    String upid

    The Unity project ID of the game.

    String environmentId

    The ID of the environment this lobby exists in.

    String name

    The name of the lobby. Typically this is shown in game UI to represent the lobby.

    Int32 maxPlayers

    The maximum number of players that can be members of the lobby.

    Int32 availableSlots

    The number of remaining open slots for players before the lobby becomes full.

    Boolean isPrivate

    Whether or not the lobby is private. Private lobbies do not appear in query results.

    Boolean isLocked

    Whether or not the lobby is locked. If true, new players will not be able to join.

    List<Player> players

    The members of the lobby.

    Dictionary<String, DataObject> data

    Properties of the lobby set by the host.

    String hostId

    The ID of the player that is the lobby host.

    DateTime created

    When the lobby was created. The timestamp is in UTC and conforms to ISO 8601.

    DateTime lastUpdated

    When the lobby was last updated. The timestamp is in UTC and conforms to ISO 8601.

    Properties

    AvailableSlots

    The number of remaining open slots for players before the lobby becomes full.

    Declaration
    [Preserve]
    public int AvailableSlots { get; }
    Property Value
    Type Description
    Int32

    Created

    When the lobby was created. The timestamp is in UTC and conforms to ISO 8601.

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

    Data

    Properties of the lobby set by the host.

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

    EnvironmentId

    The ID of the environment this lobby exists in.

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

    HostId

    The ID of the player that is the lobby host.

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

    Id

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

    IsLocked

    Whether or not the lobby is locked. If true, new players will not be able to join.

    Declaration
    [Preserve]
    public bool IsLocked { get; }
    Property Value
    Type Description
    Boolean

    IsPrivate

    Whether or not the lobby is private. Private lobbies do not appear in query results.

    Declaration
    [Preserve]
    public bool IsPrivate { get; }
    Property Value
    Type Description
    Boolean

    LastUpdated

    When the lobby was last updated. The timestamp is in UTC and conforms to ISO 8601.

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

    LobbyCode

    A short code that can be used to join a lobby. This is only visible to lobby members. Typically this is displayed to the user so they can share it with other players out-of-game. Users with the code can join a lobby even when it is private.

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

    MaxPlayers

    The maximum number of players that can be members of the lobby.

    Declaration
    [Preserve]
    public int MaxPlayers { get; }
    Property Value
    Type Description
    Int32

    Name

    The name of the lobby. Typically this is shown in game UI to represent the lobby.

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

    Players

    The members of the lobby.

    Declaration
    [Preserve]
    public List<Player> Players { get; }
    Property Value
    Type Description
    List<Player>

    Upid

    The Unity project ID of the game.

    Declaration
    [Preserve]
    public string Upid { get; }
    Property Value
    Type Description
    String
    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