Search Unity

Question Animation Tree Getting Ridiculous for just a few animations...

Discussion in 'Animation' started by billygamesinc, Nov 12, 2022.

  1. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    326
    upload_2022-11-11_19-23-58.png

    Currently I have 4 different attacks, a jump, walk, idle, knockback. I plan to add more animations so I'm concerned at how the tree looks right now.

    If I had a choice, I would prefer just using PlayAnimation rather than triggers or bools for most of these. I'm using 2D sprites so there's really no need for transitions or exit times which is being driven in code.

    The thing is using PlayAnimation gets buggy, sometimes it doesn't work at all. For example, if I wanted Attack to be played twice in a row with a .1f interval, the second one doesn't occur. There's no way to stop an animation either, sometimes the animation keeps going despite requesting another to be played.

    I was wondering if there is any way to get Play Animation to work consistently because this tree is going to get messy once I add more motions to characters.