Skip to content

Class AudityPlayBehaviour

The behaviour behind DarkEffekt.Audity.AuditySourcePlayable.Create(UnityEngine.Playables.PlayableGraph%2cDarkEffekt.Audity.AuditySource%2cSystem.Single%2cSystem.Single) and the timeline Play Clip. Plays its source on the first processed frame, pushes the animated parameter lanes every frame, stops when the playable’s authored duration is reached (or when it is destroyed). At runtime an ordinary graph pause just stops advancing - the sound keeps ringing, DAW-style; leaving the clip at its tail or across a Timeline loop stops it. In editor preview every pause stops the sound. The source comes from playerData when the output binds one (Timeline), else from DarkEffekt.Audity.AudityPlayBehaviour.boundSource.

Declaration
[Serializable]
public sealed class AudityPlayBehaviour : PlayableBehaviour

Inheritance: System.Object -> UnityEngine.Playables.PlayableBehaviour

Declaration
[Tooltip("Hold the start on the transport grid (the timeline keeps advancing; the sound starts on the boundary).")]
public AudityQuantize startQuantize
Declaration
[Header("Animatable parameter lanes")]
[Tooltip("Member written by Value A. Key 'Value A' in the clip's curves.")]
public string memberA
Declaration
public float valueA
Declaration
[Tooltip("Member written by Value B.")]
public string memberB
Declaration
public float valueB
Declaration
[NonSerialized]
public float fadeInSeconds
Declaration
[NonSerialized]
public float fadeOutSeconds

Source used when the playable’s output binds none (code-built graphs).

Declaration
[NonSerialized]
public AuditySource boundSource

This function is called during the ProcessFrame phase of the PlayableGraph.

Declaration
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
Type Name Description
UnityEngine.Playables.Playable playable The Playable that owns the current PlayableBehaviour.
UnityEngine.Playables.FrameData info A FrameData structure that contains information about the current frame context.
System.Object playerData The user data of the ScriptPlayableOutput that initiated the process pass.

This method is invoked when one of the following situations occurs:

The effective play state during traversal is changed to Playables.PlayState.Paused. This state is indicated by FrameData.effectivePlayState.
The PlayableGraph is stopped while the playable play state is Playing. This state is indicated by PlayableGraph.IsPlaying returning true.
Declaration
public override void OnBehaviourPause(Playable playable, FrameData info)
Type Name Description
UnityEngine.Playables.Playable playable The Playable that owns the current PlayableBehaviour.
UnityEngine.Playables.FrameData info A FrameData structure that contains information about the current frame context.

This function is called when the Playable that owns the PlayableBehaviour is destroyed.

Declaration
public override void OnPlayableDestroy(Playable playable)
Type Name Description
UnityEngine.Playables.Playable playable The Playable that owns the current PlayableBehaviour.