C#: Support type hints for exported Arrays

Added the code for Dictionary as well, but it's not yet supported by the Godot inspector.
This commit is contained in:
Ignacio Etcheverry 2019-03-05 21:39:50 +01:00
parent 187e6ae26d
commit 480d4c6fba
11 changed files with 208 additions and 37 deletions

View file

@ -435,7 +435,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
MonoException *exc = NULL;
GDMonoUtils::TypeIsGenericDictionary type_is_dict = CACHED_METHOD_THUNK(MarshalUtils, TypeIsGenericDictionary);
MonoBoolean is_dict = invoke_method_thunk(type_is_dict, (MonoObject *)reftype, &exc);
MonoBoolean is_dict = invoke_method_thunk(type_is_dict, reftype, &exc);
UNLIKELY_UNHANDLED_EXCEPTION(exc);
if (is_dict) {
@ -447,7 +447,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
exc = NULL;
GDMonoUtils::TypeIsGenericArray type_is_array = CACHED_METHOD_THUNK(MarshalUtils, TypeIsGenericArray);
MonoBoolean is_array = invoke_method_thunk(type_is_array, (MonoObject *)reftype, &exc);
MonoBoolean is_array = invoke_method_thunk(type_is_array, reftype, &exc);
UNLIKELY_UNHANDLED_EXCEPTION(exc);
if (is_array) {