Plugin Hot Reload

Hot reload of project plugins isn’t working for us and I’m trying to figure out why.

We have our own build of the engine. I’m working on a plugin that’s in the project area. (<Project>/Plugins/<PluginName>/Source/<PluginName>)
If the engine is running, then when I build in visual studio it produces hot reload files. (<Project>/Plugins/<PluginName>/Binaries/Win64/UE4Editor-<PluginName>-1234.dll)
If the engine is not running, then when I build in visual studio it deletes the hot reload files and generates regular dlls (<Project>/Plugins/<PluginName>/Binaries/Win64/UE4Editor-<PluginName>.dll)

Even when hot reload files are generated, the editor doesn’t reload them.
When I click “Compile” in the main editor window it doesn’t seem to actually recompile the plugin or attempt to reload anything.
Under Window>Developer Tools>Modules my plugin doesn’t have Unload or Reload buttons.

The one thing that DOES work is the Recompile button in the Modules window next to my plugin. Is building from the Modules window the only supported workflow, or should it be possible to build from visual studio and/or the compile button in the main editor window? Ideally I’d prefer to compile from visual studio and then just reload the plugin in unreal.

Thanks in advance,

Oculus Story Studio

As far as I can tell this is not supposed to work. The editor seems only able to hot-reload game modules. Everything underneath “Plugins” must be compiled on the outside and, if in “Development Editor” configuration, linked without the editor running so it drops the file handle.

Would be cool though…


Yeap, plugins can’t reload like common game dlls.

Ah, okay. The distinction between plugins and game modules wasn’t clear to me. When should code go into a plugin vs game modules? Are there different features and limitations of each? (or is there a good doc somewhere that describes the differences?)

Plugins are portable modules.
If you want a set of classes, systems, to be usable across multiple projects you most likely don’t want it hardcoded to your project source.
Example, I had a FSM component in a project, but wanted to easily move it to another ones, so I made a plugin module for it and moved the system out of my main project; every time I make changes to the plugin, all game projects using it are updated with latest module revision.
If still hardcoded to the game project, a lot of copy/paste would be needed.
Plugins also makes feasible to work on two separate Uproject for the same game, one client project and the other for server project. If you code everything in project modules you cannot do that without a ton of duplicated classes and assets, for example.

Hi Erin.Tomson, as you already figured out, plugin modules is hot reloadable as long as you’re using the recompile button in modules window.

Here’s my workflow fyi:

  1. I code and code in VS
  2. Alt-tab to unreal editor to Hit the “recompile” button, then alt-tab back to VS continue coding while UBT doing the job
  3. When compile is done, I alt-tab to editor to verify if everyting working as expected, then back to step 1

My case is:
The editor always lost response when Click “Play” after I hit “recompile” button for my plugin in the Window>Developer Tools>Modules.

Hello guys, maybe it’s late, but i made a tutorial for developing plugins using the hot reload feature. I’m using a workaround for that (creating game modules first and converting them to a plugin later).

Is this possible for editor modules too? I tried it a while back but I got a lot of crashes back than.