Search Unity

How to prevent a parent game object with bazillion children from expanding in the hierarchy

Discussion in 'Editor & General Support' started by rob8861, May 2, 2018.

  1. rob8861

    rob8861

    Joined:
    Sep 25, 2015
    Posts:
    86
    I can't express how frustrating it is to design a level and every time I accidentally click/select a game object which is deeply nested in a parent game object in the hierarchy, the entire object tree expands. Now I need to scroll ALL the way back up to collapse it.
    Is there a way to lock a game object in the hierarchy so when clicking on one of its children in the scene, it does not force it to automatically expand.

    Cheers,
     
  2. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    Don't think there's any such option. However, if you have the child object selected in the hierarchy, press left arrow on your keyboard to collapse one level of the tree. Press as many times as you need to collapse everything.
     
  3. NishitaG

    NishitaG

    Joined:
    Mar 13, 2019
    Posts:
    2
    please let me know if there is any way of locking the child objects. I have the same issue
     
  4. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Its really easy to just hit the left arrow key like Xoduz said, and it will jump straight to the top level item and you can collapse it. Just do that...
     
  5. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    DrMeatball and MD_Reptile like this.
  6. rlalancette

    rlalancette

    Joined:
    Sep 20, 2014
    Posts:
    18
    I need an option so unity stops doing that expansion. It's annoying as hell because it's automatic.
     
    SanyaBane likes this.
  7. Ducaticoder

    Ducaticoder

    Joined:
    Mar 24, 2019
    Posts:
    2
    I need this fixed so bad
     
  8. Ruuds

    Ruuds

    Joined:
    Dec 3, 2017
    Posts:
    17
    I am looking for the exact same thing. its is really frustrating and pressing arrow keys all day long is not the solution. There should be a way to lock hierarchies per game object from expanding no matter what.
     
    HenryTownshend likes this.
  9. HenryTownshend

    HenryTownshend

    Joined:
    Jun 19, 2017
    Posts:
    14
    This is the one of the most frustrating parts of using Unity for me. In Unreal, we have proper folders, and things inserted/parented to each other won't ever expand items in the Outliner for no reason.

    In Unity, there are no folders to begin with, which is already sub-optimal. But then on top of that, using empties as folders, which is already only ok'ish to arrange with if you give them a "---naming---" style for distinction and having to be careful with their mandatory Transform components, they do expand every time you insert something into them. It makes for a really unpleasant UX when working on level design and set dressing.

    The fact that a user needs to resort to hack scripts for a function like this is sad and doesn't solve the problem. It's not about collapsing all "folders", it's about leaving collapsed "folders" collapsed. Otherwise I could also just Alt+Click my Scene roots and be done.

    It's not about broad collapsing, it's about that moment when you have hundreds of modular walls and want to insert one more into the parent holding them, without expanding the whole list of walls for any reason. We don't need Unity hand-holding us at this point, or at least should be able to prevent it.
    If I want to find this wall again I just dropped in into my wall parent, I can just click it again in the 3d view. Chances are good that if I put something away into a parent for cleaning up a tree, I don't want to currently continue working with this exact object, which is kinda what Unity assumes though. But it's the much rarer case.