Play and wait for Animation/Animator to finish playing
<p>In my script i did that when the player is on the top of the platform move it up.
It's working fine. But now i want to make that once it got up play the clip "Down".</p>

<pre><code>using UnityEngine;
using System.Collections;
using System.Reflection;

public class DetectPlayer : MonoBehaviour {

    GameObject target;

    public void ClearLog()
    {
        var assembly = Assembly.GetAssembly(typeof(UnityEditor.ActiveEditorTracker));
        var type = assembly.GetType("UnityEditorInternal.LogEntries");
        var method = type.GetMethod("Clear");
        method.Invoke(new object(), null);
    }

    void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.name == "Platform")
        {
            Debug.Log("Touching Platform");
        }

    }

    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.name == "OnTop Detector")
        {
            Debug.Log("On Top of Platform");
            GameObject findGo = GameObject.Find("ThirdPersonController");
            GameObject findGo1 = GameObject.Find("Elevator");
            findGo.transform.parent = findGo1.transform;
            target = GameObject.Find("Elevator");
            target.GetComponent&lt;Animation&gt;().Play("Up");
        }
    }
}
</code></pre>

<p>After the line </p>

<pre><code>target.GetComponent&lt;Animation&gt;().Play("Up");
</code></pre>

<p>I want when it finish playing it play the down:</p>

<pre><code>target.GetComponent&lt;Animation&gt;().Play("Down");
</code></pre>