docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MatchmakerServerExtensions

    Extension methods of SessionOptions that can be used the manage the state of the matchmaking on the server side.

    Inheritance
    object
    MatchmakerServerExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Multiplayer
    Assembly: Unity.Services.Multiplayer.Server.dll
    Syntax
    public static class MatchmakerServerExtensions

    Methods

    StartBackfillingAsync(ISession)

    Starts the backfilling process of a session that was created through matchmaking and the Matchmaker service.

    Declaration
    public static Task StartBackfillingAsync(this ISession session)
    Parameters
    Type Name Description
    ISession session

    The session to start the backfilling process on.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    StopBackfillingAsync(ISession)

    Stops the backfilling process of a session that was created through matchmaking and the Matchmaker service.

    Declaration
    public static Task StopBackfillingAsync(this ISession session)
    Parameters
    Type Name Description
    ISession session

    The session to stop the backfilling process on.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    WithBackfillingConfiguration<T>(T, bool, bool, bool, int)

    [Obsolete] Use the method WithBackfillingConfiguration with 5 parameters.

    Declaration
    [Obsolete("This method is missing the `playerConnectionTimeout` parameter and is actually setting `backfillingLoopInterval` as `playerConnectionTimeout`. Use WithBackfillingConfiguration with 5 parameters instead.")]
    public static T WithBackfillingConfiguration<T>(this T options, bool enable, bool automaticallyRemovePlayers = true, bool autoStart = true, int backfillingLoopInterval = 1) where T : SessionOptions
    Parameters
    Type Name Description
    T options

    The SessionOptions this extension method applies to.

    bool enable

    Enables or disables the backfilling for the session that will be created with the SessionOptions.

    bool automaticallyRemovePlayers

    Automatically remove the player from the state of the match or not. Setting this to true will enable automatically requesting players to backfill once a player leaves.

    bool autoStart

    Automatically starts or not the backfilling process at the creation of the sessions if it is not full.

    int backfillingLoopInterval

    This parameter actually sets playerConnectionTimeout, this method is obsolete.

    Returns
    Type Description
    T

    The SessionOptions.

    Type Parameters
    Name Description
    T

    The options' type.

    WithBackfillingConfiguration<T>(T, bool, bool, bool, int, int)

    Allows configuring the Backfilling of a session that was created through matchmaking and the Matchmaker service.

    Declaration
    public static T WithBackfillingConfiguration<T>(this T options, bool enable, bool automaticallyRemovePlayers, bool autoStart, int playerConnectionTimeout, int backfillingLoopInterval) where T : SessionOptions
    Parameters
    Type Name Description
    T options

    The SessionOptions this extension method applies to.

    bool enable

    Enables or disables the backfilling for the session that will be created with the SessionOptions.

    bool automaticallyRemovePlayers

    Automatically remove the player from the state of the match or not. Setting this to true will enable automatically requesting players to backfill once a player leaves. Suggested value: true.

    bool autoStart

    Automatically starts or not the backfilling process at the creation of the sessions if it is not full. Suggested value: true.

    int playerConnectionTimeout

    The time in seconds allowed for the player to connect before being removed from the backfill. Suggested value: 30s.

    int backfillingLoopInterval

    The interval in seconds between each approval of a backfilling ticket. Suggested value: 1s.

    Returns
    Type Description
    T

    The SessionOptions.

    Type Parameters
    Name Description
    T

    The options' type.

    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)