class
ecs::Registry
Stores all entities and components in their respective storages.
Allows creation
& destruction of entities, as well as a way to add or remove components to/from those entities. Allows creation of views or groups that allow iteration over entities containing a certain subset of components. Provides other helper functionality such as sorting.
Public
Methods
TryGetStorage
Tries to retrieve the storage that contains a component identified with .
Returns null if the storage has not been created.
TryGetStorage
Tries to retrieve the storage that contains a component identified with .
Returns null if the storage has not been created.
RemoveStorage
Destroys storage and all associated components of type .
Clear
Clears all components and entities from the registry.
IsEntityValid
Returns true if the entity has been created and is still valid.
HasEntityAnyComponents
Returns true if entity has at least one associated component.
GetEntityVersion
Returns the current version of the entity.
If an entity is destroyed and its identifier re-used, the version will be incremented.
CreateEntity
Creates a brand new entity with a unique identifier.
CreateEntity
Creates a new entity while attempting to re-use an invalid entity identifier as provided by .
EraseEntity
Removes an entity and all associated components from the set if it exists, otherwise does nothing.
Returns the version of the entity that was removed.