---
title: PSO tracing and warming example
product: Unity Editor
version: '6000.7'
latest_version: '7000.0'
status: This page documents version 6000.7. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.7/manual/materials-and-shaders/shaders/shader-troubleshooting/shader-reduce-stalling/shader-prevent-stutter/shader-pso-trace-warming/shader-pso-example
latest_url: https://docs.unity.com/en-us/engine/7000.0/manual/materials-and-shaders/shaders/shader-troubleshooting/shader-reduce-stalling/shader-prevent-stutter/shader-pso-trace-warming/shader-pso-example.md
last_updated: 2026-10-29
generated_at: 2026-11-17T20:11:29.908Z
locale: en-us
---

# PSO tracing and warming example

> Get started with PSO tracing and warm up using the Universal Render Pipeline (URP) sample.

Get started with PSO tracing and warm up using the Universal Render Pipeline (URP) sample.

The Universal 3D sample uses the `GraphicsStateCollection` API. You can use this sample to help you get started with PSO tracing and warming methods. For more information about creating a project from the Universal 3D sample, refer to [Create a new project that uses URP](/engine/6000.7/manual/render-pipelines/universal-render-pipeline/introduction/installing-and-configuring-urp/creating-a-urp-project/creating-a-new-project-with-urp.md).

## Sample script reference

The following table outlines the key PSO tracing and warming scripts used in this sample and their function:

| **Script**                                                              | **Description**                                                                                                                                                                                                                                                                                                                                          |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Assets/SharedAssets/Scripts/Runtime/GraphicsStateCollectionManager.cs` | Performs PSO tracing and warmup at runtime. Holds a list of recorded collections.                                                                                                                                                                                                                                                                        |
| `Assets/SharedAssets/Scripts/Editor/GraphicsStateCollectionStripper.cs` | Ensures the build only includes the relevant collections for the target platform. The sample project targets multiple platforms and quality levels, so it contains multiple collections under the `Assets/SharedAssets/GraphicsStateCollections` folder. The filtering script removes unneeded collections for the target platform to reduce build size. |
| `Assets/SharedAssets/Scripts/Editor/GraphicsStateCollectionCombiner.cs` | Utility script that combines multiple selected collection files into one. Unity uses the first collection you select as the result collection. **Note**: This script combines collections that match the platform, graphics API, and quality level.                                                                                                      |

### Trace and warm up with the URP sample project

To trace and warm up PSOs with the sample project:

1. Open the main terminal scene from `Assets/Scenes/Terminal/TerminalScene.unity`.
2. Add an empty GameObject to the scene.
3. Open your empty GameObject in the Editor, select **Add Component** and add the **Graphics State Collection Manager** component.
4. Set the **Mode** property of the **Graphics State Collection Manager** to **Warm Up**.
5. Open the **More** (⋮) menu next to the **Graphics State Collection Manager**. Select **Update collection list** to populate the collection list with the collections from the `GraphicsStateCollections` folder.
6. Save the scene and project.
7. Build and run the Player, targeting either Windows and the DirectX 12 or Vulkan graphics API, or OSX and the Metal graphics API.

When you load the scene in the Player, Unity will now perform PSO warmup automatically.

## Additional resources

* [Introduction to PSO tracing and warming](/engine/6000.7/manual/materials-and-shaders/shaders/shader-troubleshooting/shader-reduce-stalling/shader-prevent-stutter/shader-pso-trace-warming/shader-pso-introduction.md)
