public virtual void OnGet(Transform parent) { var p = PC(); InPool = false; OpenWindowCount++; IsOpen = true; gameObject.SetActive(true); transform.ToRect().offsetMax = p.GetTemplate(GetType()).transform.ToRect().offsetMax; transform.ToRect().offsetMin = p.GetTemplate(GetType()).transform.ToRect().offsetMin; OpenWindows.AddToList(this); }
private void OnDestroy() { while (_Windows != null && _Windows.Count > 0) { if (_Windows.Count <= 0) { break; } _Windows[0].Close.onClick.Invoke(); } Instance = null; }
void Awake() { Instance = this; gameObject.SetActive(false); }