From 2c576eb2814e684c18c9995d8f276d24418332f9 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 29 Nov 2022 15:43:08 +0100 Subject: [PATCH] [Core] Fix Resource.resource_name type. The methods returns a String, but the Variant was bound as a StringName. We could alternatively change the method return type but that's a breaking change which will requires code changes in other parts of the engine. --- core/io/resource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/resource.cpp b/core/io/resource.cpp index ab30fb1ca3dd..be75ad7e2598 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -436,7 +436,7 @@ void Resource::_bind_methods() { ADD_GROUP("Resource", "resource_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resource_local_to_scene"), "set_local_to_scene", "is_local_to_scene"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_path", "get_path"); - ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "resource_name"), "set_name", "get_name"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_name"), "set_name", "get_name"); MethodInfo get_rid_bind("_get_rid"); get_rid_bind.return_val.type = Variant::RID;