浏览代码

Merge pull request #101435 from YYF233333/remote_tree_fix2

Return fast for built-in class icon
Thaddeus Crews 7 月之前
父节点
当前提交
4bac259ced
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/editor_node.cpp

+ 1 - 1
editor/editor_node.cpp

@@ -4943,7 +4943,7 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
 	String script_path;
 	if (ScriptServer::is_global_class(p_class)) {
 		script_path = ScriptServer::get_global_class_path(p_class);
-	} else if (ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists.
+	} else if (!p_class.get_extension().is_empty() && ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists.
 		script_path = p_class;
 	}