How to pass a function as parameter of UFUNCTION() function?

TFunction is what you need. Anything else is just more work and unneeded complication for me.

Declare a function then add TFunction as a parameter.

void MyFunction( TFunction<void(int32 Numparam)> MyFunctionToCall)

TFunction works like std::function in normal C++ therefore, “void” is the function’s return type and anything inside the ( ) is the parameters, which can be left empty.

TFunction can’t be a parameter in a UFUNCTION() so keep that in mind.

A simpler way to use function pointers is with a typedef. There is a great tutorial which I link below: