Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reload support #286

Open
lublak opened this issue Apr 23, 2024 · 4 comments
Open

Hot reload support #286

lublak opened this issue Apr 23, 2024 · 4 comments

Comments

@lublak
Copy link

lublak commented Apr 23, 2024

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

@Naros
Copy link
Member

Naros commented Apr 23, 2024

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

@lublak
Copy link
Author

lublak commented Apr 23, 2024

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

@Naros Naros added this to the 2.1 milestone Apr 23, 2024
@Naros
Copy link
Member

Naros commented Apr 24, 2024

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 Improve GDExtension Tools Integration with Editor Debug Tooling 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.

@lublak
Copy link
Author

lublak commented Apr 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants