Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


2D Graphics Profiler module reference for URP

Find how many light textures, shadow textures, and draw calls Unity uses to render the 2D lights and shadows in your project.
Read time 4 minutesLast updated 23 days ago

Explore the statistics and properties in the 2D Graphics module to find how much work Unity does to render 2D lights, shadows, and normal maps.
The 2D Graphics module in the Profiler window displays these statistics for the frame you select in the chart. The module is available when your project uses the Universal Render Pipeline (URP).
To open the Profiler module, follow these steps:
  1. In the main menu, go to Window > Analysis > Profiler.
  2. Select Profiler Modules, then enable 2D Graphics.

Chart categories

The chart in the 2D Graphics module displays the following categories.

Chart

Description

Normal TexturesDisplays the number of normal map textures Unity creates in the selected frame.
Light TexturesDisplays the number of light textures Unity creates in the selected frame.
Shadow TexturesDisplays the number of shadow textures Unity creates in the selected frame.
Shadow Casters Draw CallsDisplays the number of times Unity draws shadow casters in the selected frame.
Shadow TrianglesDisplays the total number of triangles in the meshes of the shadow casters Unity draws in the selected frame.
Light BatchesDisplays the number of 2D lights Unity draws individually in the selected frame because it can't batch them into a single draw call.
Light TrianglesDisplays the total number of triangles in the meshes Unity uses to render 2D lights in the selected frame.

Module details pane

The details pane of the 2D Graphics module contains the 2D Graphics Statistics panel and a table of the lights and shadow casters Unity renders in the selected frame.
To make the details pane display data while Unity profiles your application, enable Live Update in the 2D Graphics Statistics panel.

Normal Maps

The Normal Maps section contains the following property.

Property

Description

Normal TexturesDisplays the number of normal map textures Unity creates in the selected frame. Unity creates a normal map texture for each group of sorting layers that requires one. For more information, refer to Add a normal map or a mask map to a sprite in URP.

Lights

The Lights section contains the following properties.

Property

Description

Light TexturesDisplays the number of light textures Unity creates in the selected frame. Unity creates a light texture for each blend style that a group of sorting layers uses. For more information, refer to Blend 2D lights.
Light BatchesDisplays the number of 2D lights Unity draws individually in the selected frame because it can't batch them into a single draw call. For more information, refer to Optimize 2D lights.
Light TrianglesDisplays the total number of triangles in the meshes Unity uses to render 2D lights in the selected frame. Unity counts the mesh of each light once.

Shadows

The Shadows section contains the following properties.

Property

Description

Shadow TexturesDisplays the number of shadow textures Unity creates in the selected frame.
Shadow Casters Draw CallsDisplays the number of times Unity draws shadow casters in the selected frame. Unity draws a shadow caster once for each 2D light that lights it. For more information, refer to Shadow Caster 2D component reference for URP.
Shadow TrianglesDisplays the total number of triangles in the meshes of the shadow casters Unity draws in the selected frame. Unity counts the mesh of each shadow caster once.

Timing

The Timing section contains the following properties for the selected frame.

Property

Description

Render Pass TimeDisplays the time Unity spends in the main render pass of the 2D Renderer.
Draw Shadow TimeDisplays the time Unity spends drawing shadow casters into the shadow textures.
Normal Pass TimeDisplays the time Unity spends rendering the normal map textures.
Shadow Pass TimeDisplays the time Unity spends rendering the shadow textures.

Light and shadow table

The table groups the GameObjects Unity renders into a Shadow category and a Light category and contains the following columns.

Column

Description

NameDisplays the name of the category, either Shadow or Light. Expand a category to display the GameObjects Unity renders in that category.
TrianglesDisplays the number of triangles in the mesh of the GameObject. For a category row, displays the total for all the GameObjects in that category.
VerticesDisplays the number of vertices in the mesh of the GameObject. For a category row, displays the total for all the GameObjects in that category.
DrawCountDisplays the number of times Unity draws the light or the shadow caster in the selected frame. This column is empty for a category row.
To select the GameObject in the Hierarchy window, select a row.
If Unity doesn't render any 2D lights or shadow casters in the selected frame, the table displays a message that prompts you to select another frame.

Additional resources