Skip to content

ChildOf

const ChildOf: ComponentHandle<undefined>

Defined in: src/handle.ts:685

Built-in component used to represent parent-child relationships between entities.

const alice = entity()
const bob = entity().set(pair(ChildOf, alice))
assert(bob.parent() === alice)