# Delegates from two classes with the same parent

**URL:** <https://forums.unrealengine.com/t/delegates-from-two-classes-with-the-same-parent/1821671>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, delegates, CPP, question\
**Created:** [April 25, 2024, 8:29pm UTC](https://forums.unrealengine.com/t/delegates-from-two-classes-with-the-same-parent/1821671 "2024-04-25T20:29:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user\_f488f58fa1d010f87b5aa2ee92eeef31e84836b41933df7baf43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_f488f58fa1d010f87b5aa2ee92eeef31e84836b41933df7baf43a1](https://forums.unrealengine.com/u/user_f488f58fa1d010f87b5aa2ee92eeef31e84836b41933df7baf43a1)\
**Post date:** [April 25, 2024, 8:29pm UTC](https://forums.unrealengine.com/t/delegates-from-two-classes-with-the-same-parent/1821671/1 "2024-04-25T20:29:41Z")

</div>

Hi! I am having difficulty using a delegate.

There are two classes with a common parent.

Delegate variables are declared in their parents.

One child (Class A) is binding with AddUObject.

Another Child (Class B) call the Broadcast.

At this time, can Class A listen to Class B’s broadcast?

Thank you 🥲

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [April 25, 2024, 8:53pm UTC](https://forums.unrealengine.com/t/delegates-from-two-classes-with-the-same-parent/1821671/2 "2024-04-25T20:53:57Z")

</div>

Hi, yes Class A can listen to Class B broadcast. But it needs to bind to Class B’s delegate not to it’s own. So in Class A you need to do something like:  
ClassBReference-\>YourDelegate-\>AddUObject()

---

<div class="post-metadata">

**Author:** ![user\_f488f58fa1d010f87b5aa2ee92eeef31e84836b41933df7baf43a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_f488f58fa1d010f87b5aa2ee92eeef31e84836b41933df7baf43a1](https://forums.unrealengine.com/u/user_f488f58fa1d010f87b5aa2ee92eeef31e84836b41933df7baf43a1)\
**Post date:** [April 26, 2024, 4:06am UTC](https://forums.unrealengine.com/t/delegates-from-two-classes-with-the-same-parent/1821671/3 "2024-04-26T04:06:03Z")

</div>

Thanks for helping me!

I had a wrong understanding of delegates… 😭

Thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 26, 2024, 4:06am UTC](https://forums.unrealengine.com/t/delegates-from-two-classes-with-the-same-parent/1821671/4 "2024-05-26T04:06:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
