Changing the name of a function that is bound to a delegate, or attempting to bind a delegate to a second function, causes the new/changed function to not be called when the delegate is triggered.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
UBoxComponent* TestBox;
UFUNCTION(BlueprintCallable, Category = Test)
void OriginalFunction(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);
TestBox = CreateDefaultSubobject<UBoxComponent>(TEXT("TestBox")); RootComponent = TestBox; TestBox->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::OriginalFunction);
void AMyActor::OriginalFunction(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult) { if (GEngine) { GEngine->AddOnScreenDebugMessage(-1, 4.f, FColor::Magenta, TEXT("OriginalFunction")); } }
Result:
When walking into the box after changing the function name, the debug message does not appear
Expected:
Delegate is still able to recognize the bound function after changing the function name
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
Delay nodes occasionally don't fire the "Completed" output in a nativized build
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
Hey, why do i get this when i snap two similar meshes together?
Head over to the existing Questions & Answers thread and let us know what's up.
28 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.13.2, 4.14 |
Created | Nov 9, 2016 |
---|---|
Resolved | Jun 16, 2017 |
Updated | Jul 14, 2021 |