private void RemoveFromStack(BaseUI ui) { if (_uiStackList.Count == 0) { Debug.LogError("Stack is EMPTY!"); return; } var findUIPack = _uiStackList.Find(x => ReferenceEquals(x.ui, ui)); if (ReferenceEquals(findUIPack, null) == true) { Debug.LogError("ui is NOT IN Stack!"); return; } _uiStackList.Remove(findUIPack); }
public UIPack(int id, BaseUI ui) { this.id = id; this.ui = ui; }