From 1de5f7e70b9e072e5746ba817fb418bc71b1e696 Mon Sep 17 00:00:00 2001 From: Paul Joannon Date: Wed, 17 Jan 2018 20:29:44 +0100 Subject: fix marshalling when a function is returning an object from c# --- modules/mono/csharp_script.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 7df2043a62..aee2481366 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1044,7 +1044,7 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const { if (field) { MonoObject *value = field->get_value(mono_object); - r_ret = GDMonoMarshal::mono_object_to_variant(value, field->get_type()); + r_ret = GDMonoMarshal::mono_object_to_variant(value); return true; } @@ -1057,7 +1057,7 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const { r_ret = Variant(); GDMonoUtils::print_unhandled_exception(exc); } else { - r_ret = GDMonoMarshal::mono_object_to_variant(value, property->get_type()); + r_ret = GDMonoMarshal::mono_object_to_variant(value); } return true; } @@ -1147,7 +1147,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, MonoObject *return_value = method->invoke(mono_object, p_args); if (return_value) { - return GDMonoMarshal::mono_object_to_variant(return_value, method->get_return_type()); + return GDMonoMarshal::mono_object_to_variant(return_value); } else { return Variant(); } @@ -1633,7 +1633,7 @@ Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, i MonoObject *result = method->invoke(NULL, p_args); if (result) { - return GDMonoMarshal::mono_object_to_variant(result, method->get_return_type()); + return GDMonoMarshal::mono_object_to_variant(result); } else { return Variant(); } -- cgit v1.2.3