I am learning AbilitySystem, which is as powerful as it is confusing and undocumented, and I wanted to have a persistent GameplayAbilityTargetActor which broadcasts a delegate at regular intervals during it’s lifetime, that would later bind in a blueprint to attach some gameplay functionality to. Unfortunately I cannot enable the delegate pin in Wait Target Data node. How can I implement this use-case? Is there a better pattern?
Code:
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectedTargetsDelegate, const TArray<TSoftObjectPtr<AActor>>&, selectedTargets);
UPROPERTY(BlueprintReadWrite, BlueprintAssignable, EditInstanceOnly, Meta = (ExposeOnSpawn), Category = "SelectAroundPawn")
FSelectedTargetsDelegate SelectedTargetsDelegate;
Blueprint:
Note how the Radius pin is visible but not the delegate. I also tried to do this via Construct Object from Class, but got a different error:
If I set ExposeOnSpawn = true explicitly, then compiler complains that the property cannot be exposed.