Named Arguments
Named arguments are parameters that get their values assigned at runtime by game code. They always start with a dollar sign $
followed by the argument name.

For example, the "OnTriggerEnter" event of the TriggerBox
actor has a named argument called $Actor
which is a reference to the actor that entered the trigger. Using this named argument, you can pass the actor reference to another function that has an actor reference parameter. In this example, I'm passing it to a function that prints the actor's name to the screen.
There are three opportunities for you to set named arguments:
Global Named Arguments: These named arguments are not specific to any event or actor, so they can be used by all actions. By default, the I/O system has
$Player
as a global argument which is a reference to the local player's pawn. To add global named arguments, override theGetGlobalNamedArguments
event of the Actor I/O Subsystem.Local Named Arguments: These named arguments are specific to the actor that is executing the action. Useful when you want to expose variables of the actor to be used by actions. To add local named arguments, override the
GetLocalNamedArguments
event of the I/O interface on the actor.Event Processors: These named arguments are set from an Event Processor, and they are always specific to an I/O event of the actor. Useful when your event has parameters, and you want to expose them to be used by actions. Think stuff like the "OnActorBeginOverlap" event of the actor having a reference to the actor that overlapped with us.
Set Named Arguments
Use the SetNamedArgument
function to add a new named argument to the current execution context. As mentioned before, you should only do this from within GetGlobalNamedArguments
, GetLocalNamedArguments
, or an I/O event processor function.
For example, adding a named argument from within an Event Processor:

void APickupActor::ProcessEvent_OnPickup(APawn* InstigatorPawn)
{
FActionExecutionContext& ExecContext = FActionExecutionContext::Get(this);
ExecContext.SetNamedArgument(TEXT("$Instigator"), InstigatorPawn->GetPathName());
}
Notice that the value of the named argument is still in string form. Arguments remain in string form up until the very end when the final command is sent to the target actor by the action, and the C++ reflection system parses the parameters.
Make sure that the value you assign to the named argument is formatted in a way that is understood by the I/O system and Unreal. See the Function Parameters section for more details.
Last updated