-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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 array gets emptied when saving scene script #78208
Comments
I did a test with v4.1.beta.custom_build [30d247257] from the given pull request, and it still persists. The only change I did on my script was adding a blank space, and it caused the scene to be saved removing the array members. $ git diff
diff --git a/scenes/dungeon/dungeon.gd b/scenes/dungeon/dungeon.gd
index ead4590..3a171aa 100644
--- a/scenes/dungeon/dungeon.gd
+++ b/scenes/dungeon/dungeon.gd
@@ -71,7 +71,7 @@ func _roll_hazards():
for enemy in rolled:
var count = rolled.count(enemy)
if count > 0:
- rolled_group[enemy] = count
+ rolled_group[enemy] = count
get_tree().call_group("enemies_group", "define_health", rolled_group)
diff --git a/scenes/dungeon/dungeon.tscn b/scenes/dungeon/dungeon.tscn
index 9d06160..19bb1af 100644
--- a/scenes/dungeon/dungeon.tscn
+++ b/scenes/dungeon/dungeon.tscn
@@ -19,9 +19,8 @@ size = Vector3(5, 0.2, 5)
[sub_resource type="BoxMesh" id="BoxMesh_4whfm"]
size = Vector3(5, 0.2, 5)
-[node name="Dungeon" type="Node3D" node_paths=PackedStringArray("rollable_hazards")]
+[node name="Dungeon" type="Node3D"]
script = ExtResource("1_djhe0")
-rollable_hazards = [NodePath("Dragon"), NodePath("Enemies/Slime"), NodePath("Enemies/Goblin"), NodePath("Enemies/Skeleton")]
[node name="Scenario" type="Node" parent="."]
Not sure if it would make a difference or not, but before testing it I also cleaned the .godot directory to have it clean from anything |
Then this is a separate issue, thank you for testing! |
No problem, please let me know if I can give any additional information |
Will try and dig into it when I have time/energy, as I've already dug around in related things, will see if I can find anything |
It appears now that my PR when updated further fixes this, can you confirm? |
Sure, I'll git it a try later today :) |
Hello again! I did a quick test with the same steps into the initial post and it looks it's fixed with v4.1.beta.custom_build [29903df9a] Here's a quick video: Recording.2023-06-19.174154.mp4Thank you!! Not sure about your workflow, so I'll leave it open for now. |
It'll be closed automatically when the PR is closed so keep it open, thank you for confirming |
Godot version
v4.1.beta1.official [828ec2c]
System information
Godot v4.1.beta1 - Windows 10.0.23475 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3550) - AMD Ryzen 5 5500 (12 Threads)
Issue description
I have an exported array for a given type I created with class_name
It is exported as follow
I populate it using the editor and it works fine, but sometimes it gets emptied after saving the exporting scene. Not sure if it relates with #62916 and/or #77735.
Here's a screen recording I did showing the issue
Recording.2023-06-13.222554.mp4
Please let me know if you need any additional information.
Steps to reproduce
Minimal reproduction project
If you check this branch out, commit 327d03d was the base for the changes I had into the screen recording.
The text was updated successfully, but these errors were encountered: