From e4c40efeab321d84de658b1d1220d07c9eec43c9 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Wed, 12 Jan 2022 23:26:51 +0100 Subject: Fix marshaling values of generic Godot Dictionary --- modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/mono/glue/GodotSharp') diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs index 75240b0c09..e80b6af68f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs @@ -319,6 +319,9 @@ namespace Godot.Collections [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void godot_icall_Dictionary_KeyValuePairAt(IntPtr ptr, int index, out object key, out object value); + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern void godot_icall_Dictionary_KeyValuePairAt_Generic(IntPtr ptr, int index, out object key, out object value, int valueTypeEncoding, IntPtr valueTypeClass); + [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void godot_icall_Dictionary_Add(IntPtr ptr, object key, object value); @@ -485,7 +488,7 @@ namespace Godot.Collections private KeyValuePair GetKeyValuePair(int index) { - Dictionary.godot_icall_Dictionary_KeyValuePairAt(GetPtr(), index, out object key, out object value); + Dictionary.godot_icall_Dictionary_KeyValuePairAt_Generic(GetPtr(), index, out object key, out object value, valTypeEncoding, valTypeClass); return new KeyValuePair((TKey)key, (TValue)value); } -- cgit v1.2.3