You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix error spam from loading script class icons
This commit is contained in:
@@ -158,12 +158,15 @@ Ref<Texture> CreateDialog::_get_editor_icon(const String &p_type) const {
|
||||
}
|
||||
|
||||
if (ScriptServer::is_global_class(p_type)) {
|
||||
RES icon = ResourceLoader::load(EditorNode::get_editor_data().script_class_get_icon_path(p_type));
|
||||
if (icon.is_valid())
|
||||
return icon;
|
||||
icon = get_icon(ScriptServer::get_global_class_base(p_type), "EditorIcons");
|
||||
if (icon.is_valid())
|
||||
return icon;
|
||||
String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(p_type);
|
||||
RES icon;
|
||||
if (FileAccess::exists(icon_path)) {
|
||||
icon = ResourceLoader::load(icon_path);
|
||||
}
|
||||
if (!icon.is_valid()) {
|
||||
icon = get_icon(ScriptServer::get_global_class_base(p_type), "EditorIcons");
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
const Map<String, Vector<EditorData::CustomType> > &p_map = EditorNode::get_editor_data().get_custom_types();
|
||||
|
||||
Reference in New Issue
Block a user