浏览代码

Merge pull request #66289 from Rindbee/fix-scene-export

Fix sub-scene root nodes not getting the correct inheritance chain when exporting
Rémi Verschelde 3 年之前
父节点
当前提交
a5b538bdb2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/export/editor_export_platform.cpp

+ 1 - 1
editor/export/editor_export_platform.cpp

@@ -710,7 +710,7 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector
 	if (type == "PackedScene") { // Its a scene.
 		Ref<PackedScene> ps = ResourceLoader::load(p_path, "PackedScene", ResourceFormatLoader::CACHE_MODE_IGNORE);
 		ERR_FAIL_COND_V(ps.is_null(), p_path);
-		Node *node = ps->instantiate();
+		Node *node = ps->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE); // Make sure the child scene root gets the correct inheritance chain.
 		ERR_FAIL_COND_V(node == nullptr, p_path);
 		if (customize_scenes_plugins.size()) {
 			for (uint32_t i = 0; i < customize_scenes_plugins.size(); i++) {