PSO tracing and warming example
Get started with PSO tracing and warm up using the Universal Render Pipeline (URP) sample.
読み終わるまでの所要時間 2 分最終更新 23日前
Get started with PSO tracing and warm up using the Universal Render Pipeline (URP) sample.
The Universal 3D sample uses the 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.
GraphicsStateCollectionSample script reference
The following table outlines the key PSO tracing and warming scripts used in this sample and their function:
Script | Description |
|---|---|
| Performs PSO tracing and warmup at runtime. Holds a list of recorded collections. |
| 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 |
| 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:
- Open the main terminal scene from .
Assets/Scenes/Terminal/TerminalScene.unity - Add an empty GameObject to the scene.
- Open your empty GameObject in the , select Add Component and add the Graphics State Collection Manager component.Inspector
?
- Set the Mode property of the Graphics State Collection Manager to Warm Up.
- 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 folder.
GraphicsStateCollections - Save the scene and project.
- 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.