Get SpatialOS

Sites

Menu

Creating and deleting entities

You can create and delete entities from any worker.

Create an entity

You can create an entity from any worker. If it’s a Unity worker, the worker needs write access to at least one component.

Define the template for an entity

An entity template defines what components an entity has. You’ll use this template to create an entity.

Creating an entity template varies in different programming languages, but, in general, you create a new Entity object, and then adding components to it.

You need to define the components separately, in the schema. See Designing and defining entities.

For full examples, see the examples in the:

Creating an entity

See the pages for each language/worker about how to create entities using a template:

Delete an entity

You can delete an entity from any worker.

See the pages for each language/worker about how to delete entities:

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums