Skip to content

[Feature Request] Hide Panels and slide in/out animations #14

Open

Description

@JLeybovichLFL

Ability to hide entire Panels and have them slide in and out.

Activity

  1. yasirkula commented on Jun 10, 2021

    @yasirkula
    Owner

    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.

  2. pesseba commented on Apr 1, 2025

    @pesseba

    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
  3. yasirkula commented on Apr 2, 2025

    @yasirkula
    Owner

    @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.

  4. pesseba commented on Apr 2, 2025

    @pesseba

    @yasirkula I did a workaround for my situation saving and restoring the layout. Because sometimes I need to hide the dynamic panels.

  5. yasirkula commented on Apr 2, 2025

    @yasirkula
    Owner

    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)?

  6. pesseba commented on Apr 2, 2025

    @pesseba

    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
  7. yasirkula commented on Apr 2, 2025

    @yasirkula
    Owner

    I meant, what if you moved green panel to the right canvas?

  8. yasirkula commented on Apr 2, 2025

    @yasirkula
    Owner

    BTW if you register to PanelNotificationCenter.OnTabClosed or OnPanelClosed, there will be actual close buttons next to tabs and/or panels.

  9. pesseba commented on Apr 2, 2025

    @pesseba

    I meant, what if you moved green panel to the right canvas?

    Yes, I can use the panel green from CanvasLeft too. It works fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions