Namespace Apogee.Ecs¶
Classes¶
The prefab files a session knows, as numbers: one handle per file (the same file asked for by its path, its uid:// or both is the same handle), and each file's document, read once.
A handle is what
Entities that match a list of terms, cached by Flecs. Iterating defers structural changes (adding or removing components, deleting entities) until the iteration is done. Dispose it when it is not needed; the world disposes the rest.
A Flecs world: entities, components, queries and systems. Components are the unmanaged structs marked [Component]
(reflected, so Flecs knows their fields too) or ones a script defined at run time. Not thread safe: use it from one thread.
The user entities of a world as they were (Snapshot), or a part of them (SnapshotTree): ids, names, parents and component bytes. Restoring it brings the entities back
under the same ids, so a selection, an undo history or a reference between entities stays valid. A snapshot names its components by their description, not by their id in the world it
was taken from, so it can be restored into another world (a new session after a play run): the entities come back under the same ids there too. Fields that hold an asset (a model of a
ModelRenderer) are kept as the
Structs¶
Marks an entity the editor made for itself (its camera, a gizmo's anchor): it is not part of the scene, so it is not listed, saved or snapshotted.
Marks the root of a prefab instance: the entity prefab asset type), so it means the same prefab in another run. It is never written to a scene file: until scenes
save instances as overrides of their prefab, an instance is saved as plain entities.
Marks an entity that came from a prefab file (or was saved into one):
One term of a query: a component (or a pair), how it must match, and where it is read from.
The entities of one table and their components, valid only inside the call that got it. A field is the component of the term with that index; components are arrays, one element per entity (a field a term gets from elsewhere, such as a singleton, is a single element).
Where an entity is, relative to its parent (the ChildOf relationship); for an entity with no parent, in the world. The position
is a Add) has no size. the world's transform system keeps
The same placement in world space, computed from
Enums¶
Where in a frame a system runs; phases run in this order, and systems within one in the order they were added.
Where a term's component is taken from.
Delegates¶
Called for each matching entity with references to its components.
Called for each table (group of entities with the same components) a query or system matches.