docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IMultiplayerServerService

    Facade for session browsing, session management and matchmaking.

    Namespace: Unity.Services.Multiplayer
    Assembly: solution.dll
    Syntax
    public interface IMultiplayerServerService

    Methods

    CreateMatchSessionAsync(string, SessionOptions)

    Creates a server session handle with a matchmaker match id. The id must be valid and the matchmaker results will be fetched.

    Declaration
    Task<IServerSession> CreateMatchSessionAsync(string matchId, SessionOptions sessionOptions)
    Parameters
    Type Name Description
    string matchId

    The matchmaker match id

    SessionOptions sessionOptions

    The session options to be used for creation

    Returns
    Type Description
    Task<IServerSession>

    The server session

    Exceptions
    Type Condition
    SessionException

    Provides a specific session error type and error message.

    CreateSessionAsync(string, SessionOptions)

    Creates a server session handle with a custom session id.

    Declaration
    Task<IServerSession> CreateSessionAsync(string sessionId, SessionOptions sessionOptions)
    Parameters
    Type Name Description
    string sessionId

    The session id

    SessionOptions sessionOptions

    The session options to be used for creation

    Returns
    Type Description
    Task<IServerSession>

    The server session

    Exceptions
    Type Condition
    SessionException

    Provides a specific session error type and error message.

    CreateSessionAsync(SessionOptions)

    Creates a server session.

    Declaration
    Task<IServerSession> CreateSessionAsync(SessionOptions sessionOptions)
    Parameters
    Type Name Description
    SessionOptions sessionOptions

    The options for the resulting session

    Returns
    Type Description
    Task<IServerSession>

    The created server session

    Exceptions
    Type Condition
    SessionException

    Provides a specific session error type and error message.

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