The animation plays correctly when I play it manually from the editor, but it won't work via code. this is my setup: I've also tried using animation.Play function. Note that no excepcions are launched.
I managed to make it work. I was following a tutorial, but when I switched the code above to use: it did the trick.