-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Exported Variables disappearing in editor upon launching a scene #82266
Comments
Can confirm I'm also experiencing this, 4.1.1 stable |
I noticed that when a node inherints from multiple script (one script extends another), only the variables declared in one the scripts get lost. |
This appears to only happen when |
Happened to me in 4.2.2 stable. Update Continuously wasn't enabled, enabling it didn't change anything. Reloading the project fixes it. |
Could not reproduce on master. This needs more specific steps to reproduce, otherwise it's going to be difficult to pinpoint the issue. |
Had the same problem on 4.3 stable. When the project was saved or run, the variables and their values would disappear until the script was saved. I am using VSCode as a text editor and the script was inheriting from another script that also had export variables. Restarting the project fixed everything however. |
Same exact issue here with v4.3.stable.mono.official on MacOS. As others have said, reloading fixes the problem. |
Same issue at 4.3.stable.official Win11 |
@vnen I think I finally found the root cause. In some instances, a script gets opened in Godot's script editor even though "Use External Editor" is enabled, this causes issues as Godot seems to try to update the script via the internal editor even though it should ignore that and use the code from the external editor. I noticed I had several script files open in Godot every time the issue happened. Steps to replicate the issue in Godot 4.3:
That still doesn't explain why Godot still opens script files in its internal editor sometimes in the background, but it's a start. |
Fixed by #96007 (thanks @BlackDragonBE for confirming). |
Godot version
v4.1.1.stable.official
System information
Windows 10 Pro
Issue description
When running a scene, the exported variables that have been set in the editor are "null" and causing a crash. Below is a screen shot showing the remote scene where the variables are null. This is followed by a screenshot of the local scene where we can see that the exported variables do not appear.
On both screenshots, it can be clearly seen that there are 3 exported variables in the script of the scene in question.
Upon stopping the scene and returning to the editor, the exported variables have dissapeared from the inspector panel. Reloading the scene does not make them reappear. I am obliged to restart godot then reassign the exported variables.
This does not occur at regular intervals and happens intermittently, notably when I am editing the scripts of the "exported nodes" classes.
Steps to reproduce
the error is happening when running the test_arena.tscn in entities/arena. Currently the exported variables are unassigned, so assign them (only one possible node per variable) and then run the scene.
Edit the scripts res://entities/ship/player_input_component.gd and res://entities/ship/weapon_component.gd for example then re-run the project.
As mentioned in the issue, the problem happens sporadically therefore several reruns of these steps may be required to have the game crash on a null instance.
Minimal reproduction project
godot_export_crash_issue.zip
The text was updated successfully, but these errors were encountered: