So, I have a sprite animation that sets SpriteRenderer.FlipX = true, and as expected, the animation flows flawlessly…
When the animation ends, FlipX is set back to false… there is no script call no nothing, it’s just reset.
So I tried using OnStateExit to ensure that after the animation FlipX would be set to true. After coding the calls and checking that they are called, I see that the inspector keeps showing FlipX “unchecked”, the property is set to true and the sprite appears unflipped.
Then I tried doing the same thing using animation events, same result.
After that, I tried just clicking the #@&$# checkbox, and guess what? It doesn’t work, the box isn’t greyed out, it just keeps unchecked and clicking it does not flip the sprite (with the game running or not). Clicking FlipY works perfectly…
I guess that something in mecanim is holding the FlipX property, does anyone have any idea on how to fix this? I just wanted FlipX to stay checked after the end of the animation. I am using root motion and all the other properties keep their values ok.