Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Complete a looping animation before transition

Discussion in 'Animation' started by VoodooDetective, Aug 1, 2020.

  1. VoodooDetective

    VoodooDetective

    Joined:
    Oct 11, 2019
    Posts:
    114
    How do I complete a looping animation before transitioning? I want it to loop for an indefinite number of times. Randomly, I'll say "CrossFade" and I want to finish the current loop cycle before moving to the next animation.

    HOW do I do that?

    "crossfade after animation completes"
     
  2. VoodooDetective

    VoodooDetective

    Joined:
    Oct 11, 2019
    Posts:
    114
    I might need to do this a lot in my 2D (traditional animation) game so bloating the controller with a million bools or triggers is no good.
     
  3. VoodooDetective

    VoodooDetective

    Joined:
    Oct 11, 2019
    Posts:
    114
  4. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    963
  5. the_0dium

    the_0dium

    Joined:
    Nov 29, 2018
    Posts:
    14
    Check "has exit time"
     
  6. VoodooDetective

    VoodooDetective

    Joined:
    Oct 11, 2019
    Posts:
    114
    @dibdab
    So I've got to busy wait or sleep until the animation is over? There's no build in method to queue up an animation after a loop ends?

    @the_0dium
    Has exit time will exit after the first loop unless I use trigger/bool for every single instance of these transitions which won't work since I might have a lot of them.
     
  7. VoodooDetective

    VoodooDetective

    Joined:
    Oct 11, 2019
    Posts:
    114
    Sounds like it's not possible with the Animator.
     
  8. the_0dium

    the_0dium

    Joined:
    Nov 29, 2018
    Posts:
    14
    @the_0dium
    Has exit time will exit after the first loop unless I use trigger/bool for every single instance of these transitions which won't work since I might have a lot of them.[/QUOTE]
    How do you expect to create transitions without using bools for them then?
     
unityunity