I’m pretty sure that this isn’t supposed to happen at all, but I was able to declare multiple UFunctions in a class with the same name. When I tried to call one of them from C++ it called the other which caused a crash. Since you normally get an error when you try to overload UFunctions, I guess this is just an edge case that hasn’t been found/fixed yet.
I first declared a base class with a BlueprintNativeEvent in it
UCLASS()
class OVERLOADTEST_API ABaseClass : public AActor
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintNativeEvent, Category = "Default")
void Initialize();
virtual void Initialize_Implementation();
};
Then I inherited from that class and declared a BlueprintCallable function of the same name as the BlueprintNativeEvent
UCLASS()
class OVERLOADTEST_API AInheritedClass : public ABaseClass
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Default")
void Initialize(int32 num);
virtual void Initialize_Implementation() override;
};
When I try to call Initialize() from C++, it instead tries to call Initialize(num) and crashes when it tries to copy the parameters (which are null for the function with no parameters).
Attached is a repro case for this bug.