Struct Simulation
Steps a physics world.
Inherited Members
Namespace: Unity.Physics
Assembly: solution.dll
Syntax
public struct Simulation : ISimulation, IDisposable
Properties
Name | Description |
---|---|
Collision |
Gets the collision events. |
Contacts | Gets the contacts stream. |
Final |
Gets the handle of the final job. |
Final |
Gets the handle of the final simulation job (not including dispose jobs). |
Impulse |
Gets the impulse events. |
Trigger |
Gets the trigger events. |
Type | Gets the simulation type. |
Methods
Name | Description |
---|---|
Create() | Creates a new Simulation. |
Dispose() | Disposes the simulation. |
Schedule |
Schedule broadphase jobs. |
Schedule |
Schedule create jacobians jobs. |
Schedule |
Schedule narrowphase jobs. |
Schedule |
Schedule solve and integrate jobs. |
Schedule |
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(Simulation |
Steps the world immediately. |
Step |
Steps the simulation immediately on a single thread without spawning any jobs. |