Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Shortcut for "collapse all"?

Discussion in 'Editor & General Support' started by theBrandonWu, Sep 8, 2010.

  1. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    In the Hierarchy panel, if I hit command-a or ctrl-a, it will select all objects and expand the parents/children trees. However, often times I would accidentally hit those keys... is there a keyboard shortcut to collapse these tress in the Hierarchy panel? Keeping to click on the arrows to close them can get quite tiring...
     
    shekalo and redpanda like this.
  2. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Command (Control on Windows) + left-arrow should do the trick.
     
  3. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    just tried it. It closes one group but not the entire panel for me. And actually just pressing "left arrow" does the same thing on my mac. hmmmm...
     
    Eric-Te likes this.
  4. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Hmmm, Command-A to select all and then left-arrow doesn't collapse everything for you? 2.6 or 3.0?
     
  5. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    hmm nope. I am on 2.6.

    edit: oops I meant Unity iPhone ver 1.7 :)
     
  6. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Ah, ok... yeah, not working in Unity iPhone 1.7... Command-A when focussed in the Project View actually selects everything in the Hierarchy... pretty sad :roll:

    Well, all I can say it that it works in 2.6 and 3.0 :wink:

    PS - Wow, the Unity iPhone 1.7 interface is gross! I'm blinded by the bright grey... we've come a long way in 3.0 :p
     
  7. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    Ahh ok. Guess I'll just have to wait for the update. Thanks anyway!
     
  8. flaminghairball

    flaminghairball

    Joined:
    Jun 12, 2008
    Posts:
    868
    Hello,

    Have you tried Option clicking the arrows? That should close up all of the sub-hierarchies at least.

    Best wishes,

    -Lincoln Green
     
  9. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    option-arrows still doesn't work for me. It closes one tree of hierarchies but not the entire panel.

    hmm...
     
  10. simom85

    simom85

    Joined:
    May 27, 2010
    Posts:
    283
    it does't work in Unity 3.0 too! If I press CTRL + A... it select every objects but not expand it!
     
  11. MikeBastien

    MikeBastien

    Joined:
    Apr 24, 2009
    Posts:
    139
    Hi,

    1. In Windows 'CTRL + A' is usually the short-cut 'Select All', which is why every object is being selected.
    2. In Windows it is 'Alt + LMB' on the arrow in the tree in order to collapse or expand all of the children.
    3. This thread should be in the Support section.

    Note: You must Left-Mouse-Button click on the arrow, not the word or it won't work.
     
    Aurriuss, HoToFF, est-R and 11 others like this.
  12. Pixeldamage

    Pixeldamage

    Joined:
    Sep 6, 2010
    Posts:
    52
    This works for folders (great which I use a lot) but not for files with children. For example, I have an animation folder with hundreds of fbx files. Each fbx has a child node (only visible in Unity) for the animation clip (held within the fbx). In order to preview the animations you need to burrow inside to the clip.

    The issue is that if you need to change the settings (say a bunch of new ones were added and need to be set to "Legacy"). To bulk select/change all the fbx files - you cannot do it -unless you first minimize all the child nodes. It's frustrating, since you have to then scroll through hundreds of files to find the ones left un-minimized. I'm guessing scripting would be the only way around this problem?
     
  13. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
  14. Pixeldamage

    Pixeldamage

    Joined:
    Sep 6, 2010
    Posts:
    52
  15. Pixeldamage

    Pixeldamage

    Joined:
    Sep 6, 2010
    Posts:
    52
    Any chance of a dummy example/reference that I can frankenstein for my own purposes? self <= a programmer (self == 3d guy)
     
  16. sayginkarahan

    sayginkarahan

    Joined:
    Jan 23, 2015
    Posts:
    49
    Thanks, it worked on 2018.1
     
    sonofbryce likes this.
  17. GameRickster

    GameRickster

    Joined:
    Apr 28, 2018
    Posts:
    14
    you need to select ALL before you do the Control + left arrow
     
  18. avidwriter

    avidwriter

    Joined:
    Dec 21, 2021
    Posts:
    9
    easiest just to save and reload the scene! they're collapsed by default
     
    martinsleiria likes this.