docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateOrJoinLobbyAsync

    CreateOrJoinLobbyAsync(string, string, int, CreateLobbyOptions)

    Create or join a Lobby with a given name and ID and specified player limit. Async operation.

    Declaration
    Task<Lobby> CreateOrJoinLobbyAsync(string lobbyId, string lobbyName, int maxPlayers, CreateLobbyOptions options = null)
    Parameters
    Type Name Description
    string lobbyId

    ID of the lobby to create/join

    string lobbyName

    Name of the lobby to create/join

    int maxPlayers

    Player limit

    CreateLobbyOptions options

    Optional request parameters

    Returns
    Type Description
    Task<Lobby>

    Lobby data for the lobby that was just created/joined

    Exceptions
    Type Condition
    ArgumentNullException
    InvalidOperationException
    LobbyServiceException
    In This Article
    • CreateOrJoinLobbyAsync(string, string, int, CreateLobbyOptions)
    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)