WooshiiDev/HierarchyDecorator

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

Closed this issue ยท 13 comments

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

Hey there MH ๐Ÿ‘‹ ,
that's actually quite interesting, as I hadn't taken anything like that into consideration.

I assume it may potentially be an execution order thing, as if HierarchyDecorator is drawing to the Hierarchy, I assume likewise the "Subscene Editor" (or what ever handles it's buttons and the toggle displayed) either executes after and draws over the rect area for the toggle.

It would be quite a bizarre thing if it did that though as it seems to display the icon and active toggle correctly.


What happens if you remove the HierarchyDecorator completely? Is it an issue with the Entities package in general?
I did have a theory that with some use cases involving packages there may need to be extra additions done for certain things. This can actually be seen from just the prefab window alone where that is handled differently on it's own (https://github.com/WooshiiDev/HierarchyDecorator/projects/1#card-45768776)

Ok, so yeah, it looks like it must have some of it's own hierarchal drawing that shows up when I remove this package. The color bar on the class controls the color of the vertical line designating the children within the SubScene

https://i.imgur.com/N5g8dkd.mp4

https://gist.github.com/instance-id/94fddc664e154bd968935fce0fbed5a0

Hello MostHated,

I had a look at the package, and realizing that due to some problems still occurring with the two-tone background that is on. There might be only so much I can do (at least without dependencies to the Entity Package) currently in regards to the icon appearing as a GameObject rather than the Scene Icon though. (https://i.imgur.com/ksGIPkz.mp4)

This is my fault for ignorance on requirements that was needed.
The background that is shown that shows the two colours, requires the entire hierarchy to be redrawn due to it drawing over everything. This in turns requires use cases for toggles, disable/enable, selection etc on each instance in the Hierarchy to be drawn correctly.

Because the two-tone background is not displaying the hierarchy correctly, I'd recommend turning that setting off for now.
I'm going to pin this issue and also rename it for all hierarchy related problems with the two-tone option so that they can be directed here.

Implementing all correct draws for that setting is on my priority list right now due to a lot of future developments I cannot do until they're working.

I've setup a checklist on a card within the project board to keep track of all issues involving the two-tone background for current problems and beyond.

I also would like to say massive thanks for reporting these to me, I know you've mentioned a few more before and it does mean a lot.

I understand and this definitely makes sense. As soon as I turned off the background alternation everything showed up as expected.

To be completely honest with you, since I am just working on a tool and I am not yet at the phase of development that requires me working heavily with subscenes, I would rather keep the option enabled and have the alternating colors than being able to see the dropdown for now. To me, the hierarchy just looks "wrong" without it.๐Ÿ˜„

Though, upon trying this out, I believe I may have discovered another small bug. It seems that the Settings ScriptableObject keeps resetting my settings for displaying layer data and clicking functionality within the hierarchy every time I close Unity. I am not sure if it's simply not saving, or if it is being overwritten with a default each time. I will post a new issue about that though to keep things separate.

As for the prior bug reports, no worries at all. I know how much I appreciate it when someone takes the time to do the same for me, so I always like to try and help out in any way that I can. ๐Ÿ‘

I'm going ahead and closing this just because of the renaming given last year. The two-tone issues are - at least for the current system - completely fixed. This however does conflict with external packages that draw to the hierarchy too.

I've made an issue specifically for all external package conflicts that are found. If you're able to mention any of them found there so I can take a note of them.

Cheers,
Wooshii.

When two-tone background is disabled, prefab arrows (those at the right to enter prefab mode) are not visible anymore.

Ah darn, I thought I had fixed all prefab use-cases ๐Ÿ™
What version is this happening on right now? I can't seem to replicate this on my side - unless the small arrows are appearing then at least for the time being that is intentional.

Do you prefer the larger arrow being visible at all times rather than the normal prefab icon?

I just cloned it via package manager, so i guess the newest version; and unity 2020.3.15f2.
I was mainly interested in the active toggle and header styling, so i disabled everything else and while two-tone was inactive this didn't show the expected arrows to the right that one clicks to enter prefab edit mode.
But i had to already remove this extension again, because it was glitching out in a few other places too (and it's a team project where i can't afford this), like showing dropdown indicators for GameObjects that didn't actually had children and a glitchy animation when expanding hierarchies, so i can't give any more info, sorry.

Hmm, some of this may be to do with more recent versions of Unity. I'm unfortunately not available to look into this more deeply until later but I'll get on this right away when I'm available later.

If you have any screenshots I'd massively appreciate it ๐Ÿ‘

I also apologize for the issues you're having, I'd like to make sure there are no problems across all versions I can support

I've just changed one of the recent issues I made to be generally for version support here if you'd like to log any issues you're having with 2020.3.X (or otherwise).

As it seems there is more than just some two-tone issues, if you're able to just pass them into there and then I can start assigning to separate issues if required ๐Ÿ™‚

Just tested on some newer versions while I'm at lunch, seems like there are some issues conflicting with the two-tone background.

I assume it's either to do with the direct interaction with the background or the way I handle toggle interaction. I'll look further into this. Cheers for bringing it to my attention ๐Ÿ‘

Fixed the issue with non-interactable foldouts. The flickering foldouts are more trouble than you'd expect but they're being worked on currently.

Appreciate the report!

Flickering foldouts drawn on custom GUI should now be fixed in the latest release ๐Ÿ™‚

I'm going to go ahead and close this for now as that should be everything cleared up for the time being.

~ Wooshii