Hello,
I am having some troubles with a c++ delegate that I have created. I have an object(named ParentObj for sake of example) with a component (named CompObj for example). This component has a Dynamic Multicast delegate:
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompCompleteSignature);
In the header of the component I have:
FCompCompleteSignature CompleteComp;
In the ParentObj, I am calling a function when this delegate is executed:
GetCompObj()->CompleteComp.AddDynamic(this, &ParentObj::SomeFunction);
For some reason SomeFunction is never called. I know that the delegate is being broadcasted because I am able to define functionality in blueprints when this delegate broadcasts and it works. IE. if in blueprints I go: event CompleteComp - > do something node, the do something node fires correctly. It just seems that the c++ function never does.
There is nothing strange about this function either. The header containing it looks like this:
public:
UFUNCTION(BlueprintCallable, category = somecategory)
void SomeFunction();
The .cpp looks like:
void ParentObj::SomeFunction()
{
//do stuff
}
Any help you can provide would be greatly appreciated. I am sure it is just something that I am doing wrong.