Hello, sorry for not good at english since english is not my first language.
I am trying to implement C ++ to bind an event as a parameter to an event dispatcher, as shown in the image below.
Throughout the other documentation on ue4, event dispatcher corresponds to a dynamic multicast delegate and the event corresponds to dynamic delegates.
code in below , dynamic multicast delegate and the dynamic delegate are declared as follows:
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FInitEventDispatcher);
DECLARE_DYNAMIC_DELEGATE(FReferenceDelegate);
However, ‘addDynamic’ in the dynamic multicast delegate does not accept a delegate as an argument.
void AInitManager::SafeRefUniqueToActor(FReferenceDelegate EventToBind)
{
if (bUniquesEndInit == true)
{
EventToBind.ExecuteIfBound();
}
else
{
// ERROR
OnUniquesEndInit.AddDynamic(this, EventToBind);
}
}
How can I bind dynamic delegate to dynamic multicast delegate? or How can I get function signature from dynamic delegate?
Thanks for read my question.