create_state_tree
Create or load a StateTree asset, add missing schema and root state, then compile and save. Use for AI behavior trees in Unreal Engine.
Instructions
Create a StateTree asset at package_path/tree_name (or load the one already there), giving it any missing editor data, the plugin UMCPStateTreeSchema when it has no schema and a Root state when it has no states, then compile and save it. Returns tree_path, state_count, created and saved.
Returns: { tree_path, tree_name, state_count, created, saved }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tree_name | Yes | Asset name without path, e.g. "ST_Guard"; an asset of another class with that name is an error. | |
| package_path | No | Content folder for the asset, e.g. "/Game/AI" (default /Game/MCP). |