godot-kotlin-jvm
godot-kotlin-jvm copied to clipboard
Hot reload/swap in running scene
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.
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.
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.
You mean having a duplicate of existing debug arguments but for scene we start from editor ?
You mean having a duplicate of existing debug arguments but for scene we start from editor ?
Yes, exactly.