Entity
An Entity is the representation of an object, managed by the Entity-Component-System (ECS). It is defined as:
Creation
Creating an Entity is done using the Entity-Component-System, either by calling the ECS’ createEntity functions or the Scripting API’s createEntity function.
These functions return an Entity
which can then be used when referencing an Entity.
When created, an Entity already has a Transform Component.
Destruction
Destroying an Entity is done using the Entity-Component-System, either by calling the ECS’s destroyEntity function or the Scripting API’s destroyEntity function.
Name
An Entity can have a name, which allows to find it using the ECS’ findEntityByName or the Scripting API’s findEntityByName function.
Persistence
An Entity can be persistent.
When the scene changes, all non-persistent Entities are destroyed, while all persistent Entities stay. This can be used to pass data between scenes.