You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
Main's instance object.tscn of a variable named example is set to 30.
Here's a line from object.gd,
export var example = 42
I found that removing "export" from above line and then saving the project removes all other instantiated object.tscn's example variable.
Then by adding "export" back and then saving which reverts all other example variable back to 42 instead of 30.
This is a very serious issue for two reasons, there is no undo button and I have made levels with export variables set and I have made a mistake of removing "export" in code and then saving the project which messed up my levels.
Steps to reproduce:
Open bug_showcase.zip
Look at Node2D in Main.tscn first to see the number 30
Remove "export" from line 3 in object.gd.
Save.
Then put back "export".
Save.
You will see in the Main.tscn and by inspecting Node2D that 30 has been replaced by 42.
This does not happen if the affected scene isn't opened. What happened is likely that you saved your scene along with the script, which removed the old value. Everything should be alright until you save the scene, in which case you can revert it after a mistake.
Not sure if there's anything that can be done about this issue, just be careful with the variables I guess. We could register adding/removing an export variable as an undo action, but that sounds really unlikely.
Godot version:
Godot_v3.1-stable_win64
Issue description:
Main's instance object.tscn of a variable named example is set to 30.
Here's a line from object.gd,
export var example = 42
I found that removing "export" from above line and then saving the project removes all other instantiated object.tscn's example variable.
Then by adding "export" back and then saving which reverts all other example variable back to 42 instead of 30.
This is a very serious issue for two reasons, there is no undo button and I have made levels with export variables set and I have made a mistake of removing "export" in code and then saving the project which messed up my levels.
Steps to reproduce:
Open bug_showcase.zip
Look at Node2D in Main.tscn first to see the number 30
Remove "export" from line 3 in object.gd.
Save.
Then put back "export".
Save.
You will see in the Main.tscn and by inspecting Node2D that 30 has been replaced by 42.
Minimal reproduction project:
bug_showcase.zip
The text was updated successfully, but these errors were encountered: