world_hash.h
| File Path | engine/include/conjure/ecs/world_hash.h |
| API ↗ | Command buffers and observers |
Deterministic state hash.
Forward Declarations
world
Functions
Public
world_hash
world_hashHash of every alive entity and component value in the world. Equal worlds (same entities in the same row order, same bytes) hash equal regardless of archetype creation order; one flipped float bit changes it. Non-trivial components are serialised into one JSON writer reused for the whole call, so the writer allocates as it grows to the largest component, not once per component. An asset reference field of a described type takes part through its uuid alone, never through its bound slot, so a world hashes the same in every process and whether or not its references are bound yet. Reads the world without locking it: call it while no structural change is in flight.