PrecompiledGraphicsStateStats A PrecompiledGraphicsStateStats struct with the current counters, or an all-zero struct when SystemInfo.supportsPrecompiledGraphicsStateStats is false.
Returns counters describing precompiled graphics pipeline state cache hits and misses.
Check SystemInfo.supportsPrecompiledGraphicsStateStats first. When the current graphics device doesn't report these statistics, this method also sets PrecompiledGraphicsStateStats.isActive to false.
using UnityEngine; using UnityEngine.Rendering;
public class Example : MonoBehaviour { void ReportPrecompiledStateStatistics() { if (!SystemInfo.supportsPrecompiledGraphicsStateStats) return;
PrecompiledGraphicsStateStats stats = PrecompiledGraphicsState.GetStats(); Debug.Log($"Unknown-status lookups: {stats.unknownCacheStatusCount}"); } }