summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-11 22:19:02 +0100
committerGitHub <noreply@github.com>2018-01-11 22:19:02 +0100
commite6edbc76991992ef9539cc7a88604e783f4d0244 (patch)
tree55cb92ca54ba5788c397437466239cffaa852522 /scene
parent9a6282975938106d17ccd49ef1b8c7fc4b11b3d2 (diff)
parentb77968dea3b05e75fe2ad74f243bce9051a9968e (diff)
Merge pull request #15528 from AndreaCatania/p1
Fixed viewport node error on editor
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/packed_scene.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index c13a72698b..dd8d0e2141 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -235,6 +235,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
if (p_edit_state == GEN_EDIT_STATE_MAIN) {
//for the main scene, use the resource as is
res->configure_for_local_scene(base, resources_local_to_scene);
+ resources_local_to_scene[res] = res;
} else {
//for instances, a copy must be made
@@ -244,9 +245,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
res = local_dupe;
value = local_dupe;
}
-
- //this here may reference nodes not iniialized so this line is commented and used after loading all nodes
- //res->setup_local_to_scene();
}
//must make a copy, because this res is local to scene
}