Fix "No loader found for resource: res://" spam when NativeScript script_class_name is not empty.
fixes #26275
This commit is contained in:
parent
5eeb06ffd1
commit
c9de8a6e68
1 changed files with 11 additions and 9 deletions
|
@ -1599,6 +1599,7 @@ bool NativeScriptLanguage::handles_global_class_type(const String &p_type) const
|
||||||
}
|
}
|
||||||
|
|
||||||
String NativeScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const {
|
String NativeScriptLanguage::get_global_class_name(const String &p_path, String *r_base_type, String *r_icon_path) const {
|
||||||
|
if (!p_path.empty()) {
|
||||||
Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript");
|
Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript");
|
||||||
if (script.is_valid()) {
|
if (script.is_valid()) {
|
||||||
if (r_base_type)
|
if (r_base_type)
|
||||||
|
@ -1611,6 +1612,7 @@ String NativeScriptLanguage::get_global_class_name(const String &p_path, String
|
||||||
*r_base_type = String();
|
*r_base_type = String();
|
||||||
if (r_icon_path)
|
if (r_icon_path)
|
||||||
*r_icon_path = String();
|
*r_icon_path = String();
|
||||||
|
}
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue