docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CreateRequest

    The body of a Create Lobby request.

    Inheritance
    object
    CreateRequest
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Lobbies
    Assembly: solution.dll
    Syntax
    [Preserve]
    public class CreateRequest

    Constructors

    CreateRequest(string, int, bool?, bool?, Player, string, Dictionary<string, DataObject>)

    Initializes a new instance of the CreateRequest class.

    Declaration
    [Preserve]
    public CreateRequest(string name = null, int maxPlayers = 0, bool? isPrivate = false, bool? isLocked = false, Player player = null, string password = null, Dictionary<string, DataObject> data = null)
    Parameters
    Type Name Description
    string name

    The name of the lobby that should be displayed to users. All whitespace will be trimmed from the name. (required).

    int maxPlayers

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

    bool? isPrivate

    Whether or not the lobby is private. Private lobbies do not appear in query results and cannot be fetched by non-members using the GetLobby API. If the lobby is not publicly visible, the creator can share the lobbyCode with other users who can use it to join this lobby. (default to false).

    bool? isLocked

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

    Player player

    player.

    string password

    The password for this lobby. If specified, the lobby will be created with HasPassword set to true. All joins will be rejected unless provided password matches..

    Dictionary<string, DataObject> data

    Custom game-specific properties that apply to the lobby (e.g. mapName or gameType)..

    Properties

    Data

    Custom game-specific properties that apply to the lobby (e.g. mapName or gameType).

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

    Custom game-specific properties that apply to the lobby (e.g. mapName or gameType).

    IsLocked

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

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

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

    IsPrivate

    Whether or not the lobby is private. Private lobbies do not appear in query results and cannot be fetched by non-members using the GetLobby API. If the lobby is not publicly visible, the creator can share the lobbyCode with other users who can use it to join this lobby.

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

    Whether or not the lobby is private. Private lobbies do not appear in query results and cannot be fetched by non-members using the GetLobby API. If the lobby is not publicly visible, the creator can share the lobbyCode with other users who can use it to join this lobby.

    MaxPlayers

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

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

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

    Name

    The name of the lobby that should be displayed to users. All whitespace will be trimmed from the name.

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

    The name of the lobby that should be displayed to users. All whitespace will be trimmed from the name.

    Password

    The password for this lobby. If specified, the lobby will be created with HasPassword set to true. All joins will be rejected unless provided password matches.

    Declaration
    [Preserve]
    public string Password { get; set; }
    Property Value
    Type Description
    string

    The password for this lobby. If specified, the lobby will be created with HasPassword set to true. All joins will be rejected unless provided password matches.

    Player

    Gets or Sets Player

    Declaration
    [Preserve]
    public Player Player { get; set; }
    Property Value
    Type Description
    Player
    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)