Closed Igneom closed 9 years ago
Have you read the commit regarding the refactoring I did for the type-drawer mapping system? :)
It doesn't seem to me that you mapped your type to your drawer. Mapping is now done explicitly and not 'automagically' via the generic arguments of the drawer. Take a look at RegisterCustomDrawerExample.cs
If you apply that to your BasicDrawer it should work. (Doesn't matter if you're using BasicDrawer or ObjectDrawer, cause BasicDrawer 'is a' ObjectDrawer at the end) Note: ObjectDrawer is not something new, it's been around since the very beginning of Vfw. In fact I wonder how you said 'it works', it shouldn't if it's not registered/mapped ^^
I've added a third example featuring a structure similar to yours: https://github.com/vexe/VFW/commit/a386fb273968f1a91cf00db2fdf2de208ba77cb9 - does it help?
Forgot to say I mapped it after looking at your post on unity forums and checking the examples. What i found weird is that I looked again at how the BasicDrawer did the Vector3 drawing and it was still the same, then I assumed it could've been broken, which is why I created the issue without checking anything else.
Upon inspecting the code of the Vector3Drawer, I gave my shot on making a custom drawer for a struct IntVector3 I use. On 1.3 it worked fine, on 1.3.1 it doesn't work anymore.
The following is the code I'm using for the drawer
Edit: Found out About the new ObjectDrawer, code now looks like this;
It works but I'm not 100% sure if I will not have problems with serialization since I couldn't change the fields directly as can be seen, also what are the benefits of the change in how it works?