C#: Fix property set call boxing value when unboxed was expected

This commit is contained in:
Ignacio Roldán Etcheverry 2021-10-19 00:26:56 +02:00
parent 5bb3dbbedd
commit cad05f012d
3 changed files with 18 additions and 19 deletions

View file

@ -1660,7 +1660,7 @@ bool CSharpInstance::set(const StringName &p_name, const Variant &p_value) {
GDMonoProperty *property = top->get_property(p_name);
if (property) {
property->set_value(mono_object, GDMonoMarshal::variant_to_mono_object(p_value, property->get_type()));
property->set_value_from_variant(mono_object, p_value);
return true;
}