WooshiiDev / HierarchyDecorator

Lightweight Unity Plugin transforming the Hierarchy into what it should be. Adds headers, styles, icons and more.
MIT License
1.02k stars 47 forks source link

Selection is not colored correct in twoToneBackground mode #68

Closed soraphis closed 1 year ago

soraphis commented 1 year ago

the line fetching the instance id:

https://github.com/WooshiiDev/HierarchyDecorator/blob/28ea3894a27db51b32ae0aa597746b61f5aa4f76/HierarchyDecorator/Scripts/Editor/Hierarchy/Drawers/StyleDrawer.cs#L79

takes the id of the transform component, not of the game object. So the check Selection.Contains (instanceID) in line 169 is always false.

to fix it, line 79 should read:

    int instanceID = currentTransform.gameObject.GetInstanceID ();
WooshiiDev commented 1 year ago

Hi there, sorry for the slow respose.

Cheers for pointing this out, that's something I should have realized but I'll make sure that's fixed in the next release (which is in the next few weeks) I've noted this problem in https://github.com/WooshiiDev/HierarchyDecorator/issues/51 but not the solution itself, so I'll go ahead and mention this on that one.

If you would like, you're always welcome to make a small PR with the fix yourself for a wee bit more credit 😁

WooshiiDev commented 1 year ago

Pushed a fix to develop for this, will push with next release 👍