Sites

Menu

WorkerInWorld Class

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

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

Inheritance

Improbable.Gdk.Core.Worker


Fields

Origin Source
readonly Vector3 Origin

The origin of the worker in global Unity space.


Properties

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.

Returns:
A task which represents the asynchronous creation of a worker.

Parameters
  • 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


Constructors

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

Parameters


Overrides

Dispose Source
override void Dispose()

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums