UFUNCTION(Server, Reliable, WithValidation)
void ServerRPCRunFunction(void (AMyCharacter::* RunFunction)());
I make function with function pointer parameter. And here is the error message.
error : Unrecognized type 'void' - type must be a UCLASS, USTRUCT or UENUM
What is the problem and What should i do for using function pointer parameter with RPC
UE4 reflection system does not support function pointers so you can not use the with UFUNCTION
You can use UFunction* which represents function in reflection system but it’s kind of pointless to do with replication, because UE4 replication already does that for you… i mean you trying to use that right now. Make server functions to call specific functions you need.
Remember that by doing so you exposing those functions to network, they dont need to be called legitimately, as hackers can find ways to send fake packets and the way you trying to do they could call any function in any character creating crazy security flaw.