Dynamic Multicast delegate: How to bind lambda?

The only proper solution is to make a BP and native version of the event


	DECLARE_MULTICAST_DELEGATE_OneParam(FOnPoiActorAddedSignature, ALgcPoiActor* PoiActor);
	DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnPoiActorAddedSignatureBp, ALgcPoiActor*, PoiActor);

Everything else sets you up for failure and bugs. I don’t know why the most dangerous and wrong hack got the most likes in this thread. There were replies warning about it afterawards that were correct, trying to “work around” the problem with hacks is just wrong. There is a reason things are not supported directly like that. So…

Use two signature types and two events, broadcast them always together (write a helper function if needed to wrap them to follow DRY principle) and you re good! This is also several times done in UE’s engine code itself.

2 Likes