Knowledge Base: How To Expose C++ function to Python and Editor Utility Widgets

Mar 9, 2021.Knowledge
Article written by Cody A.
Many useful editor functions are exposed to scripting through Editor Utility Widgets or Python, but there are still some features that aren’t covered by our existing edi…

https://dev.epicgames.com/community/learning/knowledge-base/KKjp/unreal-engine-how-to-expose-c-function-to-python-and-editor-utility-widgets

5 Likes

Hello!

That’s really useful to know, but that would be nice to add information about how to use such a function in Python afterwards, as it is not that straightforward to guess :slight_smile:

In fact the c++ blueprint library is automatically added as a module to the unreal package and the BlueprintCallable function it contains are directly accessible, so that would look like:
unreal.MyScriptingLibraryBPLibrary.MyScriptingLibrarySampleFunction(3.1415)