Tests whether an entity has the selected concrete component type.
Signature
C means a concrete type selector. The result observes the entity's current component set and rejects an unknown entity rather than inventing absence.
Parameters
entity: Entity- An existing entity identity.
Returns
BoolTrue when the entity has component C.
Examples
Test component presence
The selector is required when the function value would otherwise not identify C.
main.kj
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
true
Rust definition
Rust interpreter builtin dispatch; C must name a concrete type and is checked during specialization.
View Rust documentation →Support: runtime