I’ve found this thread really helpful, so many thanks!
I would like to ask if it’s possible to… somehow autogenerate the struct itself, or at least “fake” it. I’m experimenting with the possibility of having a blueprint version of the function “CallFunctionByNameAndArguments()”, although it’s actually using ProcessEvent() directly.
I’ve gotten as far as having an actual CustomThunk function that includes a wildcard pin, which is then passed to the ProcessEvent() function. Basically I can already get it to execute functions with a single parameter of any type, which is awesome, but of course I want to expand on that.
The ProcessEvent() function can be given a struct for its “Parms” parameter, which should contain members matching the target function’s inputs and outputs. But from what I understand after reading through the code, it doesn’t really need the struct itself, it simply reads the memory addresses of its members to populate the target function’s parameters.
I haven’t gotten yet into how exactly should it be done, but thinking abstractly I was wondering if it wouldn’t be possible to directly generate a UStructProperty object and get its members to point to the original function’s wildcard pins instead inside the CustomThunk exec code.
If not, maybe copy ProcessEvent() function itself but accept an array of parameters instead of a struct? What do you think?