From 4f31e3f5c50c170a51f740e33e7aaa09e2a9a1ca Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Wed, 10 Jan 2024 08:08:04 -0800 Subject: [PATCH] no space between subresource parens on 4.x --- compat/resource_loader_compat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compat/resource_loader_compat.cpp b/compat/resource_loader_compat.cpp index 8fb64038..0f794846 100644 --- a/compat/resource_loader_compat.cpp +++ b/compat/resource_loader_compat.cpp @@ -1160,11 +1160,13 @@ String ResourceLoaderCompat::_write_rlc_resource(const Ref &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?"); }