# Python: How to call a blueprint function

**URL:** <https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, function, Blueprint, question\
**Created:** [August 28, 2019, 8:18am UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513 "2019-08-28T08:18:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0846af92](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0846af92](https://forums.unrealengine.com/u/anonymous_user_0846af92)\
**Post date:** [August 28, 2019, 8:18am UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/1 "2019-08-28T08:18:50Z")

</div>

Hi all,  
Is there a way that I can call a function implemented in blueprints (e.g on an actor) from the python API?

Something tells me you may not be able to call functions from the editor (outside of runtime), but that’s something I need in order to build the functionality I’m looking for.

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![ingleshveribet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ingleshveribet](https://forums.unrealengine.com/u/ingleshveribet)\
**Post date:** [August 29, 2019, 10:44am UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/2 "2019-08-29T10:44:47Z")

</div>

No way. you can use python to interact with the Unreal Editor, the Assets in your Project, and the content in your Levels. Only while editing, not in runtime

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0846af92](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0846af92](https://forums.unrealengine.com/u/anonymous_user_0846af92)\
**Post date:** [August 29, 2019, 2:35pm UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/3 "2019-08-29T14:35:47Z")

</div>

I’m working on a temporary solution; Using a `BlueprintImplementableEvent` in C++ as an sort of intermediary.  
I’m having some issues though, see [this post](https://answers.unrealengine.com/questions/919159/python-blueprintimplementableevent-call-fails.html).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0846af92](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0846af92](https://forums.unrealengine.com/u/anonymous_user_0846af92)\
**Post date:** [August 29, 2019, 2:35pm UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/4 "2019-08-29T14:35:55Z")

</div>

Solved. See my answer [here](https://answers.unrealengine.com/answers/919198/view.html).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0846af92](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0846af92](https://forums.unrealengine.com/u/anonymous_user_0846af92)\
**Post date:** [August 29, 2019, 2:35pm UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/5 "2019-08-29T14:35:58Z")

</div>

That’s exactly what I’m trying to do.  
The post has yet to be let through by mods, but I have now solved this issue. Solution will be posted [here](https://answers.unrealengine.com/answers/919198/view.html).

---

<div class="post-metadata">

**Author:** ![Vega.Bai.M](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vega.Bai.M](https://forums.unrealengine.com/u/Vega.Bai.M)\
**Post date:** [April 8, 2022, 12:40am UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/6 "2022-04-08T00:40:12Z")

</div>

The link shows a 404 to me O.O can you post it here please? Thanks!!!

---

<div class="post-metadata">

**Author:** ![DW\_MaxR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DW\_MaxR](https://forums.unrealengine.com/u/DW_MaxR)\
**Post date:** [August 31, 2023, 7:52am UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/7 "2023-08-31T07:52:19Z")

</div>

Hello !

Here is a snippet demonstrating a really simple way to do this, without any C++.  
[Call functions or modify properties of a Blueprint from Python | Epic Developer Community (epicgames.com)](https://dev.epicgames.com/community/snippets/aAlM/unreal-engine-call-functions-or-modify-properties-of-a-blueprint-from-python)

---

<div class="post-metadata">

**Author:** ![Mifthbeat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mifthbeat/32/919874_2.png) [@Mifthbeat](https://forums.unrealengine.com/u/Mifthbeat)\
**Post date:** [September 3, 2023, 11:14pm UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/8 "2023-09-03T23:14:32Z")

</div>

You need to do this:

- Wrap a function in another function
- Expose inputs in args/kwargs.

In my example I wrapped AddMeshSections function in AddMeshSectionsPy function.  
After that I called this function from Python:

```auto
my_actor.call_method("AddMeshSectionsPy", args=(my_array, ))

```

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/3/9c384edad720e43443f6d59c24a85d784a45d355.png)

---

<div class="post-metadata">

**Author:** ![Xudojnikk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xudojnikk](https://forums.unrealengine.com/u/Xudojnikk)\
**Post date:** [April 22, 2024, 2:58pm UTC](https://forums.unrealengine.com/t/python-how-to-call-a-blueprint-function/454513/9 "2024-04-22T14:58:23Z")

</div>

Thanks! “call\_method” works!
