Version: Unity 6.7 Beta (6000.7)
Language : English
Physics 2D project settings reference
Player project settings reference

Physics Core 2D project settings reference

Explore the project settings that manage the global settings for 2D Physics Core. To open these settings, go to Edit > Project Settings > Physics Core 2D.

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.

To open the Physics Core 2D project settings window, go to Edit > Project Settings… > Physics Core 2D.

Property Description
Physics Core Settings Assigns a set of global settings for physics objects and the physics simulation. For more information, refer to Configure global 2D Physics Core settings.
Make Asset Creates a Physics Core Settings 2D asset and assigns it to Physics Core Settings. This button is available only while Physics Core Settings is empty.

Package

Component Defaults

The properties in this section set the default Callback Source value a component uses when you add a new component to a GameObject.

Section Property Description
Physics Pose Callback Source Sets the default Callback Source value for a newly added Physics Pose component. Existing components keep their own value. For more information, refer to Physics Pose component reference.
Physics Area Callback Source Sets the default Callback Source value for a newly added Physics Area component. Existing components keep their own value. For more information, refer to a Physics Area component’s reference page, for example Physics Area Circle component reference.
Physics Constraint Callback Source Sets the default Callback Source value for a newly added Physics Constraint component. Existing components keep their own value. For more information, refer to a Physics Constraint component’s reference page, for example Physics Constraint Distance component reference.

Custom Properties

Use the properties in this section to pin properties to the top of a component’s Inspector window. For more information, refer to Pin properties in 2D Physics Core.

Property Sub-property Description
Off N/A Disables pinned properties for the project. This is the default.
Custom property assets N/A Lists the custom properties assets in the project folder. For more information, refer to Custom property asset properties.
N/A Radio button Activates the custom property group, so Unity pins the properties to the top of the component’s Inspector window.
N/A Make Asset Creates a Custom Properties asset and assigns it to the item.
N/A Removes the item from the list. This doesn’t delete the Custom Properties asset itself.
Add Custom N/A Adds a custom property field to the list, so you can assign a custom properties asset to it.

Custom property asset properties

Property Description
Name Sets the name of the Custom Properties asset.
Add Component Type Adds a component type you want to pin properties for.

Each component type section has the following properties:

Property Description
Remove Removes the component type section.
Properties The properties Unity pins to the top of the component’s Inspector window. Click and drag the handle to change the order of a property. Use the checkbox to enable or disable a property. Select X to remove a property from the list.
Add Property Adds a property to pin to the top of the component’s Inspector window.

Settings

The Settings tab contains the settings from the Physics Core Settings 2D asset you assign to the Physics Core Settings property.

Layers

The properties in this section configure the layers Unity uses to detect collision. For more information, refer to Configure collisions between 2D Physics Core objects.

Property Description
Physics Layer Names Sets the names of the 64 layers 2D Physics Core uses if you enable Use Physics Layers. By default, the first layer has the name Default and the other layers have no name.

Default Definitions

The properties in this section set the default values when you create a new definition object. For the individual sections, refer to the following:

General

The General section contains the following properties.

Property Description
Physics World Definition Sets the initial properties of a new physics world. For more information, refer to Physics Simulation Definition asset reference.
Physics Body Definition Sets the initial properties of a new physics body. For more information, refer to Physics Pose component reference.
Physics Shape Definition Sets the initial properties of a new physics shape.
Physics Chain Definition Sets the initial properties of a new physics chain.

Joints

The Joints section contains the following properties.

Property Description
Physics Distance Joint Definition Sets the initial properties of a new distance joint. For more information, refer to Physics Constraint Distance component reference.
Physics Fixed Joint Definition Sets the initial properties of a new fixed joint. For more information, refer to Physics Constraint Fixed component reference.
Physics Hinge Joint Definition Sets the initial properties of a new hinge joint. For more information, refer to Physics Constraint Hinge component reference.
Physics Relative Joint Definition Sets the initial properties of a new relative joint. For more information, refer to Physics Constraint Relative component reference.
Physics Slider Joint Definition Sets the initial properties of a new slider joint. For more information, refer to Physics Constraint Slider component reference.
Physics Wheel Joint Definition Sets the initial properties of a new wheel joint. For more information, refer to Physics Constraint Wheel component reference.

Global

Property Description
Auto-Edit Active Setting Enables editing the properties of the active Physics Core Settings 2D asset. Disable the setting to edit the settings of the Physics Core Settings 2D asset you select in the Project window instead.
Transform Change Mode Sets when Unity sends notifications to callbacks when the transform of a physics body changes. The options are:
  • Off: Doesn’t send notifications.
  • Frame Start: Sends notifications at the start of the frame.
  • Fixed Update: Sends notifications during the FixedUpdate event stage.
  • Update: Sends notifications during the Update event stage.
For more information, refer to Event functions.
Contact Filter Mode Determines how Unity combines the Categories and Contacts properties of two shapes to decide whether they make contact. The options are:
  • Both: Creates a contact only if each shape’s Contacts property includes the other shape’s Categories property. This is the default.
  • Either: Creates a contact if either shape’s Contacts property includes the other shape’s Categories property.
For more information, refer to Contact filter modes.
Contact Filter Group Mode Determines how Unity uses the Group Index property of two shapes to decide whether they make contact. The options are:
  • Group: A Group Index other than 0 overrides the Categories and Contacts properties. Two shapes with the same positive value always make contact, and two shapes with the same negative value never make contact. If either shape has a value of 0, or the two values are different, Unity uses Categories and Contacts instead. This is the default.
  • Filtering: Group Index filters the result of the Categories and Contacts properties. Two shapes with different values never make contact, and two shapes with the same value make contact if Categories and Contacts allow it.
For more information, refer to Contact filter modes.
Rendering Mode Determines whether Unity draws a debug visualization in a built project. The options are:
  • Editor Only: Draws only in the Unity Editor.
  • Development Player: Draws in the Editor, and a built project if Development Build is enabled. For more information, refer to Build Profiles window reference.
  • Any Player: Draws in the Editor and built projects.
For more information, refer to Draw a debug visualization of objects.
Initial World Capacity Sets the number of worlds Unity allocates. Unity always creates one physics world by default, and allocates more worlds if it needs to. The default is 4, and the range is 1 to 1024.
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 units that correspond to one meter in the physics simulation. The default is 1.
Use Physics Layers Enables 2D Physics Core using the 64 layers in the Layers section. If you disable this property, 2D Physics Core uses the 32 GameObject layers instead. For more information, refer to Configure collisions between 2D Physics Core objects.
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.

Additional resources

Physics 2D project settings reference
Player project settings reference