Vivid
|
The ECS API is a way to create 3D scenes in Vivid. It is a way to create entities and components.
Do not create entities and components directly. Use the ECS API to create them.
Entites are the main objects in the ECS API. They are the objects that are rendered in the scene. To create an entity you can use the Entity
class.
ECS is a namespace in the Vivid library, it contains all the helper functions to maintain all the entities and components.
Components are the objects that are attached to entities. They are the objects that define the properties of the entity.
To create a component you can use the Component
class.
Only components that inherit from the Component
class can created using the CreateComponent
function.
To add a component to an entity you can use the AddComponent
function in the ECS namespace.
To get the entityID you can use the GetEntityID
method in the entity class, and to get the componentID you can use the GetComponentID
method in the component class.
To get a component from an entity you can use the GetComponent
function in the ECS namespace.
You can also get all the components of a certain type from the entity using the GetComponents
function.
All these tasks can also be done using the UI.