Merge pull request #75429 from MewPurPur/Literally-cant-have-a-functioning-level-editor-because-of-this-please-helppp

Fix PackedScenes created with PackedScene.pack() have their exported nodes become null
This commit is contained in:
Rémi Verschelde 2023-04-25 09:58:41 +02:00
commit ed62d965eb
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 9 additions and 10 deletions

View File

@ -263,18 +263,17 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
}
} else {
if (Engine::get_singleton()->is_editor_hint()) {
// If editor, just set the metadata and be it.
node->set(PackedScene::META_POINTER_PROPERTY_BASE + String(prop_name), prop_variant);
continue;
}
// Do an actual deferred sed of the property path.
if (!Engine::get_singleton()->is_editor_hint()) {
// If not editor, do an actual deferred sed of the property path.
DeferredNodePathProperties dnp;
dnp.path = prop_variant;
dnp.base = node;
dnp.property = prop_name;
deferred_node_paths.push_back(dnp);
}
}
continue;
}