# Why isn't my delegate function getting called?

**URL:** <https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, CPP, question\
**Created:** [September 4, 2022, 11:49am UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080 "2022-09-04T11:49:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![IcyLucario](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IcyLucario](https://forums.unrealengine.com/u/IcyLucario)\
**Post date:** [September 4, 2022, 11:49am UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080/1 "2022-09-04T11:49:25Z")

</div>

Hello. I’ve been having trouble getting C++ delegates to work.  
[https://i.imgur.com/9Ta35XQ.png](https://i.imgur.com/9Ta35XQ.png)  
The delegate bind gets called and from the TilePawn class my logs are telling me the broadcast gets called as well… But SetToFalse is not.

I honestly have no idea how delegates (at least in C++) are supposed to be made based on the documentation alone.

I would love if someone could give me a working super simple no parameter example of C++ delegates working in UE5.

For what I’m actually trying to do: I’m trying to get a set of objects to all update their visibility based on cursor location. Though, right now I’m just trying to get anything to call.

If you feel I’m leaving important information out let me know, I’m posting this way late at night before I go to bed and may have missed something.

EDIT: Everything relevant from the other file:

DECLARE\_DYNAMIC\_MULTICAST\_DELEGATE(FTurnOffVisibility);

UFUNCTION(BlueprintCallable)  
void TurnOffTowerVisibility();

FTurnOffVisibility TurnOffTurretVis;

void ATilePawn::TurnOffTowerVisibility()  
{  
UE\_LOG(LogTemp, Warning, TEXT(“Broadcast called;”));  
TurnOffTurretVis.Broadcast();  
}

---

<div class="post-metadata">

**Author:** ![aaronWeaver781](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aaronWeaver781](https://forums.unrealengine.com/u/aaronWeaver781)\
**Post date:** [September 4, 2022, 2:07pm UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080/2 "2022-09-04T14:07:59Z")

</div>

Do you have this?

UFUNCTION()  
void setToFalse();

Have to have ufunction for any function that’s called from timers and delegates or the system won’t see it. I missed a ufunction and the game crashed.

---

<div class="post-metadata">

**Author:** ![JFarrow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JFarrow](https://forums.unrealengine.com/u/JFarrow)\
**Post date:** [September 4, 2022, 11:39pm UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080/3 "2022-09-04T23:39:05Z")

</div>

You need to tell the delegate what to call when someone calls Broadcast() on the delegate, you are missing something like

TurnOffTurretVis.AddUObject( ATurret, &ATurret:TurnOffTowerVisibility )

---

<div class="post-metadata">

**Author:** ![IcyLucario](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IcyLucario](https://forums.unrealengine.com/u/IcyLucario)\
**Post date:** [September 5, 2022, 4:36am UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080/4 "2022-09-05T04:36:12Z")

</div>

Oh, yep, that’s it. It was just missing UFUNCTION(). Thank you so much man!

---

<div class="post-metadata">

**Author:** ![UNIT28Studios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unit28studios/32/1142186_2.png) [@UNIT28Studios](https://forums.unrealengine.com/u/UNIT28Studios)\
**Post date:** [September 28, 2023, 7:46pm UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080/5 "2023-09-28T19:46:00Z")

</div>

This got me too! Adding the UFUNCTION specifier fixed it! thanks!!

This is definitely worth knowing. The problem is that if you don’t have UFUNCTION here, the project _won’t_ fail to compile, and you’ll get _no_ errors or warnings in the editor either. You’re just left wondering why your function isn’t being called.

Also, in many of the tutorials I’ve followed (like this one: [[Tutorial] Creating and Using Delegates C++ and Accessing them in Blueprints](https://forums.unrealengine.com/t/tutorial-creating-and-using-delegates-c-and-accessing-them-in-blueprints/9649)), and in the official docs, the importance of this isn’t specified.

---

<div class="post-metadata">

**Author:** ![volumetrix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@volumetrix](https://forums.unrealengine.com/u/volumetrix)\
**Post date:** [January 18, 2026, 11:40am UTC](https://forums.unrealengine.com/t/why-isnt-my-delegate-function-getting-called/641080/6 "2026-01-18T11:40:47Z")

</div>

Finally found a solution from this thread. Delegate functions need to be marked with `UFUNCTION` or they will silently be ignored. Thanks for the post, it was very difficult to track down.
