Class PhysicsWorldStepper
Utility class for scheduling physics simulation jobs
Inheritance
PhysicsWorldStepper
Syntax
public class PhysicsWorldStepper : IDisposable
Properties
FinalJobHandle
The final scheduled job, including all simulation and cleanup. The end of each step should depend on this.
Declaration
public JobHandle FinalJobHandle { get; }
Property Value
FinalSimulationJobHandle
The final simulation job handle produced by this system. Systems which read the simulation results should depend on this.
Declaration
public JobHandle FinalSimulationJobHandle { get; }
Property Value
Simulation
Current simulation implementation
Declaration
public ISimulation Simulation { get; set; }
Property Value
Methods
CreateSimulation(SimulationType, UInt32)
Returns a new ISimulation of specified type (per last registered creator)
Declaration
public static ISimulation CreateSimulation(SimulationType type, uint physicsWorldIndex)
Parameters
Returns
Dispose()
Declaration
EnqueueCallback(SimulationCallbacks.Phase, SimulationCallbacks.Callback, JobHandle)
Enqueue a callback to run during scheduling of the next simulation step
Declaration
public void EnqueueCallback(SimulationCallbacks.Phase phase, SimulationCallbacks.Callback callback, JobHandle dependency = default(JobHandle))
Parameters
RegisterSimulation(SimulationType, PhysicsWorldStepper.SimulationCreator)
Register a simulation creator
Declaration
public static void RegisterSimulation(SimulationType type, PhysicsWorldStepper.SimulationCreator creator)
Parameters
Schedule a set of jobs to step the simulation.
Declaration
public SimulationJobHandles ScheduleSimulationStepJobs(SimulationType simType, uint physicsWorldIndex, in SimulationStepInput stepInput, in JobHandle inputDep, bool multiThreaded)
Parameters
Returns