UnityEvent in Inspector

Justin

Administrator
Staff member
Yes, I plan on adding this to the next version. I'll let you know after I add it and if you send me a PM with your BD invoice number and Unity version I can send it to you before release.
 

Justin

Administrator
Staff member
I was looking into this and unfortunately it doesn't look like it's possible to do with IMGUI. Behavior Designer tasks are not Unity Objects so I can't use EditorGUI.PropertyField (which is how Unity draws the events). I would instead have to use something like EditorGUI.UnityEvent but that method does not exist. Maybe with Unity's new UIElements solution I'll be able to add better Unity Event support.
 

Matthew57

New member
It’s already being done though. If you look at the InvokeMethod action class in the inspector it has a version of the unityevent. It’s not the exact same as what normal unityevents looks like but it serves the purpose well enough. If we can just use that same inspector code that’s all we’ll need.
 

Justin

Administrator
Staff member
InvokeEvent uses a custom implementation specific for the reflection tasks, and it's not really easy to extend for the Unity Event system. I am currently working on a UIElements version of Behavior Designer and I haven't gotten to the part where I can draw fields but UIElements offers a lot more flexibility so I am hopeful that it is included in that.
 
Top