diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-29 12:45:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 12:45:43 +0200 |
commit | 653f544ca397e482c8b2938aa83c9b6673745fd3 (patch) | |
tree | 7e21cc595b611d23c29a010f18e63ed4867c3c1f /scene/resources | |
parent | 05336adb86574608b5ab922d20a06428331287cc (diff) | |
parent | f1587c8a7dcb6e28ee6659b83b02a4c6d3bd4073 (diff) |
Merge pull request #49713 from nekomatata/fix-export-var-override-runtime
Fix export var override in PackedScene at runtime
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/packed_scene.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 913f1ca376..9bb2a4ddb8 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -471,7 +471,9 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map StringName type = p_node->get_class(); Ref<Script> script = p_node->get_script(); - if (script.is_valid()) { + if (Engine::get_singleton()->is_editor_hint() && script.is_valid()) { + // Should be called in the editor only and not at runtime, + // otherwise it can cause problems because of missing instance state support. script->update_exports(); } |