If I want to run an uninstaller when my plugin shuts down / unloads, which happens to access engine classes such as UUMGEditorProjectSettings, then where can I do this safely? Is there a check to see if the engine itself is already shutting down?
Optimally the module itself manages its own cleanup, is there any reliable point in shutdown procedure it can initiate an “uninstall” option, to for example clean up the project settings? When I access the project settings during module shutdown it will crash on GetMutableDefault.
If you need an example why, take a look at the Enhanced Input plugin. when you disable that plugin it doesn’t clean up, leaving the “player input” and “input component” property in the project settings on the enhanced input value. It could have, if they wrote an uninstaller, reverted back to the engine’s default. Not so nice. So is it possible to write such module uninstaller and inject it at a point it can still safely access modules it depends on to clean up there?