Giter Club home page Giter Club logo

hierarchydecorator's Introduction

Working on some neato tools for Unity :)

Decent readme coming at some point idk...

Support my coffee addiciton if you're bored or something

hierarchydecorator's People

Contributors

atatrkgl avatar iafahim avatar krelistudio avatar medallyon avatar sanielx avatar wooshiidev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hierarchydecorator's Issues

Support for Bolt icons

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.

Bug - 0.8.5 doesn't show up in OpenUPM

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.

openupm/openupm#2927 (comment)

Hierarchy Decorator Unity Version Support

Please read this comment for any information on posting on this issue thread, thank you

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:

  • Load up a version of Unity (2018.4+) that uses the old GUI.
  • Cry as HD doesn't look the way it should

Screenshots
chrome_16_08_2021_2523

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.

Bug: package.json version is not compatible with UPM

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

Bug - Foldouts Flicker

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)

  • Provide an instance with a header or activate two-tone background and give an instance experiencing either of those conditions a child.

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.

Settings file creates new asset if moved

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

Feature Request - External Package Support for Component Icons

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 Request - Breadcrumbs

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.

Bug - Performance degradation in play mode with many objects being activated/deactivated

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)

  1. Spawn and despawn a lot of objects rapidly during play mode.
  2. Watch the stats screen in the editor.
  3. Add HierarchyDecorator.
  4. Repeat steps 1-2 and see the performance drop

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.

Bug - Prefab children not blue

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.

Update - New Settings Design (v0.9.0)

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.

Bug - Settings object reference not found

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.

Screenshots
Screenshot 2021-10-14 at 08 44 15

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.

Question: How to mark an item as a header?

Hello!

I must be missing something here - I have the package installed and I noticed that the styling changed for most items. But I cannot figure out how to mark an item as a header. What am I missing? I'm on 2021.1.12f1.

Thanks!

image

Feature Request - Activation Swiping

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 ๐Ÿ˜‰)

Bug - Settings get reset using version control

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

Errors on import of HierarchyDecorator.unitypackage in new project

----- 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:

Index was out of range
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&)
pushing more GUIClips than you are popping
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:

Index was out of range
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&)

Bug: Parent Transform dropdown arrow disappears in Context-sensitive Prefab Mode

Unity Version 2020.3.0

Describe the bug
Parent Transform dropdown arrow disappears in Context-sensitive Prefab Mode.

To Reproduce (If applicable)

  1. Create a new prefab
  2. Create some objects in the prefab
  3. Give the last object in the prefab one or more children
  4. Drag the Prefab into the scene and open it in context-sensitive mode
  5. The last object (containing some children) does not appear to have any children, and can only be opened with Right Arrow

Feature Request: Ability to opt out of transform icon

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.

Some, but not all settings being reset every time I close Unity.

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

Global options

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.

Update - Component Icons V2

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.

Bug - Missing prefab mode icon when a prefab is given a prefix style

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:

  • Give a prefab a style
  • See (or unsee) the arrow for prefab mode

Screenshots
Unity_16_08_2021_2524

Additional context
Missing use-case for styles. May need to re-evaluate some missing use-cases.

Hierarchy Decorator Bug - Cant unfold at the bottom

Unity Version

Describe the bug
Cant unfold gameobjects which are at the bottom of the hierarchy

To Reproduce (If applicable)
Add children to the gameobject at the bottom of the hierarchy
try to unfold gameobject

Screenshots

Imaget

Additional context
Add any other context about the problem here.

Bug - Custom icons do not show immediately

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)

  • Disable Show All Icons
  • Add a component in the Custom tab
  • ???
  • Profit

Screenshots
Unity_JfWAILo2fq

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

Bug - Active Swiping maintains click when dragging objects out of hierarchy

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.

Changing Category Properties doesn't seem to have any effect

I've tried changing header colours and other properties, but they don't seem to have any effect on any categories in the hierarchy. I've tried to rename the transform, create a new transform, and even switching scenes. There are no associated errors as far as I can tell.

image

Settings object fails to create with FMOD installed

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.

Bug - PrefabStageUtility class is no longer Experimental

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

Bug - GUI Background Issues (Two-Tone, Styles)

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

Errors when trying to create settings file on first import

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.

[Request] Any chance you might be willing to add OpenUPM support?

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

Icon to signify MonoBehaviour/Scripts

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 Request - Stacked script icon for multiple MonoBehaviours on one instance

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.

Bug - Extra metadata file package-lock.json.meta

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

Screenshots
image

image

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.