Class AudityNodeRegistry
The node-def registry: the package’s own defs register together at first
access, and any other def registers the first time an authoring node asks
DarkEffekt.Audity.AudityNodeRegistry.KindOf%60%601 for its kind. Player builds keep every node type
the project’s graphs use. DarkEffekt.Audity.AudityNodeRegistry.Register%60%601 and
DarkEffekt.Audity.AudityNodeRegistry.RegisterAssembly(System.Reflection.Assembly) register ahead of use. Each def is assigned a kind id
(session-only - programs are transient, assets serialize node classes, not
ids) and its exec is compiled into a Burst function-pointer
table the realtime executor dispatches through. Registration is main-thread
and idempotent; the audio thread only ever reads finished table slots.
Assembly: DarkEffekt.Audity.Runtime
Section titled “Assembly: DarkEffekt.Audity.Runtime”[BurstCompile]public static class AudityNodeRegistryProperties
Section titled “Properties”All registered defs (index = kind id; null entries are unused ids).
public static IReadOnlyList<AudityNodeDef> Defs { get; }Fields
Section titled “Fields”MaxKinds
Section titled “MaxKinds”Kind ids are a byte; the table is fixed-size and never reallocates.
public const int MaxKinds = 256Methods
Section titled “Methods”Get(AudityNodeKindId)
Section titled “Get(AudityNodeKindId)”The def for a kind, or null when nothing is registered under it.
public static AudityNodeDef Get(AudityNodeKindId kind)Returns
Section titled “Returns”DarkEffekt.Audity.AudityNodeDef
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityNodeKindId | kind |
DisplayNameForIndex(int)
Section titled “DisplayNameForIndex(int)”Display name by raw kind index - the companion to
DarkEffekt.Audity.AudityTelemetry.ISink.OnTiming(System.Int32%2cSystem.Int32%2cSystem.Int32%2cSystem.Int64%2cSystem.Int32), whose rows carry the index
(public so player-build telemetry sinks can label their rows).
public static string DisplayNameForIndex(int index)Returns
Section titled “Returns”System.String
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Int32 |
index |
KindOf<TDef>()
Section titled “KindOf<TDef>()”The kind id assigned to a def class, registering the def on first use. This
is how an authoring node names its kind, and the new() constraint is
what keeps the def in a trimmed player wherever the node is kept.
public static AudityNodeKindId KindOf<TDef>() where TDef : AudityNodeDef, new()Returns
Section titled “Returns”DarkEffekt.Audity.AudityNodeKindId
Type Parameters
Section titled “Type Parameters”TDef
Register<TDef>()
Section titled “Register<TDef>()”Registers one def class ahead of its first use. Idempotent.
public static void Register<TDef>() where TDef : AudityNodeDef, new()Type Parameters
Section titled “Type Parameters”TDef
RegisterAssembly(Assembly)
Section titled “RegisterAssembly(Assembly)”Registers every concrete [AudityNode] DarkEffekt.Audity.AudityNodeDef class in
assembly - “everything in my assembly” in one call, e.g.
AudityNodeRegistry.RegisterAssembly(typeof(MyNodeDef).Assembly).
Idempotent per def; safe to call from several bootstraps.
public static void RegisterAssembly(Assembly assembly)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Reflection.Assembly |
assembly |
EnsureInitialized()
Section titled “EnsureInitialized()”public static void EnsureInitialized()