Hierarchy Folders
Did you know that organizing your hierarchy under empty GameObjects can have a considerable negative impact on the frame rate of your game?
But on the other hand, not organizing your hierarchy can have a huge negative impact on your work efficiency, not to speak of just general quality of life.
What is a Unity developer to do in this no-win situation?
Well, this is where Hierarchy Folders comes in. With the help of Hierarchy Folders you can organize your hierarchy just how you like it, while still avoiding all the negative side effects you usually get when using empty GameObjects for the job.
Finally you can have your cake and eat it too!
Features
☑ Improve frame rate of your game by up to 40% by using hierarchy folders instead of empty GameObjects to organize your hierarchy.
☑ Hierarchy folders are clearly distinguishable from game objects in the Hierarchy and Inspector windows.
☑ Customizable hierarchy folder colors in the Hierarchy window.
☑ Folder transform locked to default state so that states of children are never affected in any way.
☑ On-the-fly play mode stripping ensures 100% consistency with final build when playtesting in the Editor.
☑ Order of transforms remains consistent through the stripping process.
☑ Configurable folder naming rules (uppercase, prefix, suffix).
☑ Context-aware menu item shortcuts enable a very fast workflow for organizing your hierarchy.
☑ Custom icon, title, and description in the Inspector clearly communicate to all members of your team how Hierarchy Folders work.
☑ Thoroughly configurable to fit the specific needs of your project.
Forum - Have ideas or questions? Let them be heard here!
Release Notes
Version 1.3.0:
- Unity 6.4 obsolete method warnings fixed (instanceId -> EntityId).
Version 1.2.9:
- Added the ability to customize the colors of hierarchy folders by clicking the hierarchy folder icon in the Inspector.
- Optimized hierarchy window icon drawing logic.
- Added "Hierarchy Folder" label to hierarchy folders' header in the Inspector.
- Hid the Tag and Layer controls for hierarchy folders in the Inspector.
- Added option to hide active toggle in the Inspector.
Version 1.2.8:
- Moved under the Packages folder.
- Inspector UI polish.
- Component Names compatibility fix.
Version 1.2.7:
- Improved reliability of Hierarchy Folder icon drawer's logic for loading the icons.
- Hierarchy Folder icons are now immediately affected by changes applied in the settings menu.
- Hierarchy folder prefab build stripping improvements.
- Added support for latest Unity versions.
- Added DontDestroyOnLoad extension methods that work even if the target is not a root object, if it only has Hierarchy Folder parents.
- Fixed issue where Undo menu could get cluttered with entries of Hierarchy Folder transforms being reset.
Version 1.2.6:
- Relocated Hierarchy options under Projects Settings from Preferences.
- Hierarchy folder transform state is now reset to (0,0,0) immediately when a hierarchy folder is placed underneath a transform that is not at (0,0,0) position. Previously there would be a short delay before this would happen due to it relying on the hierarchyChanged event.
- Fixed issue where hierarchy folders could sometimes be moved around using the Move tool after entering and exiting play mode.
- Fixed warning from duplicate using statement when making builds.
- Added a fix for rare issue where hierarchy folder play mode flattening could take place in edit mode.
Version 1.2.5:
- Introduced ability to add select components to Hierarchy Folders. This makes it possible to add components that enhance the editor experience without having any runtime functionality to Hierarchy Folders. Components need to be whitelisted in the preferences before they can be added.
Version 1.2.4:
- Added handling for prefabs nested inside other prefabs when performing build-time prefab asset stripping.
- Build-time prefab asset stripping is no longer performed if creating backups for any prefab assets fails for any reason.
- Stripped prefabs now get more immediately restored to their original states even if the build fails midway through.
Version 1.2.3:
- Fixed AssetDatabase editing related errors that could start occurring after making a build with prefab stripping enabled.
Version 1.2.2:
- Fixed issues with event listener cleanup when exiting play mode with Enter Play Mode Options disabled.
Version 1.2.1:
- Fixed issue where icons shown in the Hierarchy view would not get loaded reliably during initialization.
Version 1.2.0:
- Introduced support for adding hierarchy folders inside prefabs and prefab instances.
- Added new hierarchy icons for prefab instances and prefab additions of all types.
- Support for stripping hierarchy folders from prefabs at build time.
- Support for on-the-fly stripping of hierarchy folders from prefabs at runtime during instantiation.
- The information text box is now also shown in the default inspector and not just in Power Inspector.
- Transform component in hierarchy folder prefab assets is now drawn greyed out instead of being hidden to avoid internal Unity exceptions.
- More changes made to preferences will now take effect immediately without needing the editor to be restarted.
- The button row will now always be visible in the preferences view, so that it is not so easy to forget to press the Apply button after making changes.
- Play mode stripping can now handle situation where scene only contains inactive hierarchy folders.
- Play mode stripping now handles stripping of inactive hierarchy folders more intelligently to ensure that the Awake methods of contained components don't get triggered before all hierarchy folders in the scene have been stripped.
- Improved warning messages when trying to add hierarchy folders to prefabs or prefab instances when this functionality has not been enabled in the preferences.
- Improved support for Unity 2020.2 and later.
- Fixed hierarchy icon drawing position in Unity 2019.1.
- Bug fixes and performance improvements.
Version 1.1.4:
Fixed possible NullReferenceException in HierarchyFolderExtensions.GetParent(GameObject).
Version 1.1.3:
Added support for all experimental enter play mode options.
Version 1.1.2:
Added Undo support for changes made to children of hierarchy folders when the transform state of a hierarchy folder is altered.
Version 1.1.1:
- Added option to redirect active flag of hierarchy folders to control active state of all child Objects instead.
- Improved on-the-fly stripping of inactive hierarchy folders in play mode.
Version 1.1.0:
Inactive GameObjects will no longer be converted into hierarchy folders when using the conversion menu items under Tools.
Version 1.0.9:
Fixed issue with hierarchy folder transform state not remaining constantly locked when being manipulated through the scene view.
Version 1.0.8:
- Fixed issues with applying changes to preferences.
- In preferences moved Apply Changes, Discard Changes and Reset to separate bottom toolbar where they are always visible even with small window sizes when scrolling is needed to see all the other content. This is to reduce the risk of users omitting to press the Apply Changes button after making changes.
Version 1.0.7:
- In preferences Apply Changes, Discard Changes and Reset to Defaults buttons are now dynamically hidden when they will have no effect. Color highlighting was also introduced to the buttons to make them harder to miss.
- Changed default Play Mode Stripping Method back to Entire Scene Immediate. If an Exception should occur while this stripping is being applied a more informative error message is now displayed to the user.
- Changed script execution order from -1 000 to -32 000 to improve reliability of play mode stripping.
- Hierarchy order is now preserved in play mode no matter which stripping method is being used.
Version 1.0.6:
Hotfix for issue of hierarchy folders sometimes disappearing in edit mode when using certain preferences configurations.
Version 1.0.5:
- Added options for customizing play mode stripping behavior to enable getting around issue of Argument Exception sometimes occurring when fetching scene root objects during the Awake event.
- Tweaked build stripping process for improved reliability, getting around a Unity bug that could sometimes cause a crash to occur.
- Fixed issue with hierarchy folder icons disappearing from the hierarchy view when entering and existing play mode.
Version 1.0.4:
- Added system for preventing prefabs from being created out of hierarchy folders.
- Prefab instances are no longer allowed to be hierarchy folders.
- "Convert Scene Root to Hierarchy Folders" menu item will no longer automatically try to flatten GameObjects with extraneous components. This is to avoid potential issues with scripts breaking if they use e.g. GetComponentsInChildren.
- "Convert Selected to Hierarchy Folders" now asks the user if they want to proceed with the conversion if a selected target is a prefab instance or has extraneous components.
Version 1.0.3:
- Preferences are now saved as an asset in the project folder.
- Fixed prefix label clipping in preferences.
- The script reference field is now hidden in preferences.
- Improved Power Inspector integration package installer.
Version 1.0.2:
- Better support for RectTransforms. Local state of RectTransforms are no longer affected by parent Hierarchy Folders. Transform-based Hierarchy Folders are also automatically converted to use RectTransforms if they have a RectTransform child.
- Context menu item "Hierarchy Folder" now creates a new Hierarchy Folder under the right-clicked target to better match how this usually works with built-in context menu commands. Also if multiple targets are selected the context menu command will now create only one new Hierarchy Folder and place all the selected targets inside it, to make it function more like all the other ways to create hierarchy folders do.
Version 1.0.1:
- Added ability to double click a hierarchy folder in the hierarchy view to expand it and select all its children.
- Added custom Editor tool for creating hierarchy folders.
- Merged menu items Hierachy Folder and Hierachy Folder Parent into one. The latter method will be used automatically when more than GameObject is selected in the hierarchy.
- Expanded number of available play mode stripping methods.
- When using Flatten Hierarchy stripping method in play mode, and a child is grouped under a hierarchy folder, it will automatically be moved below the hierarchy folder as its sibling.
- The user will now be warned if they attempt to make a build with build stripping disabled.
- Many new extension methods to make working with hierarchy folders easier.
- When adding the HierarchyFolder component to an existing GameObject with children and a non-zero position, rotation or scale, the hierarchy folder transform state will now be reset without affecting any of the children.
- When a new hierarchy folder parent is created at the root of the hierarchy, it is now placed at position of the selected GameObject instead of the end of the hierarchy.
- Auto-naming system now handles naming of duplicated hierarchy folders more intelligently.
- Improved handling of prefabs and prefab instances.
- New menu items added for easily converting existing GameObjects into hierarchy folders.