Search Unity

Timeline animations ignored with manual update method

Discussion in 'Timeline' started by mrtenda, Oct 5, 2018.

  1. mrtenda

    mrtenda

    Joined:
    Jun 6, 2017
    Posts:
    73
    When I play my timeline on a PlayableDirector with timeUpdateMode set to GameTime, the animations I've placed on the timeline play on my character as expected. However, when I try to use a PlayableDirector with timeUpdateMode set to Manual, I never see the animations play on the character, which is not what I would expect.

    Is this the intended behavior from Timeline? Is there a workaround I can use to play animations even while updating the timeline manually? (I'm manually updating the timeline because I need to sync the timeline's playback with the audio playback in the audio engine (FMOD).)

    By the way, I should also mention that I do have an Animator Controller on the character's Animator. If I remove the Animator Controller from the character's Animator, the animations seem to play even with timeUpdateMode set to Manual. However, I need the Animator Controller on that character's Animator, because I need the character to be operating normally when the timeline isn't playing an animation on it. (Again, this all seems to work fine with timeUpdateMode set to GameTime).

    I am using Unity 2018.2.11f1. Here's a simple unity package that reproduces the behavior I've described: https://www.dropbox.com/s/5qyp4jgo5n30r04/TimelineManualNoAnimRepro-20181005.unitypackage?dl=0

    Thank you.
     
  2. mrtenda

    mrtenda

    Joined:
    Jun 6, 2017
    Posts:
    73
    Still not sure if the behavior I described above is expected or not, but I found a workaround: putting the PlayableDirector.Evaluate call inside of LateUpdate. I am guessing that this works because it applies its changes after the Animator Controller applies its own changes, therefore overwriting them.
     
    Duffay likes this.
  3. EthanF4D

    EthanF4D

    Joined:
    Jan 9, 2018
    Posts:
    13
    Our team stumbled on this same problem. We are also updating in Update(), we find that animations recorded directly in track works, but all animation clips do not. Thanks for your findings we moved it to LateUpdate() and all is fine now.
     
    mrtenda likes this.
  4. EthanF4D

    EthanF4D

    Joined:
    Jan 9, 2018
    Posts:
    13
    I have a related problem today. We also use MasterAudio.PlaySoundAtTranformAndForget(). It basically place an audio source at that transform position. If using GameTime mode, the source is at correct place. If using Manual mode, the source is at pre-animated location. We are using 2017.3 though.