How do you load an Editor Utility Widget with Python

Hello Everyone,

I have a editor utility widget blueprint that I need to open via python. I have managed to get the blueprint generated class of the widget and then the class default object from that, but when I use the command nothing happens.

widget_generated_class = unreal.load_object(None, ‘Path/Utility_Widget.Utility_Widget_C’)
class_default_object = unreal.get_default_object(widget_generated_class)

According to the docs I’m feeding it the correct object.

I just want to get the window for the editor utility to open, the same as if you right clicked on the blueprint “Run Editor Utility Widget”.

Thanks in advance!


I used this to execute widget from a python menu:


1 Like

@Il_Berna That worked, thank you so much!

I knew I was loading the asset but not spawning it! That is the perfect solution, it seems to handle multiple instances of a window correctly as well, by only making one current instance.

For anyone interest you need to pass the path of the Blueprint widget but you need to append .nameOfWidget_C at the end as it wants the class object not the asset object.



Amazing stuff :slight_smile:

Thank you.

1 Like