using UnityEngine; using System.Collections; public class WrongConnectEnternet : MonoBehaviour { public UILabel LabelMessage; public UIButton CloseButton; private void Start() { GetComponent().Hide(); CloseButton.onClick.Add(new EventDelegate(OnClose)); StartCoroutine(AlphaActive()); } public IEnumerator AlphaActive() { yield return new WaitForSeconds(1f); GetComponent().alpha = 1; } private void OnClose() { GetComponent().Hide(); } }