vexe / VFW

MIT License
492 stars 67 forks source link

Categories on sub object marked with Serializable #100

Closed oxysoft closed 7 years ago

oxysoft commented 7 years ago

I have a class marked with Serializable which means I can have an instance of it and edit its fields in the editor. I also defined categories to group its variables but it seems that the categories don't show. Is it just not possible to have categories on a class that isn't a BaseBehaviour?

DoomT-AliW commented 7 years ago

Correct. The only way around that is to make the VFW editor applied to all MonoBehaviours which is something you'd only want to do to your project specifically. I didn't want to do that on a framework level because who knows what people are doing to their MonoBehaviours.

The other way around that is if Unity adds support to Behaviour-level decoarations. So you'd decorate your behaviour/script with the type of editor you want to draw it with instead of the other way around. Maybe it can be done with some reflection tricks but haven't looked into it much.