Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[Mecanim] Delay between calling play and actual playback

Discussion in 'Animation' started by Zocker1996, Apr 11, 2016.

  1. Zocker1996

    Zocker1996

    Joined:
    Jan 12, 2015
    Posts:
    20
    I got an animation controller with 4 layers, NO transitions (so no "HasExitTime"), and a float parameter which is 1 or -1.The parameter (="SpeedMod") is used as Speed Multiplier in some states to determinate the direction of the clip. Since my timescale is 0 the animation mode is "Unscaled time". First I use the runtime controller to setup events so that a method is invoked after a animation ends. SpeedMod is set to 1 at beginning.
    Then I do the following:
    1)Play a state with MyAnimator.Play ("Zoom", MyAnimator.GetLayerIndex ("Position"));
    2)After that is done I wait for the user to Click a button.
    3)Set SpeedMod to -1
    4)Play the same state again with MyAnimator.Play ("Zoom", MyAnimator.GetLayerIndex ("Position"));

    Everything worked fine, but it seems since I updated to Unity 5.3.4 I encounter a problem:
    After 4) there is a massive unwanted delay (up to 30 secounds) between calling the Play method of the animator and the actuall playback starts.

    I have no idea why.