Version: Unity 6.6 Beta (6000.6)
Language : English
UI Toolkit profiler module reference
UI Toolkit profiler markers

UI Toolkit Details profiler module reference

The UI Toolkit Details profiler module collects data about the work your application performs to render and update your UI.

Use the module to identify performance bottlenecks and optimize your UI elements.

You can profile UI for Edit mode, Play mode, and player builds on devices. The profiler’s Play mode captures only in-game UI, while Edit mode captures Unity Editor UI and in-game UI running in the Game view. For more information on profiling, refer to Collecting performance data.

To open the Profiler window, go to Window > Analysis > Profiler. For more information, refer to Unity Profiler.

The UI Toolkit Details profiler module
The UI Toolkit Details profiler module

UI Toolkit Details profiler module charts

The UI Toolkit Details profiler module contains the following charts. Each chart plots one value per frame:

Chart Description
Batches Count Number of batches rendered.
Draw Calls Count Number of draw calls.
Vertices Count Number of vertices.
Indices Count Number of indices.
Hierarchy Version Changes Number of hierarchy version changes for all panels. For example, adding, removing, or reparenting of visual elements.
Repaint Version Changes Number of repaint version changes for all panels.
VisualElement Count Number of visual elements in all panels.
Event Count Number of events dispatched on all panels. For example, pointer, keyboard, or navigation.

A version change is any modification that flags data for a panel to reprocess. Panels process these changes in a deferred pass, which can itself produce more version changes.

For example, the Repaint Version Changes value is the number of changes accumulated since the panel last updated its rendering data. Updating rendering data isn’t the same as rendering a frame: a panel can render multiple frames without updating its data, or update its data multiple times between renders.

Because the deferred pass can itself produce version changes, a single user action can register as several.

Select this module in the Profiler window to view the data. Select a point on the chart to view the data for that frame in the details pane in the bottom half of the window.

For each panel or batch, the details pane displays the chart data along with the following:

Data Description
Panel / Batch The panel name or batch number. For runtime UI, the panel name is the Panel Settings asset name. For Editor UI, the panel name is the EditorWindow name.
Batches Number of batches emitted by this panel during the render pass.
Draw Calls Number of Draw commands processed.
Vertices Number of vertices referenced by Draw commands.
Indices Number of indices submitted by Draw commands.
Imm Draws Number of Immediate-mode draws.
Draw Ranges Number of contiguous draw ranges stashed before each batch is broken.
Breaking Reason Reason why the renderer broke this batch instead of continuing to grow it.
Owner Panel component that owned the render chain when the batch was broken.
Hierarchy Changes Number of hierarchy version changes. For example, adding, removing, or reparenting of visual elements.
Repaint Changes Number of repaint version changes.
VE Count Number of visual elements in this panel’s hierarchy.
Events Number of events dispatched on this panel.

The UI Toolkit profiler modules display the following additional controls:

  • A: Select Open Frame Debugger to inspect underlying rendering calls. For more information, refer to Frame Debugger.
  • B: Select Open UI Toolkit Debugger to inspect a panel’s UI elements. For more information, refer to UI Toolkit Debugger.
  • C: Open the documentation related to profiling UI.
  • D: Select the Inspector icon to show or hide UI Toolkit related data.
  • E: This pane is available when you show UI Toolkit related data by selecting the Inspector icon highlighted in (D). It displays more data for the chosen row, such as the associated panel components, batch breaking reasons, and the dispatched events. The events list provides information about the event type, the receiving element’s type and name, the panel component, and the event parameters.
  • F: Select this to highlight the panel component in the Scene view and the Hierarchy.
Additional controls available in the UI Toolkit profiler modules view
Additional controls available in the UI Toolkit profiler modules view

Select a panel to view the count of each batch breaking reason for this frame.

Select a batch to view more information about the batch breaking reason.

The following batch breaking reasons are possible:

  • Default Material Change: A Push/PopDefaultMaterial command interrupted the chain.
  • Immediate Command: An Immediate (or ImmediateCull) command interrupted the chain.
  • Material Change: A different material was needed for the next draw.
  • Page Change: The next draw uses a mesh on a different vertex or index buffer.
  • Ranges Buffer Full: The internal draw-range buffer ran out of room mid-pass and had to flush.
  • Render Chain Cut: A CutRenderChain command (new render chain owner / world-space root).
  • Scissor Change: A Push/PopScissor command changed the clip rectangle.
  • Stencil Ref Change: The stencil reference value changed (typically a clipping mask boundary).
  • Texture Slots Exhausted: All available texture slots were in use; no room for the next draw’s texture.
  • View Change: A Push/PopView command changed the view matrix.

Additional resources

UI Toolkit profiler module reference
UI Toolkit profiler markers