BeginTrace()
Start tracing shader variants and graphics states encountered at runtime.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEngine.Experimental.Rendering
- Assembly: UnityEngine.CoreModule
public bool BeginTrace()
Returns
Type | Description |
|---|---|
| bool | Returns true if tracing successfully started, false otherwise. |
Remarks
Graphics states will only be traced when SystemInfo.supportsParallelPSOCreation is true.
Examples
using UnityEngine;using UnityEngine.Experimental.Rendering;public class BeginTraceExample : MonoBehaviour{ public GraphicsStateCollection graphicsStateCollection; void Start() { graphicsStateCollection = new GraphicsStateCollection(); graphicsStateCollection.BeginTrace(); } void OnDestroy() { graphicsStateCollection.EndTrace(); }}