I know its early days but the audio track capabilities of the timeline are still very primitive which makes it almost unusable for my needs. I am thinking that the ultimate direction of unity is to literally have the sort of audio channel capabilities that you see in all DAWs but maybe this is beyond the scope of what unity has in mind. So instead of using an Audioclip, the user would reference a mixer channel track on the time line. This would open up support for transport curves that allow me to dynamically change the volume along the track.
I am trying to write my own but I am having problems creating my custom playablebehaviour from the audioclip timeline asset.
The following is an attempt to create a track mixer that requires AudioClip clipTypes but unfortunately it can create my playables from this clip type.
[TrackColor(0, 0.8623f, 0.3f)]
[TrackClipType(typeof(AudioClip))]
[TrackBindingType(typeof(AudioSource))]
public class AudioTimeLineTrack : TrackAsset {
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
{
return ScriptPlayable<AudioTimeLineMixerBehaviour>.Create (graph, inputCount);
}
protected override Playable CreatePlayable (PlayableGraph graph, GameObject go, TimelineClip clip)
{
var p = base.CreatePlayable (graph, go, clip);
ScriptPlayable<AudioTimeLineBehaviour > playable = (ScriptPlayable<AudioTimeLineBehaviour >) p;
return p;
}
}
The createPlayable is returning a null object. Can anyone point me in the right direction? is this even possible?