Skip to content

Class AudityNode

Base of every node in a Sound Graph. Nodes are plain serializable classes stored in the graph’s [SerializeReference] node list - never standalone assets. Value inputs (Audio/Float/SampleSet) are single-capacity; TRIGGER inputs take multiple wires (pulses OR, per-offset). Wiring lives in DarkEffekt.Audity.AudityNode.inputs on the consumer; DarkEffekt.Audity.AudityNode.FindInput(string) returns the first wire on a pin.

Declaration
[Serializable]
public abstract class AudityNode

Derived:
DarkEffekt.Audity.AudityKindNode

Graph-local identity, minted by DarkEffekt.Audity.AudityGraphDocument.AddNode%60%601.

Declaration
public string Id { get; }
Declaration
public IReadOnlyList<AudityPortConnection> Inputs { get; }

Instance-dependent editor title (a Constant’s value, an interface node’s member name), or null to use the [AudityNodeInfo] title.

Declaration
public virtual string DisplayTitle { get; }

The blackboard item this node references by name (a Parameter/Trigger In or Out, an Audio In/Out, a Sample Set - the interface members whose editor field carries DarkEffekt.Audity.AudityParameterNameAttribute), or null for nodes that don’t reference one. Double-clicking the node selects this name in the blackboard.

Declaration
public virtual string BlackboardReferenceName { get; }

Appends this node’s input ports (compiler and editor both consume this).

Declaration
public abstract void GetInputPorts(List<AudityPinSpec> ports)
Type Name
System.Collections.Generic.List<DarkEffekt.Audity.AudityPinSpec> ports

Appends this node’s output ports.

Declaration
public abstract void GetOutputPorts(List<AudityPinSpec> ports)
Type Name
System.Collections.Generic.List<DarkEffekt.Audity.AudityPinSpec> ports

The authored inline value behind an unconnected float input pin, if this node exposes one (compiled into the pin’s fallback).

Declaration
public virtual bool TryGetInlineValue(string portId, out float value)

System.Boolean

Type Name
System.String portId
System.Single value

The authored inline value behind an unconnected VECTOR input pin (width 2-4), if this node exposes one - components beyond the pin’s width are ignored. Checked before DarkEffekt.Audity.AudityNode.TryGetInlineValue(System.String%2cSystem.Single%40) at compile.

Declaration
public virtual bool TryGetInlineVector(string portId, out Vector4 value)

System.Boolean

Type Name
System.String portId
UnityEngine.Vector4 value

Serialized property paths (node-relative) whose changes reshape this node’s ports or body, so the editor knows to rebuild the node view.

Declaration
public virtual IEnumerable<string> BodyRebuildTriggerPaths()

System.Collections.Generic.IEnumerable<System.String>

Node-relative serialized property behind a float pin’s inline value, or null when the pin has none. Kind nodes default to the pin id by convention.

Declaration
public virtual string InlineValuePath(string portId)

System.String

Type Name
System.String portId

Grow inline-value backing arrays to match a raised count field, returning true when anything changed. Grow-only: lowering the count keeps authored values for a later raise, and the compiler reads out-of-range elements as 0. The editor calls this on the count edit itself, never on UI build - opening an asset must not mutate it (the schema’s inline resolve does not grow).

Declaration
public virtual bool SyncInlineArrays()

System.Boolean

Display-only unit tag for a float input pin (“dB”, “Hz”, “st”, “s”), or null for unitless. The editor shows it as the inline field’s scrub label so the pin’s domain reads at the point of edit; time-unit (“s”) pins floor at 0. Custom kinds override this alongside DarkEffekt.Audity.AudityNode.TryGetInlineValue(System.String%2cSystem.Single%40).

Declaration
public virtual string InlineValueUnit(string portId)

System.String

Type Name
System.String portId

Extra serialized fields the editor’s default body dump must skip.

Declaration
public virtual IEnumerable<string> HiddenBodyPaths()

System.Collections.Generic.IEnumerable<System.String>

Instance-authored display label for a pin (“enter0” → “Enter Combat”), or null for the default naming. Presentation only - ids and wiring never change.

Declaration
public virtual string PortDisplayLabel(string portId)

System.String

Type Name
System.String portId

Extra create-menu entries for this node type, one per preset variation - the Math node yields “Add”, “Subtract”, … so each op is searchable by name. Labels become the search leaves under the type’s create-menu group; payloads round-trip opaquely into DarkEffekt.Audity.AudityNode.ApplyCreationPayload(object) on the fresh instance.

Declaration
public virtual IEnumerable<(string label, object payload)> GetCreationVariants()

System.Collections.Generic.IEnumerable<System.ValueTuple<System.String,System.Object>>

Applies a create-menu payload (a variant’s op, a reroute’s pin domain) to this just-created instance. Called once, before the node joins the graph.

Declaration
public virtual void ApplyCreationPayload(object payload)
Type Name
System.Object payload

The connection wired into portId, or null.

Declaration
public AudityPortConnection FindInput(string portId)

DarkEffekt.Audity.AudityPortConnection

Type Name
System.String portId