Table of Contents

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 EntityRef through a transaction.
  • Component — an EntityLink<T> is a field type you put inside a component.
  • Archetype — the T in EntityLink<T> names the target's archetype.

In the API

Learn & use