Create a menu item or button to call python script

Hi all,

New to Unreal, so apologies in advance if this is a stupid question. I wanted to bind my python script to either a menu item or button in the Editor. Any info to achieve this would be highly appreciated.

Thanks

Created a plugin which extends the menus where we wanted to add the python scripts following C++ Extending the Editor | Live Training | Unreal Engine - YouTube

If you create an EditorUtilityWidget, it can call python byformatting a string beginning with “py” and issuing it as a console command.

Unfortunately in the current state of UE Python it’s not possible for a python script to actually “talk back” to the widget – but if all you want to do is to create UI to initiate a python script, the EditorUtilityWidget will let you do that.

Thanks Andres, looks impressive.

Thank you; what I was looking for

Can we get an updated tutorial on this? The linked video is almost 5 years old now. From what I have dug up online various things in it are sorely outdated. I even tried just copying the git sample from it (which was quite difficult to hunt down). I have been trying to cobble something together for days now but have yet to find a complete working sample even.