Animation that is triggered with a ui button doesnt play on android build

Expected behaviour:

When releasing the button, player should face the direction button is aimed at, and trigger the animation to play. Works on editor and unity remote play

On Android build:

player only faces the direction, but the animation doesnt play 80% of the time.

animation is 2 sec long, I have tried makeing it faster, slower, shorter, none of them works

Any idea why this would happen and how to fix? Thanks.

1 Answer

1

I didnt find the reason why its happening, but if there is anybody facing the same issue, I used anim.Play() instead of anim.SetTrigger() which works great.