Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

How to sync multiple playable director when some paused and resumed

Discussion in 'Timeline' started by Kichang-Kim, Apr 3, 2020.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    Hi.

    I have a question about syncing animation between multiple playable director (using same timeline asset).

    If I have 4 playable director and that shows exactly same animations, how to sync if one of it is deactivated and re-activated after a while.

    I tried to set PlayerableDirector.time and Play() in OnEnable, but no lucks.

    Any workaround or ideas are welcome.

    Thanks.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Something like this should work.

    playableDirector.time = otherDirector.time;
    playableDirector.Play();
    playableDirector.Evaluate();

    The Evaluate will cause the timeline to be evaluated _this_ frame at that time, as opposed to the next.
     
    Kichang-Kim likes this.