Lesson 75 +10 XP

Frame Debugger

Frame Debugger

The Frame Debugger allows you to freeze the game and inspect the step-by-step draw calls required to render a single frame.

What is a Draw Call?

A Draw Call occurs when the CPU instructs the GPU to draw a mesh on the screen.

  • Each draw call has overhead.
  • Having too many draw calls (hundreds or thousands) bottlenecks the CPU, causing low frame rates, even if the GPU is powerful.

Using the Frame Debugger

Open the window via Window -> Analysis -> Frame Debugger:

  1. Click the Enable button at the top-left of the window.
  2. The game freezes, and a list of draw calls (events) appears in the left panel.
  3. Click through the events sequentially. The game view updates step-by-step, showing exactly when each object (skybox, terrain, characters, UI) is drawn.
  4. The right panel displays details about the selected draw call, including which shader was used and why it could not be batched with the previous object.

Identifying Issues

Use the Frame Debugger to spot:

  • Objects drawn in the wrong order, causing overdraw.
  • UI canvases breaking batch rendering.
  • Unnecessary shader passes or shadow maps rendering when they are not visible.

TL;DR

  • The Frame Debugger breaks down rendering events for a single frame.
  • Enable it via Window -> Analysis -> Frame Debugger.
  • Click through the left list to see the frame compile step-by-step.
  • Use it to analyze batching failures and optimize draw call counts.