GDK for Unreal
If you're using the GDK for Unreal, this page does not apply to you. For information about components, see the SpatialOS component glossary entry in the GDK documentation.
Once you've worked out what entities your world will have, the next step is to work out what the components of the entities should be.
For best practices when using components, see the Component best practices page.
Components can have three elements:
properties describe persistent values that change over time
events describe transient things that have happened to an entity
commands describe things that other entities can ask this entity to do
Each component can have many properties, events and commands. For example, an explosive barrel might have the following components:
It's important that everything that you need to define your entity is stored in components. SpatialOS is a distributed system, running over many machines which may fail at any time, so your entity must be able to be recreated from the components.
Any local state stored on a worker can be easily lost.
Updated 7 months ago