I have a function I need to implement in blueprints that I would like to be able to get back a boolen from. What I am trying to do is basically:
UFUNCTION(BlueprintImplementableEvent)
bool MyFunction(bool param1);
However, BlueprintImplementableEvents cannot have a return value.
I’ve tried adding another UPROPERTY to write the output to which works, but I haven’t found any way to set the UPROPERTY to essentially be private and only accessible to the owning class/blueprint.
I’ve tried turning param1 into bool& to see if I could write back into the parameter, but then the event no longer shows up in the editor.
I’ve also tried turning param1 into bool* which leads to a compiler error.
Finally, Return a value from a BlueprintImplementableEvent - Programming & Scripting / Blueprint - Epic Developer Community Forums seems to be exactly what I am looking for and very commonly linked to, but the post with the answer seems to have been deleted.
Is there a method to return a value from a BlueprintImplementableEvent?
Edit: I converted it to a BlueprintNativeEvent