docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor CreateRequest

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

    The body of a Create Lobby request.

    Declaration
    [Preserve]
    public CreateRequest(string name, int maxPlayers, bool? isPrivate = false, bool? isLocked = false, Player player = null, Dictionary<string, DataObject> data = null, string password = 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.

    int maxPlayers

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

    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.

    bool? isLocked

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

    Player player

    player param

    Dictionary<string, DataObject> data

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

    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.

    In This Article
    Back to top
    Copyright © 2023 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)