What determines the availability of unload / reload buttons for editor modules?
I have been working on an editor module for a while now. I made some large changes to how the EditorMode and Toolkit sets up the UI Commands and the Slate UI today. At some point the Unload / Reload buttons disappeared from the Module window in the editor. I have noticed that additionally when I press Recompile it no longer disables the additional Mode tab as it used to do.
Is there a specific reason for this? Did something that I changed influece the type of module that I have? I have an additional module that only contains runtime classes. This has never had those buttons, but I can understand why.
asked Mar 09 '16 at 10:21 PM in C++ Programming
I ran into this in UE 4.15 too. Turns out having a class that inherits from UFactory in your module/plugin will remove the option to reload that plugin via the module window.
I was able to work around this by creating a separate module (ie, MyGameFactories) and putting my UFactory classes there. You still can't reload the factory plugin, but your editor module will regain the ability to reload.
Hope that helps!
answered Jun 12 '17 at 12:25 AM
I'm analyzing the same issue.
In UnrealEngine\Engine\Source\Developer\ModuleUI\Private\SModuleUI.cpp I found the code below. This code is for the module window.
And If follow the code in the same file, finally I can meet the function GetVisibilityBasedOnLoadedAndShutdownableState() through GetVisibilityBasedOnReloadableState()
This function checks DoesLoadedModuleHaveUObjects() . I think that Having UObject or Not can affect the visibility of reload button.
Unload / Reload buttons will disappear for example if you use UPROPERTY, UENUM, and other things associated with the garbage collector
answered Jan 19 '19 at 03:57 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here