[2D] Play animation backward.

Hi,

I have created an animation by dragging some sprites into the scene view. I ended up with an Animation Clip and an Animation Controller, I also have the animation visible in the scene view and hierarchy, with an Animator attached. The animation works great when I hit “Run”.

.

Now I am trying to add some code to generate a random frame number, so when the animation reaches that random number, the animation should start playing backward, starting from that particular frame (Not from the end or beginning).

Here is an image describing the needed behavior:

alt text

I have browsed several tutorials, books and forums answers without finding a solution to this problem, I would really appreciate if someone could help me solve this.

Thanks a lot.

To answer my own question, it seems that the Animator is useless in such a case, the solution would be implementing something based on this: Luckslinger tech – #1 How to make 2D Sprite animations in Unity – Duckbridge