Skip to content
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

Saving branch as scene loses script variable data and some built in overrides such as layer masks #44526

Open
chucklepie opened this issue Dec 19, 2020 · 1 comment

Comments

@chucklepie
Copy link

chucklepie commented Dec 19, 2020

Godot version:
3.2.3

OS/device including version:
Linux

Issue description:
On saving a node branch as a scene file, it has lost script variable overrides for some of my nodes, breaking the configuration in my game, and also removed some layer mask information. Hopefully these steps will let you know whether it's a known fault or not?

  1. I have the following structure and have selected to save 'Map_Container_Disableable' node. If you observe I have child node Missile_Launcher3 selected and is as follows. Please observe 'Facing', which is -1 from the default.

image

The data for this selected child node looks like this:
[node name="Missile_Launcher3" parent="Map_Containers_Disableable/Container_Missile_Launcher" instance=ExtResource( 4 )]
position = Vector2( 343, 3074 )
z_index = -1
facing = 1

  1. I then save 'Map_Container_Disableable' as a scene branch file and the data is now as follows. As you can see 'facing' has gone and when I look at this branch in Godot it has reverted to the default of 1 for evert item, wiping ever -1.

[node name="Missile_Launcher3" type="KinematicBody2D" parent="." instance=ExtResource( 2 )]
position = Vector2( 343, 3074 )
z_index = -1
collision_layer = 8
collision_mask = 0
script = ExtResource( 1 )
firing = 0.25

facing has disappeared and on loading the new scene, it is the default of 1.

As you can see, facing has been put in, but it's the default of -1, when the original was overrriden with 1

It is also doing it with built in data such as collision layer masks too.

For example,
image

The Collision Mask which is shown as overridden completely disappears on saving as a branch, i.e. the mask is 0.

It seems as if the bug is related to overridden values on inherited scenes.

Please let me know if this is a known fault or whether you would like a sample, but I you may need to download the whole project from git, however the fault is simply limited to the activity above so knowledge of the project is irrelevant.

This is not good when you cannot rely on Godot to keep integrity of your data :(

@chucklepie chucklepie changed the title Saving branch as scene loses script variable data Saving branch as scene loses script variable data and some built in overrides such as layer masks Dec 19, 2020
@chucklepie
Copy link
Author

chucklepie commented Dec 19, 2020

btw, another bug I've noticed (unless it just happened to be like this before the branch save). When I open my scenes it auto-expands the Inspector showing every section that has an override. In the 'save as branch' all of this has gone and nothing is expanded. This makes it even worse trying to find all the failed entries that are lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants