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 share properties across multiple physics objects, use the following:
Definition assets and geometry assets are files in the Project window that store the shared values.
Follow these steps:
Right-click in the Project window and select Create > 2D > Physics (Core).
Select the category and definition type you want to create. For example, select Area > Area Definition to create a shared set of properties for any Physics Area component.
Note: Physics Area components all use the same Area Definition asset type, but each Physics Constraint has its own definition asset type. For the full list, refer to Connecting 2D Physics Core objects.
Select the asset Unity creates in the Project window, then adjust its properties in the Inspector window.
In the Inspector window of any 2D Physics Core component that matches the definition type, drag the definition asset into the Definition Asset property, or select the picker (⊙).
To stop a component using a shared definition asset and revert it to using its own local properties, select Make Local.
Note: For Area components, you can also create a Physics Contact Filter asset to share a different set of contact properties, and a Physics Surface Material asset to share a different set of surface properties. If you provide these assets, they override the same properties in the definition asset.
To share a shape across multiple Area components, create a shared geometry asset. Follow these steps:
For the full list of shapes, refer to Physics Pose and Physics Area components.
To create a definition asset or geometry asset with the current properties of a component, follow these steps:
To stop a component using a shared asset and revert it to using its own local properties, select Make Local.
To change the default values of a component, follow these steps:
Unity uses the default values for components that don’t have a definition asset assigned, and for a newly created definition asset.
For a full list of properties, refer to Physics Core 2D reference.