Call a blueprint function in c++ by name and get the return value
I know the following commend will run a blueprint function by a given name : CallFunctionByNameWithArguments("function name", outputDeviceNull, NULL, true)
I want to know if there is a way to get the return value of such function if it has any.
asked Nov 12 '16 at 11:39 AM in C++ Programming
I found a work around. I use a BlueprintImplementable function and cast it to a predefine interface. this way i can simply be sure that a specific function exist in a class, because the class is drived from the interface I have already have access to.
Here is a sample code
Now you can always cast a pointer of "ASample_Actor*" to "IMyinterface*" and access the interface functions ( in this case it's SampleFunction )
Follow this question
Once you sign in you will be able to subscribe for any updates here