Search Unity

Ak Event Track with manual time evaluation is causing audio corruption

Discussion in 'Timeline' started by DanFreeStyle, Jan 11, 2019.

  1. DanFreeStyle


    Nov 21, 2012
    Hey everyone,

    Long-time Unity user, first-time forum poster here!

    I'm not sure if I'm doing this wrong or if I am the first person to notice a bug...

    I have a Playable Director which I need to have in Update Method: Manual mode and I am updating it as such (note, this is simplified to try and pare back the issue to it's most basic form):

    Code (CSharp):
    1.         private void Update()
    2.         {
    3.             m_playableDirector.time = Time.time % m_playableDirector.duration;
    4.             m_playableDirector.Evaluate();
    5.         }

    This works fine for the animation track which is updating the transform of the GameObject.

    The problem arises when I add an AK Event Track with an AK Event Playable on it; the audio for the clip does not play cleanly and sounds like it has been triggered multiple times. If I switch over the Playable Director to Update Method: Game Time then the audio will play cleanly indicating that this is probably not an issue with the properties of the AK Event Playable itself.

    Does anyone know about this particular issue or have any relevant experience? It would be unfortunate if I had to write a utility component for triggering audio events manually when the timeline seems like it should be the perfect option.

    Thanks for your help!
  2. seant_unity


    Unity Technologies

    Aug 25, 2015
    I'm not familiar with the AK events but in general, manual time with a forced evaluate and audio do not play well together. Manually calling Evaluate() is akin to scrubbing the playhead in the timeline editor, so the behaviour you are seeing is somewhat expected.