# Exposing non dynamic delegates to Blueprints?

**URL:** <https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [June 5, 2021, 12:02pm UTC](https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609 "2021-06-05T12:02:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![STRiFE.x](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strife.x/32/969826_2.png) [@STRiFE.x](https://forums.unrealengine.com/u/STRiFE.x)\
**Post date:** [June 5, 2021, 12:02pm UTC](https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609/1 "2021-06-05T12:02:19Z")

</div>

Hey, does anyone know a clean solution to exposing non dynamic delegates to blueprints? By exposing, I mean that binding a blueprint function to it somehow.

```auto
// These are non dynamic delegates, meaning they can't be exposed to BP.
// Sure I could just turn them into dynamic delegates, but this whole class is native and
// I want to handle Blueprints as a separate "layer".
_
DECLARE_EVENT(USteamMatchmakingPolicy, FOnStartSteamMatchmakingComplete);
FOnStartSteamMatchmakingComplete StartSteamMatchmakingComplete;
_
DECLARE_EVENT_TwoParams(USteamMatchmakingPolicy, FOnSteamMatchmakingComplete, const FName / **SessionName */, const ESteamMatchmakingCompleteResult /** Result */);
FOnSteamMatchmakingComplete SteamMatchmakingComplete;
_
DECLARE_EVENT(USteamMatchmakingPolicy, FOnCancelSteamMatchmakingComplete);
FOnCancelSteamMatchmakingComplete CancelSteamMatchmakingComplete;
_
DECLARE_EVENT_TwoParams(USteamMatchmakingPolicy, FOnSteamMatchmakingStateChanged, const ESteamMatchmakingState / **OldState */, const ESteamMatchmakingState /** NewState */);
FOnSteamMatchmakingStateChanged SteamMatchmakingStateChanged;

```

Right now, I have dynamic variants of these delegates in a different source file and I’m calling them when the native delegates are fired. That works as well, I’m just looking for a better solution.

---

<div class="post-metadata">

**Author:** ![BrUnO\_XaVIeR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno_xavier/32/1110230_2.png) [@BrUnO\_XaVIeR](https://forums.unrealengine.com/u/BrUnO_XaVIeR)\
**Post date:** [June 5, 2021, 1:05pm UTC](https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609/2 "2021-06-05T13:05:11Z")

</div>

If you use them as UFunction param, they will be displayed as callback pins on nodes.  
(red square input pin)

That’s the only use I ever found for them.

---

<div class="post-metadata">

**Author:** ![MagForceSeven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magforceseven/32/906563_2.png) [@MagForceSeven](https://forums.unrealengine.com/u/MagForceSeven)\
**Post date:** [June 5, 2021, 1:34pm UTC](https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609/3 "2021-06-05T13:34:27Z")

</div>

I’m _pretty_ sure that’s not possible. If you want a delegate that is exposed to blueprint, it has to be dynamic.

The non-dynamic delegates work through either template trickery or function pointers. A blueprint has the ability to bind to functions that can’t be compatible be with either. Any purely blueprint function doesn’t really have a unique C++ entry point. It’s really just a name and some sort of lookup used by the Blueprint VM.

Of course, I could be wrong. But I’m not really sure how it _could_ work.

---

<div class="post-metadata">

**Author:** ![UnrealEverything](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealEverything](https://forums.unrealengine.com/u/UnrealEverything)\
**Post date:** [June 5, 2021, 5:54pm UTC](https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609/4 "2021-06-05T17:54:04Z")

</div>

Very interesting question. Some time last year I would have liked to do this as well. Unfortunately came to the same conclusion as @MagForceSeven. My experiements either failed during serialization (not really resonable to serialize a delegate created with `FOnSteamMatchmakingStateChanged::CreateLambda` for example), creating/editing the binding in the property editor or the instancing for delegates bound in the C++ constructor.

---

<div class="post-metadata">

**Author:** ![STRiFE.x](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strife.x/32/969826_2.png) [@STRiFE.x](https://forums.unrealengine.com/u/STRiFE.x)\
**Post date:** [June 5, 2021, 8:55pm UTC](https://forums.unrealengine.com/t/exposing-non-dynamic-delegates-to-blueprints/233609/5 "2021-06-05T20:55:25Z")

</div>

> [@BrUnO\_XaVIeR](#):
>
> If you use them as UFunction param

The UFUNCTION macro or the UFunction type? Can you give a quick example because I’m not really sure what you mean.
