UFUNCTION causing build errors
I'm trying to create a function that can be overridden in blueprints, however any time I try to add the UFUNCTION prefix I get build errors.
The compile errors
Error C2511 'bool UToolTipDesign::SetToolTipTextDesign(const FText &)': overloaded member function not found in 'UToolTipDesign'
Error C2352 'UObject::FindFunctionChecked': illegal call of non-static member function
When I remove "UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "ToolTip")" the build errors go away however I an unable to override the function in blueprints.
asked Feb 17 '17 at 04:40 AM in C++ Programming
In your header add one line so it looks like this (i believe this is optional, but I like it better to explicitly declare it):
In your cpp change the implemented function name to SetToolTipTextDesign_Implementation:
For BlueprintNativeEvent, and others, the UHT generates code that implements SetToolTipTextDesign (because it needs to call blueprint), which calls the SetToolTipTextDesign_Implementation that you need to implement.
I also changed the
Note that const reference and copy are semantically the same, const ref is usually faster.
Follow this question
Once you sign in you will be able to subscribe for any updates here