Struct SimulationSingleton
A simulation singleton. Use it to get simulation used by the physics engine. Call (SystemBase|SystemAPI|EntityQuery).GetSingleton<SimulationSingleton() to get read-only access. Call (SystemBase|SystemAPI|EntityQuery).GetSingletonRW<SimulationSingleton() to get read-write access.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct SimulationSingleton : IComponentData, IQueryTypeParameter
Fields
Type
The simulation type.
Declaration
public SimulationType Type
Field Value
Type | Description |
---|---|
SimulationType |
Methods
AsSimulation()
Converts this object to a simulation.
Declaration
public Simulation AsSimulation()
Returns
Type | Description |
---|---|
Simulation | A Simulation. |
InitializeFromSimulation(ref Simulation)
Initializes this object from the given simulation.
Declaration
public void InitializeFromSimulation(ref Simulation simulation)
Parameters
Type | Name | Description |
---|---|---|
Simulation | simulation | [in,out] The simulation. |