object
Call any reflected function on an object by name. A general escape hatch.
What it’s for
Unreal exposes thousands of reflected UFUNCTIONs on actors, components, assets, and
subsystems. PinWright has typed handlers for the common ones, but it cannot wrap every function
in the engine and your project. This namespace is the escape hatch: it lets your assistant invoke
any reflected function on any resolved object by name, passing arguments as plain JSON.
Reach for it when you need to trigger behaviour that has no dedicated handler — a Blueprint
utility function, an engine method, a gameplay call that only exists in your project. You give it
the object's full path and the exact function name, and it converts your JSON arguments through
the same property layer used by property.set, then serializes the return value and
any out-parameters back to you.
It is deliberately general, so prefer a typed sibling when one exists. Use
actor.call_function when the target is an actor and
system.call_subsystem for subsystem functions; those give clearer errors and handle
target resolution for you. Come here when the target is an arbitrary UObject with no
dedicated handler.
One guardrail: it refuses to run against a Class Default Object, so you cannot accidentally mutate a class's shared defaults through it. Point it at a real instance.
Examples
Call a Blueprint function on a placed actor
Trigger a function that only your project defines, with no typed handler behind it.
You: On the door actor in the level, call its OpenDoor function.
call("object.call_function", {objectPath:"/Game/Maps/Level.Level:PersistentLevel.BP_Door_2",
function:"OpenDoor"})
→ {ok:true, returnValue:null}
Done. Called OpenDoor on BP_Door_2.
Pass arguments and read the result back
Arguments go in as a JSON map of parameter name to value, and the return value comes back to you.
You: Call AddHealth with amount 25 on the player pawn and tell me the new total.
call("object.call_function", {objectPath:"/Game/Maps/Level.Level:PersistentLevel.BP_Player_0",
function:"AddHealth", args:{amount:25}})
→ {ok:true, returnValue:75}
Done. AddHealth returned 75.
Invoke a function on an asset
The target does not have to be an actor — any resolved object works, including an asset by its full path.
You: Rebuild the nav data on the DataAsset that exposes a Rebuild function.
call("object.call_function", {objectPath:"/Game/AI/DA_NavConfig.DA_NavConfig",
function:"Rebuild"})
→ {ok:true, returnValue:null}
Done. Called Rebuild on DA_NavConfig.