Expand description
Types for defining Archetype
s, collections of entities that have the same set of
components.
An archetype uniquely describes a group of entities that share the same components: a world only has one archetype for each unique combination of components, and all entities that have those components and only those components belong to that archetype.
Archetypes are not to be confused with Table
s. Each archetype stores its table
components in one table, and each archetype uniquely points to one table, but multiple
archetypes may store their table components in the same table. These archetypes
differ only by the SparseSet
components.
Like tables, archetypes can be created but are never cleaned up. Empty archetypes are not removed, and persist until the world is dropped.
Archetypes can be fetched from Archetypes
, which is accessible via World::archetypes
.
Structs
- Metadata for a single archetype within a
World
. - The next
ArchetypeId
in anArchetypes
collection. - An opaque location within a
Archetype
.