create_pcg_graph
Creates or loads a PCG Graph asset in Unreal Engine and saves it, enabling headless-safe AI graph setup.
Instructions
Creates (or loads, idempotently) a UPCGGraph asset and saves it. Uses CreatePackage + NewObject (headless-safe). A fresh PCG graph has the implicit Input/Output nodes; node_count counts user-added nodes only (initially 0). Requires the PCG plugin to be enabled.
Returns: { graph_name: string, asset_path: string, created: bool, already_exists: bool, node_count: int, saved: bool, save_error: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the PCG Graph asset to create. | |
| package_path | No | Destination /Game folder (default /Game/PCG). |