The invention relates to a C + +
game engine real-time hot reloading and editing environment integration method and
system. The method comprises the steps that all current key runtime data are serialized into data blocks in a memory in an
XML format; creating a brand new playing scene; accessing the
XML serialized data block in the memory by the engine, executing a deserialization operation, and restoring to a pre-play editor scene state; a developer modifies a C + + script
source code and compiles a script, after compiling succeeds, a dynamic link
library file HotReload.dll containing new code logic is generated, an engine is switched to a ReloadingScriptsState reloading script state, the engine serializes a current editor scene state into a memory by using an
XML format, an old editor scene is deleted, a dynamic link
library HotReload.dll of old code logic is unloaded, and the dynamic link
library HotReload.dll is reloaded. And loading a newly compiled dynamic link library HotReload.dll, and executing a deserialization operation on a newly loaded scene by using the
XML data block stored in the memory. According to the method, the iteration efficiency of development and debugging can be remarkably improved on the premise of ensuring the operation stability.