Getting hot-reload to work with multiple modules


i’m working on a fresh C++ project which should have some logic separated in a different module (not a plugin).

The basic part works: I can create a separate module right next to the game module which can be compiled and loaded into the UE4Editor on startup.
However, when i change something in the module with Visual Studio, it will not get picked up by hot-reload.
Changing something in the primary game module does initiate hot-reload, so it works in general.

I have a minimal example set up here to demonstrate my approach:

Is there something i need to declare on a module in order to get it flying with hot reload?

Another interesting thing: When i change something in the separate module and press the Compile Button in UE4Editor, the changes are not seen at all. The log just says that everything is up to date.

I’m using 4.19.1.

I just ran into this too =)))

In UE editor, go Window>Developer Tools>Modules, and reload your module from that menu.

That’s a good hint. However, i got problems from time to time with it. Sometimes only old module versions got loaded + it’s not that convenient to use that module instead of just hitting compile :slight_smile:
Most of my (bad) experience is from using UE4 on Linux. On Windows everything behaves better.

The Modules options is really inconvenient. Furthermore, suppose you’ve recompiled one module and other modules depend on it then, the modules will hold out of date dependences once you’ve compiled the module depended upon.

Overall very mess