The following Project settingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary manage the global settings for the Physics Core 2D API.
Note: This documentation is about writing C# scripts using the Unity.U2D.Physics API. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to 2D physics instead.
To open the PhysicsCore 2D project settings window, go to Edit > Project Settings… > PhysicsCore 2D.
Note: To manage the global settings for 3D physics instead, refer to the Physics Project settings reference page.
| Property | Description |
|---|---|
| Physics Core Settings | Assigns a set of global settings for physics objects and the physics simulation when you use the Physics Core 2D API. For more information, refer to Configure global Physics Core 2D API settings. |
The settings tab contains the settings from the PhysicsCore Settings file.
The properties in this section configure the layers Unity uses to detect collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary. For more information, refer to Configure collisions between Physics Core 2D API objects.
| Property | Description |
|---|---|
| Physics Layer Names | Sets the names of the 64 layers the PhysicsMask API uses if you enable Use Full Layers. By default, the first layer has the name Default and the other layers have no name. |
The properties in this section set the default values when you create a new definition object. For the individual sections, refer to the following:
| Property | Description |
|---|---|
| Transform Change Mode | Sets when Unity sends notifications to callbacks when the transform of a physics body changes. The options are:
|
| Contact Filter Mode | Determines when Unity reports a contact event between two shapes that have contact filters. The options are:
PhysicsShape.ContactFilter. |
| Rendering Mode | Determines whether Unity draws a debug visualization in a built project. The options are:
|
| Maximum Worlds | Sets the maximum number of worlds that can exist at the same time. Unity always creates one physics world by default. |
| Concurrent Simulations | Sets the number of physics simulations that can run at the same time. The default is 2. |
| Length Units Per Meter | Sets the number of Unity unitsThe unit size used in Unity projects. By default, 1 Unity unit is 1 meter. To use a different scale, set the Scale Factor in the Import Settings when importing assets. See in Glossary that correspond to one meter in the physics simulation. The default is 1. |
| Use Physics Layers | Enables the PhysicsMask API using the 64 layers in the Layers tab. If you disable this property, the PhysicsMask API uses the 32 GameObject layers instead. |
| Disable Simulation | Stops the simulation. You can still use the API as normal while the simulation is stopped. |
| Always Draw Worlds | Creates a DrawResults object with the debug draw visualization, even if you set Rendering Mode to disable drawing in a built project. For more information, refer to PhysicsWorld.DrawResults. |