Search Unity

Blend Tree ignores animations with 'Loop Time' unchecked.

Discussion in 'Animation' started by Sigma266, Jul 13, 2018.

  1. Sigma266

    Sigma266

    Joined:
    Mar 25, 2017
    Posts:
    99
    Pretty much everything's on the title. I'm not sure why this is happening, but animations that do have Loop Time checked work just fine. What's going on?
     
  2. gambitslacklines

    gambitslacklines

    Joined:
    Feb 23, 2015
    Posts:
    14
    Easy to explain, the Blendtree runs one time when you enter it, if the animations or not set to loop, they will play onces and they are done.

    Lets say you got 2 animations in a Blendtree, which are based on a speedparameter like Walk-Run.

    Once the animator enters the blendtree, both animations start playing blended untill they reach the endframe.

    So the way you got it, is the way it should be.

    You can use a "Transition-to-Self" If you want them to loop without checking the "Loop Time" paramter.
     
    Marktesla and thangchiba like this.
  3. Sigma266

    Sigma266

    Joined:
    Mar 25, 2017
    Posts:
    99
    I'm dumb and I forgot to mention that I don't want it to loop. It should do it once and then stop. Which is why I unchecked Loop Time. And thank you for answering.
     
  4. gambitslacklines

    gambitslacklines

    Joined:
    Feb 23, 2015
    Posts:
    14
    No problem, you are welcome. I was confused about the same thing when i started with mecanim and it took me a while to recnognize that it is the way it is intended to work.
     
  5. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Sorry for the necro but its not how its intended to work as its looping and they have loop time unchecked and do not have transition-to self. The OP didn't want some animations to loop but they are anyways. So this is still unanswered after multiple years and I am having the same issue without any answerers.

    Edit: For me it was a sub state machine not a blend tree and if there is no transition out of your sub-state machine in the parent machine, transitioning into "Exit" apparently, cause the parent machine to transition to "Entry," effectively looping, not exiting.
     
    Last edited: Mar 14, 2022