How to play animation in both direction (forwards, backwards) continuously?

I want to reduce size of game package. So i wanna to reverse animation (play in backwards) when it comes to end of animation, and vice versa, when it comes to beggining of animation, to play forward?
How to do this?

I found
Just set transition from one animation node to another, and vice versa. And set speed parameter on first 1, and on second -1.

There is also a wrap mode called “ping-pong” which exactly does what you want to do