From 2d106eb715239f42f3bf89652bab554af3c5a6a9 Mon Sep 17 00:00:00 2001 From: Will Nations Date: Wed, 6 Feb 2019 17:53:24 -0600 Subject: Fix inherited icons for script classes --- editor/editor_node.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 6140412a32..e32593bbdf 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3350,12 +3350,30 @@ Ref EditorNode::get_class_icon(const String &p_class, const String &p_f if (ScriptServer::is_global_class(p_class)) { String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(p_class); RES icon; + if (FileAccess::exists(icon_path)) { icon = ResourceLoader::load(icon_path); + if (icon.is_valid()) + return icon; } - if (!icon.is_valid()) { - icon = gui_base->get_icon(ScriptServer::get_global_class_native_base(p_class), "EditorIcons"); + + Ref