Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Delegate works in Blueprint but not c++


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:


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:

 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.

Product Version: UE 4.10
more ▼

asked Mar 29 '16 at 07:28 PM in C++ Programming

avatar image

6 1 5 5

avatar image Bariudol Feb 14 '17 at 11:35 PM

Im Having the exact same issue, did you find a way to solve this?

avatar image Wilco Feb 15 '17 at 03:22 AM

Hey, I was only experiencing this issue in 4.10 - I am now using 4.14 and it works completely fine with the above implementation. Sorry, I couldn't be of more help.

avatar image project.gheist Feb 15 '17 at 02:24 AM

In C++, are you calling GetCompObj()->CompleteComp.Broadcast() when the delegate is supposed to be fire? Or are you firing it from BP?

avatar image Wilco Feb 15 '17 at 03:24 AM

Hey, the delegate was being broadcasted from C++ using CompleteComp.Broadcast(). That said, I only experienced this issue in 4.10. I'm on 4.14 now and it seems to be working fine with the above implementation.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

In my situation it appears that this bug only existed in version 4.10. I have upgraded through several versions all the way up to 4.14 since originally posting this question and have not seen the issue since. For this reason, I will mark this as answered.

more ▼

answered Feb 15 '17 at 03:26 AM

avatar image

6 1 5 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question