Class BackfillingConfiguration
Allow to configure the backfilling behavior on the session.
Inherited Members
Namespace: Unity.Services.Multiplayer
Assembly: Unity.Services.Multiplayer.dll
Syntax
public class BackfillingConfiguration
Properties
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 |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
int |
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 |
---|---|
bool |
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 |
---|---|
int |
Methods
WithBackfillingConfiguration(bool, bool, bool, int, int)
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 |
---|---|---|
bool | enable | Allow the matchmaker to backfill the session if it is not full, not locked and not private. |
bool | 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. |
bool | 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. |
int | 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. |
int | 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 |