Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Loop animation x times before transition

Discussion in 'Animation' started by stevej91, Jun 6, 2021.

  1. stevej91

    stevej91

    Joined:
    Apr 1, 2019
    Posts:
    2
    Hi,

    New to the animator and here's what I'd like help doing. I want to play an idle animation several loops and then play a separate charismatic idle and revert back every so many seconds. How do I keep one animation on loop until x seconds passes to play the other animation once and come back?

    Thank you if anyone is willing to answer.
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Hi,

    Write a logic in code that switches your animation state.

    Check animator documentation to see how you could set booleans and triggers to switch animation. Then just create a logic which plays N times an animation, then performs another animation.