Fix VisualScript method calls not working with value types

This commit is contained in:
2023-09-29 00:49:51 +03:00
parent 310d61edda
commit 1d42988f39

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