Merge pull request #26312 from ericrybick/master
Fix "No loader found for resource: res://" spam when NativeScript script_class_name is not empty.
This commit is contained in:
commit
3b0f301660
|
@ -1599,18 +1599,20 @@ 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 {
|
||||||
Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript");
|
if (!p_path.empty()) {
|
||||||
if (script.is_valid()) {
|
Ref<NativeScript> script = ResourceLoader::load(p_path, "NativeScript");
|
||||||
|
if (script.is_valid()) {
|
||||||
|
if (r_base_type)
|
||||||
|
*r_base_type = script->get_instance_base_type();
|
||||||
|
if (r_icon_path)
|
||||||
|
*r_icon_path = script->get_script_class_icon_path();
|
||||||
|
return script->get_script_class_name();
|
||||||
|
}
|
||||||
if (r_base_type)
|
if (r_base_type)
|
||||||
*r_base_type = script->get_instance_base_type();
|
*r_base_type = String();
|
||||||
if (r_icon_path)
|
if (r_icon_path)
|
||||||
*r_icon_path = script->get_script_class_icon_path();
|
*r_icon_path = String();
|
||||||
return script->get_script_class_name();
|
|
||||||
}
|
}
|
||||||
if (r_base_type)
|
|
||||||
*r_base_type = String();
|
|
||||||
if (r_icon_path)
|
|
||||||
*r_icon_path = String();
|
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue