Hey, I’ve encountered a strange bug with timeline, and I’m mostly sure it’s not something I’m doing. I managed to boil down an example to this:
I have a custom track, that extends TrackAsset and ILayerable:
[Serializable]
[TrackClipType(typeof(AnimationPlayableAsset), false)]
[TrackBindingType(typeof(Animator))]
public class CustomAnimationTrack : TrackAsset, ILayerable {
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount) {
return AnimationMixerPlayable.Create(graph, inputCount);
}
public Playable CreateLayerMixer(PlayableGraph graph, GameObject go, int inputCount) {
AnimationPlayableOutput playableOutput = AnimationPlayableOutput.Create(graph, "LayerMixerOutput123", null);
return Playable.Null;
}
}
The track just creates an AnimationMixerPlayable for the TrackMixer, and returns Playable.Null for the LayerMixer, but it also creates an instance of AnimationPlayableOutput there. This example does nothing with it but in my “actual” track I do use it.
So this particular track doesn’t do anything exciting (I removed all the irrelevant code), except for one thing. If I have two tracks, each with one clip (or more), the ControlTrack that comes after them will not work. So for example, in this setup:
The ControlTrack will not work. The clip that is on it is driving a GameObject in the scene with an ITimeControl script on it, that logs all the methods. I get no log in the console. I also don’t see anything weird in the playable graph. If I remove one of the custom tracks (or all the clips on one), the ControlTrack starts working normally. Other types of track (e.g. ActivationTrack) work as expected.
This is happening on Unity 2020.3.11f1. I attached an example project showing the issue.
Does anyone have an idea what’s going on?
7234742–870899–TimelineBug.zip (34.8 KB)