Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Simulate

Simulate the world. The world should must have its PhysicsWorld.simulationType set to PhysicsWorld.SimulationType.Script for this to work.
Read time 1 minuteLast updated 11 days ago

Definition

Simulate(float)

Simulate the world. The world should must have its PhysicsWorld.simulationType set to PhysicsWorld.SimulationType.Script for this to work.
public void Simulate(float deltaTime)

Parameters

deltaTime

The amount of time to forward simulate the world.

Simulate(ReadOnlySpan<PhysicsWorld>, float)

Simulate a batch of worlds. The worlds can be simulated concurrently depending on the setting of PhysicsLowLevelSettings2D.concurrentSimulations. The worlds in the batch must have their PhysicsWorld.simulationType set to PhysicsWorld.SimulationType.Script.
public static void Simulate(ReadOnlySpan<PhysicsWorld> worlds, float deltaTime)

Parameters

The worlds to forward simulate.

deltaTime

The amount of time to forward simulate the world.