Version: Unity 6.7 Beta (6000.7)
Language : English
Create multiple simulation worlds with 2D Physics Core
Physics Simulation Definition asset reference

Physics Simulation component reference

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 World Sets 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 Asset Creates 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 Scenes Keeps 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
Valid The state of the object. True means the object is in the simulation.
Index The index number of the object in the world.
Generation The 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 Count The total number of physics bodies in the world.
Shape Count The total number of shapes attached to bodies in the world.
Contact Count The current number of contacts.
Awake Contact Count The number of contacts in the previous simulation step.
Recycled Contact Count The number of contact points Unity reused from the previous simulation step, to improve stability and performance.
Joint Count The total number of constraints.
Island Count The number of groups of connected objects that Unity calculates.
Stack Used The temporary memory the simulation currently uses, in bytes. Unity allocates and releases this memory during each simulation step.
Used Memory The memory allocated for the physics system, in bytes.
Static Broadphase Height The height of the internal structure Unity uses to find which static objects might be near each other.
Broadphase Height The height of the internal structure Unity uses to find which dynamic and kinematic objects might be near each other.
Task Count The 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 Step How long it takes to step the whole simulation forward.
Contact Pairs How long it takes to find shape pairs that might be colliding, and creating contacts to track new overlapping pairs.
Contact Updates How long it takes to update existing contacts as shapes moved.
Solving How long it takes to integrate velocities, solve velocity constraints, and integrate positions.
Solver Setup How long it takes to prepare to solve the collisions and forces in the world.
Constraints How long it takes to calculate constraints.
Prepare Constraints How long it takes to prepare constraints before calculating them.
Integrate Velocities How long it takes to update the velocity of each body, based on the forces acting on it.
Warm Starting How long it takes to reuse the velocity changes from the previous simulation step.
Solve Impulses How long it takes to calculate the immediate velocity changes for constraints.
Integrate Transforms How long it takes to update the position and rotation of each body based on its velocity.
Relax Impulses How long it takes to make a final pass over the impulses calculated for constraints, to reduce jitter and improve stability.
Apply Bounciness How long it takes to apply bounce to objects involved in a collision.
Store Impulses How 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 Islands How long it takes to split islands after Unity removes contacts or joints that connected them.
Body Transforms How long it takes to update the internal position and rotation data Unity stores for each body.
Fast Triggers How long it takes to check for fast-moving bodies passing through trigger shapes.
Joint Events How long it takes to generate events for constraints that exceeded their Force Threshold or Torque Threshold value.
Hit Events How long it takes to generate events for shapes that collide with enough force to register as a hit.
Broadphase Updates How long it takes to update the internal structure Unity uses to find which objects might be near each other.
Solve Continuous How long it takes to calculate continuous collision detection.
Sleep Islands How long it takes to put islands to sleep when none of the bodies are moving, to save processing time.
Update Triggers How long it takes to update which shapes are overlapping trigger shapes.
Write Transforms How long it takes to write the final position and rotation of each body to its GameObject’s Transform component.

Additional resources

Create multiple simulation worlds with 2D Physics Core
Physics Simulation Definition asset reference