Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. 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,407
    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.
     
unityunity