void SwitchToPanel(PageBehaviour targetPanel) { PageBehaviour currentPanel = UITabCenter.instance.currentPanel; ClosePanelImmediate(currentPanel.canvas, () => { currentPanel.DoPageClose(); }); OpenPanelImmediate(targetPanel.canvas, () => { targetPanel.DoPageOpen(); }); UITabCenter.instance.currentPanel = targetPanel; //Kill all Flow window foreach (var item in UITabCenter.instance.flowWindows) { item.KillSelf(); } UITabCenter.instance.flowWindows.Clear(); }