瀏覽代碼

Fix extending scripts by path

kobewi 3 年之前
父節點
當前提交
6f80ffeddd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/script_create_dialog.cpp

+ 1 - 1
editor/script_create_dialog.cpp

@@ -373,7 +373,7 @@ void ScriptCreateDialog::_create_new() {
 	const ScriptLanguage::ScriptTemplate sinfo = _get_current_template();
 	const ScriptLanguage::ScriptTemplate sinfo = _get_current_template();
 
 
 	String parent_class = parent_name->get_text();
 	String parent_class = parent_name->get_text();
-	if (!ClassDB::class_exists(parent_class) && !ScriptServer::is_global_class(parent_class)) {
+	if (!parent_name->get_text().is_quoted() && !ClassDB::class_exists(parent_class) && !ScriptServer::is_global_class(parent_class)) {
 		// If base is a custom type, replace with script path instead.
 		// If base is a custom type, replace with script path instead.
 		const EditorData::CustomType *type = EditorNode::get_editor_data().get_custom_type_by_name(parent_class);
 		const EditorData::CustomType *type = EditorNode::get_editor_data().get_custom_type_by_name(parent_class);
 		ERR_FAIL_NULL(type);
 		ERR_FAIL_NULL(type);