-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] EditorButton directly on methods #28
Comments
Unfortunately not yet. I wanted to avoid using non-field attributes to keep everything consistent, and I liked that the current approach gives a great possibility to place Buttons directly in the desired area. A similar case refers to Foldout(Group) functionality, this can't be implemented without treating the target object as a whole, not only single, independent properties. I have a few ideas on how to achieve it in a pretty neat way but can't promise when this will be implemented. Thank you for the request :) |
True, the other solutions only support buttons at the top and bottom of the inspector, not in the middle. When you need a "dummy" field to put decorators on, what do you use? Just an |
To be honest, I never had such a problem. If this particular component/ScriptableObject has non-serialized instance fields probably I would make something like this:
I agree it takes a little bit of memory and in fact, it's redundant, additionally, it may be misleading for other programmers. |
The
EditorButton
example shows placing a button before a field by annotating the field.https://github.com/arimger/Unity-Editor-Toolbox#toolboxdecoratorattributes
Is there any way to place an attribute directly on a method? Similar to https://dbrizov.github.io/na-docs/attributes/drawer_attributes/button.html
I checked the code for these solutions. They appear to use reflection in their
CustomEditor(typeof(Object)...
implementations to query for all annotated methods.The text was updated successfully, but these errors were encountered: