Current hot-reload really annoying, can you pls improve it?

What we have now?
If we compile game project, while editor is opened, then we will get Game-XXXX.dll, editor will close and delete Game.dll, and load Game-XXXX.dll. And then, if we close editor and open again, then it will ask us Game.dll, which we dont have. Recompile, recompile, recompile…

What if, just what if?

  1. Compiler create Game-XXXX.dll, copy it to game project output, near to Game.dll, like it does now.

  2. Editor detect Game-XXXX.dll.

  3. Editor close and delete current Game.dll.

new step 4) Editor rename Game-XXXX.dll to Game.dll. Understand? we dont load Game-XXXX.dll, we just use it as transition step.

  1. Editor load Game.dll

Is it possible or not?

HotReload swaps out to differnet dll’s / pdb’s at runtime - and it’s probably not a good idea to overwrite a ‘good’ .dll with a hot reloaded one which may not have compiled properly, especially if you’re checking binaries into source control.

If Game -XXXX.dll compiled then it already properly compiled otherwise it wont be created. There is no extra backup even now. Compiler just clean previous dlls and creates new.

Yes, Hot reloading should be reworked. Because now it is really annoying, editor even crash if you open once hot reloaded project.
But the steps you wrote would not work, Editor will not be able to swap loaded dll’s it should simply load hot reloaded dlls, and if successful, overwrite original dlls with loaded one.

If hot reloading worked - the dll’s will be ok.

If your Hot Reload crashes the engine, then rebuilding new binaries will just do the same thing? It just means you’ve done something wrong… either that or you’re having a really different HR experience to me.

You shouldn’t use Hot Reload for Header changes anyway, it’s faster to quit and relaunch in my experience. It’s meant for quick CPP changes, not development / major iteration.

The editor crashes after restarting - it tries to load some hotreloaded dlls, or not hotreloaded… i don’t know the details… looks like Engine itself does not know which dll’s he should load, so he crashes, until I rebuild project and it removes all Game-****.dll’s.
That is complete mess.

> quit and relaunch
that what I usually do now.

Oh, it shouldn’t do. That is wierd. If I try to launch while i have hot reloaded .dll’s it tells me it needs rebuilding (though I rarely have them cus I often restart).

Just… avoid it.
If you really really want script iteration while editor is open consider using a scripting language instead.
Most of the time I don’t even use the editor, stay all day staring at Visual Studio so I just keep editor closed.