Class BackfillingConfiguration
Allow to configure the backfilling behavior on the session.
Inheritance
Inherited Members
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
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
System.Boolean | enable | Allow the matchmaker to backfill the session if it is not full, not locked and not private. |
System.Boolean | 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. |
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. |
System.Int32 | 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. |
System.Int32 | backfillingLoopInterval | The time between each backfill approval request. Default value is 1 second. Value is invalid if below 0. |
Returns
Type | Description |
---|---|
BackfillingConfiguration |
Exceptions
Type | Condition |
---|---|
SessionException | Thrown when |