public void RegisterWnd(BaseWnd wnd) { wnd.transform.SetParent(uiRoot); wnd.transform.localPosition = Vector3.zero; wnd.transform.localScale = Vector3.one; wnd.gameObject.GetComponent <Canvas> ().sortingOrder = GetNextSortOrder(); _wndList.Add(wnd); }
public void UnregisterWnd(BaseWnd wnd) { _wndList.Remove(wnd); GameObject.Destroy(wnd.gameObject); }