Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.


Product Version: UE 4.10
more ▼

asked Mar 09 '16 at 10:21 PM in C++ Programming

avatar image

11 1 2 4

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

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!

more ▼

answered Jun 12 '17 at 12:25 AM

avatar image


(comments are locked)
10|2000 characters needed characters left

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.

 else if ( ColumnName == "ModuleActions" )
                 // Reload button
                 + SHorizontalBox::Slot()
                     .Padding( 2.0f, 0.0f )
                         SNew( SButton )
                         .Visibility( Item.ToSharedRef(), &FModuleListItem::GetVisibilityBasedOnReloadableState )
                         .Text( LOCTEXT("Reload", "Reload") )
                         .OnClicked( Item.ToSharedRef(), &FModuleListItem::OnReloadClicked )

And If follow the code in the same file, finally I can meet the function GetVisibilityBasedOnLoadedAndShutdownableState() through GetVisibilityBasedOnReloadableState()

 EVisibility SModuleUI::FModuleListItem::GetVisibilityBasedOnLoadedAndShutdownableState() const
     if ( GIsSavingPackage || IsGarbageCollecting() )
         return EVisibility::Hidden;
     const bool bIsHotReloadable = FModuleManager::Get().DoesLoadedModuleHaveUObjects(ModuleName);
     const bool bCanShutDown = ( FModuleManager::Get().IsModuleLoaded(ModuleName)
                                 && !bIsHotReloadable 
                                 && FModuleManager::Get().GetModule(ModuleName)->SupportsDynamicReloading() );
     return bCanShutDown ? EVisibility::Visible : EVisibility::Hidden;
 EVisibility SModuleUI::FModuleListItem::GetVisibilityBasedOnReloadableState() const
     return GetVisibilityBasedOnLoadedAndShutdownableState();

This function checks DoesLoadedModuleHaveUObjects() . I think that Having UObject or Not can affect the visibility of reload button.

more ▼

answered Sep 01 '17 at 02:41 AM

avatar image

6 1

(comments are locked)
10|2000 characters needed characters left

Unload / Reload buttons will disappear for example if you use UPROPERTY, UENUM, and other things associated with the garbage collector

more ▼

answered Jan 19 '19 at 03:57 PM

avatar image

Evgeniy Babush
1 3 2

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question