wooshiidev / hierarchydecorator Goto Github PK
View Code? Open in Web Editor NEWLightweight Unity Plugin transforming the Hierarchy into what it should be. Adds headers, styles, icons and more.
License: MIT License
Lightweight Unity Plugin transforming the Hierarchy into what it should be. Adds headers, styles, icons and more.
License: MIT License
This is about Bolt, the visual scripting plugin that has recently been aquired by Unity.
I have a a lot og Bolt graphs attached to game objects in my scene, and beeing able to display their icons would make it easier to find them.
In the current version, closing and reopening Unity will reset settings, as they are not currently saving correctly
A push is coming out for this, but this issue is here just to show that it has been recognized
The package manager shows me that there's an update even though the "1.0.2" version was released a heck while ago
The problem is with the published versions, somehow 1.0.2 was published at some point
https://openupm.com/packages/com.wooshii.hierarchydecorator/?subPage=versions
You should probably contact the openupm maintainer to take down this version
As per Favo Yang
The problem is that the Git tag is mismatched with package.json version.
Tag 0.8.5, package.json 0.8.4 WooshiiDev/HierarchyDecorator@f10ba25/package.json
Tag 0.8.4, package.json 0.8.3 WooshiiDev/HierarchyDecorator@57c0d1b/package.json
Perhaps your CI could bump package.json version first, then create the Git tag?
You can align your Git tag and package.json version with 0.8.6 to fix the issue.
OpenUPM build pipeline section didn't show the actual published version, it just shows the version parsed from the Git tag. Something to improve for us.
Unity Version
Describe the bug
Constant issues throughout the GUI in both the hierarchy and the settings GUI because most of the code only supports Unity's new design. Errors are also caused by this.
To Reproduce (If applicable)
Steps to reproduce the behavior:
Additional context
Need to look into splitting up some of the GUI logic into wrappers to handle this rather than always having defines thrown about the place. Keep it clean and refined.
Unity Version
2020.3.0f1
[Package Manager Window] Cannot perform upm operation: Unable to add package [https://github.com/wooshiidev/HierarchyDecorator.git]:
Manifest [C:\Projects\learning_platform\Library\PackageCache\com.wooshii.hierarchydecorator@164cc81c3c\package.json] is invalid:
Version '0.7.1.0' is invalid. Expected a 'SemVer' compatible value. [NotFound].
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
To Reproduce (If applicable)
Attempt to install the package via Unity > Window > Package Manager > Install via git
Feature Description
A clear and concise description of what the feature is.
Reason for feature
A clear and concise explanation of why this feature would be beneficial and extends Hierarchy Decorators functionality.
When the prefab editor scene/window is open, elements overlap where they should not be.
I installed it via git URL and as a folder import, and this warning keeps appearing.
Tested in Unity 2020.2
Unity Version - All supported versions
Describe the bug
Due to the fixed update time on the hierarchyWindowItemOnGUI
when foldouts have to be manually drawn, there is a short flicker in their GUI update.
The flicker length depends on the child count - the more children the longer the flicker. This makes sense as after opening the foldout it then attempts to update the next instance(s) it comes across - the children.
To Reproduce (If applicable)
Screenshots
Eh.
Additional context
Some form of light temporary cache needs created. Something that can check the current foldout value while the callback is going over the instance, and then recheck on the next instance to see if anything has changed.
If there is a change the cache needs to store the required foldout information until the callback is back on that original instance. The instance only updates when the callback is called, hence why it needs to be stored in that cache until then.
Heya again,
I just thought of this because I just ran across it again. I would say this is more of a nuisance probably than a bug, but if you try to relocate the HierarchyDecorator folder from Asset/HierarchyDecorator to something like Assets/Standard Assets/HierarchyDecorator, or anywhere at all aside from just Assets/ it will automatically create a new Asset/HierarchyDecorator/Settings.asset and reference that. I am guessing that it is hardcoded for that path as even if I try to take my old settings file that I had a bunch of changes in, delete the new one and move my old one there, it will just create a new one again right away. So then I had to recreate all my settings, and I was stuck with a standalone file within the Asset/HierarchyDecorator folder when I wanted the whole thing moved to a subfolder.
The separation of the main files from the settings file is really only a concern since I have the actual files in the project instead of added as a package, but being able to move the settings file/folder is definitely something most folks like to do. I try to keep my top level folder clean and put third party assets and what not in the /Standard Assets/ folder.
Should you be interested, I came up with a decent way to handle this a while back that I have used in a few projects and it has done pretty well for me. Here is a link to my settings ScriptableObject, then I just have my main static class check the location of the settings object and update its location.
It kicks off here.
https://github.com/instance-id/AboveAverageInspector/blob/16c8295c6317ee11c8e1d947020ca9f7e9962504/Assets/instance.id/Scripts/idConfig.cs#L92
and here is where it determines it's path.
https://github.com/instance-id/AboveAverageInspector/blob/16c8295c6317ee11c8e1d947020ca9f7e9962504/Assets/instance.id/Scripts/System/AAIConfiguration.cs#L192
Now that I think about it though, I am not quite sure how it will react when it is located in a package. It may end up not being useful at all, actually, lol. I may have to make some adjustments once I actually go that route and test it out.
Thanks,
-MH
Because other packages also draw to the Unity Inspector, any conficts with others should be posted here so they're all collectively in one place.
If possible, please specify the earliest version you know of these bugs occuring so full support can be added in the future. Providing some images to see what they should be displaying too would be a great help.
Cheers,
Wooshii
Feature Description
Hierarchy Breadcrumbs - displays a clean path going down the hierarchy showing the connections between each instance.
Reason for feature
Especially with HD's features it can get tedious to look through the hierarchy when you're looking at (mostly) a flat list of data. The spacers can make it more confusing throughout depending on which one is used.
Unity will not allow git importing of the package due to the repository being structured wrong.
Current Unity version used
2022.1.6f1
Describe the bug
In my game, I use an object pool for spawning bullets. When a lot of them are being spawned and despawned, the performance degrades significantly in play mode.
To Reproduce (If applicable)
Screenshots
First video is without the HierarchyDecorator
https://user-images.githubusercontent.com/717574/179356429-33b16cef-3aec-49da-bbec-4629e6ee3253.mp4
Second video shows With the HierarchyDecorator.
https://user-images.githubusercontent.com/717574/179356498-5310ca1f-3107-4a68-8b37-c525c24b19ee.mp4
Additional context
My laptop is unfortunately not a very strong one, but it is a significant difference between the two options.
Current Unity version used
2021.3.7f1
Describe the bug
When inspecting a prefab's children, they are not blue and so it looks like they are not 'applied' to the prefab.
To Reproduce (If applicable)
Create a prefab with children, and drag it into a scene. Unfold the prefab to view the children
Screenshots
https://sxcu.net/5F9DcZ2XI
As you can see I make a prefab and the children are not blue (blue indicating that the child is applied to said prefab)
Also notice that the child momentarily turns blue when you delete it from the inspector view.
To support the new features and to improve settings navigation, a new design for the settings that is cleaner and more "standard" would be a good addition.
Current Unity version used
All versions supported.
Describe the bug
Current selection colours are incorrect compared to standard unity colours when the two-tone is enabled.
Currently, HD settings are saved as a single ScriptableObject in the Assets folder, which is great for a team-shared approach. Individuals may want different settings on their machine than the team-shared settings, but these changes are always reflected in git and can become annoying.
Current Unity version used
2018.4.24f1
Describe the bug
After installing the plugin using the .unitypackage provided with the release 0.8.4, I found out that the script is unable to detect the ScriptableObject containing the Settings. A NullRefereceException is printed in the console, originated on the GetOrCreateSettings function.
To Reproduce (If applicable)
The plugin works perfectly fine in a 2018.4.24f1 project, therefore I'm not aware of a way to reproduce this problem.
Additional context
The project I'm working is big and complex, I can't exclude the possibility that this problem is originated by other scripts' behaviours.
Feature Description
Another (now-archived) hierarchy-enchancing plugin Smart Hierarchy does a cool thing with activation checkbox which is activation swiping. Basically, dragging mouse across several checkboxes with LMB down bulk-toggles these checkboxes. You can read more about it here
Reason for feature
It was really useful back when I was using that package.
By the way, there is a bunch of other cool features implemented in that plugin (like Hover Preview), so I recommend checking it out for inspiration (if you need one ๐)
Describe the bug
When opening a project on a new PC after pulling from a repo: "HierarchyDecorator version changed, updating cached components." will get triggered and overrides the settings asset.
The workaround is to simply revert changes on the settings asset, but it would be great to have a way to retain settings when already present (but when likely no previous version check has been done yet).
----- Edit - Nevermind, lol. After all that I did in the second post, I went to look at the code in the repo and saw you already fixed this and I just had not updated on my end to have the changes. >_<
Hey there again,
I was just using the demo from this repo before and just now tried to add the .unitypackage that was included with it into a new project but was unfortunately greeted with errors right away, so I just wanted to make sure you were aware of them.
This was a new project - Unity 2020.1.4f1 with the standard renderer.
None of the errors occur in the demo project, I also just tried it with a new 2019.4.9f1 project and there were no errors there. Though, all new projects I have been starting/using use 2020.1.x
With only importing and doing nothing else, the modifications to the hierarchy were applied:
But these two showed up:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
HierarchyDecorator.HierarchyDecoratorSettings.UpdateSettings () (at Assets/HierarchyDecorator/Editor/Settings/HierarchyDecoratorSettings.cs:249)
HierarchyDecorator.HierarchyDecorator.GetSettings () (at Assets/HierarchyDecorator/Editor/HierarchyDecorator.cs:339)
HierarchyDecorator.HierarchyDecorator.HandleObject (System.Int32 instanceID, UnityEngine.Rect selectionRect) (at Assets/HierarchyDecorator/Editor/HierarchyDecorator.cs:51)
UnityEditor.SceneHierarchy.OnRowGUICallback (System.Int32 instanceID, UnityEngine.Rect rect) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.SceneHierarchyWindow.OnGUI () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.DockArea.OldOnGUI () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I then went to click on the settings SO and the console exploded:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
HierarchyDecorator.HierarchyDecoratorSettings.UpdateSettings () (at Assets/HierarchyDecorator/Editor/Settings/HierarchyDecoratorSettings.cs:249)
HierarchyDecorator.HierarchyDecoratorSettings.OnBeforeSerialize () (at Assets/HierarchyDecorator/Editor/Settings/HierarchyDecoratorSettings.cs:209)
UnityEditor.SerializedObject:UpdateIfRequiredOrScript()
HierarchyDecorator.HierarchyDecoratorSettingsEditor:OnInspectorGUI() (at Assets/HierarchyDecorator/Editor/Settings/HierarchyDecoratorSettingsEditor.cs:74)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Unity Version 2020.3.0
Describe the bug
Parent Transform dropdown arrow disappears in Context-sensitive Prefab Mode.
To Reproduce (If applicable)
Feature Description
I'd like to leave "show all icons" enabled but without the transform icon.
Reason for feature
Everything has a transform icon, so I find it to be noise. I know that I can turn off "enable all" but then I have to manually add each script, which would be quite a bit of work.
It seems that each time I close Unity, the settings within my HierarchyDecoratorSettings ScriptableObject are being reset. The only thing is it is not all of them. In the clip below, you can see my settings for the background color of the prefixed headers, as well as the location of the text remains the same, but the settings for the layers to not show, as well as the alternating background do get reset upon opening Unity.
https://i.imgur.com/E8mA2Ro.mp4
Thanks,
-MH
When making changes to any options, the global options all recheck themselves. I only leave "Show Layers" checked, going to another tab and changing something resets all the checkboxes to checked.
Feature Description
Component Icon settings are somewhat clunky to still use and have no external package support that's convenient.
A new design and set of features to easily enable or toggle settings would be a much needed improvement.
Unity Version
Describe the bug
Does not show the prefab mode arrow when prefabs are given a style
To Reproduce (If applicable)
Steps to reproduce the behavior:
Additional context
Missing use-case for styles. May need to re-evaluate some missing use-cases.
Current Unity version used
2021.3.3f1
Describe the bug
When disabling Show All Icons
, adding a new custom icon doesn't take effect until you add another.
To Reproduce (If applicable)
Show All Icons
Custom
tabAdditional context
I have tried adjusting other settings, like disabling the component icon and re-enabling it again, switching back to Show All Icons
and back off again, nothing works. The only thing that seems to fix it, is adding a new custom icon - which you then have to delete again because it's not necessary to have a duplicate.
Current Unity version used
2020.3.22f1
Describe the bug
When dragging something out of the hierarchy, for example, to the Timeline, moving the mouse over the hierarchy again (without any mouse button pressed) will start to turn off the gameObjects, like if the hierarchy detects that you are still holding the click
To Reproduce (If applicable)
Active Swiping must be ON
Drag something from the hierarchy to the timeline, then without clicking again, move the mouse over the boxes to turn off/On the objects
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Hello! Thought I'd let you know about an odd conflict of settings I discovered. My project has the FMOD Unity plugin installed, and when I tried installing Hierarchy Decorator, it gave me a null reference exception at line 101 of HierarchyDecorator.cs. After digging into it a bit, it seems the settings asset was failing to be created/found. Trying to trace where the problem was, I discovered that it seemed to think the settings asset already existed, which it didn't, and was then failing to create a new one.
In AssetUtility.cs, in FindOrCreateScriptable, the guids array is getting populated with one pre-existing asset: FMODStudioSettings.asset.
I discovered this by adding after line 56:
string scriptablePathTest = AssetDatabase.GUIDToAssetPath(guids[0]);
Debug.Log(scriptablePathTest);
This printed:
Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset
UnityEngine.Debug:Log (object)
So I'm not sure why, but when the utility tries to find or create the settings, instead of creating the settings, it finds the FMOD settings, thinks its what it's looking for, and then throws an error because it's not actually the settings it needs. I'm not sure how to fix this exactly, and it's probably a weird edge case, but I thought I should give you a heads up!
EDIT: I forgot to specify, I'm using Unity 2021.1.17f1.
Still no contribution guidelines added anywhere, which makes things difficult for anyone that wants to collaborate on this project.
Current Unity version used
Unity 2021.3.0f1 LTS
Describe the bug
The following error is thrown when Unity 2021.3.0f1 LTS version+ is used. This is caused by PrefabStageUtility class no longer being Experimental.
Packages\HierarchyDecorator\HierarchyDecorator\Scripts\Editor\Hierarchy\Drawers\ToggleDrawer.cs(47,61): error CS0103: The name 'PrefabStageUtility' does not exist in the current context
Heya,
I was confused for a few when I went to look for the child objects within a subscene that I loaded. You will see in the clip below that normal child objects display the dropdown arrow fine, but above it is a SubScene loading script (part of the Unity Entities package), when the subscene is loaded into the hierarchy, the icon to open the child objects does not display. It is technically still there, as I was able to click on it, but it didn't actually show.
https://i.imgur.com/b6JtWNS.mp4
Thanks,
-MH
In HierarchyDecoratorSettings.cs
right below //Quick fix for now to stop duplication issues
it needs to null check the components
:
if (components != null && components.Count > allTypes.Length)
It should probably also just Clear
the list instead of allocating a new one, but I haven't looked any further into it.
Hey there,
This package looks great. (Honestly might end up being even better than some paid ones. ๐) Any chance you might be willing to add OpenUPM support? (https://openupm.com/). This definitely seems like it would quickly become one of the "every new project" type packages, and supporting OpenUPM makes it easier for folks to create new project initialization/ package installation scripts and such.
Thanks,
-MH
The asset will fail to compile if the user has Sirenix Odin Inspector installed as the global namespace GUIHelper class collides with HierarchyDecorator's.
Hey there,
I was going through the icons but I didn't see any icon signifying whether or not an object has scripts on them or not. Is it possible to include one? That is honestly one of the most useful, to me at least. Even better yet would be a script icon and a small number on it to show how many scripts an object has, but simply having just a single script icon would be great.
Thanks,
-MH
Feature Description
An option to display a single stacked icon for multiple MonoBehaviours on an instance rather than multiple script icons.
Reason for feature
When all icons are shown, an instance with numerous MonoBehaviours will use an excessive amount of the space an instance has. An option to display a single stacked icon for multiple scripts would be much cleaner. This would also be kept optional.
Current Unity version used
2021.2.7f1
Describe the bug
There is a extra meta file without a file existing
To Reproduce (If applicable)
Clone the repo as version 0.8.4
Additional context
This show up every single the the asset data base refreshes .... Please please remove the file as this plugin helps quite a bit with navigating the nightmare that is the fun complex UI prefabs I'm working with
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.