diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/packed_scene.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 169c956546..4dfc23fa67 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -242,7 +242,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const { value = local_dupe; } - res->setup_local_to_scene(); + //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 } @@ -293,6 +294,11 @@ Node *SceneState::instance(GenEditState p_edit_state) const { } } + for (Map<Ref<Resource>, Ref<Resource> >::Element *E = resources_local_to_scene.front(); E; E = E->next()) { + + E->get()->setup_local_to_scene(); + } + //do connections int cc = connections.size(); |