MyBox
MyBox copied to clipboard
Request: Compatibility with Naughty Attributes
Hi! Is there a possibility to make MyBox compatible with https://github.com/dbrizov/NaughtyAttributes?
No, unfortunately it's not possible by technical reasons. What features do you use the most from NaughtyAttributes? I may create my own versions of such features 🙂
BoxGroup, ResizableTextArea, InfoBox, OnValueChanged
To combine multiple libraries, such as NaughtyAttributes, MyBox, and Unity Editor Toolbox, we need to merge their CustomEditor(Object) implementations, right?
https://github.com/Deadcows/MyBox/blob/master/Tools/Internal/UnityObjectEditor.cs https://github.com/arimger/Unity-Editor-Toolbox/blob/aabf50dfc5b924906de69d0146039fc229a3efd4/Assets/Editor%20Toolbox/Editor/ToolboxEditor.cs https://github.com/dbrizov/NaughtyAttributes/blob/master/Assets/NaughtyAttributes/Scripts/Editor/NaughtyInspector.cs
Looks like MyBox defers to the built-in inspector GUI unless foldout needs to do stuff, and it renders ButtonMethods before and after.
Foldout has to do the same kind of custom overriding, which is why MyBox had to implement special support for it. https://github.com/PixeyeHQ/InspectorFoldoutGroup/blob/master/Homebrew/DecorateFoldout/Editor/EditorOverride.cs
Theoretically, if some sort of a pluggable system was built for this kind of inspector replacement, then these various libraries could coexist by using this pluggable system. Probably tricky to implement well, and then you'd need everyone to agree to use it.
Well I think the best and easiest step for now is to allow conditionally disable Foldout and ButtonMethod for compatibility with such libraries. It's not the worst sacrifice I think
I'm mostly missing the ValidateInput system. As well as showing warnings and error messages on variables
I'm mostly missing the ValidateInput system. As well as showing warnings and error messages on variables
Good stuff. I think this functionality could be easily combined with MustBeAssignedAttribute. I'll look into that 👍
It's been a long time, but finally I made UnityObjectEditor optional. Disable "Inspector override" toggle in MyBoxWindow for compatibility for some other libraries. It is required for [ButtonMethod] and [Foldout] attributes to work though.