I’m a bit confused by this one. It seems that I can only use BlueprintNativeEvents with certain parameters?
This compiles and runs:
UCLASS()
class DEBUG_API UMyUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintNativeEvent, Category = "Files")
void Setup();
};
This errors out:
UCLASS()
class DEBUG_API UMyUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintNativeEvent, Category = "Files")
void Setup(FString input);
};
There are a lot of different errors that I can get from this problem, depending on the project. On an empty project, with this configuration, I get:
MyUserWidget.cpp(14): error C2511: 'void UMyUserWidget::Setup_Implementation(FString)': overloaded member function not found in 'UMyUserWidget'
If I change to the GENERATED_UCLASS_BODY macro and define a constructor, I get:
Debug.generated.cpp(18): error C2511: 'void UMyUserWidget::Setup(const FString &)': overloaded member function not found in 'UMyUserWidget'