Skip to content

Commit

Permalink
no space between subresource parens on 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitalita committed Jan 10, 2024
1 parent 903e24c commit 4f31e3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compat/resource_loader_compat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1160,11 +1160,13 @@ String ResourceLoaderCompat::_write_rlc_resource(const Ref<Resource> &res) {
// Godot 4.x ids are strings, Godot 3.x are integers
if (engine_ver_major >= 4) {
id = "\"" + id + "\"";
} else {
id = " " + id + " ";
}
if (has_internal_resource(path)) {
return "SubResource( " + id + " )";
return "SubResource(" + id + ")";
} else if (has_external_resource(path)) {
return "ExtResource( " + id + " )";
return "ExtResource(" + id + ")";
}
ERR_FAIL_V_MSG("null", "Resource was not pre cached for the resource section, bug?");
}
Expand Down

0 comments on commit 4f31e3f

Please sign in to comment.