Search Unity

Timeline Dialog Box User Interaction

Discussion in 'Timeline' started by Gasric, Mar 10, 2020.

  1. Gasric

    Gasric

    Joined:
    Sep 8, 2013
    Posts:
    66
    Hi Folks,

    I am not getting timeline! I am trying to have a dialog box appear and display it's text but I don't know how to pause it and have the timeline continue when the player presses any key.

    I have everything in place and if I just hit play it works as a non stop sequence. The part I'm missing is what do I do to achieve the pause and user interaction and how?

    Thanks in advance!
     
  2. TimmyTheTerrible

    TimmyTheTerrible

    Joined:
    Feb 18, 2017
    Posts:
    186
    Create a Timeline Signal. Call it whatever you want.

    Now click the little pin to show/hid markers on the timeline, and click Add Marker. Select the the signal you just created.

    By default this will have created a signal receiver on the game object that has the playable director. So click on the reaction dropdown button, and select the Playable Director component from the list. This will show some functions, and the one our looking for is of course named Pause.

    Now, when the timeline reaches the the marker, it will cause the pause function on the playable director at the appropriate time. All thats left to do, is select your button, and in the OnClick inspector, add the Playable Director, but this time select the Resume component function.
     
  3. Gasric

    Gasric

    Joined:
    Sep 8, 2013
    Posts:
    66
    Thank you! I will give this a shot and will no doubt have questions.
     
  4. Gasric

    Gasric

    Joined:
    Sep 8, 2013
    Posts:
    66
    Finally got back to this.

    1. So I have created a sprite to walk in an L shape using timeline with no issues.
    2. Next stage I added a UI text box and button which activated near the end of the walk.
    3. A pause signal has been used just at the end of the UI activation.
    4. I click the END button and it turns off the UI and triggers a resume play function which allows the sprite to finish walking off the screen.
    Okay, so while this is going on it will hit the pause function of the playable director then ping my sprite back to its starting point, however, when I hit end on the button it will turn off the UI and resume the timeline with the sprite back at the position it should pause at.

    It then completes the timeline with no issues.

    Now I think this has something to do with the pause function within the playable director but I not sure how to fix it. Any ideas?