v1.0.0
Latest
2022.3+

Class BackfillingConfiguration

Allow to configure the backfilling behavior on the session.

Inheritance
System.Object
BackfillingConfiguration
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 class BackfillingConfiguration

Properties

AutomaticallyRemovePlayers

Define if players leaving the session are automatically removed from the backfill. If set to false, players leaving the session will stay in the backfill ticket preventing them from joining again.

Declaration
public bool AutomaticallyRemovePlayers { get; }
Property Value
TypeDescription
System.Boolean

AutoStart

Define if the backfilling will start automatically when a player is missing. If set to false, it is possible to start backfilling manually using StartBackfilling() on the Session.

Declaration
public bool AutoStart { get; }
Property Value
TypeDescription
System.Boolean

BackfillingLoopInterval

The time between each backfill approval request. Default value is 1 second. Value is invalid if below 0

Declaration
public int BackfillingLoopInterval { get; }
Property Value
TypeDescription
System.Int32

Enable

Allow the matchmaker to backfill the session if it is not full, not locked, and not private.

Declaration
public bool Enable { get; set; }
Property Value
TypeDescription
System.Boolean

PlayerConnectionTimeout

The time in seconds that a player who was added from backfilling has to connect to a session before being automatically removed. Default value is 30 seconds. If value is set to 0, the player will never be removed.

Declaration
public int PlayerConnectionTimeout { get; set; }
Property Value
TypeDescription
System.Int32

Methods

WithBackfillingConfiguration(Boolean, Boolean, Boolean, Int32, Int32)

Create a backfilling configuration.

Declaration
public static BackfillingConfiguration WithBackfillingConfiguration(bool enable = true, bool automaticallyRemovePlayers = true, bool autoStart = true, int playerConnectionTimeout = 30, int backfillingLoopInterval = 1)
Parameters
TypeNameDescription
System.Booleanenable

Allow the matchmaker to backfill the session if it is not full, not locked and not private.

System.BooleanautomaticallyRemovePlayers

Define if players leaving the session are automatically removed from the backfill. If set to false, players leaving the session will stay in the backfill ticket preventing them from joining again.

System.BooleanautoStart

Define if the backfilling will start automatically when a player is missing. If set to false, it is possible to start backfilling manually using StartBackfilling() on the Session.

System.Int32playerConnectionTimeout

The time in seconds that a player who was added from backfilling has to connect to a session before being automatically removed. Default value is 30 seconds. If value is set to 0, the player will never be removed.

System.Int32backfillingLoopInterval

The time between each backfill approval request. Default value is 1 second. Value is invalid if below 0.

Returns
TypeDescription
BackfillingConfiguration

The BackfillingConfiguration.

Exceptions
TypeCondition
SessionException

Thrown when playerConnectionTimeout is less than 0 or when backfillingLoopInterval is less than 1.