Skip to content

Debug Draw Rect

Draw a world-space Rect so you can see its bounds during Play Mode.

This is useful for checking trigger areas, spawn zones, UI-to-world conversions, and other systems that build or reuse Rect data.

What It Does

Debug Draw Rect draws the four edges of the rect with debug lines.

You can also enable Draw Cross to add diagonals across the corners, which makes it easier to read the rect at a glance.

Like the other draw actions, it uses a duration of 0 while updating every frame, then redraws one last time with the configured duration when the state stops.

Parameters

Parameter Description
Rect The world-space rect to draw.
Color Color of the outline.
Draw Cross Draw diagonal lines across the rect.
Duration How long the lines remain visible when not updating every frame.
Depth Test If enabled, the lines can be hidden behind other geometry.

Example

Use this action to verify a spawn area:

  1. Create or calculate a Rect variable that represents the spawn bounds.
  2. Add Debug Draw Rect to the state that sets or uses that rect.
  3. Assign the rect variable and choose a visible color.
  4. Enable Draw Cross if you want the shape to stand out more clearly.

Notes

  • The rect is interpreted in world space.
  • This action adds extra behavior compared with a simple Debug.DrawLine wrapper because it builds the full rect outline for you.
  • If you need to debug a ray or line directly, use the simpler debug draw actions from the Action Browser.