Search Issue Tracker

By Design

Votes

0

Found in

2019.1.0a1

2019.1.0f2

2019.2.0a1

2019.3.0a1

Issue ID

1152532

Regression

No

Timeline will execute all signals in between when advancing PlayableDirector.Time

Timeline

-

How to reproduce:
1. Open attached project
2. Open Test scene
3. Select Test GameObject
4. Open Window > Sequencing > Timeline
5. Press Play in Timeline Window
6. Notice how "Forward", "Backward" and "YouShouldntSeeMe" messages printed to console every time play head reaches "Forward" marker and then instead of stopping at the End marker - loop repeats from Start because "Backward" signal was also executed

Reproducible with: 2019.1.2f1, 2019.2.0b1, 2019.3.0a2
Not reproducible with: 2017.4.26f1, 2018.4.0f1 due to incompatible Timelines

Actual results: instead of stopping at the End marker - loop repeats from Start because "Backward" signal was also executed
Expected results: Setting PlayableBehaviour.Time should skip any signals between current and new time or PlayableDirector should provide an option to jump to a specific marker / time and skip all signals in between

  1. Resolution Note (2019.3.X):

    Changing the time while the PlayableDirector is playing will emit all Signals (notifications) between the current and new time. This is by design.
    If you want to skip signals between the current and new time, you need to call Pause() on the PlayableDirector.
    (Also, the Time property on the PlayableDirector is in seconds, not in frames. So 180 needs to be 3 instead.)

    Here's what your updated code should look like:

    public class Test : MonoBehaviour
    {
    public PlayableDirector director;

    public void Forward()
    {
    Debug.Log("Forward");
    director.Pause(); // I added this line
    director.time = 3; // I changed ''180'' to ''3''
    director.Play();
    }

    public void Backward()
    {
    Debug.Log("Backward");
    director.Pause(); // I added this line
    director.time = 0;
    director.Play();
    }

    public void YouShouldntSeeMe()
    {
    Debug.Log("YouShouldntSeeMe");
    }
    }

Comments (2)

  1. adamstepinski

    Dec 14, 2022 13:12

    info about executing all signals should be added to deocumentation for PlayableDirector.time

  2. ROBYER1

    Jun 19, 2020 14:29

    This actually makes no sense when Signals can be toggled as 'Retroactive' or not though?

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.