///
/// Internals of the bindings between native and .NET code.
/// Game code shouldn't go here.
///
///
/// Jackson Dunstan, 2017, http://JacksonDunstan.com
///
///
/// MIT
///
// Type definitions
#include "Bindings.h"
// For assert()
#include
// For int32_t, etc.
#include
// For malloc(), etc.
#include
// Macro to put before functions that need to be exposed to C#
#ifdef _WIN32
#define DLLEXPORT extern "C" __declspec(dllexport)
#else
#define DLLEXPORT extern "C"
#endif
////////////////////////////////////////////////////////////////
// C# functions for C++ to call
////////////////////////////////////////////////////////////////
namespace Plugin
{
void (*ReleaseObject)(int32_t handle);
int32_t (*StringNew)(const char* chars);
void (*SetException)(int32_t handle);
int32_t (*ArrayGetLength)(int32_t handle);
int32_t (*ArrayGetRank)(int32_t handle);
/*BEGIN FUNCTION POINTERS*/
int32_t (*SystemDiagnosticsStopwatchConstructor)();
int64_t (*SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle);
void (*SystemDiagnosticsStopwatchMethodStart)(int32_t thisHandle);
void (*SystemDiagnosticsStopwatchMethodReset)(int32_t thisHandle);
int32_t (*UnityEngineObjectPropertyGetName)(int32_t thisHandle);
void (*UnityEngineObjectPropertySetName)(int32_t thisHandle, int32_t valueHandle);
System::Boolean (*UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle);
System::Boolean (*UnityEngineObjectMethodop_ImplicitUnityEngineObject)(int32_t existsHandle);
int32_t (*UnityEngineGameObjectConstructor)();
int32_t (*UnityEngineGameObjectConstructorSystemString)(int32_t nameHandle);
int32_t (*UnityEngineGameObjectPropertyGetTransform)(int32_t thisHandle);
int32_t (*UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle);
int32_t (*UnityEngineComponentPropertyGetTransform)(int32_t thisHandle);
UnityEngine::Vector3 (*UnityEngineTransformPropertyGetPosition)(int32_t thisHandle);
void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value);
void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle);
System::Boolean (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)();
void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value);
void (*UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle);
void (*UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle);
void (*UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32)(int32_t* bufferLength, int32_t* numBuffers);
void (*UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte)(int32_t hostId, int32_t* addressHandle, int32_t* port, uint8_t* error);
void (*UnityEngineNetworkingNetworkTransportMethodInit)();
UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z);
float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz);
void (*UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ);
UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b);
UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a);
float (*UnityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column);
void (*UnityEngineMatrix4x4PropertySetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column, float value);
void (*ReleaseUnityEngineRaycastHit)(int32_t handle);
UnityEngine::Vector3 (*UnityEngineRaycastHitPropertyGetPoint)(int32_t thisHandle);
void (*UnityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, UnityEngine::Vector3& value);
int32_t (*UnityEngineRaycastHitPropertyGetTransform)(int32_t thisHandle);
void (*ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)(int32_t handle);
int32_t (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble)(int32_t keyHandle, double value);
int32_t (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey)(int32_t thisHandle);
double (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)(int32_t thisHandle);
int32_t (*SystemCollectionsGenericListSystemStringConstructor)();
int32_t (*SystemCollectionsGenericListSystemStringPropertyGetItem)(int32_t thisHandle, int32_t index);
void (*SystemCollectionsGenericListSystemStringPropertySetItem)(int32_t thisHandle, int32_t index, int32_t valueHandle);
void (*SystemCollectionsGenericListSystemStringMethodAddSystemString)(int32_t thisHandle, int32_t itemHandle);
int32_t (*SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString)(int32_t valueHandle);
int32_t (*SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue)(int32_t thisHandle);
void (*SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue)(int32_t thisHandle, int32_t valueHandle);
int32_t (*SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString)(int32_t valueHandle);
int32_t (*SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)(int32_t thisHandle);
void (*SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)(int32_t thisHandle, int32_t valueHandle);
int32_t (*SystemExceptionConstructorSystemString)(int32_t messageHandle);
int32_t (*UnityEngineResolutionPropertyGetWidth)(UnityEngine::Resolution* thiz);
void (*UnityEngineResolutionPropertySetWidth)(UnityEngine::Resolution* thiz, int32_t value);
int32_t (*UnityEngineResolutionPropertyGetHeight)(UnityEngine::Resolution* thiz);
void (*UnityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value);
int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz);
void (*UnityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value);
int32_t (*UnityEngineScreenPropertyGetResolutions)();
UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction);
int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle);
int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray);
int32_t (*UnityEngineGradientConstructor)();
int32_t (*UnityEngineGradientPropertyGetColorKeys)(int32_t thisHandle);
void (*UnityEngineGradientPropertySetColorKeys)(int32_t thisHandle, int32_t valueHandle);
int32_t (*SystemAppDomainSetupConstructor)();
int32_t (*SystemAppDomainSetupPropertyGetAppDomainInitializer)(int32_t thisHandle);
void (*SystemAppDomainSetupPropertySetAppDomainInitializer)(int32_t thisHandle, int32_t valueHandle);
int32_t (*SystemInt32Array1Constructor1)(int32_t length0);
int32_t (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0);
int32_t (*SystemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item);
int32_t (*SystemSingleArray1Constructor1)(int32_t length0);
float (*SystemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0);
int32_t (*SystemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item);
int32_t (*SystemSingleArray2Constructor2)(int32_t length0, int32_t length1);
int32_t (*SystemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension);
float (*SystemSingleArray2GetItem2)(int32_t thisHandle, int32_t index0, int32_t index1);
int32_t (*SystemSingleArray2SetItem2)(int32_t thisHandle, int32_t index0, int32_t index1, float item);
int32_t (*SystemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2);
int32_t (*SystemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension);
float (*SystemSingleArray3GetItem3)(int32_t thisHandle, int32_t index0, int32_t index1, int32_t index2);
int32_t (*SystemSingleArray3SetItem3)(int32_t thisHandle, int32_t index0, int32_t index1, int32_t index2, float item);
int32_t (*SystemStringArray1Constructor1)(int32_t length0);
int32_t (*SystemStringArray1GetItem1)(int32_t thisHandle, int32_t index0);
int32_t (*SystemStringArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle);
int32_t (*UnityEngineResolutionArray1Constructor1)(int32_t length0);
UnityEngine::Resolution (*UnityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0);
int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item);
int32_t (*UnityEngineRaycastHitArray1Constructor1)(int32_t length0);
int32_t (*UnityEngineRaycastHitArray1GetItem1)(int32_t thisHandle, int32_t index0);
int32_t (*UnityEngineRaycastHitArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle);
int32_t (*UnityEngineGradientColorKeyArray1Constructor1)(int32_t length0);
UnityEngine::GradientColorKey (*UnityEngineGradientColorKeyArray1GetItem1)(int32_t thisHandle, int32_t index0);
int32_t (*UnityEngineGradientColorKeyArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::GradientColorKey& item);
void (*ReleaseSystemAction)(int32_t handle, int32_t classHandle);
void (*SystemActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle);
void (*SystemActionInvoke)(int32_t thisHandle);
void (*SystemActionAdd)(int32_t thisHandle, int32_t delHandle);
void (*SystemActionRemove)(int32_t thisHandle, int32_t delHandle);
void (*ReleaseSystemActionSystemSingle)(int32_t handle, int32_t classHandle);
void (*SystemActionSystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle);
void (*SystemActionSystemSingleInvoke)(int32_t thisHandle, float obj);
void (*SystemActionSystemSingleAdd)(int32_t thisHandle, int32_t delHandle);
void (*SystemActionSystemSingleRemove)(int32_t thisHandle, int32_t delHandle);
void (*ReleaseSystemActionSystemSingle_SystemSingle)(int32_t handle, int32_t classHandle);
void (*SystemActionSystemSingle_SystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle);
void (*SystemActionSystemSingle_SystemSingleInvoke)(int32_t thisHandle, float arg1, float arg2);
void (*SystemActionSystemSingle_SystemSingleAdd)(int32_t thisHandle, int32_t delHandle);
void (*SystemActionSystemSingle_SystemSingleRemove)(int32_t thisHandle, int32_t delHandle);
void (*ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble)(int32_t handle, int32_t classHandle);
void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle);
double (*SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2);
void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle);
void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle);
void (*ReleaseSystemFuncSystemInt16_SystemInt32_SystemString)(int32_t handle, int32_t classHandle);
void (*SystemFuncSystemInt16_SystemInt32_SystemStringConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle);
int32_t (*SystemFuncSystemInt16_SystemInt32_SystemStringInvoke)(int32_t thisHandle, int16_t arg1, int32_t arg2);
void (*SystemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle);
void (*SystemFuncSystemInt16_SystemInt32_SystemStringRemove)(int32_t thisHandle, int32_t delHandle);
void (*ReleaseSystemAppDomainInitializer)(int32_t handle, int32_t classHandle);
void (*SystemAppDomainInitializerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle);
void (*SystemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle);
void (*SystemAppDomainInitializerAdd)(int32_t thisHandle, int32_t delHandle);
void (*SystemAppDomainInitializerRemove)(int32_t thisHandle, int32_t delHandle);
/*END FUNCTION POINTERS*/
}
////////////////////////////////////////////////////////////////
// Reference counting of managed objects
////////////////////////////////////////////////////////////////
namespace Plugin
{
int32_t RefCountsLenClass;
int32_t* RefCountsClass;
void ReferenceManagedClass(int32_t handle)
{
assert(handle >= 0 && handle < RefCountsLenClass);
if (handle != 0)
{
RefCountsClass[handle]++;
}
}
void DereferenceManagedClass(int32_t handle)
{
assert(handle >= 0 && handle < RefCountsLenClass);
if (handle != 0)
{
int32_t numRemain = --RefCountsClass[handle];
if (numRemain == 0)
{
ReleaseObject(handle);
}
}
}
/*BEGIN GLOBAL STATE AND FUNCTIONS*/
int32_t RefCountsLenUnityEngineRaycastHit;
int32_t* RefCountsUnityEngineRaycastHit;
void ReferenceManagedUnityEngineRaycastHit(int32_t handle)
{
assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit);
if (handle != 0)
{
RefCountsUnityEngineRaycastHit[handle]++;
}
}
void DereferenceManagedUnityEngineRaycastHit(int32_t handle)
{
assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit);
if (handle != 0)
{
int32_t numRemain = --RefCountsUnityEngineRaycastHit[handle];
if (numRemain == 0)
{
ReleaseUnityEngineRaycastHit(handle);
}
}
}
int32_t RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble;
int32_t* RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble;
void ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle)
{
assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble);
if (handle != 0)
{
RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]++;
}
}
void DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle)
{
assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble);
if (handle != 0)
{
int32_t numRemain = --RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle];
if (numRemain == 0)
{
ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(handle);
}
}
}
int32_t SystemActionFreeListSize;
System::Action** SystemActionFreeList;
System::Action** NextFreeSystemAction;
int32_t StoreSystemAction(System::Action* del)
{
assert(NextFreeSystemAction != nullptr);
System::Action** pNext = NextFreeSystemAction;
NextFreeSystemAction = (System::Action**)*pNext;
*pNext = del;
return (int32_t)(pNext - SystemActionFreeList);
}
System::Action* GetSystemAction(int32_t handle)
{
assert(handle >= 0 && handle < SystemActionFreeListSize);
return SystemActionFreeList[handle];
}
void RemoveSystemAction(int32_t handle)
{
System::Action** pRelease = SystemActionFreeList + handle;
*pRelease = (System::Action*)NextFreeSystemAction;
NextFreeSystemAction = pRelease;
}
int32_t SystemActionSystemSingleFreeListSize;
System::Action1** SystemActionSystemSingleFreeList;
System::Action1** NextFreeSystemActionSystemSingle;
int32_t StoreSystemActionSystemSingle(System::Action1* del)
{
assert(NextFreeSystemActionSystemSingle != nullptr);
System::Action1** pNext = NextFreeSystemActionSystemSingle;
NextFreeSystemActionSystemSingle = (System::Action1**)*pNext;
*pNext = del;
return (int32_t)(pNext - SystemActionSystemSingleFreeList);
}
System::Action1* GetSystemActionSystemSingle(int32_t handle)
{
assert(handle >= 0 && handle < SystemActionSystemSingleFreeListSize);
return SystemActionSystemSingleFreeList[handle];
}
void RemoveSystemActionSystemSingle(int32_t handle)
{
System::Action1** pRelease = SystemActionSystemSingleFreeList + handle;
*pRelease = (System::Action1*)NextFreeSystemActionSystemSingle;
NextFreeSystemActionSystemSingle = pRelease;
}
int32_t SystemActionSystemSingle_SystemSingleFreeListSize;
System::Action2** SystemActionSystemSingle_SystemSingleFreeList;
System::Action2** NextFreeSystemActionSystemSingle_SystemSingle;
int32_t StoreSystemActionSystemSingle_SystemSingle(System::Action2* del)
{
assert(NextFreeSystemActionSystemSingle_SystemSingle != nullptr);
System::Action2** pNext = NextFreeSystemActionSystemSingle_SystemSingle;
NextFreeSystemActionSystemSingle_SystemSingle = (System::Action2**)*pNext;
*pNext = del;
return (int32_t)(pNext - SystemActionSystemSingle_SystemSingleFreeList);
}
System::Action2* GetSystemActionSystemSingle_SystemSingle(int32_t handle)
{
assert(handle >= 0 && handle < SystemActionSystemSingle_SystemSingleFreeListSize);
return SystemActionSystemSingle_SystemSingleFreeList[handle];
}
void RemoveSystemActionSystemSingle_SystemSingle(int32_t handle)
{
System::Action2** pRelease = SystemActionSystemSingle_SystemSingleFreeList + handle;
*pRelease = (System::Action2*)NextFreeSystemActionSystemSingle_SystemSingle;
NextFreeSystemActionSystemSingle_SystemSingle = pRelease;
}
int32_t SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize;
System::Func3** SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList;
System::Func3** NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble;
int32_t StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(System::Func3* del)
{
assert(NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble != nullptr);
System::Func3** pNext = NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble;
NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = (System::Func3**)*pNext;
*pNext = del;
return (int32_t)(pNext - SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList);
}
System::Func3* GetSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle)
{
assert(handle >= 0 && handle < SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize);
return SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[handle];
}
void RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle)
{
System::Func3** pRelease = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + handle;
*pRelease = (System::Func3*)NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble;
NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = pRelease;
}
int32_t SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize;
System::Func3** SystemFuncSystemInt16_SystemInt32_SystemStringFreeList;
System::Func3** NextFreeSystemFuncSystemInt16_SystemInt32_SystemString;
int32_t StoreSystemFuncSystemInt16_SystemInt32_SystemString(System::Func3* del)
{
assert(NextFreeSystemFuncSystemInt16_SystemInt32_SystemString != nullptr);
System::Func3** pNext = NextFreeSystemFuncSystemInt16_SystemInt32_SystemString;
NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = (System::Func3**)*pNext;
*pNext = del;
return (int32_t)(pNext - SystemFuncSystemInt16_SystemInt32_SystemStringFreeList);
}
System::Func3* GetSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle)
{
assert(handle >= 0 && handle < SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize);
return SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[handle];
}
void RemoveSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle)
{
System::Func3** pRelease = SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + handle;
*pRelease = (System::Func3*)NextFreeSystemFuncSystemInt16_SystemInt32_SystemString;
NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = pRelease;
}
int32_t SystemAppDomainInitializerFreeListSize;
System::AppDomainInitializer** SystemAppDomainInitializerFreeList;
System::AppDomainInitializer** NextFreeSystemAppDomainInitializer;
int32_t StoreSystemAppDomainInitializer(System::AppDomainInitializer* del)
{
assert(NextFreeSystemAppDomainInitializer != nullptr);
System::AppDomainInitializer** pNext = NextFreeSystemAppDomainInitializer;
NextFreeSystemAppDomainInitializer = (System::AppDomainInitializer**)*pNext;
*pNext = del;
return (int32_t)(pNext - SystemAppDomainInitializerFreeList);
}
System::AppDomainInitializer* GetSystemAppDomainInitializer(int32_t handle)
{
assert(handle >= 0 && handle < SystemAppDomainInitializerFreeListSize);
return SystemAppDomainInitializerFreeList[handle];
}
void RemoveSystemAppDomainInitializer(int32_t handle)
{
System::AppDomainInitializer** pRelease = SystemAppDomainInitializerFreeList + handle;
*pRelease = (System::AppDomainInitializer*)NextFreeSystemAppDomainInitializer;
NextFreeSystemAppDomainInitializer = pRelease;
}
/*END GLOBAL STATE AND FUNCTIONS*/
}
namespace Plugin
{
// An unhandled exception caused by C++ calling into C#
System::Exception* unhandledCsharpException = nullptr;
}
////////////////////////////////////////////////////////////////
// Mirrors of C# types. These wrap the C# functions to present
// a similiar API as in C#.
////////////////////////////////////////////////////////////////
namespace System
{
Object::Object(Plugin::InternalUse iu, int32_t handle)
: Handle(handle)
{
}
Object::Object(std::nullptr_t n)
: Handle(0)
{
}
bool Object::operator==(std::nullptr_t other) const
{
return Handle == 0;
}
bool Object::operator!=(std::nullptr_t other) const
{
return Handle != 0;
}
void Object::ThrowReferenceToThis()
{
throw *this;
}
ValueType::ValueType(Plugin::InternalUse iu, int32_t handle)
{
Handle = handle;
}
ValueType::ValueType(std::nullptr_t n)
{
Handle = 0;
}
String::String(std::nullptr_t n)
: Object(0)
{
}
String::String(Plugin::InternalUse iu, int32_t handle)
: Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
String::String(const String& other)
: Object(Plugin::InternalUse::Only, other.Handle)
{
if (Handle)
{
Plugin::ReferenceManagedClass(Handle);
}
}
String::String(String&& other)
: Object(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
String::~String()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
String& String::operator=(const String& other)
{
if (Handle != other.Handle)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
if (Handle)
{
Plugin::ReferenceManagedClass(Handle);
}
}
return *this;
}
String& String::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
String& String::operator=(String&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
String::String()
: Object(nullptr)
{
}
String::String(const char* chars)
: Object(Plugin::InternalUse::Only, Plugin::StringNew(chars))
{
}
Array::Array(Plugin::InternalUse iu, int32_t handle)
: Object(iu, handle)
{
}
Array::Array(std::nullptr_t n)
: Object(0)
{
}
int32_t Array::GetLength()
{
return Plugin::ArrayGetLength(Handle);
}
int32_t Array::GetRank()
{
return Plugin::ArrayGetRank(Handle);
}
}
/*BEGIN METHOD DEFINITIONS*/
namespace System
{
namespace Diagnostics
{
Stopwatch::Stopwatch(std::nullptr_t n)
: Stopwatch(Plugin::InternalUse::Only, 0)
{
}
Stopwatch::Stopwatch(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Stopwatch::Stopwatch(const Stopwatch& other)
: Stopwatch(Plugin::InternalUse::Only, other.Handle)
{
}
Stopwatch::Stopwatch(Stopwatch&& other)
: Stopwatch(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Stopwatch::~Stopwatch()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Stopwatch& Stopwatch::operator=(const Stopwatch& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Stopwatch& Stopwatch::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Stopwatch& Stopwatch::operator=(Stopwatch&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Stopwatch::operator==(const Stopwatch& other) const
{
return Handle == other.Handle;
}
bool Stopwatch::operator!=(const Stopwatch& other) const
{
return Handle != other.Handle;
}
Stopwatch::Stopwatch()
: System::Object(nullptr)
{
auto returnValue = Plugin::SystemDiagnosticsStopwatchConstructor();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
int64_t Stopwatch::GetElapsedMilliseconds()
{
auto returnValue = Plugin::SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Stopwatch::Start()
{
Plugin::SystemDiagnosticsStopwatchMethodStart(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
void Stopwatch::Reset()
{
Plugin::SystemDiagnosticsStopwatchMethodReset(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
}
namespace UnityEngine
{
Object::Object(std::nullptr_t n)
: Object(Plugin::InternalUse::Only, 0)
{
}
Object::Object(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Object::Object(const Object& other)
: Object(Plugin::InternalUse::Only, other.Handle)
{
}
Object::Object(Object&& other)
: Object(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Object::~Object()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Object& Object::operator=(const Object& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Object& Object::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Object& Object::operator=(Object&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Object::operator==(const Object& other) const
{
return Handle == other.Handle;
}
bool Object::operator!=(const Object& other) const
{
return Handle != other.Handle;
}
System::String Object::GetName()
{
auto returnValue = Plugin::UnityEngineObjectPropertyGetName(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::String(Plugin::InternalUse::Only, returnValue);
}
void Object::SetName(System::String value)
{
Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
System::Boolean Object::operator==(UnityEngine::Object x)
{
auto returnValue = Plugin::UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(Handle, x.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
Object::operator System::Boolean()
{
auto returnValue = Plugin::UnityEngineObjectMethodop_ImplicitUnityEngineObject(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
}
namespace UnityEngine
{
GameObject::GameObject(std::nullptr_t n)
: GameObject(Plugin::InternalUse::Only, 0)
{
}
GameObject::GameObject(Plugin::InternalUse iu, int32_t handle)
: UnityEngine::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
GameObject::GameObject(const GameObject& other)
: GameObject(Plugin::InternalUse::Only, other.Handle)
{
}
GameObject::GameObject(GameObject&& other)
: GameObject(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
GameObject::~GameObject()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
GameObject& GameObject::operator=(const GameObject& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
GameObject& GameObject::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
GameObject& GameObject::operator=(GameObject&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool GameObject::operator==(const GameObject& other) const
{
return Handle == other.Handle;
}
bool GameObject::operator!=(const GameObject& other) const
{
return Handle != other.Handle;
}
GameObject::GameObject()
: UnityEngine::Object(nullptr)
{
auto returnValue = Plugin::UnityEngineGameObjectConstructor();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
GameObject::GameObject(System::String name)
: UnityEngine::Object(nullptr)
{
auto returnValue = Plugin::UnityEngineGameObjectConstructorSystemString(name.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
UnityEngine::Transform GameObject::GetTransform()
{
auto returnValue = Plugin::UnityEngineGameObjectPropertyGetTransform(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue);
}
template<> MyGame::MonoBehaviours::TestScript GameObject::AddComponent()
{
auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return MyGame::MonoBehaviours::TestScript(Plugin::InternalUse::Only, returnValue);
}
}
namespace UnityEngine
{
Component::Component(std::nullptr_t n)
: Component(Plugin::InternalUse::Only, 0)
{
}
Component::Component(Plugin::InternalUse iu, int32_t handle)
: UnityEngine::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Component::Component(const Component& other)
: Component(Plugin::InternalUse::Only, other.Handle)
{
}
Component::Component(Component&& other)
: Component(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Component::~Component()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Component& Component::operator=(const Component& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Component& Component::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Component& Component::operator=(Component&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Component::operator==(const Component& other) const
{
return Handle == other.Handle;
}
bool Component::operator!=(const Component& other) const
{
return Handle != other.Handle;
}
UnityEngine::Transform Component::GetTransform()
{
auto returnValue = Plugin::UnityEngineComponentPropertyGetTransform(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue);
}
}
namespace UnityEngine
{
Transform::Transform(std::nullptr_t n)
: Transform(Plugin::InternalUse::Only, 0)
{
}
Transform::Transform(Plugin::InternalUse iu, int32_t handle)
: UnityEngine::Component(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Transform::Transform(const Transform& other)
: Transform(Plugin::InternalUse::Only, other.Handle)
{
}
Transform::Transform(Transform&& other)
: Transform(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Transform::~Transform()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Transform& Transform::operator=(const Transform& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Transform& Transform::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Transform& Transform::operator=(Transform&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Transform::operator==(const Transform& other) const
{
return Handle == other.Handle;
}
bool Transform::operator!=(const Transform& other) const
{
return Handle != other.Handle;
}
UnityEngine::Vector3 Transform::GetPosition()
{
auto returnValue = Plugin::UnityEngineTransformPropertyGetPosition(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Transform::SetPosition(UnityEngine::Vector3& value)
{
Plugin::UnityEngineTransformPropertySetPosition(Handle, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace UnityEngine
{
Debug::Debug(std::nullptr_t n)
: Debug(Plugin::InternalUse::Only, 0)
{
}
Debug::Debug(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Debug::Debug(const Debug& other)
: Debug(Plugin::InternalUse::Only, other.Handle)
{
}
Debug::Debug(Debug&& other)
: Debug(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Debug::~Debug()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Debug& Debug::operator=(const Debug& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Debug& Debug::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Debug& Debug::operator=(Debug&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Debug::operator==(const Debug& other) const
{
return Handle == other.Handle;
}
bool Debug::operator!=(const Debug& other) const
{
return Handle != other.Handle;
}
void Debug::Log(System::Object message)
{
Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace UnityEngine
{
namespace Assertions
{
System::Boolean Assert::GetRaiseExceptions()
{
auto returnValue = Plugin::UnityEngineAssertionsAssertFieldGetRaiseExceptions();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Assert::SetRaiseExceptions(System::Boolean value)
{
Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions(value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
template<> void Assert::AreEqual(System::String expected, System::String actual)
{
Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
template<> void Assert::AreEqual(UnityEngine::GameObject expected, UnityEngine::GameObject actual)
{
Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
}
namespace UnityEngine
{
Collision::Collision(std::nullptr_t n)
: Collision(Plugin::InternalUse::Only, 0)
{
}
Collision::Collision(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Collision::Collision(const Collision& other)
: Collision(Plugin::InternalUse::Only, other.Handle)
{
}
Collision::Collision(Collision&& other)
: Collision(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Collision::~Collision()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Collision& Collision::operator=(const Collision& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Collision& Collision::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Collision& Collision::operator=(Collision&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Collision::operator==(const Collision& other) const
{
return Handle == other.Handle;
}
bool Collision::operator!=(const Collision& other) const
{
return Handle != other.Handle;
}
}
namespace UnityEngine
{
Behaviour::Behaviour(std::nullptr_t n)
: Behaviour(Plugin::InternalUse::Only, 0)
{
}
Behaviour::Behaviour(Plugin::InternalUse iu, int32_t handle)
: UnityEngine::Component(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Behaviour::Behaviour(const Behaviour& other)
: Behaviour(Plugin::InternalUse::Only, other.Handle)
{
}
Behaviour::Behaviour(Behaviour&& other)
: Behaviour(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Behaviour::~Behaviour()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Behaviour& Behaviour::operator=(const Behaviour& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Behaviour& Behaviour::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Behaviour& Behaviour::operator=(Behaviour&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Behaviour::operator==(const Behaviour& other) const
{
return Handle == other.Handle;
}
bool Behaviour::operator!=(const Behaviour& other) const
{
return Handle != other.Handle;
}
}
namespace UnityEngine
{
MonoBehaviour::MonoBehaviour(std::nullptr_t n)
: MonoBehaviour(Plugin::InternalUse::Only, 0)
{
}
MonoBehaviour::MonoBehaviour(Plugin::InternalUse iu, int32_t handle)
: UnityEngine::Behaviour(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
MonoBehaviour::MonoBehaviour(const MonoBehaviour& other)
: MonoBehaviour(Plugin::InternalUse::Only, other.Handle)
{
}
MonoBehaviour::MonoBehaviour(MonoBehaviour&& other)
: MonoBehaviour(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
MonoBehaviour::~MonoBehaviour()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
MonoBehaviour& MonoBehaviour::operator=(const MonoBehaviour& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
MonoBehaviour& MonoBehaviour::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
MonoBehaviour& MonoBehaviour::operator=(MonoBehaviour&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool MonoBehaviour::operator==(const MonoBehaviour& other) const
{
return Handle == other.Handle;
}
bool MonoBehaviour::operator!=(const MonoBehaviour& other) const
{
return Handle != other.Handle;
}
}
namespace UnityEngine
{
AudioSettings::AudioSettings(std::nullptr_t n)
: AudioSettings(Plugin::InternalUse::Only, 0)
{
}
AudioSettings::AudioSettings(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
AudioSettings::AudioSettings(const AudioSettings& other)
: AudioSettings(Plugin::InternalUse::Only, other.Handle)
{
}
AudioSettings::AudioSettings(AudioSettings&& other)
: AudioSettings(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
AudioSettings::~AudioSettings()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
AudioSettings& AudioSettings::operator=(const AudioSettings& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
AudioSettings& AudioSettings::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
AudioSettings& AudioSettings::operator=(AudioSettings&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool AudioSettings::operator==(const AudioSettings& other) const
{
return Handle == other.Handle;
}
bool AudioSettings::operator!=(const AudioSettings& other) const
{
return Handle != other.Handle;
}
void AudioSettings::GetDSPBufferSize(int32_t* bufferLength, int32_t* numBuffers)
{
Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(bufferLength, numBuffers);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace UnityEngine
{
namespace Networking
{
NetworkTransport::NetworkTransport(std::nullptr_t n)
: NetworkTransport(Plugin::InternalUse::Only, 0)
{
}
NetworkTransport::NetworkTransport(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
NetworkTransport::NetworkTransport(const NetworkTransport& other)
: NetworkTransport(Plugin::InternalUse::Only, other.Handle)
{
}
NetworkTransport::NetworkTransport(NetworkTransport&& other)
: NetworkTransport(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
NetworkTransport::~NetworkTransport()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
NetworkTransport& NetworkTransport::operator=(const NetworkTransport& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
NetworkTransport& NetworkTransport::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
NetworkTransport& NetworkTransport::operator=(NetworkTransport&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool NetworkTransport::operator==(const NetworkTransport& other) const
{
return Handle == other.Handle;
}
bool NetworkTransport::operator!=(const NetworkTransport& other) const
{
return Handle != other.Handle;
}
void NetworkTransport::GetBroadcastConnectionInfo(int32_t hostId, System::String* address, int32_t* port, uint8_t* error)
{
int32_t addressHandle = address->Handle;
Plugin::UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(hostId, &addressHandle, port, error);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
if (address->Handle != addressHandle)
{
if (address->Handle)
{
Plugin::DereferenceManagedClass(address->Handle);
}
address->Handle = addressHandle;
if (address->Handle)
{
Plugin::ReferenceManagedClass(address->Handle);
}
}
}
void NetworkTransport::Init()
{
Plugin::UnityEngineNetworkingNetworkTransportMethodInit();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
}
namespace UnityEngine
{
Vector3::Vector3()
{
}
Vector3::Vector3(float x, float y, float z)
{
auto returnValue = Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(x, y, z);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
*this = returnValue;
}
float Vector3::GetMagnitude()
{
auto returnValue = Plugin::UnityEngineVector3PropertyGetMagnitude(this);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Vector3::Set(float newX, float newY, float newZ)
{
Plugin::UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(this, newX, newY, newZ);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a)
{
auto returnValue = Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(*this, a);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
UnityEngine::Vector3 Vector3::operator-()
{
auto returnValue = Plugin::UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(*this);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
}
namespace UnityEngine
{
Matrix4x4::Matrix4x4()
{
}
float Matrix4x4::GetItem(int32_t row, int32_t column)
{
auto returnValue = Plugin::UnityEngineMatrix4x4PropertyGetItem(this, row, column);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Matrix4x4::SetItem(int32_t row, int32_t column, float value)
{
Plugin::UnityEngineMatrix4x4PropertySetItem(this, row, column, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace UnityEngine
{
RaycastHit::RaycastHit(std::nullptr_t n)
: RaycastHit(Plugin::InternalUse::Only, 0)
{
}
RaycastHit::RaycastHit(Plugin::InternalUse iu, int32_t handle)
: System::ValueType(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedUnityEngineRaycastHit(Handle);
}
}
RaycastHit::RaycastHit(const RaycastHit& other)
: RaycastHit(Plugin::InternalUse::Only, other.Handle)
{
}
RaycastHit::RaycastHit(RaycastHit&& other)
: RaycastHit(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
RaycastHit::~RaycastHit()
{
if (Handle)
{
Plugin::DereferenceManagedUnityEngineRaycastHit(Handle);
Handle = 0;
}
}
RaycastHit& RaycastHit::operator=(const RaycastHit& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedUnityEngineRaycastHit(Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedUnityEngineRaycastHit(Handle);
}
}
return *this;
}
RaycastHit& RaycastHit::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedUnityEngineRaycastHit(Handle);
Handle = 0;
}
return *this;
}
RaycastHit& RaycastHit::operator=(RaycastHit&& other)
{
if (Handle)
{
Plugin::DereferenceManagedUnityEngineRaycastHit(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool RaycastHit::operator==(const RaycastHit& other) const
{
return Handle == other.Handle;
}
bool RaycastHit::operator!=(const RaycastHit& other) const
{
return Handle != other.Handle;
}
UnityEngine::Vector3 RaycastHit::GetPoint()
{
auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetPoint(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void RaycastHit::SetPoint(UnityEngine::Vector3& value)
{
Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
UnityEngine::Transform RaycastHit::GetTransform()
{
auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetTransform(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue);
}
}
namespace System
{
namespace Collections
{
namespace Generic
{
KeyValuePair::KeyValuePair(std::nullptr_t n)
: KeyValuePair(Plugin::InternalUse::Only, 0)
{
}
KeyValuePair::KeyValuePair(Plugin::InternalUse iu, int32_t handle)
: System::ValueType(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
}
}
KeyValuePair::KeyValuePair(const KeyValuePair& other)
: KeyValuePair(Plugin::InternalUse::Only, other.Handle)
{
}
KeyValuePair::KeyValuePair(KeyValuePair&& other)
: KeyValuePair(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
KeyValuePair::~KeyValuePair()
{
if (Handle)
{
Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
Handle = 0;
}
}
KeyValuePair& KeyValuePair::operator=(const KeyValuePair& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
}
}
return *this;
}
KeyValuePair& KeyValuePair::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
Handle = 0;
}
return *this;
}
KeyValuePair& KeyValuePair::operator=(KeyValuePair&& other)
{
if (Handle)
{
Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool KeyValuePair::operator==(const KeyValuePair& other) const
{
return Handle == other.Handle;
}
bool KeyValuePair::operator!=(const KeyValuePair& other) const
{
return Handle != other.Handle;
}
KeyValuePair::KeyValuePair(System::String key, double value)
: System::ValueType(nullptr)
{
auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(key.Handle, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle);
}
}
System::String KeyValuePair::GetKey()
{
auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::String(Plugin::InternalUse::Only, returnValue);
}
double KeyValuePair::GetValue()
{
auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
}
}
}
namespace System
{
namespace Collections
{
namespace Generic
{
List::List(std::nullptr_t n)
: List(Plugin::InternalUse::Only, 0)
{
}
List::List(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
List::List(const List& other)
: List(Plugin::InternalUse::Only, other.Handle)
{
}
List::List(List&& other)
: List(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
List::~List()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
List& List::operator=(const List& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
List& List::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
List& List::operator=(List&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool List::operator==(const List& other) const
{
return Handle == other.Handle;
}
bool List::operator!=(const List& other) const
{
return Handle != other.Handle;
}
List::List()
: System::Object(nullptr)
{
auto returnValue = Plugin::SystemCollectionsGenericListSystemStringConstructor();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
System::String List::GetItem(int32_t index)
{
auto returnValue = Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem(Handle, index);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::String(Plugin::InternalUse::Only, returnValue);
}
void List::SetItem(int32_t index, System::String value)
{
Plugin::SystemCollectionsGenericListSystemStringPropertySetItem(Handle, index, value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
void List::Add(System::String item)
{
Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString(Handle, item.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
}
}
namespace System
{
namespace Collections
{
namespace Generic
{
LinkedListNode::LinkedListNode(std::nullptr_t n)
: LinkedListNode(Plugin::InternalUse::Only, 0)
{
}
LinkedListNode::LinkedListNode(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
LinkedListNode::LinkedListNode(const LinkedListNode& other)
: LinkedListNode(Plugin::InternalUse::Only, other.Handle)
{
}
LinkedListNode::LinkedListNode(LinkedListNode&& other)
: LinkedListNode(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
LinkedListNode::~LinkedListNode()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
LinkedListNode& LinkedListNode::operator=(const LinkedListNode& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
LinkedListNode& LinkedListNode::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
LinkedListNode& LinkedListNode::operator=(LinkedListNode&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool LinkedListNode::operator==(const LinkedListNode& other) const
{
return Handle == other.Handle;
}
bool LinkedListNode::operator!=(const LinkedListNode& other) const
{
return Handle != other.Handle;
}
LinkedListNode::LinkedListNode(System::String value)
: System::Object(nullptr)
{
auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
System::String LinkedListNode::GetValue()
{
auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::String(Plugin::InternalUse::Only, returnValue);
}
void LinkedListNode::SetValue(System::String value)
{
Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(Handle, value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
}
}
namespace System
{
namespace Runtime
{
namespace CompilerServices
{
StrongBox::StrongBox(std::nullptr_t n)
: StrongBox(Plugin::InternalUse::Only, 0)
{
}
StrongBox::StrongBox(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
StrongBox::StrongBox(const StrongBox& other)
: StrongBox(Plugin::InternalUse::Only, other.Handle)
{
}
StrongBox::StrongBox(StrongBox&& other)
: StrongBox(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
StrongBox::~StrongBox()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
StrongBox& StrongBox::operator=(const StrongBox& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
StrongBox& StrongBox::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
StrongBox& StrongBox::operator=(StrongBox&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool StrongBox::operator==(const StrongBox& other) const
{
return Handle == other.Handle;
}
bool StrongBox::operator!=(const StrongBox& other) const
{
return Handle != other.Handle;
}
StrongBox::StrongBox(System::String value)
: System::Object(nullptr)
{
auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
System::String StrongBox::GetValue()
{
auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::String(Plugin::InternalUse::Only, returnValue);
}
void StrongBox::SetValue(System::String value)
{
Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(Handle, value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
}
}
namespace System
{
namespace Collections
{
namespace ObjectModel
{
Collection::Collection(std::nullptr_t n)
: Collection(Plugin::InternalUse::Only, 0)
{
}
Collection::Collection(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Collection::Collection(const Collection& other)
: Collection(Plugin::InternalUse::Only, other.Handle)
{
}
Collection::Collection(Collection&& other)
: Collection(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Collection::~Collection()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Collection& Collection::operator=(const Collection& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Collection& Collection::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Collection& Collection::operator=(Collection&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Collection::operator==(const Collection& other) const
{
return Handle == other.Handle;
}
bool Collection::operator!=(const Collection& other) const
{
return Handle != other.Handle;
}
}
}
}
namespace System
{
namespace Collections
{
namespace ObjectModel
{
KeyedCollection::KeyedCollection(std::nullptr_t n)
: KeyedCollection(Plugin::InternalUse::Only, 0)
{
}
KeyedCollection::KeyedCollection(Plugin::InternalUse iu, int32_t handle)
: System::Collections::ObjectModel::Collection(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
KeyedCollection::KeyedCollection(const KeyedCollection& other)
: KeyedCollection(Plugin::InternalUse::Only, other.Handle)
{
}
KeyedCollection::KeyedCollection(KeyedCollection&& other)
: KeyedCollection(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
KeyedCollection::~KeyedCollection()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
KeyedCollection& KeyedCollection::operator=(const KeyedCollection& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
KeyedCollection& KeyedCollection::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
KeyedCollection& KeyedCollection::operator=(KeyedCollection&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool KeyedCollection::operator==(const KeyedCollection& other) const
{
return Handle == other.Handle;
}
bool KeyedCollection::operator!=(const KeyedCollection& other) const
{
return Handle != other.Handle;
}
}
}
}
namespace System
{
Exception::Exception(std::nullptr_t n)
: Exception(Plugin::InternalUse::Only, 0)
{
}
Exception::Exception(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Exception::Exception(const Exception& other)
: Exception(Plugin::InternalUse::Only, other.Handle)
{
}
Exception::Exception(Exception&& other)
: Exception(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Exception::~Exception()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Exception& Exception::operator=(const Exception& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Exception& Exception::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Exception& Exception::operator=(Exception&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Exception::operator==(const Exception& other) const
{
return Handle == other.Handle;
}
bool Exception::operator!=(const Exception& other) const
{
return Handle != other.Handle;
}
Exception::Exception(System::String message)
: System::Object(nullptr)
{
auto returnValue = Plugin::SystemExceptionConstructorSystemString(message.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
}
namespace System
{
SystemException::SystemException(std::nullptr_t n)
: SystemException(Plugin::InternalUse::Only, 0)
{
}
SystemException::SystemException(Plugin::InternalUse iu, int32_t handle)
: System::Exception(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
SystemException::SystemException(const SystemException& other)
: SystemException(Plugin::InternalUse::Only, other.Handle)
{
}
SystemException::SystemException(SystemException&& other)
: SystemException(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
SystemException::~SystemException()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
SystemException& SystemException::operator=(const SystemException& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
SystemException& SystemException::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
SystemException& SystemException::operator=(SystemException&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool SystemException::operator==(const SystemException& other) const
{
return Handle == other.Handle;
}
bool SystemException::operator!=(const SystemException& other) const
{
return Handle != other.Handle;
}
}
namespace System
{
NullReferenceException::NullReferenceException(std::nullptr_t n)
: NullReferenceException(Plugin::InternalUse::Only, 0)
{
}
NullReferenceException::NullReferenceException(Plugin::InternalUse iu, int32_t handle)
: System::SystemException(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
NullReferenceException::NullReferenceException(const NullReferenceException& other)
: NullReferenceException(Plugin::InternalUse::Only, other.Handle)
{
}
NullReferenceException::NullReferenceException(NullReferenceException&& other)
: NullReferenceException(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
NullReferenceException::~NullReferenceException()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
NullReferenceException& NullReferenceException::operator=(const NullReferenceException& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
NullReferenceException& NullReferenceException::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
NullReferenceException& NullReferenceException::operator=(NullReferenceException&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool NullReferenceException::operator==(const NullReferenceException& other) const
{
return Handle == other.Handle;
}
bool NullReferenceException::operator!=(const NullReferenceException& other) const
{
return Handle != other.Handle;
}
}
namespace UnityEngine
{
Resolution::Resolution()
{
}
int32_t Resolution::GetWidth()
{
auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(this);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Resolution::SetWidth(int32_t value)
{
Plugin::UnityEngineResolutionPropertySetWidth(this, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
int32_t Resolution::GetHeight()
{
auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(this);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Resolution::SetHeight(int32_t value)
{
Plugin::UnityEngineResolutionPropertySetHeight(this, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
int32_t Resolution::GetRefreshRate()
{
auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(this);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Resolution::SetRefreshRate(int32_t value)
{
Plugin::UnityEngineResolutionPropertySetRefreshRate(this, value);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace UnityEngine
{
Screen::Screen(std::nullptr_t n)
: Screen(Plugin::InternalUse::Only, 0)
{
}
Screen::Screen(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Screen::Screen(const Screen& other)
: Screen(Plugin::InternalUse::Only, other.Handle)
{
}
Screen::Screen(Screen&& other)
: Screen(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Screen::~Screen()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Screen& Screen::operator=(const Screen& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Screen& Screen::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Screen& Screen::operator=(Screen&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Screen::operator==(const Screen& other) const
{
return Handle == other.Handle;
}
bool Screen::operator!=(const Screen& other) const
{
return Handle != other.Handle;
}
System::Array1 Screen::GetResolutions()
{
auto returnValue = Plugin::UnityEngineScreenPropertyGetResolutions();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::Array1(Plugin::InternalUse::Only, returnValue);
}
}
namespace UnityEngine
{
Ray::Ray()
{
}
Ray::Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction)
{
auto returnValue = Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(origin, direction);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
*this = returnValue;
}
}
namespace UnityEngine
{
Physics::Physics(std::nullptr_t n)
: Physics(Plugin::InternalUse::Only, 0)
{
}
Physics::Physics(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Physics::Physics(const Physics& other)
: Physics(Plugin::InternalUse::Only, other.Handle)
{
}
Physics::Physics(Physics&& other)
: Physics(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Physics::~Physics()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Physics& Physics::operator=(const Physics& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Physics& Physics::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Physics& Physics::operator=(Physics&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Physics::operator==(const Physics& other) const
{
return Handle == other.Handle;
}
bool Physics::operator!=(const Physics& other) const
{
return Handle != other.Handle;
}
int32_t Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1 results)
{
auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ray, results.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
System::Array1 Physics::RaycastAll(UnityEngine::Ray& ray)
{
auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ray);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::Array1(Plugin::InternalUse::Only, returnValue);
}
}
namespace UnityEngine
{
Color::Color()
{
}
}
namespace UnityEngine
{
GradientColorKey::GradientColorKey()
{
}
}
namespace UnityEngine
{
Gradient::Gradient(std::nullptr_t n)
: Gradient(Plugin::InternalUse::Only, 0)
{
}
Gradient::Gradient(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Gradient::Gradient(const Gradient& other)
: Gradient(Plugin::InternalUse::Only, other.Handle)
{
}
Gradient::Gradient(Gradient&& other)
: Gradient(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Gradient::~Gradient()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Gradient& Gradient::operator=(const Gradient& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Gradient& Gradient::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Gradient& Gradient::operator=(Gradient&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Gradient::operator==(const Gradient& other) const
{
return Handle == other.Handle;
}
bool Gradient::operator!=(const Gradient& other) const
{
return Handle != other.Handle;
}
Gradient::Gradient()
: System::Object(nullptr)
{
auto returnValue = Plugin::UnityEngineGradientConstructor();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
System::Array1 Gradient::GetColorKeys()
{
auto returnValue = Plugin::UnityEngineGradientPropertyGetColorKeys(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::Array1(Plugin::InternalUse::Only, returnValue);
}
void Gradient::SetColorKeys(System::Array1 value)
{
Plugin::UnityEngineGradientPropertySetColorKeys(Handle, value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace System
{
AppDomainSetup::AppDomainSetup(std::nullptr_t n)
: AppDomainSetup(Plugin::InternalUse::Only, 0)
{
}
AppDomainSetup::AppDomainSetup(Plugin::InternalUse iu, int32_t handle)
: System::Object(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
AppDomainSetup::AppDomainSetup(const AppDomainSetup& other)
: AppDomainSetup(Plugin::InternalUse::Only, other.Handle)
{
}
AppDomainSetup::AppDomainSetup(AppDomainSetup&& other)
: AppDomainSetup(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
AppDomainSetup::~AppDomainSetup()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
AppDomainSetup& AppDomainSetup::operator=(const AppDomainSetup& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
AppDomainSetup& AppDomainSetup::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
AppDomainSetup& AppDomainSetup::operator=(AppDomainSetup&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool AppDomainSetup::operator==(const AppDomainSetup& other) const
{
return Handle == other.Handle;
}
bool AppDomainSetup::operator!=(const AppDomainSetup& other) const
{
return Handle != other.Handle;
}
AppDomainSetup::AppDomainSetup()
: System::Object(nullptr)
{
auto returnValue = Plugin::SystemAppDomainSetupConstructor();
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
System::AppDomainInitializer AppDomainSetup::GetAppDomainInitializer()
{
auto returnValue = Plugin::SystemAppDomainSetupPropertyGetAppDomainInitializer(Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return System::AppDomainInitializer(Plugin::InternalUse::Only, returnValue);
}
void AppDomainSetup::SetAppDomainInitializer(System::AppDomainInitializer value)
{
Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer(Handle, value.Handle);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace MyGame
{
namespace MonoBehaviours
{
TestScript::TestScript(std::nullptr_t n)
: TestScript(Plugin::InternalUse::Only, 0)
{
}
TestScript::TestScript(Plugin::InternalUse iu, int32_t handle)
: UnityEngine::MonoBehaviour(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
TestScript::TestScript(const TestScript& other)
: TestScript(Plugin::InternalUse::Only, other.Handle)
{
}
TestScript::TestScript(TestScript&& other)
: TestScript(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
TestScript::~TestScript()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
TestScript& TestScript::operator=(const TestScript& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
TestScript& TestScript::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
TestScript& TestScript::operator=(TestScript&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool TestScript::operator==(const TestScript& other) const
{
return Handle == other.Handle;
}
bool TestScript::operator!=(const TestScript& other) const
{
return Handle != other.Handle;
}
}
}
namespace System
{
Array1::Array1(std::nullptr_t n)
: Array1(Plugin::InternalUse::Only, 0)
{
}
Array1::Array1(Plugin::InternalUse iu, int32_t handle)
: System::Array(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Array1::Array1(const Array1& other)
: Array1(Plugin::InternalUse::Only, other.Handle)
{
}
Array1::Array1(Array1&& other)
: Array1(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Array1::~Array1()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Array1& Array1::operator=(const Array1& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Array1& Array1::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Array1& Array1::operator=(Array1&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Array1::operator==(const Array1& other) const
{
return Handle == other.Handle;
}
bool Array1::operator!=(const Array1& other) const
{
return Handle != other.Handle;
}
Array1::Array1(int32_t length0)
: System::Array(nullptr)
{
auto returnValue = Plugin::SystemInt32Array1Constructor1(length0);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
int32_t Array1::GetLength()
{
return Array::GetLength();
}
int32_t Array1::GetRank()
{
return Array::GetRank();
}
int32_t Array1::GetItem(int32_t index0)
{
auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, index0);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Array1::SetItem(int32_t index0, int32_t item)
{
Plugin::SystemInt32Array1SetItem1(Handle, index0, item);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace System
{
Array1::Array1(std::nullptr_t n)
: Array1(Plugin::InternalUse::Only, 0)
{
}
Array1::Array1(Plugin::InternalUse iu, int32_t handle)
: System::Array(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Array1::Array1(const Array1& other)
: Array1(Plugin::InternalUse::Only, other.Handle)
{
}
Array1::Array1(Array1&& other)
: Array1(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Array1::~Array1()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Array1& Array1::operator=(const Array1& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Array1& Array1::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Array1& Array1::operator=(Array1&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Array1::operator==(const Array1& other) const
{
return Handle == other.Handle;
}
bool Array1::operator!=(const Array1& other) const
{
return Handle != other.Handle;
}
Array1::Array1(int32_t length0)
: System::Array(nullptr)
{
auto returnValue = Plugin::SystemSingleArray1Constructor1(length0);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
int32_t Array1::GetLength()
{
return Array::GetLength();
}
int32_t Array1::GetRank()
{
return Array::GetRank();
}
float Array1::GetItem(int32_t index0)
{
auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, index0);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
void Array1::SetItem(int32_t index0, float item)
{
Plugin::SystemSingleArray1SetItem1(Handle, index0, item);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
}
}
namespace System
{
Array2::Array2(std::nullptr_t n)
: Array2(Plugin::InternalUse::Only, 0)
{
}
Array2::Array2(Plugin::InternalUse iu, int32_t handle)
: System::Array(iu, handle)
{
if (handle)
{
Plugin::ReferenceManagedClass(handle);
}
}
Array2::Array2(const Array2& other)
: Array2(Plugin::InternalUse::Only, other.Handle)
{
}
Array2::Array2(Array2&& other)
: Array2(Plugin::InternalUse::Only, other.Handle)
{
other.Handle = 0;
}
Array2::~Array2()
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
}
Array2& Array2::operator=(const Array2& other)
{
if (this->Handle != other.Handle)
{
if (this->Handle)
{
Plugin::DereferenceManagedClass(this->Handle);
}
this->Handle = other.Handle;
if (this->Handle)
{
Plugin::ReferenceManagedClass(this->Handle);
}
}
return *this;
}
Array2& Array2::operator=(std::nullptr_t other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
Handle = 0;
}
return *this;
}
Array2& Array2::operator=(Array2&& other)
{
if (Handle)
{
Plugin::DereferenceManagedClass(Handle);
}
Handle = other.Handle;
other.Handle = 0;
return *this;
}
bool Array2::operator==(const Array2& other) const
{
return Handle == other.Handle;
}
bool Array2::operator!=(const Array2& other) const
{
return Handle != other.Handle;
}
Array2::Array2(int32_t length0, int32_t length1)
: System::Array(nullptr)
{
auto returnValue = Plugin::SystemSingleArray2Constructor2(length0, length1);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
Handle = returnValue;
if (returnValue)
{
Plugin::ReferenceManagedClass(returnValue);
}
}
int32_t Array2::GetLength()
{
return Array::GetLength();
}
int32_t Array2::GetLength(int32_t dimension)
{
auto returnValue = Plugin::SystemSingleArray2GetLength2(Handle, dimension);
if (Plugin::unhandledCsharpException)
{
System::Exception* ex = Plugin::unhandledCsharpException;
Plugin::unhandledCsharpException = nullptr;
ex->ThrowReferenceToThis();
delete ex;
}
return returnValue;
}
int32_t Array2::GetRank()
{
return Array::GetRank();
}
float Array2