Hi, I’m trying to override MarkerTrack, but its methods are not being called. Here’s what I have:
[TrackBindingType(typeof(MyComponent))]
public sealed class CustomMarkerTrack : MarkerTrack
{
public IEnumerable<CustomMarker> CustomMarkers => GetMarkers().OfType<CustomMarker>();
public override IEnumerable<PlayableBinding> outputs
{
get
{
// This is called as expected.
Debug.Log(nameof(this.outputs), this);
return base.outputs;
}
}
protected override void OnBeforeTrackSerialize()
{
// This is called as expected.
Debug.Log(nameof(OnBeforeTrackSerialize), this);
base.OnBeforeTrackSerialize();
}
protected override void OnAfterTrackDeserialize()
{
// This is called as expected.
Debug.Log(nameof(OnAfterTrackDeserialize), this);
base.OnAfterTrackDeserialize();
}
protected override void OnCreateClip(TimelineClip clip)
{
// This is never called.
Debug.Log(nameof(OnCreateClip), this);
base.OnCreateClip(clip);
}
protected override Playable CreatePlayable(PlayableGraph graph, GameObject gameObject, TimelineClip clip)
{
// This is never called.
Debug.Log(nameof(CreatePlayable), this);
return base.CreatePlayable(graph, gameObject, clip);
}
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
{
// This is never called.
Debug.Log(nameof(CreateTrackMixer), this);
return ScriptPlayable<CustomMarkerMixer>.Create(graph, inputCount);
}
}
What am I doing wrong?