EntityLink
In one line: a typed, blittable reference from one entity to another, storable inside a component field.
EntityLink<T> is how one entity points at another by type: a component field of type EntityLink<Unit> records "this entity's target is a Unit". Because it is blittable, it lives directly in the memory-mapped store like any other field — no serialization, no separate reference table. It carries the target archetype type at compile time, which a bare EntityId does not.
How it relates
- Entity — what a link points at; resolve it back to an
EntityRefthrough a transaction. - Component — an
EntityLink<T>is a field type you put inside a component. - Archetype — the
TinEntityLink<T>names the target's archetype.
In the API
- EntityLink<T> — the typed link field.
Learn & use
- Narrative: Guide ch.2 — fields
- Feature detail: component field declaration