Fix using C#-only structures as Visual Script properties

This commit is contained in:
Wojtek Figat
2021-07-30 10:34:21 +02:00
parent 752dc30cc5
commit e970d53787
3 changed files with 29 additions and 2 deletions

View File

@@ -237,7 +237,7 @@ VariantType MUtils::UnboxVariantType(MonoType* monoType)
// TODO: support any structure unboxing
// TODO: unbox other types as generic ManagedObject type
LOG(Error, "Invalid managed type to unbox {0}.{1}", String(mono_class_get_namespace(klass)), String(mono_class_get_name(klass)));
LOG(Error, "Invalid managed type to unbox {0}", String(GetClassFullname(klass)));
return VariantType();
}
@@ -342,6 +342,7 @@ Variant MUtils::UnboxVariant(MonoObject* value)
type.Struct.Unbox(v.AsBlob.Data, value);
return v;
}
return Variant(value);
}
if (klass == mono_array_class_get(mono_get_byte_class(), 1))
{