QOL: ItemView visual rework / grouping and naming #177
marc-antoine-girard
started this conversation in
Feature Requests
Replies: 1 comment
-
New attributes are now available in v1.2.0! Icons are not currently supported, but custom paths (or categories) and names are! You can read more about them here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Support custom name for ItemVisuals classes
It would be nice if we could add an attribute to our Visual class that would change the displayed name in the dropdown window. Something like
[Title(string name)]
Allow grouping
Similarly, Having an attribute to organize our Visuals by "category". The attribute could also have an optional parameter to allow automatic grouping using inheritance. For instance, I have a multiple ButtonVisuals that inherits a base class AbstractButtonVisual. We could do something like that:
[Category(string name, bool applyForChildren = false)]
FastButtonVisuals would be located in
Button/Fast Button
.The groups could be displayed like the AddComponent window:
This could also lead to adding an IconAttribute:
[Icon(typeof(Transform))]
. All of this is of course inspired by Unity's Visual Scripting APICode-wise, I feel it wouldn't be too difficult to implement using Unity's
AdvancedDropdownItem
(which I'm guessing is what you're using right now) andTypeCache.GetTypesWithAttribute
.Beta Was this translation helpful? Give feedback.
All reactions