Skip to content

Namespace Apogee.Ecs

Classes

PrefabLibrary

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 and hold; it only means something in the run that made it, which is why snapshots and scenes name the file instead (). A reference that names no file still gets a handle that keeps its text, so an instance of a prefab that is missing keeps what it was made from. Safe to use from several threads.

Query<T1, T2, T3>

Query<T1, T2>

Query<T1>

Query<T1, T2, T3, T4>

Query

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.

World

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.

WorldSnapshot

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 they named: restored into the world they came from they are the same handles, into another world they are that world's handles for the same assets.

Structs

EditorOnly

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.

PrefabInstance

Marks the root of a prefab instance: the entity returned. is a handle of the world's ; a snapshot holds the it names instead (the 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.

PrefabMember

Marks an entity that came from a prefab file (or was saved into one): is its number in that file, the number that stays the same each time the file is saved, and is the file the number belongs to. It is never written to a scene file.

QueryTerm

One term of a query: a component (or a pair), how it must match, and where it is read from.

TableView

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).

Transform

Where an entity is, relative to its parent (the ChildOf relationship); for an entity with no parent, in the world. The position is a : the world is double precision, so a position stays exact for thousands of kilometres. Set the to one: a zeroed transform (from Add) has no size. the world's transform system keeps up to date from it.

WorldTransform

The same placement in world space, computed from and the parents' by the world's transform system once a frame. Read it; changes to it are overwritten.

Enums

ObserverEvent

Phase

Where in a frame a system runs; phases run in this order, and systems within one in the order they were added.

QueryOperator

QuerySource

Where a term's component is taken from.

Delegates

EachAction<T1, T2, T3, T4>

EachAction<T1, T2, T3>

EachAction<T1, T2>

EachAction<T1>

Called for each matching entity with references to its components.

TableAction

Called for each table (group of entities with the same components) a query or system matches.