Fix VisualScript method calls not working with value types
This commit is contained in:
@@ -1237,8 +1237,12 @@ bool ManagedBinaryModule::InvokeMethod(void* method, const Variant& instance, Sp
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_NETCORE
|
||||||
|
mInstance = instanceObject;
|
||||||
|
#else
|
||||||
// For value-types instance is the actual boxed object data, not te object itself
|
// For value-types instance is the actual boxed object data, not te object itself
|
||||||
mInstance = instanceObjectClass->IsValueType() ? MCore::Object::Unbox(instanceObject) : instanceObject;
|
mInstance = instanceObjectClass->IsValueType() ? MCore::Object::Unbox(instanceObject) : instanceObject;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Marshal parameters
|
// Marshal parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user