Reply To: [BUG] Custom Attribute Drawer, (float)instance cast is not working with BBParam

NodeCanvas Forums Support [BUG] Custom Attribute Drawer, (float)instance cast is not working with BBParam Reply To: [BUG] Custom Attribute Drawer, (float)instance cast is not working with BBParam

#15420
Gavalakis
Keymaster

Hello there,

You are right. The code shown in the documentation is outdated and I have just updated that section. In practice, we need to check whether or not the type of the field we are currently “looking at” is of the required type we want and only if so proceed with the editor GUI code (and also the casting). Otherwise, we call MoveNextDrawer() by the end of the OnGUI method.

Please take a look at the updated documentation. You can also take a look at the various implemented attribute drawers that can be found in AttributeDrawers.cs file for a few more examples.

Please let me know if that works for you.
Thanks!

Join us on Discord: https://discord.gg/97q2Rjh