Search Unity

The animations suddenly stop blending.

Discussion in 'Animation' started by unity_qR1sIyXklBgIjA, Jul 9, 2019.

  1. unity_qR1sIyXklBgIjA

    unity_qR1sIyXklBgIjA

    Joined:
    Dec 11, 2018
    Posts:
    1
    Hi, I have a problem with the animator, after a while I use the character, mainly when I perform more operations in a short time, the animator stops blending the various animations and resumes its correct functioning only once I have pressed a few ticks, maybe in order to perform some kind of refresh of the animator. It also happens in build.

    Do you know why this happens? Here is a video to show you my problem.
     
  2. Nosaru

    Nosaru

    Joined:
    Feb 26, 2017
    Posts:
    13
    I have exact same issue, If I do a Play or Crossfade from code during Mecanim transition all animations stop blending.
    If I then go in the animator and manually do something (anything) lets say untick and tick "Has Exit Time" the Animator will start doing transitions correctly again.

    Another way to get to this is to do a transition with no exit time and all values on 0. Not as stable at getting this bug as the script version, no idea why.

    Is there a command we can run to simulate this Mecanim refresh that we do by interacting with it?

    Edit: This is on 2019.2.0f1
     
    Last edited: Aug 26, 2019
    ryschawy likes this.
  3. TPEUnity

    TPEUnity

    Joined:
    Jan 17, 2018
    Posts:
    36
    For me this happened if i called two crossfades shortly after each other so that they "overlap" each other. Is this bug or by design i dont know... Work around was to use triggers from any state to get similar behaviour.
     
  4. Nosaru

    Nosaru

    Joined:
    Feb 26, 2017
    Posts:
    13
    I can confirm this, however I would love to avoid doing it this way and just activate animations through code. The whole UI becomes huge mess real quick so Im trying to avoid adding to it.
     
  5. Nosaru

    Nosaru

    Joined:
    Feb 26, 2017
    Posts:
    13
    Sent in a bug report with a test project with this problem to Unity a month ago. 0 communication.
    This issue is easily reproducible in all versions of unity 2018+
    Im on 2020 alpha, the issue is still there. No one gives a crap about this problem it seems.
     
  6. ryschawy

    ryschawy

    Joined:
    Jul 28, 2012
    Posts:
    65
    Ran into the same issue: Trying to Play or Crossfade from script while animator is in transition leads to corrupt animator internal states, e.g. following Crossfades not using transition time. I see that calling animator.Rebind() while in transition allows me to call Play and Crossfade again. Not perfect, but seems to work as the looked for 'Mecanim refresh' command. (I'm on 2019.2)
     
  7. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    It's 2024 and I am having the exact same problem.

    I'm crossfading into a falling animation, but that kills the mecanim transition conditions for the landing animation. Now the entire falling loop must play to the end before it transitions which is exactly what I don't want.

    Nice to know Unity is on the case.