소스 검색

Merge pull request #38677 from Calinou/tweak-post-import-script-message

Tweak the error message displayed when a post-import script fails
Rémi Verschelde 5 년 전
부모
커밋
17099ecae7
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      editor/import/resource_importer_scene.cpp

+ 3 - 1
editor/import/resource_importer_scene.cpp

@@ -1582,7 +1582,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
 		post_import_script->init(base_path, p_source_file);
 		scene = post_import_script->post_import(scene);
 		if (!scene) {
-			EditorNode::add_io_error(TTR("Error running post-import script:") + " " + post_import_script_path);
+			EditorNode::add_io_error(
+					TTR("Error running post-import script:") + " " + post_import_script_path + "\n" +
+					TTR("Did you return a Node-derived object in the `post_import()` method?"));
 			return err;
 		}
 	}