public void HideInput() { if (m_InoutBoxView != null) { GameObject.DestroyObject(m_InoutBoxView.gameObject); m_InoutBoxView = null; } }
// 显示输入 输入角色名字 等情况 public void ShowInput(System.Action <string> callback) { if (m_InoutBoxView == null) { System.Action <Object> handler = (asset) => { if (asset != null) { GameObject objInputBox = (GameObject)GameObject.Instantiate(asset); // 创建输入界面 显示 m_InoutBoxView = objInputBox.GetComponent <InoutBoxView>(); NGUIUtility.SetParent(waitingParentT, objInputBox.transform); m_InoutBoxView.onShow(callback); } }; StartCoroutine(BundleMgr.CreateObject(kResource.View, "InputBoxView", "InputBoxView", handler)); } }