上一帧中调用 Begin/End 对的数量。(只读)
计数器表示上一帧中完成或正在运行的分析块的数量。
using UnityEngine; using UnityEngine.Profiling;
public class ExampleClass : MonoBehaviour { Recorder materialSetPass; void Start() { materialSetPass = Recorder.Get("Material.SetPassFast"); materialSetPass.enabled = true; }
void Update() { if (materialSetPass.isValid) Debug.Log("Material SetPass count: " + materialSetPass.sampleBlockCount); } }