docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IMultiplaySessionManager

    Provides methods to manage a Game Server Hosting server.

    Namespace: Unity.Services.Multiplayer
    Assembly: Unity.Services.Multiplayer.Server.dll
    Syntax
    [Obsolete("The Multiplay service will cease to operate on March 31st 2026 - For alternative hosting providers, please update to com.unity.services.multiplayer 2.1")]
    public interface IMultiplaySessionManager
    Remarks

    The Multiplay service will cease to operate on March 31st 2026 - For alternative hosting providers, please update to com.unity.services.multiplayer 2.1

    Properties

    Allocation

    The server allocation information.

    Declaration
    ServerAllocation Allocation { get; }
    Property Value
    Type Description
    ServerAllocation

    ConnectionPort

    The connection port for the session. Null when the server is not allocated.

    Declaration
    ushort? ConnectionPort { get; }
    Property Value
    Type Description
    ushort?

    IpAddress

    The connection IP for the session. Null when the server is not allocated.

    Declaration
    [CanBeNull]
    string IpAddress { get; }
    Property Value
    Type Description
    string

    IsReadyForPlayers

    Whether the server is ready to accept players.

    Declaration
    bool IsReadyForPlayers { get; }
    Property Value
    Type Description
    bool
    See Also
    SetPlayerReadinessAsync(bool)

    QueryPort

    The Server Query Protocol Port. Null when the server is not allocated.

    Declaration
    ushort? QueryPort { get; }
    Property Value
    Type Description
    ushort?

    ServerId

    The server ID. Null when the server is not allocated.

    Declaration
    long? ServerId { get; }
    Property Value
    Type Description
    long?

    ServerLogDirectory

    The directory on the server Multiplay will write logs to. Null when the server is not allocated.

    Declaration
    [CanBeNull]
    string ServerLogDirectory { get; }
    Property Value
    Type Description
    string

    Session

    The session being hosted by this server.

    Declaration
    IServerSession Session { get; }
    Property Value
    Type Description
    IServerSession

    State

    Current state of the Multiplay session handler.

    Declaration
    MultiplaySessionManagerState State { get; }
    Property Value
    Type Description
    MultiplaySessionManagerState

    Methods

    GetAllocationPayloadFromJsonAsAsync<TPayload>()

    Gets the payload allocation, in JSON, and deserializes it as the given object.

    Declaration
    Task<TPayload> GetAllocationPayloadFromJsonAsAsync<TPayload>()
    Returns
    Type Description
    Task<TPayload>

    An object representing the payload allocation.

    Type Parameters
    Name Description
    TPayload

    The object to be deserialized as.

    GetAllocationPayloadFromPlainTextAsync()

    Gets the payload allocation as plain text.

    Declaration
    Task<string> GetAllocationPayloadFromPlainTextAsync()
    Returns
    Type Description
    Task<string>

    The payload allocation as plain text.

    SetPlayerReadinessAsync(bool)

    Set the server as ready to receive players.

    Declaration
    Task SetPlayerReadinessAsync(bool isReady)
    Parameters
    Type Name Description
    bool isReady

    True if the server is ready to receive players, false otherwise.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    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)