When I creat a BlueprintNativeEvent or BlueprintImplementableEvent
for example:
81494- UFUNCTION(BlueprintNativeEvent, …)
void TestFunction(FString Str);
then I compile, I always get a error says that cant find the overloaded function TestFunction( const FString& Str )
when I look into the Project.generated.cpp file,
I saw my function become TestFunction( const FString& Str );
I suppose compiler wants you to declare event with const FString& Str instead of FString Str, possibly because you can’t modify FString and you should declare it as not modifiable.
What I mean is there are a several ways to use arguments:
FString Str - receiving string as argument to this function. Used to transfer string from blueprint to C++ function.
FString& Str - returning string by assigning value to this argument (works almost as pointer). Good for returning several values at once.
const FString& Str - gets string by with guarantee that we cannot modify it. Blueprint treats it as returned. Used to output string from C++ to blueprint.
Your case is the third.
And don’t ever modify generated files. They are not supposed to be modified, they generated by header tool and any little change can create huge problems.