# Execute UFunction programmatically

**URL:** <https://forums.unrealengine.com/t/execute-ufunction-programmatically/464574>\
**Category:** Blueprint\
**Tags:** compiling, ufunction, unreal-engine, Blueprint, question\
**Created:** [May 2, 2020, 6:42pm UTC](https://forums.unrealengine.com/t/execute-ufunction-programmatically/464574 "2020-05-02T18:42:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crispy\_Penguin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crispy\_Penguin](https://forums.unrealengine.com/u/Crispy_Penguin)\
**Post date:** [May 2, 2020, 6:42pm UTC](https://forums.unrealengine.com/t/execute-ufunction-programmatically/464574/1 "2020-05-02T18:42:55Z")

</div>

Is there a way to execute UFunction by having a pointer to it or its name?

While compiling the blueprint, I have created a number of functions (bool MyFunc1(), bool MyFunc2()… bool MyFuncN()…).

From compile process I can get pointers to those functions and their names, but I am not aware of any way to execute them during runtime.

---

<div class="post-metadata">

**Author:** ![Bino](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bino](https://forums.unrealengine.com/u/Bino)\
**Post date:** [May 2, 2020, 7:16pm UTC](https://forums.unrealengine.com/t/execute-ufunction-programmatically/464574/2 "2020-05-02T19:16:26Z")

</div>

I think delegates is what you’re after.

> **[Delegates](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/)**
>
> Data types that reference and execute member functions on C++ Objects

---

<div class="post-metadata">

**Author:** ![Crispy\_Penguin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crispy\_Penguin](https://forums.unrealengine.com/u/Crispy_Penguin)\
**Post date:** [May 6, 2020, 6:30pm UTC](https://forums.unrealengine.com/t/execute-ufunction-programmatically/464574/3 "2020-05-06T18:30:18Z")

</div>

Creating delegates on compile time was a bit too complicated.

Simple alternative is to use void UObject::ProcessEvent( UFunction\* Function, void\* Parms )
