BeginTrace()
Start tracing shader variants and graphics states encountered at runtime.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public bool BeginTrace()
Returns
Type | Description |
|---|---|
| bool | True if tracing successfully started, false otherwise. |
Remarks
The GraphicsStateCollection.graphicsDeviceType, GraphicsStateCollection.qualityLevelName, and GraphicsStateCollection.runtimePlatform for this collection are set when tracing begins.
Tracing cannot begin if any collection is already currently tracing.
using UnityEngine;using UnityEngine.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.