godot-orchestrator icon indicating copy to clipboard operation
godot-orchestrator copied to clipboard

Hot reload support

Open lublak opened this issue 1 year ago • 5 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

lublak avatar Apr 23 '24 09:04 lublak

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

Naros avatar Apr 23 '24 18:04 Naros

@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.

lublak avatar Apr 23 '24 19:04 lublak

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 https://github.com/godotengine/godot/pull/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 avatar Apr 24 '24 23:04 Naros

@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.

lublak avatar Apr 25 '24 07:04 lublak

We now seem to be blocked by https://github.com/godotengine/godot/pull/95771, as this prevents hot-reloading of scripts.

Naros avatar Aug 18 '24 21:08 Naros