Nunu SDK Utility Functions
The Unreal plugin includes Blueprint and C++ helpers for promises, common game operations, and converting values to EL5 parameters.
Promise utilities
Include Utils/FlayerPromiseUtils.h to use these helpers from C++.
| Helper | Behavior |
|---|---|
DelayedPromise(Context, DelaySeconds, Result) | Completes with the supplied result after a delay |
ConditionalPromise(Context, Condition, Result, MaxWaitTime, TickInterval) | Checks a condition until it returns true |
TickingPromise(Context, OnTick, Result, MaxTickTime, TickInterval) | Calls a tick delegate until it returns true |
ConditionalPromiseWithResult | Lets a condition delegate provide the result |
TickingPromiseWithResult | Lets a tick delegate provide the result |
The condition delegate returns true when it is time to complete. The ticking delegate receives the elapsed frame time and returns true when the operation is complete. The helpers also provide Blueprint nodes and variants that receive a UCallLogger* context.
FDynamicParams Result{FDynamicParam(TEXT("done"))};
return UFlayerPromiseUtils::DelayedPromise(
this,
1.5f,
Result
);See Flayer Promises for return metadata, cancellation, and lifecycle details.
Flayer function utilities
UFlayerFunctionUtils provides Blueprint nodes and C++ static helpers for:
- Converting milliseconds to seconds and seconds to milliseconds.
- Creating and splitting vectors and rotators.
- Reading actor positions, distances, and directions.
- Finding a nearby actor of a class and getting a player controller or pawn.
- Joining and splitting strings.
- Mapping a value between numeric ranges.
- Formatting vectors and rotators and serializing reflected structs to JSON.
For example, retrieve the first local player pawn in a Flayer library with:
APawn* Pawn = UFlayerFunctionUtils::GetPlayerPawn(this);Dynamic parameters
FDynamicParam represents one EL5 value and FDynamicParams holds a sequence of values. Use UDynamicParamUtils to convert supported values in Blueprint. Its helpers cover Null, Bool, Int, Float, String, Binary, Array, and Map values.
FDynamicParams Values;
Values.Add(FDynamicParam(TEXT("ready")));
Values.Add(FDynamicParam(true));
Values.Add(FDynamicParam(int64(42)));EL5 has eight value types: Null, Int, Float, Bool, String, Binary, Array, and Map. Integer conversions are range-checked. Use TryGet or GetParam when converting dynamic values to a specific Unreal type.