-
-
Notifications
You must be signed in to change notification settings - Fork 40
feat: Implement reload scripts in GodotJSScriptLanguage. #174
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
base: main
Are you sure you want to change the base?
feat: Implement reload scripts in GodotJSScriptLanguage. #174
Conversation
f784cde to
499c610
Compare
45d8e74 to
1d860c3
Compare
|
@Daylily-Zeleen I tried to test the branch, how to trigger the hot-loading? With |
Edit: modify TypeScript and save it in godot ediot can not test this pr,because reloading is triggered before compiling. Please use external text editor for test. |
Bildschirmaufnahme.2025-12-29.000654.mp4Somehow it's not working. I used your branch, and followed your steps |
The output is too frequent and hard to check change. Please test again by my test project. |
|
What happens when JS references are held to these script objects that have been reloaded? Won't the prototypes be stale and not match the implementations anymore? Maybe I'm just misunderstanding what you're doing here. |
|
I'm not sure, this main purpose of this pr is receiving debugger message from editor to reloading changed scripts, then restore instances state. |
|
Ah right, yeah, I suspect it's pretty broken at the moment. I'm planning on doing some work in this area in the coming weeks. I'm not sure it'll currently behave as users expect if we merge this right now, but it does look like a decent starting point. Thanks for sharing your work on this. |
You project works as exprected. I tested it with this file and modified it with Maybe the problem is the autoload script? That's the only thing about the projects which might differ |
Now we can modify, compile and focus in godot editor to trigger hot-reloading in debug process like GDScript.
NOTE: Callable that created by
Callable.create()can't be reloaded.Edit:
1766997122578.mp4
Test project:
ts-reload-test.zip