PlayerLifecycleConfig Class

Namespace: Improbable.Gdk.PlayerLifecycleSource


Static Fields

PlayerHeartbeatIntervalSeconds Source
double PlayerHeartbeatIntervalSeconds

The time in seconds between player heartbeat requests.

Notes:

MaxNumFailedPlayerHeartbeats Source
int MaxNumFailedPlayerHeartbeats

The maximum number of failed heartbeats before a player is disconnected.

Notes:
  • The HandlePlayerHeartbeatResponseSystem deletes a player entity if the corresponding client-worker fails to respond successfully to this number of consecutive PlayerHeartbeat requests.

MaxPlayerCreationRetries Source
int MaxPlayerCreationRetries

The maximum number of retries for player creation requests.

Notes:
  • The number of times a player creation request is retried after the first attempt. Setting this to 0 disables retrying player creation after calling RequestPlayerCreation.

MaxPlayerCreatorQueryRetries Source
int MaxPlayerCreatorQueryRetries

The maximum number of retries for finding player creator entities, before any player creation occurs.

Notes:
  • All player creation requests must be sent to a player creator entity, which are initially queried for when the SendCreatePlayerRequestSystem starts. This field indicates the maximum number of retries for the

AutoRequestPlayerCreation Source
bool AutoRequestPlayerCreation

This indicates whether a player should be created automatically upon a worker connecting to SpatialOS.

Notes:
  • If true, a Player entity is automatically created upon a client-worker connecting to SpatialOS. However, to be able to send arbitrary serialized data in the player creation request, or to provide a callback to be invoked upon receiving a player creation response, this field must be set to false.

CreatePlayerEntityTemplate Source
GetPlayerEntityTemplateDelegate CreatePlayerEntityTemplate

The delegate responsible for returning a player EntityTemplate when creating a player.

Notes:
  • This must be set before initiating any player creation because it is called by the HandleCreatePlayerRequestSystem. The system uses this delegate to request a new player entity based on the returned EntityTemplate.

Updated about a year ago


PlayerLifecycleConfig Class


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.