I have found this piece of code showing how to call a blueprint function from C++:
UFUnction* Func = Obj->GetClass()->FindFunction(FName("FuncName"));
if(Func == nullptr){return;}
FStructOnScope FuncParam(Func);
UProperty* ReturnProp = nullptr;
for (TFieldIterator<UProperty> It(Func); It; ++It)
{
UProperty* Prop = *It;
if (Prop->HasAnyPropertyFlags(CPF_ReturnParm))
{
ReturnProp = Prop;
}
else
{
//FillParam here
}
}
Obj->ProcessEvent(Func, FuncParam.GetStructMemory());
But… I don’t know how to //Fillparam here.
How can I fill the FuncParam with the parameters that I need to pass?