using UnityEngine; using System.Collections; public class Panel : MonoBehaviour { public void Open() { GetComponent().Play("PanelShow"); } public void Close() { GetComponent().Play("PanelHide"); } public void HideAnimationEnd() { Destroy(this.gameObject); } }