How do i know if a animation is finished or not ?

Hello, i have a camera animated and i need a Gui to show up when the animation is completed, how do i know if the animation is completed or not, c# here please…

animation.isPlaying

You can use the yield command to determine the length of the animation. For example:

JavaScript:

animation.Play();
// Wait for the animation to have finished
yield WaitForSeconds (animation.clip.length);

C#:

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    IEnumerator Example() {
        animation.Play();
        yield return new WaitForSeconds(animation.clip.length);
    }
}

This can be used in an if statement. So if the animation finishes, do whatever you want it to do…