Skip to content

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools

Inspect BehaviorTree (BT) assets.

7 tool(s).

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.get_blackboard

Returns the blackboard asset for this behavior tree.

    Args:
        behavior_tree: The BehaviorTree asset to query.
    Returns:
        The BlackboardData asset.

Input schema

{
  "properties": {
    "behavior_tree": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BehaviorTree",
      "type": "object"
    }
  },
  "required": [
    "behavior_tree"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BlackboardData",
      "type": "object"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.get_children

Returns direct child nodes of a composite node.

    Args:
        composite: A BTCompositeNode (Selector, Sequence, etc.).
    Returns:
        A list of child BTNode UObjects.

Input schema

{
  "properties": {
    "composite": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BTCompositeNode",
      "type": "object"
    }
  },
  "required": [
    "composite"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "properties": {
          "refPath": {
            "description": "The reference stored as a soft path string.",
            "type": "string"
          }
        },
        "required": [
          "refPath"
        ],
        "title": "/Script/AIModule.BTNode",
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.get_node_depth

Returns the tree depth of a node by its list_nodes index.

    Args:
        behavior_tree: The BehaviorTree asset.
        node_index: Zero-based index into list_nodes output.
    Returns:
        The tree depth (0 = root level).

Input schema

{
  "properties": {
    "behavior_tree": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BehaviorTree",
      "type": "object"
    },
    "node_index": {
      "type": "integer"
    }
  },
  "required": [
    "behavior_tree",
    "node_index"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "type": "integer"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.get_node_depths

Returns tree depths for all nodes, matching list_nodes order.

    Args:
        behavior_tree: The BehaviorTree asset.
    Returns:
        A list of depth integers.

Input schema

{
  "properties": {
    "behavior_tree": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BehaviorTree",
      "type": "object"
    }
  },
  "required": [
    "behavior_tree"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "type": "integer"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.get_root_decorators

Returns root-level decorators on this tree.

    Args:
        behavior_tree: The BehaviorTree asset to query.
    Returns:
        A list of BTDecorator UObjects.

Input schema

{
  "properties": {
    "behavior_tree": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BehaviorTree",
      "type": "object"
    }
  },
  "required": [
    "behavior_tree"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "properties": {
          "refPath": {
            "description": "The reference stored as a soft path string.",
            "type": "string"
          }
        },
        "required": [
          "refPath"
        ],
        "title": "/Script/AIModule.BTDecorator",
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.get_subtree

Returns the sub-BT asset referenced by a RunBehavior task.

    Args:
        node: Any BTNode. Only RunBehavior tasks have a subtree.
    Returns:
        The referenced BehaviorTree asset.
    Raises:
        ValueError: If the node does not reference a subtree.

Input schema

{
  "properties": {
    "node": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BTNode",
      "type": "object"
    }
  },
  "required": [
    "node"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BehaviorTree",
      "type": "object"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

aimodule_toolset.toolsets.behavior_tree.BehaviorTreeTools.list_nodes

Returns a flat list of all node UObjects in tree order.

    Order: root decorators, then DFS (composite, services,
    per-child decorators, child node).

    Args:
        behavior_tree: The BehaviorTree asset to inspect.
    Returns:
        A list of BTNode UObjects.

Input schema

{
  "properties": {
    "behavior_tree": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/AIModule.BehaviorTree",
      "type": "object"
    }
  },
  "required": [
    "behavior_tree"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "properties": {
          "refPath": {
            "description": "The reference stored as a soft path string.",
            "type": "string"
          }
        },
        "required": [
          "refPath"
        ],
        "title": "/Script/AIModule.BTNode",
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}