Component · physics
PhysicsId
Stable simulation identity; nonzero and unique within a physics world.
Fields
value
u64Stable scene/network identity. Zero asks Play to assign a unique value from the entity identity; positive values explicitly reserve an identity.
default 0≥ 0
Usage
Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.
Add it
ara do component.add -p entity=name:Crate -p component=PhysicsId --why "Add PhysicsId"Set a field
ara do property.set -p entity=name:Crate -p path=PhysicsId.value -p value=0 --why "Tune PhysicsId"In a scene document
{
"PhysicsId": {
"value": 0
}
}From C#
/// <summary>Restore a stable physics identity from a checkpoint.</summary>
public static void UsePhysicsId(Entity entity, in Tick tick)
{
ref var component = ref World.Get<PhysicsId>(entity);
component.Value = 42;
}From C#
Scripts read and write it with Get<PhysicsId>(); see the PhysicsId struct.