You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Hide Panels and slide in/out animations #14
You can call panel.gameObject.SetActive to show/hide it. Naturally, it doesn't have a slide animation but IMO the slide animation doesn't apply to all projects and should be implemented by the end-users, if desired.
I'm getting problem when hide/show panels. When a panel hides, the DummyPanel and FreeTarget update well, but when panels are activated back, the DummyPanel Rect doesn't resize and the panels are not docked anymore. The behaviour can be replicated in DemoScene.
@pesseba Dummy panel isn't resized because the panel isn't docked anymore. It isn't docked because there is no guarantee that the panel layout will remain the same before the panel will be reactivated. For example, before reactivating the panel, you could dock the red/green/blue panels to that canvas and now the canvas is not in the same state that it was before.
Glad to hear it! Though what happens when you change other panels' positions before restoring the layout? Is only the closed panel's layout restored (somehow)?
Activity
yasirkula commentedon Jun 10, 2021
You can call panel.gameObject.SetActive to show/hide it. Naturally, it doesn't have a slide animation but IMO the slide animation doesn't apply to all projects and should be implemented by the end-users, if desired.
pesseba commentedon Apr 1, 2025
I'm getting problem when hide/show panels. When a panel hides, the DummyPanel and FreeTarget update well, but when panels are activated back, the DummyPanel Rect doesn't resize and the panels are not docked anymore. The behaviour can be replicated in DemoScene.
dynamicPanels.2.mp4
yasirkula commentedon Apr 2, 2025
@pesseba Dummy panel isn't resized because the panel isn't docked anymore. It isn't docked because there is no guarantee that the panel layout will remain the same before the panel will be reactivated. For example, before reactivating the panel, you could dock the red/green/blue panels to that canvas and now the canvas is not in the same state that it was before.
pesseba commentedon Apr 2, 2025
@yasirkula I did a workaround for my situation saving and restoring the layout. Because sometimes I need to hide the dynamic panels.
yasirkula commentedon Apr 2, 2025
Glad to hear it! Though what happens when you change other panels' positions before restoring the layout? Is only the closed panel's layout restored (somehow)?
pesseba commentedon Apr 2, 2025
I save the layout before hide them. So, after I reactivate the panels first and than I load the layout. All panels works fine.
dynamicPanels.3.mp4
yasirkula commentedon Apr 2, 2025
I meant, what if you moved green panel to the right canvas?
yasirkula commentedon Apr 2, 2025
BTW if you register to PanelNotificationCenter.OnTabClosed or OnPanelClosed, there will be actual close buttons next to tabs and/or panels.
pesseba commentedon Apr 2, 2025
Yes, I can use the panel green from CanvasLeft too. It works fine too.