Runtime guidance
Performance And Platform Notes
Use the overlay deliberately in development and profiling builds while accounting for platform-specific counters.
- Runtime design
- Recommended usage
- Production guards
- Platform fallbacks
Azkar Screen Stats is built to keep the overlay itself from becoming the performance problem.
Performance Design
The runtime path uses:
- A camera-child
MeshRenderer. - A transparent overlay shader with
ZTest Always. - A generated 5x7 bitmap font atlas initialized once.
- Fixed-size text, frame sample, vertex, and index buffers.
- Manual numeric formatting for FPS, frame time, counters, and memory.
ProfilerRecorderfor memory and render statistics.- Configurable text and graph update rates so the mesh does not rebuild every frame unless needed.
The result is a compact overlay that is appropriate for quick device checks and constrained targets.
Recommended Usage
For day-to-day development, leave the overlay visible in test scenes and disable sections you do not need.
For device profiling, keep the graph enabled and set Target FPS to the target you care about, such as 30, 60, 90, or 120.
For multi-camera projects, assign Target Camera explicitly.
For production builds, hide the overlay by default or create it only in development builds:
#if DEVELOPMENT_BUILD || UNITY_EDITOR
gameObject.AddComponent<ScreenStatsOverlay>();
#endifFor custom debug menus, keep the component in the scene and drive visibility through Show(), Hide(), or Toggle().
Platform Notes
Some counters are provided by Unity only on certain platforms, render pipelines, graphics APIs, or build configurations.
If a value cannot be read, Azkar Screen Stats displays --. This can happen for CPU/GPU timing, render counters, or platform-specific profiler values.
This behavior is intentional. The overlay is designed to stay stable during runtime testing instead of throwing exceptions or hiding the full overlay because one counter is unavailable.
