Skip to content
Konjure / spatial intelligence

Entity

← Builtin reference

An opaque ECS identity created by spawn.

Signature

Entity stores a Rust u64 handle. IDs are allocated in creation order and cannot be constructed from a Number in the language. Copying a handle keeps the same identity; it does not duplicate the entity or its components.

Use get, set, has and bind with a concrete component type. A handle can outlive its entity, but subsequent access to a removed entity is rejected.

Examples

Share an entity identity

Both handles address the same entity, so the update through alias is visible through item.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
4

Rust definition

Value::Entity(u64); stable interpreter identity, not a pointer or a Rust SDK Entity struct.

See also