call_component_function
Invoke a UFUNCTION on a component by naming the actor and component class, skipping object path construction. Use for gameplay state on components.
Instructions
Drive a COMPONENT without ever building its object path: name the actor, name the component CLASS, and it resolves the actor (editor world or a live PIE world via world), runs FindComponentByClass, and invokes the UFUNCTION with JSON arguments — the one generalist reflection call that replaces bespoke per-feature helpers (attribute getters, inventory or equipment calls), since almost all gameplay state in a component-based framework lives on components rather than on the actor. Arguments go in a dict named params (call_function uses parameters, call_object_method uses args_json); marshals scalars, ENUM by entry name, STRUCT as a JSON object, ARRAY/set as a JSON array, FGameplayTag (validated) and FGuid, and returns return_value + out_params typed alongside the resolved component_path and the identity of the world that answered. WARNING: it uses the FIRST component of (or derived from) that class. An OBJECT/class argument IS passed by path — resolved in the target's own world first, then as an asset, and a path that resolves to nothing is a hard error, never a silent null. In co-op, world='server' is where authoritative component state lives.
Returns: { success: bool, actor: string, component_class: string, component_path: string, function: string, world: string, returns_json: object ({ return_value?: any, out_params?: object }), 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), world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Alias of `params` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `params`. | |
| actor | Yes | Actor name / path / (in PIE, editor) label to resolve. In world='editor' also accepts a full object path / CDO / archetype; in world='pie' resolves within the running PIE world (Actor[.Component[.Subobject]] by name/label). | |
| world | No | Optional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'server' (the PIE world with authority) | 'client' | 'pie:N' | 'game' (alias of 'pie'). Anything other than absent/'editor' resolves the actor in that live world (LIVE component instance). | |
| params | No | Optional {param_name: value} dict. Same marshaling as call_function: scalars; ENUM by entry name string; STRUCT as a JSON object; ARRAY/set as a JSON array; FGameplayTag as {"TagName":"A.B"} (validated); FGuid as a hex/braced string. | |
| function | Yes | Name of the UFUNCTION to call on the component (BlueprintCallable+Public or a BlueprintEvent). | |
| transact | No | Optional (default false). Wrap the invocation in an FScopedTransaction and Modify() BOTH the component and its owner actor first (a component's authored state persists in the OWNER's package — the OFPA .uasset for a World Partition actor), so the write is undoable and actually gets saved. REFUSED for pure/const functions and whenever world='pie'. | |
| args_json | No | Alias of `params` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `params`. | |
| parameters | No | Alias of `params` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `params`. | |
| component_class | Yes | Component CLASS name/path to locate on the actor (bare/native e.g. "AC_Storage", /Script path, or Blueprint asset path — resolved via ResolveClass). The FIRST component of (or derived from) this class is used. |