Class: HotReloader

HotReloader

new gdjs.HotReloader(runtimeGame)

Reload scripts/data of an exported game and applies the changes to the running runtime game.

Name Type Description
runtimeGame gdjs.RuntimeGame

The gdjs.RuntimeGame to be hot-reloaded.

Methods

staticgdjs.HotReloader.deepEqual(a, b)

Deep check equality between the two objects/arrays/primitives.

Inspired from https://github.com/epoberezkin/fast-deep-equal

Name Type Description
a any

The first object/array/primitive to compare

b any

The second object/array/primitive to compare

staticgdjs.HotReloader.groupByPersistentUuid(objectsWithPersistentId){Object.<string, any>}

Name Type Description
objectsWithPersistentId Array.<ObjectWithPersistentId>
Returns:
Type Description
Object.<string, any> // (returning any because https://github.com/microsoft/TypeScript/issues/26883)

reloadScriptFiles(newProjectData, oldScriptFiles, newScriptFiles, projectDataOnlyExport)

Name Type Description
newProjectData ProjectData
oldScriptFiles Array.<RuntimeGameOptionsScriptFile>
newScriptFiles Array.<RuntimeGameOptionsScriptFile>
projectDataOnlyExport boolean