Kaynağa Gözat

Merge pull request #95508 from Summersay415/loaded-when-not

Return error when no ResourceFormatLoader found
Rémi Verschelde 1 yıl önce
ebeveyn
işleme
6a829d5a86
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      core/io/resource_loader.cpp

+ 4 - 0
core/io/resource_loader.cpp

@@ -280,6 +280,10 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin
 		return res;
 	}
 
+	if (r_error) {
+		*r_error = ERR_FILE_UNRECOGNIZED;
+	}
+
 	ERR_FAIL_COND_V_MSG(found, Ref<Resource>(),
 			vformat("Failed loading resource: %s. Make sure resources have been imported by opening the project in the editor at least once.", p_path));