summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-07 17:21:10 +0200
committerGitHub <noreply@github.com>2022-07-07 17:21:10 +0200
commit3768236ad273799a46b13de6d3ed0cfbdbb28692 (patch)
tree2506db16756cc3fb2a4c7ae3b49c9729486fd252 /modules
parent664d8cd8ab0f03073a9e98a6e048569c75988d3b (diff)
parent68477e9b1b70e8eb9ce012240e7b45443450f1cb (diff)
Merge pull request #62789 from raulsntos/csharp-export-nodes
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/csharp_script.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 622838b308..bda6a9a014 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -2866,6 +2866,12 @@ int CSharpScript::_try_get_member_export_hint(IMonoClassMember *p_member, Manage
r_hint = PROPERTY_HINT_RESOURCE_TYPE;
r_hint_string = String(NATIVE_GDMONOCLASS_NAME(field_native_class));
+ } else if (p_variant_type == Variant::OBJECT && CACHED_CLASS(Node)->is_assignable_from(p_type.type_class)) {
+ GDMonoClass *field_native_class = GDMonoUtils::get_class_native_base(p_type.type_class);
+ CRASH_COND(field_native_class == nullptr);
+
+ r_hint = PROPERTY_HINT_NODE_TYPE;
+ r_hint_string = String(NATIVE_GDMONOCLASS_NAME(field_native_class));
} else if (p_allow_generics && p_variant_type == Variant::ARRAY) {
// Nested arrays are not supported in the inspector