Skip to content

Commit 433bb0d

Browse files
committed
Merge pull request godotengine#106403 from Raftatul/import_script
Check if import script is subtype of EditorScenePostImport
2 parents 902d2b4 + 9511e11 commit 433bb0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

editor/import/3d/resource_importer_scene.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3205,6 +3205,8 @@ Error ResourceImporterScene::import(ResourceUID::ID p_source_id, const String &p
32053205
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
32063206
if (scr.is_null()) {
32073207
EditorNode::add_io_error(TTR("Couldn't load post-import script:") + " " + post_import_script_path);
3208+
} else if (scr->get_instance_base_type() != "EditorScenePostImport") {
3209+
EditorNode::add_io_error(TTR("Script is not a subtype of EditorScenePostImport:") + " " + post_import_script_path);
32083210
} else {
32093211
post_import_script.instantiate();
32103212
post_import_script->set_script(scr);

0 commit comments

Comments
 (0)