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/swap in running scene #560

Open
LukasVykuka opened this issue Dec 29, 2023 · 4 comments
Open

Hot reload/swap in running scene #560

LukasVykuka opened this issue Dec 29, 2023 · 4 comments

Comments

@LukasVykuka
Copy link
Contributor

Is it possible to make hot reload of just builded code to running scene? Or is it possible to re-launch current scene after build in IntelliJ?
This would improve workflow.

@CedNaru
Copy link
Member

CedNaru commented Dec 29, 2023

We never tried, but I think it should be possible as long as you don't make any structural changes to the code and only modify function bodies.
The process should be the same as any JVM program, you will simply need to attach your IDE to the JVM Godot is using. For that you can launch Godot with the --wait-for-debugger argument.
https://godot-kotl.in/en/stable/user-guide/advanced/commandline-args/

One issue I see is that running a scene from the editor directly won't allow that, as it's technically a separate Godot instance launched without arguments. I guess we could add some settings to allow that, but first we will have to test if hot reload works outside the editor.

@LukasVykuka
Copy link
Contributor Author

One issue I see is that running a scene from the editor directly won't allow that, as it's technically a separate Godot instance launched without arguments. I guess we could add some settings to allow that, but first we will have to test if hot reload works outside the editor.

What about another launch arguments for editor which will be passed to JVM running the scene? It can be then also used for passing debugger address and port for attaching remote debugger to scene runned from editor.

@piiertho
Copy link
Member

You mean having a duplicate of existing debug arguments but for scene we start from editor ?

@LukasVykuka
Copy link
Contributor Author

You mean having a duplicate of existing debug arguments but for scene we start from editor ?

Yes, exactly.

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

No branches or pull requests

3 participants