mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@bdf625bd54
This commit is contained in:
@@ -467,7 +467,7 @@ Error ResourceLoaderText::load() {
|
||||
ext_resources[id].path = path;
|
||||
ext_resources[id].type = type;
|
||||
ext_resources[id].load_token = ResourceLoader::_load_start(path, type, use_sub_threads ? ResourceLoader::LOAD_THREAD_DISTRIBUTE : ResourceLoader::LOAD_THREAD_FROM_CURRENT, cache_mode_for_external);
|
||||
if (!ext_resources[id].load_token.is_valid()) {
|
||||
if (ext_resources[id].load_token.is_null()) {
|
||||
if (ResourceLoader::get_abort_on_missing_resources()) {
|
||||
error = ERR_FILE_CORRUPT;
|
||||
error_text = "[ext_resource] referenced non-existent resource at: " + path;
|
||||
@@ -686,7 +686,7 @@ Error ResourceLoaderText::load() {
|
||||
resource = cache;
|
||||
}
|
||||
|
||||
if (!resource.is_valid()) {
|
||||
if (resource.is_null()) {
|
||||
Object *obj = ClassDB::instantiate(res_type);
|
||||
if (!obj) {
|
||||
if (ResourceLoader::is_creating_missing_resources_if_class_unavailable_enabled()) {
|
||||
@@ -825,7 +825,7 @@ Error ResourceLoaderText::load() {
|
||||
|
||||
Ref<PackedScene> packed_scene = _parse_node_tag(rp);
|
||||
|
||||
if (!packed_scene.is_valid()) {
|
||||
if (packed_scene.is_null()) {
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -2123,7 +2123,7 @@ Error ResourceLoaderText::set_uid(Ref<FileAccess> p_f, ResourceUID::ID p_uid) {
|
||||
}
|
||||
|
||||
Error ResourceFormatSaverText::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
|
||||
if (p_path.ends_with(".tscn") && !Ref<PackedScene>(p_resource).is_valid()) {
|
||||
if (p_path.ends_with(".tscn") && Ref<PackedScene>(p_resource).is_null()) {
|
||||
return ERR_FILE_UNRECOGNIZED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user