call_function
Invoke a UFUNCTION on an editor-world object instance, passing typed parameters and returning typed return values and out-params. Use it for BlueprintCallable or BlueprintEvent functions.
Instructions
Invoke a UFUNCTION on an object instance in the EDITOR world and get its return value and out-params back typed. Arguments go in a dict named parameters (each sibling uses a DIFFERENT key — call_object_method uses args_json, call_component_function uses params — and an unknown key is a hard error, so read the signature with get_function_info first). Marshals scalars, ENUM by entry name, Blueprint STRUCTs as JSON objects, ARRAY/set as JSON arrays, FGameplayTag (validated against the registry) and FGuid. Choose call_object_method to reach a CDO/archetype/live PIE subobject or to pass world, call_component_function to hit a component without hand-building its path, and call_library_function for a static/library call with no instance at all. Only BlueprintCallable+Public or BlueprintEvent functions are callable; pass transact=true to make the write undoable and actually dirty an OFPA package.
Returns: { object_path: string, function_name: string, success: bool, message: string, return_value: any (typed: bool/number/string natively, struct/map as object, array/set as array, object-ref as path string), out_params: object (same typed values), transaction?: { requested, modified: [path], saved_to_transaction_buffer, is_package_external, package_name, package_file, package_file_exists, package_dirty_before, package_dirty_after }, verification?: object (only when transact=true) }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Alias of `parameters` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `parameters`. | |
| params | No | Alias of `parameters` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `parameters`. | |
| transact | No | Optional (default false). When true, wrap the invocation in an FScopedTransaction and Modify() the target (and, for a component, its owner) BEFORE calling, so whatever the function writes is undoable AND marks the owning package dirty. Without this, a CallInEditor-style function that fills state on a World Partition (OFPA) actor leaves the package clean and save_level reports success while writing nothing. REFUSED for pure/const functions and for PIE-world targets (both would only produce a false-positive dirty flag). | |
| args_json | No | Alias of `parameters` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `parameters`. | |
| parameters | No | Optional {param_name: value} dict. Scalars map directly; pass an ENUM by its entry name as a string (e.g. "Harvest"); pass a STRUCT param as a JSON object {Field: val, ...} and an ARRAY/set as a JSON array (nativized via FJsonObjectConverter — nested structs + enum-by-name inside structs supported; JSON keys match the field's authored name). A UE-format text string (e.g. "(X=1,Y=2,Z=3)") is also accepted for structs. | |
| object_path | Yes | Path or name of the object instance, resolved in the EDITOR world: full object path, asset path, CDO/archetype, or a dotted "Actor[.Component[.Subobject]]" whose first segment is the actor's internal name. This command has NO `world` parameter — use call_object_method for a live PIE target. | |
| function_name | Yes | Name of the function to call, exactly as declared (a Blueprint graph named "Add Item" keeps its spaces) |