"Animate only if visible" just reduces performance cost. The animation will play normally but the animation curves are not applied. eg. a skinnedMeshRenderer needs a lot of transformations on each bone when animating a character. If it's not visible you don't care if the bones are transformed or not.
EDIT:
Ok, a bit more in detail:
Animate Only If Visible is affected by all cameras. If at least one camera can “see” the object it will be animated. That includes the scene-view camera in the editor (that’s the edit view)!
If you create an animation in Unity that will move a object along the x-axis from 0 to 200 in 10 sec. The object will move slowly from 0 to 200.
Let’s say you don’t look at the object when you start the game, but you set the animation to “Play automatically”. That means the animation is started right at the beginning and the animation time runs, but the object is not moving. If you look at the object after 3 sec. the object will jump suddenly to 60 on x-axis and is animated towards 200.
You should not use animate only if visible on moving animations because the object will never move until the object itself comes in view. In the case your camera is placed at x 100 (in the middle of our animation way) and you look at the end point (x 200) the object will never animate even if the time is 5sec+. The calculated position would be in view but the object is not in view at the moment and therefore not updated.
For stationary character animations like "idle" that's not a problem. The character is moved independently from animations. If he's not in view the idle animation loop will be looped but not updated.
Now a little bug:
Animations that “Loop” or “PingPong” are not a problem the time loops fine and when it comes in view it jumps in at the current time. But animations with wrapmode Once or ClampForever have a little problem. When the time reaches the end and it’s not in view at that moment it will not stop the animation. In ClampForever you want this, but the object isn’t even updated to the last position if it’s in view again.
That's why i recommend to use this option on looping, stationary animations only.
If you actually want to pause the animation when it's not in view, you have to do this yourself.
Something like:
// C#
void OnBecameVisible()
{
animation["TestAnim"].enabled = true;
animation["TestAnim"].weight = 1.0f;
}
void OnBecameInvisible()
{
animation["TestAnim"].enabled = false;
animation["TestAnim"].weight = 0.0f;
}
If you still want to control the animation manually you need to handle this yourself and create some custom animation managing.
I'm not sure if AnimationEvents fire if animate only if visible is on. I don't use them. Try it yourself ;)
good luck and i'll hope that clears up your questions.