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

About Old Animation, play an animation clip to back to default clip

Discussion in 'Animation' started by Arhspros, Dec 25, 2018.

  1. Arhspros

    Arhspros

    Joined:
    Nov 11, 2014
    Posts:
    14
    Hi, because some reason I have to use old Animation system, which is the "Animation" component

    Now My default Animation clip is "Idle", I used "animation.CrossFade("Attack", 0.3f)" when I need to play an attack animation, and I set "animation.wrapMode= WrapMode.Once", because I need the character attack only once and then back to default "Idle" state. But it just ends up with last frame state of attack animation .

    I try to add an event at the end of the attack anim clip, then receive it to crossfade to idle state. I could work but I don't think it's a very good way. I still wanna know if there is better and convienient way, maybe like the Animator can do.
     
  2. Arhspros

    Arhspros

    Joined:
    Nov 11, 2014
    Posts:
    14
    I try to used
    CrossFade("Attack")
    CrossFadeQueue("Idle")
    but it's still not a goode way.....
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,555
    I'm not very familiar with the legacy animation system, but my Animancer plugin might meet your needs and makes it very easy to get a callback when an animation ends so you can do something else as shown in this image.