BehaviorGizmoPlugin ​
Inherits: EditorNode3DGizmoPlugin
Draws the behaviour of the selected NPC in the 3D viewport: for each schedule of its behaviour script a route with arrows (patrol points, the places it walks to), the circle it wanders in, and lines to the people and objects it talks to, uses or follows. One colour per schedule (the Behaviour tab shows the same colours); the schedule the tab has chosen is bright, the others dim; the task chosen in the tab is white. Only the selected NPC is drawn, and nothing when the tab's Show paths is off. The drawing itself is BehaviorRoute.build_lines. When the script is the NPC's own and a schedule is chosen, its points have handles: drag one to move it over the ground (a patrol point, the place of a move, the centre of a wander), and the small handle on the circle of a wander sets its radius. One drag is one step of Undo (BehaviorPanel keeps it). Phase 4: for the chosen schedule it also draws the real walk (BehaviorCheck.plan: the path the baked navigation gives between the places, light green), the places that cannot be reached in red (and a red line to each from where the walk came), and the walker (a figure at the time the slider of the tab says).
Variables ​
Callable | state_provider | Callable() |
BehaviorPanel | panel | null |
int | picked_id | -1 |
Variable descriptions ​
Callable state_provider = Callable() ​
What to draw: a Callable that takes the NPC and answers {"script", "focus_schedule", "focus_task", "only_focus", "editable"} (empty = draw nothing). The Behaviour tab (BehaviorPanel) is the one that answers
BehaviorPanel panel = null ​
The Behaviour tab: it keeps a drag as one step of Undo
int picked_id = -1 ​
The point handle pressed last (-1 none): it has the move gizmo (2026-11-14, AxisHandles: an X, a Y and a Z arrow; drag the tip of one to move the point along that axis only)