Merge branch 'visualscript_valuetype_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-visualscript_valuetype_fix

This commit is contained in:
Wojtek Figat
2023-10-01 12:06:00 +02:00

View File

@@ -1237,8 +1237,12 @@ bool ManagedBinaryModule::InvokeMethod(void* method, const Variant& instance, Sp
return true;
}
#if USE_NETCORE
mInstance = instanceObject;
#else
// For value-types instance is the actual boxed object data, not te object itself
mInstance = instanceObjectClass->IsValueType() ? MCore::Object::Unbox(instanceObject) : instanceObject;
#endif
}
// Marshal parameters