Reloading Python module results in UMG `on_pressed` button callbacks to no longer work - even if I reregister

Hi, I’ve been playing around a bit with creating EditorUtilityWidgets using Python.

Wanted to try and implement hot reloading, but after running importlib.reload(sys.modules[__name__]) all my UI widgets no longer responds to button presses: the functions registered via unreal.EditorUtilityButton().on_pressed.add_callback(...) no longer gets executed, even though I’m reinstanciating the buttons and rebdinding the callbacks after reloading the module.

Could this some kind of bug or am I attempting to reload in the wrong way?

This is what it looks like:

If anyone wants to take a look, heres the python code along with a EditorUtilityWidget created in UE5.4.3
Python.zip (1.2 MB)

@Jamie_Dale Sorry about the coldping, but I saw you post on a similar thread from a couple of years back, figured you might be able to shed some light on this :slight_smile: