This issue has been closed as 'Won't Fix' due to an extended period of time without updates. If this issue is important to you please let us know by posting on the AnswerHub or UDN, and Epic will re-open the ticket for further review.
If an actor that contains a delegate bound in code is duplicated after being placed in the level, the delegate for the duplicate will also trigger the delegate for the original as well.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnTicked, AActor*, Actor);
inside the UCLASS:
UPROPERTY(BlueprintAssignable) FOnTicked OnComponentTicked;
OnComponentTicked.Broadcast(GetOwner());
UPROPERTY(Category = Components, VisibleDefaultsOnly, BlueprintReadOnly)
class UMyActorComponent* MyActorComponent;
MyActorComponent = CreateDefaultSubobject<UMyActorComponent>(TEXT("MyActor0"));
Result:
Three messages are printed to the screen, 1)the message for the original instance 2)expected message for the duplicate instance 3) Copied message, also from the duplicate
Expected:
Expected message prints once for each instance of the blueprint
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.10 |
Created | Jan 15, 2016 |
---|---|
Resolved | Jan 13, 2017 |
Updated | Feb 5, 2017 |