From 4b5daf06efa1329d60be15f635dd49a7d2b2f056 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Fri, 18 Aug 2023 07:35:58 +0300 Subject: Editor: Improve signal callback generation --- modules/mono/csharp_script.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/mono/csharp_script.cpp') diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 9e23a27093..b41f2155f8 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -435,6 +435,11 @@ static String variant_type_to_managed_name(const String &p_var_type_name) { return "Collections.Dictionary"; } + if (p_var_type_name.begins_with(Variant::get_type_name(Variant::ARRAY) + "[")) { + String element_type = p_var_type_name.trim_prefix(Variant::get_type_name(Variant::ARRAY) + "[").trim_suffix("]"); + return "Collections.Array<" + variant_type_to_managed_name(element_type) + ">"; + } + if (p_var_type_name == Variant::get_type_name(Variant::ARRAY)) { return "Collections.Array"; } -- cgit v1.2.3