diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index b8c8fb7e624..49459a0ba00 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -384,6 +384,12 @@ bool ShaderEditorPlugin::can_drop_data_fw(const Point2 &p_point, const Variant & return true; } } + if (ResourceLoader::exists(file, "ShaderInclude")) { + Ref sinclude = ResourceLoader::load(file); + if (sinclude.is_valid()) { + return true; + } + } } return false; } @@ -413,11 +419,10 @@ void ShaderEditorPlugin::drop_data_fw(const Point2 &p_point, const Variant &p_da for (int i = 0; i < files.size(); i++) { String file = files[i]; - if (!ResourceLoader::exists(file, "Shader")) { - continue; + Ref res; + if (ResourceLoader::exists(file, "Shader") || ResourceLoader::exists(file, "ShaderInclude")) { + res = ResourceLoader::load(file); } - - Ref res = ResourceLoader::load(file); if (res.is_valid()) { edit(res.ptr()); }