using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UIMessageBox : MonoBehaviour { public Text title; public Text message; public Button btnOk; private void Start() { btnOk.onClick.AddListener(Close); } private void Close() { gameObject.SetActive(false); } }