Flayer Function Libraries
A Flayer function library is a subclass of UFlayerFunctionLibrary. The subsystem discovers eligible native libraries and saved Blueprint libraries automatically, creates an instance for each game instance, and registers the functions they expose.
Game-facing Flayer handlers run on the game thread. Return a value for an immediate result, or return FFlayerPromise for an operation that continues over multiple frames.
C++ libraries
Register a UFUNCTION in the library constructor. The public function name and description appear in discovery:
#pragma once
#include "CoreMinimal.h"
#include "Flayer/FlayerFunctionLibrary.h"
#include "Utils/FlayerFunctionUtils.h"
#include "MyGameFunctions.generated.h"
UCLASS()
class UMyGameFunctions : public UFlayerFunctionLibrary
{
GENERATED_BODY()
public:
UMyGameFunctions()
{
REGISTER_FLAYER_FUNCTION_SHORT(
GetPlayerLocation,
"get_player_location",
"Returns the local player's world location"
);
}
UFUNCTION()
FString GetPlayerLocation() const
{
const APawn* Pawn = UFlayerFunctionUtils::GetPlayerPawn(this);
return IsValid(Pawn)
? Pawn->GetActorLocation().ToString()
: TEXT("No player pawn is available");
}
};Check GetWorld() before using world objects. A library’s world resolves from its owning game instance and can be null during travel or teardown.
Function signatures and EL5 values
A handler can return void, one supported value, one output parameter, or an FFlayerPromise. Inputs can use values or const references. Supported reflected values map to EL5 as follows:
| Unreal type | EL5 value |
|---|---|
bool | Bool |
| Non-enum integer types | Signed 64-bit Int, with checked range conversion |
float, double | 64-bit Float |
FString | String |
TArray<uint8> | Binary |
Supported typed arrays, TArray<FDynamicParam>, FDynamicParams | Array |
TMap<FString, T> with supported values, including FDynamicParam | Map |
EL5 also supports Null. For enums, actors, structs, and other game types, expose supported values and convert them inside the handler. The registration system validates signatures and RPC arguments.
The runtime can inject one optional UCallLogger* at any position in the signature. It carries managed execution cancellation context and is not sent as an RPC argument. Most handlers do not need it. Use Unreal logging such as UE_LOG for diagnostics; while connected, engine logs are forwarded to game.log.
Blueprint libraries
- In the Content Browser, choose Create Flayer Function Library, or create a Blueprint subclass of Flayer Function Library.
- Add functions with supported input and output types.
- In
On Register Blueprint Flayer Functions, connect a Register Flayer Function node for each function. - Select the handler in the node’s dropdown and set its Public Name and Description.
- Compile and save the Blueprint, then restart Play to discover a newly created library.

For example, a Blueprint handler can activate a dash ability through Unreal’s Ability System.

The node exposes advanced metadata for visibility, hint matching, argument descriptions and defaults, coordinate hints, and the promise return type. Saved Blueprint libraries are included in packaged builds.
Registration metadata
Public names are case-sensitive. The name flayer_funcs is reserved for SDK discovery. Set a hint regex to control which game-state hints match a function, and set bExposed to control whether it appears in agent discovery.
C++ handlers can provide optional argument defaults and coordinate metadata with FFlayerFunctionMeta:
FFlayerFunctionMeta Meta;
Meta.PacketName = TEXT("set_move_target");
Meta.Description = TEXT("Moves the player to a target");
Meta.HintKey = TEXT(".*");
FFlayerArgumentMeta Run;
Run.Description = TEXT("Whether the player runs");
Run.bOptional = true;
Run.DefaultValue = FDynamicParam(false);
Meta.Arguments.Add(TEXT("bRun"), Run);
RegisterCodeFunction(TEXT("SetMoveTarget"), Meta);Required inputs precede optional inputs. Each optional input needs a default value with a matching supported type and range. Coordinate metadata can identify X, Y, Point, or PointList values. Promise handlers set PromiseReturnType to the eventual EL5 result type.
A public name with conflicting non-volatile registrations is unavailable until the conflict is resolved. A non-volatile game function can replace a volatile SDK default.
Built-in functions
The SDK registers volatile defaults for game_state, reset, echo, and pause. Register a game-specific function with the same public name to replace a default. The default game_state includes _can_interact, _hint_key, and current_scene; the default reset returns false.
Open Window > Nunu Flayer Functions during Play to inspect the active game instance, discovered libraries, signatures, registration metadata, and validation diagnostics.
