Animation Control by Float

Hello there,
im kinda stucked in my project where everything is controled by one global float which is always an value between 0 and 1. So basically the float moves from 0 to 0.1 and so on, till it reaches 1, then it goes back to 0 (like a pulse).

So far so good, the problem is that i want to attach an animation to this and have no idea how to do that. The basic idea is that when the float is 0 - the animation is is on its first frame, when it reaches 1 - it will be on its last frame.

Im using unity 4.1 and c#, but its ok to switch the version to a newer one if necessary.

I hope someone might help me :frowning:
Thank you in anticipation!

Ints are only full numbers! So it can only be 0 or 1 but nothing in between.
I believe you mean floats? If not, make all floats.

The rest is mathmatical stuff.

Animation Frame Count / 100 = a float value which represents 1 frame.

It’s probably easier to use the Legacy Animation component than the Animator component for this.