Class AudityAnimationBridge
The animation-system adapter: plain serialized fields that AnimationClips (.anim assets) can key, pushed to named graph parameters each frame. Works anywhere Unity animation works - Animator Controllers, blend trees, Timeline Animation tracks - because the curves write ordinary component fields; this component is just the bridge from fields to the graph. It drives an DarkEffekt.Audity.AuditySource when one exists, or a bare AudioSource with a slot-authored graph (through DarkEffekt.Audity.AudityMessaging) - no other Audity component required.
Discrete events have two paths:
- An AnimationEvent on the clip calling DarkEffekt.Audity.AudityAnimationBridge.AudityTrigger(string) - the classic footstep pattern (place events at heel-strike frames).
- A trigger lane: key its Value 0 → 1 where the event belongs and the lane fires on the rising edge through 0.5. Unlike AnimationEvents, curve edges blend predictably inside blend trees and crossfades.
Animator lanes forward Animator Controller parameters (the locomotion Speed blend param, a grounded bool) to members - the value already driving the blend tree drives the graph, no game code.
Assembly: DarkEffekt.Audity.Runtime
Section titled “Assembly: DarkEffekt.Audity.Runtime”[AddComponentMenu("Audio/Audity Animation Bridge")][Icon("Packages/com.darkeffekt.audity/Editor/Icons/Assets/AudityAnimationBridge.png")]public sealed class AudityAnimationBridge : MonoBehaviourInheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour
Fields
Section titled “Fields”source
Section titled “source”[Tooltip("The source to drive. Empty uses the Audity Source on this object.")]public AuditySource sourceaudioSource
Section titled “audioSource”[Tooltip("Componentless alternative: the AudioSource to drive (slot-authored graph) when no Audity Source is set or found. Empty uses the AudioSource on this object.")]public AudioSource audioSourcesmoothSeconds
Section titled “smoothSeconds”[Tooltip("Glide time for pushed values. Negative uses each member's authored Smooth time; 0 follows the curve exactly.")]public float smoothSecondsanimator
Section titled “animator”[Tooltip("The Animator the Animator lanes read. Empty uses the Animator on this object.")]public Animator animatorvalues
Section titled “values”public List<AudityAnimationBridge.ValueLane> valuesanimatorValues
Section titled “animatorValues”public List<AudityAnimationBridge.AnimatorLane> animatorValuestriggers
Section titled “triggers”public List<AudityAnimationBridge.TriggerLane> triggersMethods
Section titled “Methods”AudityTrigger(string)
Section titled “AudityTrigger(string)”Fires a named trigger immediately. Call this from an AnimationEvent (string parameter = the Trigger member name) - footsteps and other animation-locked events want Immediate, not musical quantize. Needs a live instance; the crowd-scale alternative is DarkEffekt.Audity.AudityAnimationBridge.AudityPlay().
public void AudityTrigger(string member)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
member |
AudityPlay()
Section titled “AudityPlay()”Plays the source - AnimationEvent-callable. The crowd-scale event pattern: a finite one-shot graph played per event (so idle characters hold no live instance, and the source’s Batch Group caps the herd) instead of a parked instance waiting on triggers. Lane dedup resets so the fresh instance receives every lane’s current value, not only ones that changed since the last instance.
public void AudityPlay()