summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-07-13 22:16:09 +0200
committerGitHub <noreply@github.com>2022-07-13 22:16:09 +0200
commit4dc86f3b5ac689961a6f719c4c80fc761f5ba39e (patch)
tree78b75463241cd4844226d7f824c0fd0708dbc745
parent98d5b37a4cf3c5dd008022752514109ff621d268 (diff)
parent0df23111b3596c17e1116df702245aac6269e807 (diff)
Merge pull request #62986 from fire-forge/array-object
-rw-r--r--editor/editor_properties_array_dict.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index f1a3fe0c57..0b9004bbc4 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -211,7 +211,14 @@ void EditorPropertyArray::update_property() {
String array_type_name = Variant::get_type_name(array_type);
if (array_type == Variant::ARRAY && subtype != Variant::NIL) {
- array_type_name = vformat("%s[%s]", array_type_name, Variant::get_type_name(subtype));
+ String type_name;
+ if (subtype == Variant::OBJECT && subtype_hint == PROPERTY_HINT_RESOURCE_TYPE) {
+ type_name = subtype_hint_string;
+ } else {
+ type_name = Variant::get_type_name(subtype);
+ }
+
+ array_type_name = vformat("%s[%s]", array_type_name, type_name);
}
if (array.get_type() == Variant::NIL) {