Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

PhysicsDrawOverride

class in Unity.U2D.Physics.Editor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The Editor draw override: a per-user preference that replaces the draw settings of every physics world while it is enabled.

The override changes no stored value. Each world keeps its own draw settings, as does the project settings asset, and reading a world's draw properties still returns the world's own values. Only the drawing itself uses the override values, and only for the values selected in PhysicsDrawOverride.Settings.overrideOptions. A world opts out by setting PhysicsWorld.disableDrawOverride, after which it draws as if the override were disabled. The state is saved in the Editor preferences for the current user, so it follows them into every project and is never shared through version control. This is Editor-only and never affects a player.

Static Properties

Property Description
defaultSettings The settings the override starts from: the current default world definition's draw values, with the draw options and hiding with gizmos selected.
enabled Controls whether the override is in effect.
settings The override values and the selection of which of them apply.

Events

Event Description
changed Raised after PhysicsDrawOverride.enabled or PhysicsDrawOverride.settings changes.