ドキュメント

Unity Engine

Download Unity

Unity Engine

2D Physics Core preferences reference

Explore the properties you can use to configure how 2D Physics Core draws and edits physics objects in the Scene view.
読み終わるまでの所要時間 7 分最終更新 5日前

Explore the properties you can use to configure how 2D Physics Core draws and edits physics objects in the Scene view. These properties apply to every project you open in the Unity Editor.
注
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 these properties, go to Edit > Preferences > 2D > Physics Core.
For more information about the tools these properties configure, refer to Visualize and edit 2D Physics Core scenes.

General

Property

Description

Confirm Scene Asset EditDisplays a confirmation dialog when the Scene view tools edit geometry that a shared asset stores.
Edit on SelectionAutomatically enters the Physics Area or Physics Constraint editing tool when you select a GameObject that has one of these components. Unity ignores components on child GameObjects. If a GameObject has both, Unity enters the Physics Area tool.
Hierarchy SelectionSets which physics objects Unity draws when you select a GameObject in the Hierarchy window. The options are:
  • Nothing: Draws no physics objects for the selection.
  • Selected: Draws the physics objects of the components on the GameObject.
  • Children: Draws the physics objects of the components on the children of the GameObject.
  • Everything: Draws the physics objects of the components on the GameObject and its children.
Edit Shape SelectionSets which layers to edit when you click on a shape. The options are:
  • Single: Selects one layer. Click again in the same place to cycle through stacked shapes.
  • Multiple: Selects every layer under the cursor.
Play Mode EditSets which components you can edit in Play mode, in the Inspector window and with the Scene view tools.
Local Geometry TargetSets which values Unity updates when you drag the center handle of a component without a shared geometry asset. The options are:
  • Geometry: Updates the geometry of the component.
  • Transformation: Updates the Transformation properties of the component.
This property doesn't affect contour group geometry.
Asset Geometry TargetSets which values Unity updates when you drag the center handle of a component that uses a shared geometry asset. The options are:
  • Geometry: Updates the geometry of the shared geometry asset.
  • Transformation: Updates the Transformation properties of the component.
This property doesn't affect contour group geometry, which always updates its vertices.
Geometry DisplaySets how Unity displays the panel beneath a geometry asset in the Inspector window of a component. The options are:
  • Off: Hides the panel.
  • View: Displays the panel as read-only.
  • Edit: Displays the panel so you can edit the properties of the geometry asset.
Definition DisplaySets how Unity displays the panel beneath a definition asset in the Inspector window of a component. The options are:
  • Off: Hides the panel.
  • View: Displays the panel as read-only.
  • Edit: Displays the panel so you can edit the properties of the definition asset.
HighlightSets the brightness of the selected shape. Set the value to 0 to leave the shape unhighlighted.
DimmingSets how strongly Unity fades a shape that you haven't selected or hovered over. Set the value to 1 to hide unselected layers.
Max HandlesSets the maximum number of vertex handles Unity displays on a contour in the Scene view. Use a lower value to make editing a complex contour faster.
Handle SizeScales the editing handles in the Scene view. Use a higher value to make handles easier to select.
Handle Edge RangeSets how far from the edge of a selected shape the handles appear, as a multiple of the base handle size.
Editing Gizmo ScaleScales the angle lines, arcs, and limit bands Unity draws when you edit a pose, an anchor, or a limit. This property doesn't affect the handle size.
Angle QuantizeSets the increment in degrees that Unity rounds an angle to when you drag a pose rotation, an anchor angle, or a transformation angle. The options are Off, 0.1°, 0.25°, 0.5°, 1°, 10°, 15°, 30°, 45°, and 90°. Select Off to drag at full precision.

Labels

The settings in this section configure the labels Unity displays in the Scene view.

Property

Description

Show LabelsSets when Unity displays coordinates and value labels. The options are:
  • Off: Draws no labels.
  • On: Draws the label of every handle.
  • Selected: Draws the label only when you drag or hover over a handle.
Label SpaceSets the space that label coordinates use. The options are:
  • Local: Displays coordinates in the local geometry space of the component.
  • World: Displays coordinates in world space.
Label PrecisionSets the maximum number of decimal digits in a label.

Colors

The settings in this section set the color of shapes, handles, labels, and lines in the Scene view.

Geometry

Property

Description

Invalid EditSets the color of an edit that Unity rejects as invalid.

Constraint

Property

Description

Lower LimitSets the color of the line that marks a lower limit, such as the lower angle limit of a Physics Constraint Hinge component.
Upper LimitSets the color of the line that marks an upper limit, such as the upper angle limit of a Physics Constraint Hinge component.

Handle

Property

Description

Handle IdleSets the color of a vertex, edge, size, or endpoint handle at rest.
Handle HoverSets the color of a handle when you hover over it.
CenterSets the color of the center handle.
AnchorSets the color of the anchor handles of a constraint. By default, this color matches Handle Idle.
AddSets the color of the handles that add geometry.
DeleteSets the color of the handles that delete geometry.

Labels & Lines

Property

Description

LabelSets the color of coordinate and value labels.
Label BackgroundSets the color Unity fills behind a label. Set the alpha value to 0 to draw no background.
LineSets the color of the lines the tools draw between objects, such as the link between the two anchors of a constraint.
Zero ReferenceSets the color of the dashed line Unity measures an angle from.
Current AngleSets the color of the solid line Unity draws out to the handle of the current angle.
Edit FillSets the color Unity fills the range with while you edit, such as a swept angle arc or a linear limit band.

Draw Override

The settings in this section replace the draw settings of every physics world in the Editor, except a world whose
disableDrawOverride
property is
true
. Such a world ignores the override, including Hide With Gizmos.
Each world stores its own draw settings in the project, so a change to them affects everyone on a shared project and appears in source control. The override is personal to you. Unity stores its values in your Editor preferences, so they aren't shared through source control. It changes only what you see in the Scene view and Game view, and leaves the project, the worlds, and the team-wide settings untouched.
Overrides is editable only when Enabled is selected. Each other property is editable only when Enabled is selected and that property is selected in Overrides.
Except for Draw At Transform, each draw property overrides the property of the same name in the Physics Simulation Definition asset reference.

Property

Description

EnabledWhen enabled, Unity draws every physics world with the selected values in this section. When disabled, each world uses its own draw settings, and Unity keeps the values in this section.
OverridesSets which draw settings in this section replace each world's settings. Also includes Hide With Gizmos, which hides all physics drawing in a Scene view or Game view when its Gizmos button is off. By default, Draw Options and Hide With Gizmos are selected.
Draw OptionsOverrides the world's Draw Options setting.
Draw Fill OptionsOverrides the world's Draw Fill Options setting.
Draw Contact TypeOverrides the world's Draw Contact Type setting.
Draw FilterOverrides the world's Draw Filter setting.
Draw TargetOverrides the world's Draw Target setting.
Draw ThicknessOverrides the world's Draw Thickness setting.
Draw Fill AlphaOverrides the world's Draw Fill Alpha setting.
Draw Point ScaleOverrides the world's Draw Point Scale setting.
Draw Normal ScaleOverrides the world's Draw Normal Scale setting.
Draw Force ScaleOverrides the world's Draw Force Scale setting.
Draw At TransformDraws bodies at the pose of their Transform component rather than their simulated pose.
Draw ColorsOverrides the world's Draw Colors setting.

Reset Preferences

Property

Description

Reset PreferencesRestores all the properties in the Physics Core tab to their default values.

Additional resources