Search Issue Tracker

By Design

Votes

1

Found in [Package]

1.7.6

1.8.6

Issue ID

TB-298

Regression

No

Timelines are not synchronized when they are both played simultaneously

Package: Timeline

-

How to reproduce:
1. Open the attached project "TimelineBug.zip"
2. Enter Play Mode
3. Wait ~15 seconds

Expected results: "TimelineCube" and "TimelineSphere" are synchronized
Actual results: "TimelineCube" and "TimelineSphere" are not synchronized

Reproducible with: 1.7.6 (2021.3.39f1, 2022.3.31f), 1.8.6 (2021.3.39f1, 2022.3.31f, 6000.0.4f1)

Reproducible on: Windows 11 23H2
Not reproducible on: No other environment tested

  1. Resolution Note:

    Hello! Thanks for logging this issue. After investigation I can confirm the behaviour you have described. However, I have concluded that this is by design.

    Short answer : The 'lagging' timeline only has an Animation Track. Animation playables can take an extra frame to detect completion. You can work-around this by switching the director wrap modes to Loop (and removing your manual calls to Play) or adding other track types and clips to your Timeline (so there are non-animation playables).

    Long answer : The project included has two Timelines controlled by two Playable Directors. The directors are Played by another MonoBehaviour that, during Update, calls Play whenever it sees that they are not currently playing (ie : the timeline is complete and the director state is Paused). This somewhat mimics a Loop wrap mode.

    Each subsequent "loop" shows that one of the timelines is "behind" the other. It's visible in the scene by the sphere lagging behind the cube.

    The cause of this is that the "SphereTimeline" only has an AnimationTrack. The "CubeTimeline" has an AnimationTrack AND a ActivationTrack. Most playables are processed by the director. Animation playables on the other processed by the animation system.

    When the director is processing its playables it checks if the current time is at the duration and marks the Playable as 'done'. This will occur even if the graph contains animation nodes. If there are ONLY animation nodes then the root playable isn't added to the processing queue as the animation system will handle things.

    Your CubeTimeline gets marked as done due to its Activation Playable being in the graph, then when Update is called on your behaviour cubeDirector.state is Paused. The SphereTimeline (which is the one with only an animation track) will require another frame for the animation system to stop the graph.

    You can work around this by adding another track and a clip to your Sphere Timeline or by using the loop wrap mode on your directors.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.