docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SubscribeToLobbyEventsAsync

    SubscribeToLobbyEventsAsync(string, LobbyEventCallbacks)

    A subscription to the given lobby is created and the given callbacks are associated with it. The return ILobbyEvents interface can be used to unsubscribe and re-subscribe to the connection. The callbacks object provided will be used to provide the notifications from the subscription.

    Declaration
    Task<ILobbyEvents> SubscribeToLobbyEventsAsync(string lobbyId, LobbyEventCallbacks callbacks)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby you are subscribing to events for.

    LobbyEventCallbacks callbacks

    The callbacks you provide, which will be called as notifications arrive from the subscription.

    Returns
    Type Description
    Task<ILobbyEvents>

    An interface to change the callbacks associated with the subscription, or to unsubscribe and re-subscribe to the lobby's events.

    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)