Is it possible to create object drawers for action class? I tried so many times but every time but it just failed.You can create object drawers which integrate with Odin, but because this is such a low level feature and we cannot include Odin within Behavior Designer it's not possible to do a full fledged integration.
I tried to create a custom editor for my action class like in unity editor. I failed to get the task variables usingYou can create object drawers which integrate with Odin, but because this is such a low level feature and we cannot include Odin within Behavior Designer it's not possible to do a full fledged integration.
Is it possible to create object drawers for action class? I tried so many times but every time but it just failed.
[CustomObjectDrawer(typeof(MyAction))]
public class MyActionDrawer : ObjectDrawer
{
public override void OnGUI(GUIContent label)
{
var myAction = task as MyAction;
Tasks are not serialized objects. There isn't a SerializedObject or SerializedProperty associated with them. You will need to use EditorGUILayout to draw the inspector elements.serializedObject.Update() and could not create a foldout group based on the custom enum I created in my action class.
Also another way to use custom drawer like Odin, now I link my Monobehaviors to behavior designer actions, for example: a custom action called "CustomAction" calling "MeleeAttack" Monobehavior in its OnUpdate function, so that I can use other package like Odin / Hot reload to modify the real action scripts without recompile.Hi, I’m sorry to resurrect an old thread but, I looked at the solution and think I could create an attribute to draw fields with Odin using their property tree. However, I would need a callback for when the editor is opened and closed.
Currently, there is only the OnGUI method in ObjectDrawer. Would it be possible to add something like OnBeginGUI / OnEndGUI or similar? Or are there any alternative callbacks that are triggered when switching to the Inspector tab or when its content changes?