public void Close() { RectTransform[] childs = content.GetComponentsInChildren <RectTransform>(); for (int i = 1; i < childs.Length; i++) { // if (child) Destroy(childs[i].gameObject); } StartCoroutine(chat.Animation(-1)); RectTransform rect = content.GetComponent <RectTransform>(); rect.sizeDelta = new Vector2(rect.rect.width, 0); }
void Open()//открывает чат { StartCoroutine(chatAnim.Animation(1)); }