Struct PhysicsWorldData
Structure containing PhysicsWorld and other data and queries that are necessary for
simulating a physics world. Note: it is important to create Physics
Implements
Inherited Members
Namespace: Unity.Physics.Systems
Assembly: Unity.Physics.dll
Syntax
public struct PhysicsWorldData : IDisposable
Constructors
PhysicsWorldData(ref SystemState, in PhysicsWorldIndex)
Constructor.
Declaration
public PhysicsWorldData(ref SystemState state, in PhysicsWorldIndex worldIndex)
Parameters
Type | Name | Description |
---|---|---|
System |
state | [in,out] The System |
Physics |
worldIndex | Zero-based index of the world. |
Fields
ComponentHandles
The component handles. Stores the information about ECS component handles needed for
generating a Physics
Declaration
public PhysicsWorldData.PhysicsWorldComponentHandles ComponentHandles
Field Value
Type | Description |
---|---|
Physics |
DynamicEntityGroup
Query for dynamic bodies.
Declaration
public EntityQuery DynamicEntityGroup
Field Value
Type | Description |
---|---|
Entity |
HaveStaticBodiesChanged
A flag indicating if the static bodies have changed in this frame.
Declaration
public NativeReference<int> HaveStaticBodiesChanged
Field Value
Type | Description |
---|---|
Native |
InvalidatedTemporalCoherenceInfoGroup
Query for bodies with invalidated temporal coherence info, e.g., due to deletion.
Declaration
public EntityQuery InvalidatedTemporalCoherenceInfoGroup
Field Value
Type | Description |
---|---|
Entity |
JointEntityGroup
Query for joints.
Declaration
public EntityQuery JointEntityGroup
Field Value
Type | Description |
---|---|
Entity |
PhysicsWorld
The physics world.
Declaration
public PhysicsWorld PhysicsWorld
Field Value
Type | Description |
---|---|
Physics |
StaticEntityGroup
Query for bodies.
Declaration
public EntityQuery StaticEntityGroup
Field Value
Type | Description |
---|---|
Entity |
Methods
Dispose()
Free stored memory.
Declaration
public void Dispose()
Update(ref SystemState)
Calls the Update(ref System
Declaration
public void Update(ref SystemState state)
Parameters
Type | Name | Description |
---|---|---|
System |
state | [in,out] The state. |