Sites

Menu

WorkerSystem Class

Namespace: Improbable.Gdk.Core
GDK package: Core
Source

A SpatialOS worker instance.

Inheritance

ComponentSystem


Fields

WorkerEntity Source
Entity WorkerEntity

An ECS entity that represents the Worker.
LogDispatcher Source
readonly ILogDispatcher LogDispatcher

WorkerType Source
readonly string WorkerType

WorkerId Source
readonly string WorkerId

Origin Source
readonly Vector3 Origin


Constructors

WorkerSystem Source
WorkerSystem(WorkerInWorld worker)

Parameters


Methods

TryGetEntity Source
bool TryGetEntity(EntityId entityId, out Entity entity)

Attempts to find an ECS entity associated with a SpatialOS entity ID.

Returns:
True, if an ECS entity associated with the SpatialOS entity ID was found, false otherwise.

Parameters
  • EntityId entityId : The SpatialOS entity ID.
  • out Entity entity : When this method returns, contains the ECS entity associated with the SpatialOS entity ID if one was found, else the default value for Entity.
HasEntity Source
bool HasEntity(EntityId entityId)

Checks whether a SpatialOS entity is checked out on this worker.

Returns:
True, if the SpatialOS entity is checked out on this worker, false otherwise.

Parameters
  • EntityId entityId : The SpatialOS entity ID to check for.
SendLogMessage Source
void SendLogMessage(string message, string loggerName, LogLevel logLevel, EntityId? entityId)

Parameters
  • string message :
  • string loggerName :
  • LogLevel logLevel :
  • EntityId? entityId :
SendMetrics Source
void SendMetrics(Metrics metrics)

Parameters
  • Metrics metrics :


Overrides

OnCreate Source
override void OnCreate()

OnUpdate Source
override void OnUpdate()

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums