Vahera/godot-orchestrator

Hot reload support

Opened this issue ยท 4 comments

Description

Currently, you have to restart the project every time you make a change.
It would be very helpful and useful to have a hot reload functionality. Especially with gdscript this is possible and very convenient. Just change a variable / a calculation: No problem with hot reload.

Implementation ideas

No response

Hi @lublak , this shouldn't require an editor reload. Can you give a set of steps that force you to reload the editor?

@Naros hi! :)
Not a editor reload, a restart of the project/debug process/rerun. (the F5/F6 key).

Just a simple example, i have current node setup:
grafik

now i want to change the speed. I can simple adjust the multiply node and save.
Now if i look in my current running game/application the rotation speed not changes. Only if a repress F5/F6.
In gdscript i can simple hit save and godot hot reloads the script and i can directly see the speed change.

So I took some time to look into this today, and is most definitely doable; however, there are a few requirements:

  • To support the ability to break due to a parse failure requires access to the EngineDebugger, which isn't fully exposed to GDE. I've got an active PR godotengine/godot#86721, which once merged, will expose all the bits needed for this to work.
  • We may need to decouple resource loading from construction. In GDScript, there is a separation between the loader and the parser/analyzer, and compiler bits, and we may need to have a slight separation here to be able to reuse logic at the right stages for some of these lifecycles. I'm not 100% sold its needed for this in particular yet, but we'll definitely need this soon anyway.

@Naros Thanks for the information :)
Thank you also for your effort in presenting it to me here.

  • Let's hope that the pull request goes through. And also thanks for the effort. :)
  • I am currently still quite new to Godot/GDScript. Nevertheless, it makes sense for my understanding here.