WorkerInWorld Class

Namespace: Improbable.Gdk.CoreSource

Represents a SpatialOS worker that is coupled with an ECS World.




Origin Source
readonly Vector3 Origin

The origin of the worker in global Unity space.


World Source
World World { get; }

The ECS world associated with this worker.

OnDisconnect Source
Action<string> OnDisconnect { }

An event that triggers when the worker is disconnected.

Static Methods

CreateWorkerInWorldAsync Source
async Task<WorkerInWorld> CreateWorkerInWorldAsync(IConnectionHandlerBuilder connectionHandlerBuilder, string workerType, ILogDispatcher logDispatcher, Vector3 origin, CancellationToken? token = null)

Creates a WorkerInWorld object asynchronously.

A task which represents the asynchronous creation of a worker.

  • IConnectionHandlerBuilder connectionHandlerBuilder : A builder which describes how to create the IConnectionHandler for this worker.
  • string workerType : The type of worker to connect as.
  • ILogDispatcher logDispatcher : The logger to use for this worker.
  • Vector3 origin :
  • CancellationToken? token : A cancellation token which will cancel this asynchronous operation


WorkerInWorld Source
WorkerInWorld(IConnectionHandler connectionHandler, string workerType, ILogDispatcher logDispatcher, Vector3 origin)



Dispose Source
override void Dispose()

Updated about a year ago

WorkerInWorld Class

Suggested Edits are limited on API Reference Pages

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