停止跟踪在运行时遇到的着色器变体和图形状态。
using UnityEngine; using UnityEngine.Experimental.Rendering;
public class EndTraceExample : MonoBehaviour { public GraphicsStateCollection graphicsStateCollection;
void Start() { graphicsStateCollection = new GraphicsStateCollection(); graphicsStateCollection.BeginTrace(); }
void OnDestroy() { graphicsStateCollection.EndTrace(); } }