BeginTrace()
Start tracing shader variants and graphics states encountered at runtime.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Experimental.Rendering
- Assembly: UnityEngine.CoreModule
public bool BeginTrace()
Returns
Type | Description |
|---|---|
| bool | True if tracing successfully started, false otherwise. |
Remarks
Graphics states will only be traced when SystemInfo.supportsParallelPSOCreation is true.
The GraphicsStateCollection.graphicsDeviceType, GraphicsStateCollection.qualityLevelName, and GraphicsStateCollection.runtimePlatform for this collection are set when tracing begins.
using UnityEngine;using UnityEngine.Experimental.Rendering;public class BeginTraceExample : MonoBehaviour{ public GraphicsStateCollection graphicsStateCollection; void Start() { graphicsStateCollection = new GraphicsStateCollection(); graphicsStateCollection.BeginTrace(); } void OnDestroy() { graphicsStateCollection.EndTrace(); }}
Additional Resources: GraphicsStateCollection.EndTrace, GraphicsStateCollection.isTracing.