Compiling code live to the engine

Hi, i’m just wondering.
is there a way to compile code live to the engine, if you dont know what i’m talking about lets say this.
i have two screens, one where i can see the engine and an other where i can see the code, is there a way that i can test play a game at the same time changing the code and auto compile it while the game is still active?

No. Your code is located in a DLL which the engine must load in order to execute and it must stop in order to reload that DLL. Hot reload is the best you will get.

sorry, can you explain what DLL is?

It’s basically a loadable piece of compiled code. All platforms support the concept of a static library (linked-in at build time) and dynamic/shared library (linked-in at runtime). A DLL is Windows version of a shared library.

Using a DLL means a company (Epic in this case) can provide a generic executable (EXE file) and allow people (you and me in this case) to provide additional functionality (a game in this case) loaded at runtime.

Microsoft probably explain it better than me, however.

That’s not completely true. As long as you don’t change any headers it can reload the dll while your game runs just fine.

All you have to do is click build in VS.

That wasn’t what was asked, or at least as I understood it. The OP wanted to know if it was possible to change code within a gameplay session. Hot reloading requires the gameplay session to stop.

I just tried it again, changed some code and compiled the changes - the editor picked up the new dll and updated while in-game.

I’ve no idea how it did that!