public void RemoveWindow(string id) { if (windowsDict.ContainsKey(id)) { var window = windowsDict[id]; windowsDict.Remove(id); Destroy(window.gameObject); OnWindowRemoved?.Invoke(id); } }
public void RemoveWindow(UIBaseWindow window) { if (!window) { return; } var windowId = window.Id; windowsDict.Remove(windowId); OnWindowRemoved?.Invoke(windowId); Destroy(window.gameObject); }
public void RemoveWindow(UIBaseWindow window) { if (!window) { return; } if (windows.ContainsKey(window.Id)) { windows.Remove(window.Id); OnWindowRemoved?.Invoke(window.Id); Destroy(window.gameObject); } }