Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Physics Simulation component reference

Explore the properties you can use to configure a Physics Simulation component in the Unity Editor using 2D Physics Core.
Read time 4 minutesLast updated 14 days ago

Explore the properties you can use to keep a custom simulation world alive across scene loads. For more information, refer to Create multiple simulation worlds with 2D Physics Core.
Note
This documentation is about using Pose, Area, and Constraint components. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to 2D physics instead.

Physics Simulation component properties

Property

Description

Simulation WorldSets the Physics Simulation World asset, which in turn has the asset with the world's properties. Drag a Physics Simulation World asset from the Project window to this property, or select the picker (⊙).
Make AssetCreates a Physics Simulation World asset for you to save, then assigns it to the Simulation World property. This property is available only if Simulation World is empty.
Persist Across ScenesKeeps this GameObject alive across every scene load, instead of only for the lifetime of the scene it's in. This affects the whole GameObject, not just this component. This property is only available on a GameObject without a parent.

Info

This section displays information about the component. You can't directly edit the properties in this section.

Handle

Property

Description

ValidThe state of the object. True means the object is in the simulation.
IndexThe index number of the object in the world.
GenerationThe number of times Unity has used the same Index for different objects.

Counters

For more information, refer to the
PhysicsWorld.WorldCounters
API.

Property

Description

Body CountThe total number of physics bodies in the world.
Shape CountThe total number of shapes attached to bodies in the world.
Contact CountThe current number of contacts.
Awake Contact CountThe number of contacts in the previous simulation step.
Recycled Contact CountThe number of contact points Unity reused from the previous simulation step, to improve stability and performance.
Joint CountThe total number of constraints.
Island CountThe number of groups of connected objects that Unity calculates.
Stack UsedThe temporary memory the simulation currently uses, in bytes. Unity allocates and releases this memory during each simulation step.
Used MemoryThe memory allocated for the physics system, in bytes.
Static Broadphase HeightThe height of the internal structure Unity uses to find which static objects might be near each other.
Broadphase HeightThe height of the internal structure Unity uses to find which dynamic and kinematic objects might be near each other.
Task CountThe number of multithreaded tasks the simulation requests.

Profile

The properties in this section are in milliseconds.
For more information, refer to the
PhysicsWorld.WorldProfile
API.

Property

Description

Simulation StepHow long it takes to step the whole simulation forward.
Contact PairsHow long it takes to find shape pairs that might be colliding, and creating contacts to track new overlapping pairs.
Contact UpdatesHow long it takes to update existing contacts as shapes moved.
SolvingHow long it takes to integrate velocities, solve velocity constraints, and integrate positions.
Solver SetupHow long it takes to prepare to solve the collisions and forces in the world.
ConstraintsHow long it takes to calculate constraints.
Prepare ConstraintsHow long it takes to prepare constraints before calculating them.
Integrate VelocitiesHow long it takes to update the velocity of each body, based on the forces acting on it.
Warm StartingHow long it takes to reuse the velocity changes from the previous simulation step.
Solve ImpulsesHow long it takes to calculate the immediate velocity changes for constraints.
Integrate TransformsHow long it takes to update the position and rotation of each body based on its velocity.
Relax ImpulsesHow long it takes to make a final pass over the impulses calculated for constraints, to reduce jitter and improve stability.
Apply BouncinessHow long it takes to apply bounce to objects involved in a collision.
Store ImpulsesHow long it takes to store the impulses Unity calculated during this simulation step, so it can reuse them for Warm Starting in the next step.
Split IslandsHow long it takes to split islands after Unity removes contacts or joints that connected them.
Body TransformsHow long it takes to update the internal position and rotation data Unity stores for each body.
Fast TriggersHow long it takes to check for fast-moving bodies passing through trigger shapes.
Joint EventsHow long it takes to generate events for constraints that exceeded their Force Threshold or Torque Threshold value.
Hit EventsHow long it takes to generate events for shapes that collide with enough force to register as a hit.
Broadphase UpdatesHow long it takes to update the internal structure Unity uses to find which objects might be near each other.
Solve ContinuousHow long it takes to calculate continuous collision detection.
Sleep IslandsHow long it takes to put islands to sleep when none of the bodies are moving, to save processing time.
Update TriggersHow long it takes to update which shapes are overlapping trigger shapes.
Write TransformsHow long it takes to write the final position and rotation of each body to its GameObject's Transform component.

Additional resources