Documentation

Unity Engine

Download Unity

Unity Engine

PhysicsDrawOverride

The Editor draw override: a per-user preference that replaces the draw settings of every physics world while it is enabled.
Read time 1 minuteLast updated 3 hours ago

Definition

public static class PhysicsDrawOverride

Remarks

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

defaultSettingsThe settings the override starts from: the current default world definition's draw values, with the draw options and hiding with gizmos selected.
enabledControls whether the override is in effect.
settingsThe override values and the selection of which of them apply.

Static Events

Member

Description

changedRaised after PhysicsDrawOverride.enabled or PhysicsDrawOverride.settings changes.

Structs

Struct

Description

PhysicsDrawOverride.SettingsThe draw values the override uses, together with the selection of which of them apply.

Enums

Enum

Description

PhysicsDrawOverride.OverrideOptionsSelects which draw values the override replaces while it is enabled.