The current entity handle inside a system lifecycle callback.
Signature
entity: Entityentity identifies the entity whose component join is being processed. It is immutable and available in init, frame and done, not at module scope. Use it to access other components or schedule removal at the callback boundary.
Examples
Inspect the current entity
Step once to see the two entities in creation order.
Press Step once to reach the checked result.
main.kj⌘ / Ctrl + Enter
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
entity(1) entity(2)
Rust definition
Machine supplies a Value::Entity for the currently executing system join.
View Rust documentation →Support: runtime