Overview
Components are used to parametrize the behaviors per entity. A simple example is GoForwardAuthoring, which adds the GoForwardComponent to an entity. This component's data can then be used inside the Execute method of GoForwardJob, where it's passed in as EntityInformation<GoForwardComponent>.
There are three interfaces [1], [2], [3], each matching one of the three kinds of behaviors. All these interfaces share the following properties:
- Priority - (0, 255) what is the priority of this behavior.
- DirectionStrength - (0, 1) how strongly (relative to other behaviors) should this behavior influence the entity's direction.
- SpeedStrength - (0, 1) how strongly (relative to other behaviors) should this behavior influence the entity's speed.
- IsActive - Should the behavior run.
- Debug - Toggle to draw debug elements.
- DebugScale - Scale for the debug elements.
- Color - Color for the debug elements.
Example of GoForwardComponent in the inspector, in contains a Speed property on top of the BaseData.