v1.0.0
Latest
2022.3+

Class MatchmakerServerExtensions

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

Inheritance
System.Object
MatchmakerServerExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Unity.Services.Multiplayer
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
TypeNameDescription
ISessionsession

The session to start the backfilling process on.

Returns
TypeDescription
System.Threading.Tasks.Task

A System.Threading.Tasks.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
TypeNameDescription
ISessionsession

The session to stop the backfilling process on.

Returns
TypeDescription
System.Threading.Tasks.Task

A System.Threading.Tasks.Task representing the asynchronous operation.

WithBackfillingConfiguration<T>(T, Boolean, Boolean, Boolean, Int32)

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 = true, bool autoStart = true, int backfillingLoopInterval = 1)
    where T : SessionOptions
Parameters
TypeNameDescription
Toptions

The SessionOptions this extension method applies to.

System.Booleanenable

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

System.BooleanautomaticallyRemovePlayers

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.

System.BooleanautoStart

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

System.Int32backfillingLoopInterval

The interval in seconds between each approval of a backfilling ticket.

Returns
TypeDescription
T

The SessionOptions.

Type Parameters
NameDescription
T

The SessionOptions' type.