summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/packed_scene.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 863f2be699..f8283bb5ca 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -509,6 +509,19 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
}
}
+ if (exists && p_node->get_script_instance()) {
+ //if this is an overriden value by another script, save it anyway
+ //as the script change will erase it
+ //https://github.com/godotengine/godot/issues/2958
+
+ bool valid=false;
+ p_node->get_script_instance()->get_property_type(name,&valid);
+ if (valid) {
+ exists=false;
+ isdefault=false;
+ }
+ }
+
if (exists && bool(Variant::evaluate(Variant::OP_EQUAL,value,original))) {
//exists and did not change