I have a class that uses a custom property Drawer to manage the display in Unity’s inspector and I was wondering if it was possible to have the same display while in a GraphInspector? Or I can somehow tell either BBParameter or something else how to handle the display for that class?
Currently this is not possible. The unity Property Drawers are basicaly ment to be used in the Unity inspector. Some time ago I took a look at how to replicate this and use any custom Drawers already created to show in NC inspector, but didn’t find a solution if at all possible. I will take another look at this and if not able, I will create a custom solution to define the GUI display of a class in the NC inspector.
If it is not possible to use directly an already existing drawer, is there a way to tell Node Canvas how it should draw a certain type via a BBParameter?
Sorry for the late reply.
No, unfortunately, neither of the 2 is possible right now. These 2, are the 2 ways I explained in my reply above. I will take a look at them and either one of the 2 possibilites in a future version. Either the ability to use existing Drawers or define your custom NC Drawers.
I hope to add one the 2 options in the next update.
I thought you were only talking about the Unity’s Property Drawer, my mistake.
I guess a workaround for now would be to make a custom ActionTask and override the InpectorGUI. I won’t be able to do the same if I want to put that object in the Blackboard, but it’s better than nothing.
Yeah, right now the only way would be to override the OnInspectorGUI, but of course it’s not that convenient since you will have to do that in each ActionTask, unless you make some static method for showing your class.
When I add this feature properly, it will also be able to show in the blackboard.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.