public void CloseBox() { if (m_currentBox) { m_currentBox.gameObject.SetActive(false); } m_currentBox = null; }
private void OpenUIBoxOpen <T>(GameObject uiObject, Dictionary <string, object> varList = null) where T : UIBox { if (uiObject) { T box = uiObject.GetComponent <T>(); //box.PanelOpen(); if (varList != null) { box.m_userData = varList; } if (m_currentBox) { m_currentBox.gameObject.SetActive(false); } uiObject.SetActive(true); m_currentBox = box; } }