OnSelect for nodes in Behavior Designer GUI

jpapon

New member
Hello,

Is there any way to trigger a callback when a node is selected in the Behavior Designer GUI?
As a simple example, I'd like to select a game object in the hierarchy when one of my actions is selected.
Or I want to do some special gizmo drawing only when a node is selected.

Thanks!
 
For that use case you can override the Task.OnDrawGizmos method. This will draw the node when the GameObject is selected (this can be enabled within the preferences on the top right of the editor)
 
Hi Justin!
So with "Gizmos View Mode" set to "Selected", and an override to OnDrawGizmos to my Task, it calls the OnDrawGizmos (strangely, 4 times) whenever the GameObject containing the BehaviorTree component is selected.
I'd like to only have it called when the specific Task is selected in the GUI editor - is that possible?
 
Top