---
title: PhysicsDrawOverride
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:29:38.287Z
locale: en-us
---

# PhysicsDrawOverride

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

## Definition

* **Type:** Class
* **Namespace:** [Unity.U2D.Physics.Editor](/engine/7000.0/script-reference/unity/u2d/physics/editor.md)
* **Assembly:** [UnityEditor](/engine/7000.0/script-reference/modules/unityeditor.md)

```csharp
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](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/settings/overrideoptions.md). A world opts out by setting [PhysicsWorld.disableDrawOverride](/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/disabledrawoverride.md), 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](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/defaultsettings.md) | The settings the override starts from: the current default world definition's draw values, with the draw options and hiding with gizmos selected. |
| [enabled](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/enabled.md)                 | Controls whether the override is in effect.                                                                                                       |
| [settings](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/settings-1.md)             | The override values and the selection of which of them apply.                                                                                     |

## Static Events

| Member                                                                                             | Description                                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [changed](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/changed.md) | Raised after [PhysicsDrawOverride.enabled](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/enabled.md) or [PhysicsDrawOverride.settings](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/settings-1.md) changes. |

## Structs

| Struct                                                                                                                   | Description                                                                            |
| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| [PhysicsDrawOverride.Settings](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/settings.md) | The draw values the override uses, together with the selection of which of them apply. |

## Enums

| Enum                                                                                                                                   | Description                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [PhysicsDrawOverride.OverrideOptions](/engine/7000.0/script-reference/unity/u2d/physics/editor/physicsdrawoverride/overrideoptions.md) | Selects which draw values the override replaces while it is enabled. |
