using BehaviorDesigner.Runtime; using UnityEngine; using UnityEditor; using BlueWater.BehaviorTrees.Enemies.Bosses.Actions; namespace BehaviorDesigner.Editor.ObjectDrawers { [CustomObjectDrawer(typeof(Move))] public class MoveDrawer : ObjectDrawer { public override void OnGUI(GUIContent label) { if (Task is not Move moveTask) return; moveTask.UseMovePosition = EditorGUILayout.Toggle("Use Move Position", moveTask.UseMovePosition); if (moveTask.UseMovePosition) { moveTask.MovePosition = (SharedVector3)FieldInspector.DrawSharedVariable(null, new GUIContent("Move Position"), null, typeof(SharedVector3), moveTask.MovePosition); } else { moveTask.Target = (SharedCollider)FieldInspector.DrawSharedVariable(null, new GUIContent("Target"), null, typeof(SharedCollider), moveTask.Target); } } } }