How to make a custom property drawer for the Behavior Inspector?

We are working on a project where we need to create custom nodes for Behavior Graph which either have custom Unity Inspectors or Custom Property Drawers that go beyond what the current auto created ones allow.

We have found that the Behavior Package inspector is using a sort of MVVM architecture, but we have failed to create and use our custom inspectors with reflection.

Is there a way, or is it in the roadmap, to allow for Behavior Node and/or Inspector customization? Which actually need this rather urgently, so would really appreciate any pointers to how we can achieve this.

Thank you for the support!

Hi @AlejandroGamezS ,

The short answer is those aren’t exposed at this time.

Question: Can you give more information on what exactly you’re trying to achieve that requires the custom inspectors?

Longer answer: Internally we create a NodeModel for the authoring data for specific nodes. We can then create a BehaviorNodeUI and BehaviorGraphNodeInspectorUI to make specific UIs for them. If you look at RepeatNodeInspectorUI, RepeatNodeUI and RepeatNodeModel you can get the sense for how it works. Similar examples but for Action would be the ConditionalGuardNodeUI, ConditionalGuardNodeModel and ConditionalNodeInspectorUI.

Unfortunately we haven’t fully fleshed these out, so they’re all currently internal and would need to change to be easier to implement for users. I’m not happy with users using this API currently. That said, I don’t know if we’d be able to prioritize it for Q1 so your best way might be to expose these classes locally, which unfortunately brings the burden of updating onto you.

If you can open a ticket detailing what you need and why, then at least we can prioritize it and you can track it.

I’m sorry this is not the greatest solutions for now.

Thank you for the detailed answer.

I will open a ticket and maybe it can be discussed over there.

We did find about these classes and tried to create our own implementation, but we failed at that. It’s very likely we are missing something, somewhere.

To answer your question, we need custom inspectors, or custom property drawers to be drawn, to allow for some visual aids and QoL features to be available for our use case.

We already have it for the editor inspector and our hope was to reuse some of it in the nodes or node inspectors to make it easy to understand for our users.

I will create a support ticket to discuss further.

Hi @AlejandroGamezS ,

Sounds good, thank you. Hopefully this will be forwarded to us correctly for the discussion :slight_smile:

If not, just ping me here.