Skip to content

Class AudityPerfHud

On-screen per-node render timing - the Activity panel’s numbers without the editor. Drop on any GameObject in a scene that plays Audity content; it registers as the telemetry sink, requests tracing, and draws per-instance node costs via OnGUI.

Built for RELEASE (non-development) player builds: the engine’s trace timestamps are plain clock reads inside the Burst block loop, not Unity Profiler markers, so the numbers reflect shipping code - Burst AOT, safety checks off, no profiler attached. The trace itself costs two clock reads per node per block, identical in editor and player, so readings stay comparable.

Declaration
public sealed class AudityPerfHud : MonoBehaviour, AudityTelemetry.ISink

Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour

Implements:
DarkEffekt.Audity.AudityTelemetry.ISink

Declaration
[Tooltip("Exponential smoothing for the per-window µs numbers (0 = frozen, 1 = raw latest window).")]
[Range(0.05, 1)]
public float smoothing
Declaration
public void OnNode(int nodeIndex, int activeVoices, float meter)
Type Name
System.Int32 nodeIndex
System.Int32 activeVoices
System.Single meter
Declaration
public void OnParameter(uint id, float value)
Type Name
System.UInt32 id
System.Single value

A Wave Player’s first live voice position - playhead in clip-rate frames, plus the clip’s own frame count.

Declaration
public void OnVoice(int nodeIndex, float playhead, int clipFrames, int clipIndex, bool scheduled)
Type Name
System.Int32 nodeIndex
System.Single playhead
System.Int32 clipFrames
System.Int32 clipIndex
System.Boolean scheduled
Declaration
public void OnStatus(int activeVoices, long clock)
Type Name
System.Int32 activeVoices
System.Int64 clock

One node’s accumulated render cost this window (ProfilerUnsafeUtility ticks; convert with TimestampToNanosecondsConversionRatio). Sent only while DarkEffekt.Audity.AudityTelemetry.TraceRequested.

Declaration
public void OnTiming(int instanceId, int nodeIndex, int kindIndex, long ticks, int blocks)
Type Name
System.Int32 instanceId
System.Int32 nodeIndex
System.Int32 kindIndex
System.Int64 ticks
System.Int32 blocks

Whole-render cost this window: DSP load = ticks-as-seconds over (frames/sampleRate).

Declaration
public void OnBlockTiming(int instanceId, long ticks, long peakBlockTicks, int blocks, long frames)
Type Name
System.Int32 instanceId
System.Int64 ticks
System.Int64 peakBlockTicks
System.Int32 blocks
System.Int64 frames