Struct Simulation
Steps a physics world.
Inherited Members
Namespace: Unity.Physics
Assembly: solution.dll
Syntax
public struct Simulation : ISimulation, IDisposable
Properties
Name | Description |
---|---|
CollisionEvents | Gets the collision events. |
Contacts | Gets the contacts stream. |
FinalJobHandle | Gets the handle of the final job. |
FinalSimulationJobHandle | Gets the handle of the final simulation job (not including dispose jobs). |
ImpulseEvents | Gets the impulse events. |
TriggerEvents | Gets the trigger events. |
Type | Gets the simulation type. |
Methods
Name | Description |
---|---|
Create() | Creates a new Simulation. |
Dispose() | Disposes the simulation. |
ScheduleBroadphaseJobs(SimulationStepInput, JobHandle, bool) | Schedule broadphase jobs. |
ScheduleCreateJacobiansJobs(SimulationStepInput, JobHandle, bool) | Schedule create jacobians jobs. |
ScheduleNarrowphaseJobs(SimulationStepInput, JobHandle, bool) | Schedule narrowphase jobs. |
ScheduleSolveAndIntegrateJobs(SimulationStepInput, JobHandle, bool) | Schedule solve and integrate jobs. |
ScheduleStepJobs(SimulationStepInput, JobHandle, bool) | Schedule all the jobs for the simulation step. Enqueued callbacks can choose to inject additional jobs at defined sync points. multiThreaded defines which simulation type will be called: - true will result in default multithreaded simulation - false will result in a very small number of jobs (1 per physics step phase) that are scheduled sequentially Behavior doesn't change regardless of the multiThreaded argument provided. |
Step(SimulationStepInput) | Steps the world immediately. |
StepImmediate(SimulationStepInput, ref SimulationContext) | Steps the simulation immediately on a single thread without spawning any jobs. |