stateHash
A hash of the whole simulation state, covering every body's pose and velocity and every contact's manifold. Two worlds that have simulated identically produce the same value, so comparing it across runs or machines is a way to check that a simulation is deterministic.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public ulong stateHash { get; }
Remarks
This is recomputed from scratch over the entire world every time it is read, and is never cached, so treat it as a diagnostic rather than something to read every frame. The value identifies a state, not an object, so it is not stable across engine versions and should not be stored as a persistent identifier.