From a04c1904b5eeffe46f993678e6b9ba88f697729d Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 3 Feb 2018 09:56:29 -0800 Subject: [PATCH 01/41] Make value types fit into the type hierarchy better - Managed structs no longer derive from ValueType - Enums are now structs with const static fields for their enumerators - Primitives are now structs in System and in all APIs - Boxing is now available for all target reference types via explicit conversion operators Use primitive types (e.g. int32_t) in all bindings functions instead of structs (e.g. System::Int32) Upgrade to Unity 2017.3 Update README --- README.md | 2 +- Unity/Assets/NativeScript/Bindings.cs | 1639 +- .../NativeScript/Editor/GenerateBindings.cs | 1006 +- Unity/Assets/NativeScriptTypes.json | 496 +- Unity/CppSource/Game/Game.cpp | 2 +- Unity/CppSource/NativeScript/Bindings.cpp | 21725 +++++++++------- Unity/CppSource/NativeScript/Bindings.h | 4797 ++-- Unity/ProjectSettings/ProjectVersion.txt | 2 +- Unity/ProjectSettings/UnityAdsSettings.asset | Bin 4116 -> 0 bytes 9 files changed, 16556 insertions(+), 13113 deletions(-) delete mode 100644 Unity/ProjectSettings/UnityAdsSettings.asset diff --git a/README.md b/README.md index ff70cd5..3ed4061 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ C++ is the standard language for video games as well as many other fields. By pr * Arrays (single- and multi-dimensional) * Delegates * Events - * Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`) + * Boxing and unboxing (e.g. casting `int` to `object` and visa versa) * Implementing C# interfaces with C++ classes * Deriving from C# classes with C++ classes * Default parameters diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 825944f..86a7bf3 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -315,6 +315,7 @@ delegate void InitDelegate( IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ int maxManagedObjects, + IntPtr systemIComparableMethodCompareToSystemObject, IntPtr systemIDisposableMethodDispose, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3PropertyGetMagnitude, @@ -336,6 +337,7 @@ delegate void InitDelegate( IntPtr boxGradientColorKey, IntPtr unboxGradientColorKey, IntPtr releaseUnityEngineResolution, + IntPtr unityEngineResolutionConstructor, IntPtr unityEngineResolutionPropertyGetWidth, IntPtr unityEngineResolutionPropertySetWidth, IntPtr unityEngineResolutionPropertyGetHeight, @@ -352,18 +354,6 @@ delegate void InitDelegate( IntPtr unboxRaycastHit, IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, IntPtr systemCollectionsIEnumeratorMethodMoveNext, - IntPtr systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator, IntPtr releaseUnityEnginePlayablesPlayableGraph, IntPtr boxPlayableGraph, IntPtr unboxPlayableGraph, @@ -404,16 +394,6 @@ delegate void InitDelegate( IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue, IntPtr boxKeyValuePairSystemString_SystemDouble, IntPtr unboxKeyValuePairSystemString_SystemDouble, - IntPtr systemCollectionsGenericListSystemStringConstructor, - IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, - IntPtr systemCollectionsGenericListSystemStringPropertySetItem, - IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, - IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, - IntPtr systemCollectionsGenericListSystemInt32Constructor, - IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, - IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, - IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, - IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, IntPtr systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue, @@ -466,6 +446,8 @@ delegate void InitDelegate( IntPtr releaseUnityEnginePlayablesPlayableHandle, IntPtr boxPlayableHandle, IntPtr unboxPlayableHandle, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString, IntPtr boxInteractionSourcePositionAccuracy, @@ -476,6 +458,28 @@ delegate void InitDelegate( IntPtr unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode, IntPtr boxInteractionSourcePose, IntPtr unboxInteractionSourcePose, + IntPtr systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator, + IntPtr systemCollectionsGenericListSystemStringConstructor, + IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, + IntPtr systemCollectionsGenericListSystemStringPropertySetItem, + IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, + IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, + IntPtr systemCollectionsGenericListSystemInt32Constructor, + IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, + IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, + IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, + IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -819,6 +823,7 @@ static extern void Init( IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ int maxManagedObjects, + IntPtr systemIComparableMethodCompareToSystemObject, IntPtr systemIDisposableMethodDispose, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3PropertyGetMagnitude, @@ -840,6 +845,7 @@ static extern void Init( IntPtr boxGradientColorKey, IntPtr unboxGradientColorKey, IntPtr releaseUnityEngineResolution, + IntPtr unityEngineResolutionConstructor, IntPtr unityEngineResolutionPropertyGetWidth, IntPtr unityEngineResolutionPropertySetWidth, IntPtr unityEngineResolutionPropertyGetHeight, @@ -856,18 +862,6 @@ static extern void Init( IntPtr unboxRaycastHit, IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, IntPtr systemCollectionsIEnumeratorMethodMoveNext, - IntPtr systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator, IntPtr releaseUnityEnginePlayablesPlayableGraph, IntPtr boxPlayableGraph, IntPtr unboxPlayableGraph, @@ -908,16 +902,6 @@ static extern void Init( IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue, IntPtr boxKeyValuePairSystemString_SystemDouble, IntPtr unboxKeyValuePairSystemString_SystemDouble, - IntPtr systemCollectionsGenericListSystemStringConstructor, - IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, - IntPtr systemCollectionsGenericListSystemStringPropertySetItem, - IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, - IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, - IntPtr systemCollectionsGenericListSystemInt32Constructor, - IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, - IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, - IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, - IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, IntPtr systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue, @@ -970,6 +954,8 @@ static extern void Init( IntPtr releaseUnityEnginePlayablesPlayableHandle, IntPtr boxPlayableHandle, IntPtr unboxPlayableHandle, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString, IntPtr boxInteractionSourcePositionAccuracy, @@ -980,6 +966,28 @@ static extern void Init( IntPtr unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode, IntPtr boxInteractionSourcePose, IntPtr unboxInteractionSourcePose, + IntPtr systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent, + IntPtr systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator, + IntPtr systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator, + IntPtr systemCollectionsGenericListSystemStringConstructor, + IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, + IntPtr systemCollectionsGenericListSystemStringPropertySetItem, + IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, + IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, + IntPtr systemCollectionsGenericListSystemInt32Constructor, + IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, + IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, + IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, + IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -1231,6 +1239,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int EnumerableGetEnumeratorDelegate(int handle); /*BEGIN DELEGATE TYPES*/ + delegate int SystemIComparableMethodCompareToSystemObjectDelegate(int thisHandle, int objHandle); delegate void SystemIDisposableMethodDisposeDelegate(int thisHandle); delegate UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(float x, float y, float z); delegate float UnityEngineVector3PropertyGetMagnitudeDelegate(ref UnityEngine.Vector3 thiz); @@ -1252,6 +1261,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int BoxGradientColorKeyDelegate(ref UnityEngine.GradientColorKey val); delegate UnityEngine.GradientColorKey UnboxGradientColorKeyDelegate(int valHandle); delegate void ReleaseUnityEngineResolutionDelegate(int handle); + delegate int UnityEngineResolutionConstructorDelegate(); delegate int UnityEngineResolutionPropertyGetWidthDelegate(int thisHandle); delegate void UnityEngineResolutionPropertySetWidthDelegate(int thisHandle, int value); delegate int UnityEngineResolutionPropertyGetHeightDelegate(int thisHandle); @@ -1268,18 +1278,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int UnboxRaycastHitDelegate(int valHandle); delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate(int thisHandle); - delegate float SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate(int thisHandle); - delegate UnityEngine.GradientColorKey SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate(int thisHandle); delegate void ReleaseUnityEnginePlayablesPlayableGraphDelegate(int handle); delegate int BoxPlayableGraphDelegate(int valHandle); delegate int UnboxPlayableGraphDelegate(int valHandle); @@ -1320,16 +1318,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate(int thisHandle); delegate int BoxKeyValuePairSystemString_SystemDoubleDelegate(int valHandle); delegate int UnboxKeyValuePairSystemString_SystemDoubleDelegate(int valHandle); - delegate int SystemCollectionsGenericListSystemStringConstructorDelegate(); - delegate int SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(int thisHandle, int index); - delegate void SystemCollectionsGenericListSystemStringPropertySetItemDelegate(int thisHandle, int index, int valueHandle); - delegate void SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate(int thisHandle, int itemHandle); - delegate void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate(int thisHandle, int comparerHandle); - delegate int SystemCollectionsGenericListSystemInt32ConstructorDelegate(); - delegate int SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate(int thisHandle, int index); - delegate void SystemCollectionsGenericListSystemInt32PropertySetItemDelegate(int thisHandle, int index, int value); - delegate void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate(int thisHandle, int item); - delegate void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate(int thisHandle, int comparerHandle); delegate int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate(int valueHandle); delegate int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate(int thisHandle); delegate void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate(int thisHandle, int valueHandle); @@ -1382,6 +1370,8 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate void ReleaseUnityEnginePlayablesPlayableHandleDelegate(int handle); delegate int BoxPlayableHandleDelegate(int valHandle); delegate int UnboxPlayableHandleDelegate(int valHandle); + delegate int SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrentDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumeratorDelegate(int thisHandle); delegate int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate(int eHandle, int nameHandle, int classesHandle); delegate int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate(int eHandle, int nameHandle, int classNameHandle); delegate int BoxInteractionSourcePositionAccuracyDelegate(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy val); @@ -1392,6 +1382,28 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate bool UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate(int thisHandle, out UnityEngine.Quaternion rotation, UnityEngine.XR.WSA.Input.InteractionSourceNode node); delegate int BoxInteractionSourcePoseDelegate(int valHandle); delegate int UnboxInteractionSourcePoseDelegate(int valHandle); + delegate int SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate(int thisHandle); + delegate float SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate(int thisHandle); + delegate UnityEngine.GradientColorKey SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate(int thisHandle); + delegate int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate(int thisHandle); + delegate int SystemCollectionsGenericListSystemStringConstructorDelegate(); + delegate int SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(int thisHandle, int index); + delegate void SystemCollectionsGenericListSystemStringPropertySetItemDelegate(int thisHandle, int index, int valueHandle); + delegate void SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate(int thisHandle, int itemHandle); + delegate void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate(int thisHandle, int comparerHandle); + delegate int SystemCollectionsGenericListSystemInt32ConstructorDelegate(); + delegate int SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate(int thisHandle, int index); + delegate void SystemCollectionsGenericListSystemInt32PropertySetItemDelegate(int thisHandle, int index, int value); + delegate void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate(int thisHandle, int item); + delegate void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate(int thisHandle, int comparerHandle); delegate int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1575,7 +1587,6 @@ ReusableWaitForSecondsRealtime poll long cur = File.GetLastWriteTime(pluginPath).Ticks; if (cur != lastWriteTime) { - Debug.Log("reloading at " + DateTime.Now); lastWriteTime = cur; Reload(); } @@ -1656,6 +1667,7 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new EnumerableGetEnumeratorDelegate(EnumerableGetEnumerator)), /*BEGIN INIT CALL*/ 1000, + Marshal.GetFunctionPointerForDelegate(new SystemIComparableMethodCompareToSystemObjectDelegate(SystemIComparableMethodCompareToSystemObject)), Marshal.GetFunctionPointerForDelegate(new SystemIDisposableMethodDisposeDelegate(SystemIDisposableMethodDispose)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3PropertyGetMagnitudeDelegate(UnityEngineVector3PropertyGetMagnitude)), @@ -1677,6 +1689,7 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new BoxGradientColorKeyDelegate(BoxGradientColorKey)), Marshal.GetFunctionPointerForDelegate(new UnboxGradientColorKeyDelegate(UnboxGradientColorKey)), Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineResolutionDelegate(ReleaseUnityEngineResolution)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionConstructorDelegate(UnityEngineResolutionConstructor)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetWidthDelegate(UnityEngineResolutionPropertyGetWidth)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertySetWidthDelegate(UnityEngineResolutionPropertySetWidth)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetHeightDelegate(UnityEngineResolutionPropertyGetHeight)), @@ -1693,18 +1706,6 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new UnboxRaycastHitDelegate(UnboxRaycastHit)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(SystemCollectionsIEnumeratorPropertyGetCurrent)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorMethodMoveNextDelegate(SystemCollectionsIEnumeratorMethodMoveNext)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)), Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEnginePlayablesPlayableGraphDelegate(ReleaseUnityEnginePlayablesPlayableGraph)), Marshal.GetFunctionPointerForDelegate(new BoxPlayableGraphDelegate(BoxPlayableGraph)), Marshal.GetFunctionPointerForDelegate(new UnboxPlayableGraphDelegate(UnboxPlayableGraph)), @@ -1745,16 +1746,6 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)), Marshal.GetFunctionPointerForDelegate(new BoxKeyValuePairSystemString_SystemDoubleDelegate(BoxKeyValuePairSystemString_SystemDouble)), Marshal.GetFunctionPointerForDelegate(new UnboxKeyValuePairSystemString_SystemDoubleDelegate(UnboxKeyValuePairSystemString_SystemDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringConstructorDelegate(SystemCollectionsGenericListSystemStringConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(SystemCollectionsGenericListSystemStringPropertyGetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertySetItemDelegate(SystemCollectionsGenericListSystemStringPropertySetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate(SystemCollectionsGenericListSystemStringMethodAddSystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32ConstructorDelegate(SystemCollectionsGenericListSystemInt32Constructor)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate(SystemCollectionsGenericListSystemInt32PropertyGetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32PropertySetItemDelegate(SystemCollectionsGenericListSystemInt32PropertySetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue)), @@ -1807,6 +1798,8 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEnginePlayablesPlayableHandleDelegate(ReleaseUnityEnginePlayablesPlayableHandle)), Marshal.GetFunctionPointerForDelegate(new BoxPlayableHandleDelegate(BoxPlayableHandle)), Marshal.GetFunctionPointerForDelegate(new UnboxPlayableHandleDelegate(UnboxPlayableHandle)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator)), Marshal.GetFunctionPointerForDelegate(new UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)), Marshal.GetFunctionPointerForDelegate(new BoxInteractionSourcePositionAccuracyDelegate(BoxInteractionSourcePositionAccuracy)), @@ -1817,6 +1810,28 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate(UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)), Marshal.GetFunctionPointerForDelegate(new BoxInteractionSourcePoseDelegate(BoxInteractionSourcePose)), Marshal.GetFunctionPointerForDelegate(new UnboxInteractionSourcePoseDelegate(UnboxInteractionSourcePose)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringConstructorDelegate(SystemCollectionsGenericListSystemStringConstructor)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(SystemCollectionsGenericListSystemStringPropertyGetItem)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertySetItemDelegate(SystemCollectionsGenericListSystemStringPropertySetItem)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate(SystemCollectionsGenericListSystemStringMethodAddSystemString)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32ConstructorDelegate(SystemCollectionsGenericListSystemInt32Constructor)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate(SystemCollectionsGenericListSystemInt32PropertyGetItem)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32PropertySetItemDelegate(SystemCollectionsGenericListSystemInt32PropertySetItem)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)), Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -2821,6 +2836,30 @@ public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentRe /*END BASE TYPES*/ /*BEGIN FUNCTIONS*/ + [MonoPInvokeCallback(typeof(SystemIComparableMethodCompareToSystemObjectDelegate))] + static int SystemIComparableMethodCompareToSystemObject(int thisHandle, int objHandle) + { + try + { + var thiz = (System.IComparable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var obj = NativeScript.Bindings.ObjectStore.Get(objHandle); + var returnValue = thiz.CompareTo(obj); + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + [MonoPInvokeCallback(typeof(SystemIDisposableMethodDisposeDelegate))] static void SystemIDisposableMethodDispose(int thisHandle) { @@ -3283,6 +3322,28 @@ static void ReleaseUnityEngineResolution(int handle) } } + [MonoPInvokeCallback(typeof(UnityEngineResolutionConstructorDelegate))] + static int UnityEngineResolutionConstructor() + { + try + { + var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Resolution()); + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetWidthDelegate))] static int UnityEngineResolutionPropertyGetWidth(int thisHandle) { @@ -3642,36 +3703,35 @@ static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableGraphDelegate))] + static void ReleaseUnityEnginePlayablesPlayableGraph(int handle) { try { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + if (handle != 0) + { + NativeScript.Bindings.StructStore.Remove(handle); + } } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(BoxPlayableGraphDelegate))] + static int BoxPlayableGraph(int valHandle) { try { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; + var val = (UnityEngine.Playables.PlayableGraph)NativeScript.Bindings.StructStore.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -3688,39 +3748,61 @@ static int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(int } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate))] - static float SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxPlayableGraphDelegate))] + static int UnboxPlayableGraph(int valHandle) { try { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Playables.PlayableGraph)val); return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineAnimationsAnimationMixerPlayableDelegate))] + static void ReleaseUnityEngineAnimationsAnimationMixerPlayable(int handle) { try { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.StructStore.Store(returnValue); - } - catch (System.NullReferenceException ex) + if (handle != 0) + { + NativeScript.Bindings.StructStore.Remove(handle); + } + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + } + + [MonoPInvokeCallback(typeof(UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBooleanDelegate))] + static int UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(int graphHandle, int inputCount, bool normalizeWeights) + { + try + { + var graph = (UnityEngine.Playables.PlayableGraph)NativeScript.Bindings.StructStore.Get(graphHandle); + var returnValue = UnityEngine.Animations.AnimationMixerPlayable.Create(graph, inputCount, normalizeWeights); + return NativeScript.Bindings.StructStore.Store(returnValue); + } + catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); @@ -3734,37 +3816,37 @@ static int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCu } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate))] - static UnityEngine.GradientColorKey SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(BoxAnimationMixerPlayableDelegate))] + static int BoxAnimationMixerPlayable(int valHandle) { try { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; + var val = (UnityEngine.Animations.AnimationMixerPlayable)NativeScript.Bindings.StructStore.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxAnimationMixerPlayableDelegate))] + static int UnboxAnimationMixerPlayable(int valHandle) { try { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.StructStore.Store(returnValue); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Animations.AnimationMixerPlayable)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3780,14 +3862,13 @@ static int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCu } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(int thisHandle) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] + static int SystemDiagnosticsStopwatchConstructor() { try { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3803,60 +3884,76 @@ static int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(in } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator(int thisHandle) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] + static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) { try { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.ElapsedMilliseconds; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(long); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(long); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator(int thisHandle) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] + static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) { try { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.Start(); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator(int thisHandle) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodResetDelegate))] + static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) { try { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.Reset(); + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + } + + [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorDelegate))] + static int UnityEngineGameObjectConstructor() + { + try + { + var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject()); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3872,14 +3969,14 @@ static int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnum } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorSystemStringDelegate))] + static int UnityEngineGameObjectConstructorSystemString(int nameHandle) { try { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject(name)); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3895,13 +3992,13 @@ static int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodG } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectPropertyGetTransformDelegate))] + static int UnityEngineGameObjectPropertyGetTransform(int thisHandle) { try { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); + var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.transform; return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) @@ -3918,36 +4015,37 @@ static int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnum } } - [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableGraphDelegate))] - static void ReleaseUnityEnginePlayablesPlayableGraph(int handle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate))] + static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(int thisHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.AddComponent(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxPlayableGraphDelegate))] - static int BoxPlayableGraph(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate))] + static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(int thisHandle) { try { - var val = (UnityEngine.Playables.PlayableGraph)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.AddComponent(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -3963,14 +4061,13 @@ static int BoxPlayableGraph(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxPlayableGraphDelegate))] - static int UnboxPlayableGraph(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] + static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Playables.PlayableGraph)val); - return returnValue; + var returnValue = UnityEngine.GameObject.CreatePrimitive(type); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -3986,15 +4083,13 @@ static int UnboxPlayableGraph(int valHandle) } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineAnimationsAnimationMixerPlayableDelegate))] - static void ReleaseUnityEngineAnimationsAnimationMixerPlayable(int handle) + [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] + static void UnityEngineDebugMethodLogSystemObject(int messageHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + var message = NativeScript.Bindings.ObjectStore.Get(messageHandle); + UnityEngine.Debug.Log(message); } catch (System.NullReferenceException ex) { @@ -4008,189 +4103,188 @@ static void ReleaseUnityEngineAnimationsAnimationMixerPlayable(int handle) } } - [MonoPInvokeCallback(typeof(UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBooleanDelegate))] - static int UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(int graphHandle, int inputCount, bool normalizeWeights) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate))] + static bool UnityEngineAssertionsAssertFieldGetRaiseExceptions() { try { - var graph = (UnityEngine.Playables.PlayableGraph)NativeScript.Bindings.StructStore.Get(graphHandle); - var returnValue = UnityEngine.Animations.AnimationMixerPlayable.Create(graph, inputCount, normalizeWeights); - return NativeScript.Bindings.StructStore.Store(returnValue); + var returnValue = UnityEngine.Assertions.Assert.raiseExceptions; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(bool); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(bool); } } - [MonoPInvokeCallback(typeof(BoxAnimationMixerPlayableDelegate))] - static int BoxAnimationMixerPlayable(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate))] + static void UnityEngineAssertionsAssertFieldSetRaiseExceptions(bool value) { try { - var val = (UnityEngine.Animations.AnimationMixerPlayable)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + UnityEngine.Assertions.Assert.raiseExceptions = value; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnboxAnimationMixerPlayableDelegate))] - static int UnboxAnimationMixerPlayable(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate))] + static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(int expectedHandle, int actualHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Animations.AnimationMixerPlayable)val); - return returnValue; + var expected = (string)NativeScript.Bindings.ObjectStore.Get(expectedHandle); + var actual = (string)NativeScript.Bindings.ObjectStore.Get(actualHandle); + UnityEngine.Assertions.Assert.AreEqual(expected, actual); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] - static int SystemDiagnosticsStopwatchConstructor() + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate))] + static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(int expectedHandle, int actualHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); - return returnValue; + var expected = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(expectedHandle); + var actual = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(actualHandle); + UnityEngine.Assertions.Assert.AreEqual(expected, actual); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] - static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] + static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.ElapsedMilliseconds; - return returnValue; + var thiz = (UnityEngine.MonoBehaviour)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.transform; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] - static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate))] + static void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(ref int bufferLength, ref int numBuffers) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Start(); + UnityEngine.AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + bufferLength = default(int); + numBuffers = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + bufferLength = default(int); + numBuffers = default(int); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodResetDelegate))] - static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByteDelegate))] + static void UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(int hostId, ref int addressHandle, ref int port, ref byte error) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Reset(); + var address = (string)NativeScript.Bindings.ObjectStore.Get(addressHandle); + UnityEngine.Networking.NetworkTransport.GetBroadcastConnectionInfo(hostId, out address, out port, out error); + int addressHandleNew = NativeScript.Bindings.ObjectStore.GetHandle(address); + addressHandle = addressHandleNew; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + addressHandle = default(int); + port = default(int); + error = default(byte); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + addressHandle = default(int); + port = default(int); + error = default(byte); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorDelegate))] - static int UnityEngineGameObjectConstructor() + [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodInitDelegate))] + static void UnityEngineNetworkingNetworkTransportMethodInit() { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject()); - return returnValue; + UnityEngine.Networking.NetworkTransport.Init(); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorSystemStringDelegate))] - static int UnityEngineGameObjectConstructorSystemString(int nameHandle) + [MonoPInvokeCallback(typeof(BoxQuaternionDelegate))] + static int BoxQuaternion(ref UnityEngine.Quaternion val) { try { - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject(name)); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -4207,82 +4301,77 @@ static int UnityEngineGameObjectConstructorSystemString(int nameHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectPropertyGetTransformDelegate))] - static int UnityEngineGameObjectPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxQuaternionDelegate))] + static UnityEngine.Quaternion UnboxQuaternion(int valHandle) { try { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Quaternion)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Quaternion); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Quaternion); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate))] - static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertyGetItemDelegate))] + static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) { try { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AddComponent(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = thiz[row, row]; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(float); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate))] - static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertySetItemDelegate))] + static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column, float value) { try { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AddComponent(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + thiz[row, column] = column; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] - static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) + [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] + static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) { try { - var returnValue = UnityEngine.GameObject.CreatePrimitive(type); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -4298,75 +4387,83 @@ static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(Un } } - [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] - static void UnityEngineDebugMethodLogSystemObject(int messageHandle) + [MonoPInvokeCallback(typeof(UnboxMatrix4x4Delegate))] + static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) { try { - var message = NativeScript.Bindings.ObjectStore.Get(messageHandle); - UnityEngine.Debug.Log(message); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Matrix4x4)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Matrix4x4); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Matrix4x4); } } - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate))] - static bool UnityEngineAssertionsAssertFieldGetRaiseExceptions() + [MonoPInvokeCallback(typeof(BoxQueryTriggerInteractionDelegate))] + static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) { try { - var returnValue = UnityEngine.Assertions.Assert.raiseExceptions; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate))] - static void UnityEngineAssertionsAssertFieldSetRaiseExceptions(bool value) + [MonoPInvokeCallback(typeof(UnboxQueryTriggerInteractionDelegate))] + static UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteraction(int valHandle) { try { - UnityEngine.Assertions.Assert.raiseExceptions = value; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.QueryTriggerInteraction)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.QueryTriggerInteraction); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.QueryTriggerInteraction); } } - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(int expectedHandle, int actualHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate))] + static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int handle) { try { - var expected = (string)NativeScript.Bindings.ObjectStore.Get(expectedHandle); - var actual = (string)NativeScript.Bindings.ObjectStore.Get(actualHandle); - UnityEngine.Assertions.Assert.AreEqual(expected, actual); + if (handle != 0) + { + NativeScript.Bindings.StructStore>.Remove(handle); + } } catch (System.NullReferenceException ex) { @@ -4380,34 +4477,36 @@ static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_Sy } } - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(int expectedHandle, int actualHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] + static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) { try { - var expected = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(expectedHandle); - var actual = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(actualHandle); - UnityEngine.Assertions.Assert.AreEqual(expected, actual); + var key = (string)NativeScript.Bindings.ObjectStore.Get(keyHandle); + var returnValue = NativeScript.Bindings.StructStore>.Store(new System.Collections.Generic.KeyValuePair(key, value)); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] - static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] + static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) { try { - var thiz = (UnityEngine.MonoBehaviour)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; + var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); + var returnValue = thiz.Key; return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) @@ -4424,82 +4523,82 @@ static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate))] - static void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(ref int bufferLength, ref int numBuffers) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] + static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) { try { - UnityEngine.AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); + var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); + var returnValue = thiz.Value; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - bufferLength = default(int); - numBuffers = default(int); + return default(double); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - bufferLength = default(int); - numBuffers = default(int); + return default(double); } } - [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByteDelegate))] - static void UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(int hostId, ref int addressHandle, ref int port, ref byte error) + [MonoPInvokeCallback(typeof(BoxKeyValuePairSystemString_SystemDoubleDelegate))] + static int BoxKeyValuePairSystemString_SystemDouble(int valHandle) { try { - var address = (string)NativeScript.Bindings.ObjectStore.Get(addressHandle); - UnityEngine.Networking.NetworkTransport.GetBroadcastConnectionInfo(hostId, out address, out port, out error); - int addressHandleNew = NativeScript.Bindings.ObjectStore.GetHandle(address); - addressHandle = addressHandleNew; + var val = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - addressHandle = default(int); - port = default(int); - error = default(byte); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - addressHandle = default(int); - port = default(int); - error = default(byte); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodInitDelegate))] - static void UnityEngineNetworkingNetworkTransportMethodInit() + [MonoPInvokeCallback(typeof(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] + static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) { try { - UnityEngine.Networking.NetworkTransport.Init(); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore>.Store((System.Collections.Generic.KeyValuePair)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxQuaternionDelegate))] - static int BoxQuaternion(ref UnityEngine.Quaternion val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] + static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.LinkedListNode(value)); return returnValue; } catch (System.NullReferenceException ex) @@ -4516,77 +4615,81 @@ static int BoxQuaternion(ref UnityEngine.Quaternion val) } } - [MonoPInvokeCallback(typeof(UnboxQuaternionDelegate))] - static UnityEngine.Quaternion UnboxQuaternion(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] + static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Quaternion)val; - return returnValue; + var thiz = (System.Collections.Generic.LinkedListNode)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Value; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Quaternion); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Quaternion); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertyGetItemDelegate))] - static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] + static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) { try { - var returnValue = thiz[row, row]; - return returnValue; + var thiz = (System.Collections.Generic.LinkedListNode)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + thiz.Value = value; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); } } - [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertySetItemDelegate))] - static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column, float value) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] + static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) { try { - thiz[row, column] = column; + var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Runtime.CompilerServices.StrongBox(value)); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] - static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] + static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Value; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -4602,35 +4705,34 @@ static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) } } - [MonoPInvokeCallback(typeof(UnboxMatrix4x4Delegate))] - static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] + static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Matrix4x4)val; - return returnValue; + var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + thiz.Value = value; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Matrix4x4); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Matrix4x4); } } - [MonoPInvokeCallback(typeof(BoxQueryTriggerInteractionDelegate))] - static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) + [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] + static int SystemExceptionConstructorSystemString(int messageHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); return returnValue; } catch (System.NullReferenceException ex) @@ -4647,37 +4749,36 @@ static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) } } - [MonoPInvokeCallback(typeof(UnboxQueryTriggerInteractionDelegate))] - static UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteraction(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] + static int UnityEngineScreenPropertyGetResolutions() { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.QueryTriggerInteraction)val; - return returnValue; + var returnValue = UnityEngine.Screen.resolutions; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.QueryTriggerInteraction); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.QueryTriggerInteraction); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate))] - static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int handle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineRayDelegate))] + static void ReleaseUnityEngineRay(int handle) { try { if (handle != 0) { - NativeScript.Bindings.StructStore>.Remove(handle); + NativeScript.Bindings.StructStore.Remove(handle); } } catch (System.NullReferenceException ex) @@ -4692,13 +4793,12 @@ static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) + [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] + static int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) { try { - var key = (string)NativeScript.Bindings.ObjectStore.Get(keyHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store(new System.Collections.Generic.KeyValuePair(key, value)); + var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Ray(origin, direction)); return returnValue; } catch (System.NullReferenceException ex) @@ -4715,14 +4815,14 @@ static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstruc } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) + [MonoPInvokeCallback(typeof(BoxRayDelegate))] + static int BoxRay(int valHandle) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Key; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var val = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -4738,36 +4838,37 @@ static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleProperty } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] - static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxRayDelegate))] + static int UnboxRay(int valHandle) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Value; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Ray)val); return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxKeyValuePairSystemString_SystemDoubleDelegate))] - static int BoxKeyValuePairSystemString_SystemDouble(int valHandle) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate))] + static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(int rayHandle, int resultsHandle) { try { - var val = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); + var results = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(resultsHandle); + var returnValue = UnityEngine.Physics.RaycastNonAlloc(ray, results); return returnValue; } catch (System.NullReferenceException ex) @@ -4784,13 +4885,35 @@ static int BoxKeyValuePairSystemString_SystemDouble(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] - static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] + static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(int rayHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store((System.Collections.Generic.KeyValuePair)val); + var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); + var returnValue = UnityEngine.Physics.RaycastAll(ray); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + + [MonoPInvokeCallback(typeof(UnityEngineGradientConstructorDelegate))] + static int UnityEngineGradientConstructor() + { + try + { + var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Gradient()); return returnValue; } catch (System.NullReferenceException ex) @@ -4807,13 +4930,14 @@ static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] - static int SystemCollectionsGenericListSystemStringConstructor() + [MonoPInvokeCallback(typeof(UnityEngineGradientPropertyGetColorKeysDelegate))] + static int UnityEngineGradientPropertyGetColorKeys(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); - return returnValue; + var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.colorKeys; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -4829,79 +4953,80 @@ static int SystemCollectionsGenericListSystemStringConstructor() } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(UnityEngineGradientPropertySetColorKeysDelegate))] + static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var value = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(valueHandle); + thiz.colorKeys = value; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainSetupConstructorDelegate))] + static int SystemAppDomainSetupConstructor() { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz[index] = value; + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.AppDomainSetup()); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] - static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate))] + static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); - thiz.Add(item); + var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.AppDomainInitializer; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertySetAppDomainInitializerDelegate))] + static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, int valueHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var comparer = (System.Collections.Generic.IComparer)NativeScript.Bindings.ObjectStore.Get(comparerHandle); - thiz.Sort(comparer); + var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var value = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(valueHandle); + thiz.AppDomainInitializer = value; } catch (System.NullReferenceException ex) { @@ -4915,58 +5040,53 @@ static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsG } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] - static int SystemCollectionsGenericListSystemInt32Constructor() + [MonoPInvokeCallback(typeof(UnityEngineApplicationAddEventOnBeforeRenderDelegate))] + static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); - return returnValue; + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + UnityEngine.Application.onBeforeRender += del; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(UnityEngineApplicationRemoveEventOnBeforeRenderDelegate))] + static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; - return returnValue; + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + UnityEngine.Application.onBeforeRender += del; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) + [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] + static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index] = value; + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; } catch (System.NullReferenceException ex) { @@ -4980,13 +5100,13 @@ static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandl } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] - static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) + [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] + static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Add(item); + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; } catch (System.NullReferenceException ex) { @@ -5000,14 +5120,15 @@ static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int this } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineSceneManagementSceneDelegate))] + static void ReleaseUnityEngineSceneManagementScene(int handle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var comparer = (System.Collections.Generic.IComparer)NativeScript.Bindings.ObjectStore.Get(comparerHandle); - thiz.Sort(comparer); + if (handle != 0) + { + NativeScript.Bindings.StructStore.Remove(handle); + } } catch (System.NullReferenceException ex) { @@ -5021,13 +5142,13 @@ static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGe } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) + [MonoPInvokeCallback(typeof(BoxSceneDelegate))] + static int BoxScene(int valHandle) { try { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.LinkedListNode(value)); + var val = (UnityEngine.SceneManagement.Scene)NativeScript.Bindings.StructStore.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -5044,14 +5165,14 @@ static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemSt } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] + static int UnboxScene(int valHandle) { try { - var thiz = (System.Collections.Generic.LinkedListNode)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Value; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.SceneManagement.Scene)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -5067,58 +5188,58 @@ static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(in } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] - static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] + static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) { try { - var thiz = (System.Collections.Generic.LinkedListNode)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.Value = value; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) + [MonoPInvokeCallback(typeof(UnboxLoadSceneModeDelegate))] + static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandle) { try { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Runtime.CompilerServices.StrongBox(value)); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.SceneManagement.LoadSceneMode)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.SceneManagement.LoadSceneMode); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.SceneManagement.LoadSceneMode); } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(BoxPrimitiveTypeDelegate))] + static int BoxPrimitiveType(UnityEngine.PrimitiveType val) { try { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Value; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -5134,57 +5255,58 @@ static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int t } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] - static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnboxPrimitiveTypeDelegate))] + static UnityEngine.PrimitiveType UnboxPrimitiveType(int valHandle) { try { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.Value = value; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.PrimitiveType)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.PrimitiveType); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.PrimitiveType); } } - [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] - static int SystemExceptionConstructorSystemString(int messageHandle) + [MonoPInvokeCallback(typeof(UnityEngineTimePropertyGetDeltaTimeDelegate))] + static float UnityEngineTimePropertyGetDeltaTime() { try { - var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); + var returnValue = UnityEngine.Time.deltaTime; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(float); } } - [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] - static int UnityEngineScreenPropertyGetResolutions() + [MonoPInvokeCallback(typeof(BoxFileModeDelegate))] + static int BoxFileMode(System.IO.FileMode val) { try { - var returnValue = UnityEngine.Screen.resolutions; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -5200,173 +5322,160 @@ static int UnityEngineScreenPropertyGetResolutions() } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineRayDelegate))] - static void ReleaseUnityEngineRay(int handle) + [MonoPInvokeCallback(typeof(UnboxFileModeDelegate))] + static System.IO.FileMode UnboxFileMode(int valHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (System.IO.FileMode)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(System.IO.FileMode); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(System.IO.FileMode); } } - [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] - static int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemInt32ConstructorDelegate))] + static void SystemCollectionsGenericBaseIComparerSystemInt32Constructor(int cppHandle, ref int handle) { try { - var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Ray(origin, direction)); - return returnValue; + var thiz = new SystemCollectionsGenericBaseIComparerSystemInt32(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } } - [MonoPInvokeCallback(typeof(BoxRayDelegate))] - static int BoxRay(int valHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemInt32Delegate))] + static void ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(int handle) { try { - var val = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnboxRayDelegate))] - static int UnboxRay(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate))] + static void SystemCollectionsGenericBaseIComparerSystemStringConstructor(int cppHandle, ref int handle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Ray)val); - return returnValue; + var thiz = new SystemCollectionsGenericBaseIComparerSystemString(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate))] - static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(int rayHandle, int resultsHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate))] + static void ReleaseSystemCollectionsGenericBaseIComparerSystemString(int handle) { try { - var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); - var results = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(resultsHandle); - var returnValue = UnityEngine.Physics.RaycastNonAlloc(ray, results); - return returnValue; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] - static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(int rayHandle) + [MonoPInvokeCallback(typeof(SystemBaseStringComparerConstructorDelegate))] + static void SystemBaseStringComparerConstructor(int cppHandle, ref int handle) { try { - var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); - var returnValue = UnityEngine.Physics.RaycastAll(ray); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = new SystemBaseStringComparer(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineGradientConstructorDelegate))] - static int UnityEngineGradientConstructor() + [MonoPInvokeCallback(typeof(ReleaseSystemBaseStringComparerDelegate))] + static void ReleaseSystemBaseStringComparer(int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Gradient()); - return returnValue; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineGradientPropertyGetColorKeysDelegate))] - static int UnityEngineGradientPropertyGetColorKeys(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsQueuePropertyGetCountDelegate))] + static int SystemCollectionsQueuePropertyGetCount(int thisHandle) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.colorKeys; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = (System.Collections.Queue)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Count; + return returnValue; } catch (System.NullReferenceException ex) { @@ -5382,80 +5491,75 @@ static int UnityEngineGradientPropertyGetColorKeys(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineGradientPropertySetColorKeysDelegate))] - static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsBaseQueueConstructorDelegate))] + static void SystemCollectionsBaseQueueConstructor(int cppHandle, ref int handle) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.colorKeys = value; + var thiz = new SystemCollectionsBaseQueue(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + handle = default(int); } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupConstructorDelegate))] - static int SystemAppDomainSetupConstructor() + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsBaseQueueDelegate))] + static void ReleaseSystemCollectionsBaseQueue(int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.AppDomainSetup()); - return returnValue; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate))] - static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignBaseIComponentChangeServiceConstructorDelegate))] + static void SystemComponentModelDesignBaseIComponentChangeServiceConstructor(int cppHandle, ref int handle) { try { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AppDomainInitializer; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var thiz = new SystemComponentModelDesignBaseIComponentChangeService(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + handle = default(int); } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertySetAppDomainInitializerDelegate))] - static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignBaseIComponentChangeServiceDelegate))] + static void ReleaseSystemComponentModelDesignBaseIComponentChangeService(int handle) { try { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.AppDomainInitializer = value; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -5469,33 +5573,36 @@ static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, } } - [MonoPInvokeCallback(typeof(UnityEngineApplicationAddEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) + [MonoPInvokeCallback(typeof(SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate))] + static int SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int pathHandle, System.IO.FileMode mode) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; + var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.IO.FileStream(path, mode)); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineApplicationRemoveEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) + [MonoPInvokeCallback(typeof(SystemIOFileStreamMethodWriteByteSystemByteDelegate))] + static void SystemIOFileStreamMethodWriteByteSystemByte(int thisHandle, byte value) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; + var thiz = (System.IO.FileStream)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.WriteByte(value); } catch (System.NullReferenceException ex) { @@ -5509,33 +5616,35 @@ static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) + [MonoPInvokeCallback(typeof(SystemIOBaseFileStreamConstructorSystemString_SystemIOFileModeDelegate))] + static void SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; + var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); + var thiz = new SystemIOBaseFileStream(cppHandle, path, mode); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + handle = default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemIOBaseFileStreamDelegate))] + static void ReleaseSystemIOBaseFileStream(int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -5549,14 +5658,14 @@ static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int del } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineSceneManagementSceneDelegate))] - static void ReleaseUnityEngineSceneManagementScene(int handle) + [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableHandleDelegate))] + static void ReleaseUnityEnginePlayablesPlayableHandle(int handle) { try { if (handle != 0) { - NativeScript.Bindings.StructStore.Remove(handle); + NativeScript.Bindings.StructStore.Remove(handle); } } catch (System.NullReferenceException ex) @@ -5571,12 +5680,12 @@ static void ReleaseUnityEngineSceneManagementScene(int handle) } } - [MonoPInvokeCallback(typeof(BoxSceneDelegate))] - static int BoxScene(int valHandle) + [MonoPInvokeCallback(typeof(BoxPlayableHandleDelegate))] + static int BoxPlayableHandle(int valHandle) { try { - var val = (UnityEngine.SceneManagement.Scene)NativeScript.Bindings.StructStore.Get(valHandle); + var val = (UnityEngine.Playables.PlayableHandle)NativeScript.Bindings.StructStore.Get(valHandle); var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } @@ -5594,13 +5703,13 @@ static int BoxScene(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] - static int UnboxScene(int valHandle) + [MonoPInvokeCallback(typeof(UnboxPlayableHandleDelegate))] + static int UnboxPlayableHandle(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.SceneManagement.Scene)val); + var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Playables.PlayableHandle)val); return returnValue; } catch (System.NullReferenceException ex) @@ -5617,13 +5726,14 @@ static int UnboxScene(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] - static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrentDelegate))] + static int SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -5639,36 +5749,14 @@ static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) } } - [MonoPInvokeCallback(typeof(UnboxLoadSceneModeDelegate))] - static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.LoadSceneMode)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); - } - } - - [MonoPInvokeCallback(typeof(BoxPrimitiveTypeDelegate))] - static int BoxPrimitiveType(UnityEngine.PrimitiveType val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -5684,53 +5772,58 @@ static int BoxPrimitiveType(UnityEngine.PrimitiveType val) } } - [MonoPInvokeCallback(typeof(UnboxPrimitiveTypeDelegate))] - static UnityEngine.PrimitiveType UnboxPrimitiveType(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate))] + static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(int eHandle, int nameHandle, int classesHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.PrimitiveType)val; - return returnValue; + var e = (UnityEngine.Experimental.UIElements.VisualElement)NativeScript.Bindings.ObjectStore.Get(eHandle); + var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); + var classes = (string[])NativeScript.Bindings.ObjectStore.Get(classesHandle); + var returnValue = UnityEngine.Experimental.UIElements.UQueryExtensions.Q(e, name, classes); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.PrimitiveType); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.PrimitiveType); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineTimePropertyGetDeltaTimeDelegate))] - static float UnityEngineTimePropertyGetDeltaTime() + [MonoPInvokeCallback(typeof(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate))] + static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString(int eHandle, int nameHandle, int classNameHandle) { try { - var returnValue = UnityEngine.Time.deltaTime; - return returnValue; + var e = (UnityEngine.Experimental.UIElements.VisualElement)NativeScript.Bindings.ObjectStore.Get(eHandle); + var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); + var className = (string)NativeScript.Bindings.ObjectStore.Get(classNameHandle); + var returnValue = UnityEngine.Experimental.UIElements.UQueryExtensions.Q(e, name, className); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxFileModeDelegate))] - static int BoxFileMode(System.IO.FileMode val) + [MonoPInvokeCallback(typeof(BoxInteractionSourcePositionAccuracyDelegate))] + static int BoxInteractionSourcePositionAccuracy(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy val) { try { @@ -5751,160 +5844,176 @@ static int BoxFileMode(System.IO.FileMode val) } } - [MonoPInvokeCallback(typeof(UnboxFileModeDelegate))] - static System.IO.FileMode UnboxFileMode(int valHandle) + [MonoPInvokeCallback(typeof(UnboxInteractionSourcePositionAccuracyDelegate))] + static UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy UnboxInteractionSourcePositionAccuracy(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (System.IO.FileMode)val; + var returnValue = (UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(System.IO.FileMode); + return default(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(System.IO.FileMode); + return default(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemInt32ConstructorDelegate))] - static void SystemCollectionsGenericBaseIComparerSystemInt32Constructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxInteractionSourceNodeDelegate))] + static int BoxInteractionSourceNode(UnityEngine.XR.WSA.Input.InteractionSourceNode val) { try { - var thiz = new SystemCollectionsGenericBaseIComparerSystemInt32(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemInt32Delegate))] - static void ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(int handle) + [MonoPInvokeCallback(typeof(UnboxInteractionSourceNodeDelegate))] + static UnityEngine.XR.WSA.Input.InteractionSourceNode UnboxInteractionSourceNode(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.XR.WSA.Input.InteractionSourceNode)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.XR.WSA.Input.InteractionSourceNode); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.XR.WSA.Input.InteractionSourceNode); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate))] - static void SystemCollectionsGenericBaseIComparerSystemStringConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineXRWSAInputInteractionSourcePoseDelegate))] + static void ReleaseUnityEngineXRWSAInputInteractionSourcePose(int handle) { try { - var thiz = new SystemCollectionsGenericBaseIComparerSystemString(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + if (handle != 0) + { + NativeScript.Bindings.StructStore.Remove(handle); + } } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate))] - static void ReleaseSystemCollectionsGenericBaseIComparerSystemString(int handle) + [MonoPInvokeCallback(typeof(UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate))] + static bool UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode(int thisHandle, out UnityEngine.Quaternion rotation, UnityEngine.XR.WSA.Input.InteractionSourceNode node) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + var thiz = (UnityEngine.XR.WSA.Input.InteractionSourcePose)NativeScript.Bindings.StructStore.Get(thisHandle); + var returnValue = thiz.TryGetRotation(out rotation, node); + NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + rotation = default(UnityEngine.Quaternion); + return default(bool); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + rotation = default(UnityEngine.Quaternion); + return default(bool); } } - [MonoPInvokeCallback(typeof(SystemBaseStringComparerConstructorDelegate))] - static void SystemBaseStringComparerConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxInteractionSourcePoseDelegate))] + static int BoxInteractionSourcePose(int valHandle) { try { - var thiz = new SystemBaseStringComparer(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var val = (UnityEngine.XR.WSA.Input.InteractionSourcePose)NativeScript.Bindings.StructStore.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemBaseStringComparerDelegate))] - static void ReleaseSystemBaseStringComparer(int handle) + [MonoPInvokeCallback(typeof(UnboxInteractionSourcePoseDelegate))] + static int UnboxInteractionSourcePose(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.XR.WSA.Input.InteractionSourcePose)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsQueuePropertyGetCountDelegate))] - static int SystemCollectionsQueuePropertyGetCount(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate))] + static int SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent(int thisHandle) { try { - var thiz = (System.Collections.Queue)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Count; - return returnValue; + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -5920,96 +6029,106 @@ static int SystemCollectionsQueuePropertyGetCount(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsBaseQueueConstructorDelegate))] - static void SystemCollectionsBaseQueueConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate))] + static int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(int thisHandle) { try { - var thiz = new SystemCollectionsBaseQueue(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsBaseQueueDelegate))] - static void ReleaseSystemCollectionsBaseQueue(int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate))] + static float SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent(int thisHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(float); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignBaseIComponentChangeServiceConstructorDelegate))] - static void SystemComponentModelDesignBaseIComponentChangeServiceConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate))] + static int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent(int thisHandle) { try { - var thiz = new SystemComponentModelDesignBaseIComponentChangeService(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return NativeScript.Bindings.StructStore.Store(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignBaseIComponentChangeServiceDelegate))] - static void ReleaseSystemComponentModelDesignBaseIComponentChangeService(int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate))] + static UnityEngine.GradientColorKey SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent(int thisHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.GradientColorKey); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.GradientColorKey); } } - [MonoPInvokeCallback(typeof(SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate))] - static int SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int pathHandle, System.IO.FileMode mode) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate))] + static int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent(int thisHandle) { try { - var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.IO.FileStream(path, mode)); - return returnValue; + var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return NativeScript.Bindings.StructStore.Store(returnValue); } catch (System.NullReferenceException ex) { @@ -6025,98 +6144,106 @@ static int SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int pathHa } } - [MonoPInvokeCallback(typeof(SystemIOFileStreamMethodWriteByteSystemByteDelegate))] - static void SystemIOFileStreamMethodWriteByteSystemByte(int thisHandle, byte value) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(int thisHandle) { try { - var thiz = (System.IO.FileStream)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.WriteByte(value); + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemIOBaseFileStreamConstructorSystemString_SystemIOFileModeDelegate))] - static void SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator(int thisHandle) { try { - var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); - var thiz = new SystemIOBaseFileStream(cppHandle, path, mode); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemIOBaseFileStreamDelegate))] - static void ReleaseSystemIOBaseFileStream(int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator(int thisHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableHandleDelegate))] - static void ReleaseUnityEnginePlayablesPlayableHandle(int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator(int thisHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxPlayableHandleDelegate))] - static int BoxPlayableHandle(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator(int thisHandle) { try { - var val = (UnityEngine.Playables.PlayableHandle)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -6132,14 +6259,14 @@ static int BoxPlayableHandle(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxPlayableHandleDelegate))] - static int UnboxPlayableHandle(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate))] + static int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator(int thisHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Playables.PlayableHandle)val); - return returnValue; + var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetEnumerator(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -6155,16 +6282,13 @@ static int UnboxPlayableHandle(int valHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate))] - static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(int eHandle, int nameHandle, int classesHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] + static int SystemCollectionsGenericListSystemStringConstructor() { try { - var e = (UnityEngine.Experimental.UIElements.VisualElement)NativeScript.Bindings.ObjectStore.Get(eHandle); - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var classes = (string[])NativeScript.Bindings.ObjectStore.Get(classesHandle); - var returnValue = UnityEngine.Experimental.UIElements.UQueryExtensions.Q(e, name, classes); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); + return returnValue; } catch (System.NullReferenceException ex) { @@ -6180,15 +6304,13 @@ static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineEx } } - [MonoPInvokeCallback(typeof(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate))] - static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString(int eHandle, int nameHandle, int classNameHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) { try { - var e = (UnityEngine.Experimental.UIElements.VisualElement)NativeScript.Bindings.ObjectStore.Get(eHandle); - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var className = (string)NativeScript.Bindings.ObjectStore.Get(classNameHandle); - var returnValue = UnityEngine.Experimental.UIElements.UQueryExtensions.Q(e, name, className); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz[index]; return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) @@ -6205,187 +6327,172 @@ static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineEx } } - [MonoPInvokeCallback(typeof(BoxInteractionSourcePositionAccuracyDelegate))] - static int BoxInteractionSourcePositionAccuracy(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + thiz[index] = value; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnboxInteractionSourcePositionAccuracyDelegate))] - static UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy UnboxInteractionSourcePositionAccuracy(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] + static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy)val; - return returnValue; + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); + thiz.Add(item); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy); } } - [MonoPInvokeCallback(typeof(BoxInteractionSourceNodeDelegate))] - static int BoxInteractionSourceNode(UnityEngine.XR.WSA.Input.InteractionSourceNode val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] + static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var comparer = (System.Collections.Generic.IComparer)NativeScript.Bindings.ObjectStore.Get(comparerHandle); + thiz.Sort(comparer); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnboxInteractionSourceNodeDelegate))] - static UnityEngine.XR.WSA.Input.InteractionSourceNode UnboxInteractionSourceNode(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] + static int SystemCollectionsGenericListSystemInt32Constructor() { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.XR.WSA.Input.InteractionSourceNode)val; + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourceNode); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourceNode); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineXRWSAInputInteractionSourcePoseDelegate))] - static void ReleaseUnityEngineXRWSAInputInteractionSourcePose(int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz[index]; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate))] - static bool UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode(int thisHandle, out UnityEngine.Quaternion rotation, UnityEngine.XR.WSA.Input.InteractionSourceNode node) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) { try { - var thiz = (UnityEngine.XR.WSA.Input.InteractionSourcePose)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.TryGetRotation(out rotation, node); - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); - return returnValue; + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz[index] = value; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - rotation = default(UnityEngine.Quaternion); - return default(bool); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - rotation = default(UnityEngine.Quaternion); - return default(bool); } } - [MonoPInvokeCallback(typeof(BoxInteractionSourcePoseDelegate))] - static int BoxInteractionSourcePose(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] + static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) { try { - var val = (UnityEngine.XR.WSA.Input.InteractionSourcePose)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.Add(item); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnboxInteractionSourcePoseDelegate))] - static int UnboxInteractionSourcePose(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] + static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.XR.WSA.Input.InteractionSourcePose)val); - return returnValue; + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var comparer = (System.Collections.Generic.IComparer)NativeScript.Bindings.ObjectStore.Get(comparerHandle); + thiz.Sort(comparer); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 2b6735c..49283b8 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -186,7 +186,7 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppGlobalStateAndFunctions = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CppBoxingMethodDeclarations = + public readonly StringBuilder CppUnboxingMethodDeclarations = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppStringDefaultParams = new StringBuilder(InitialStringBuilderCapacity); @@ -601,7 +601,16 @@ static void DoPostCompileWork(bool canRefreshAssetDb) // Generate boxing and unboxing for primitive types foreach (Type type in PRIMITIVE_TYPES) { - AppendBoxingUnboxing( + string dummyString; + ParameterInfo[] dummyParams; + AppendBoxingBindings( + type, + TypeKind.Primitive, + null, + builders, + out dummyString, + out dummyParams); + AppendUnboxing( type, TypeKind.Primitive, null, @@ -965,7 +974,9 @@ static Type[] GetDirectInterfaces(Type type) static void AddCppCtorInitType(Type type, List types) { - if (type.BaseType != null && type.BaseType != typeof(object)) + if (type.BaseType != null + && type.BaseType != typeof(object) + && type.BaseType != typeof(ValueType)) { AddCppCtorInitType(type.BaseType, types); } @@ -1341,7 +1352,7 @@ static int AppendType( AppendEnum( type, builders); - AppendBoxingUnboxing( + AppendUnboxing( type, typeKind, null, @@ -1387,7 +1398,7 @@ static int AppendType( builders); if (typeKind != TypeKind.Class) { - AppendBoxingUnboxing( + AppendUnboxing( genericType, typeKind, typeParams, @@ -1412,7 +1423,7 @@ static int AppendType( builders); if (typeKind != TypeKind.Class) { - AppendBoxingUnboxing( + AppendUnboxing( type, typeKind, null, @@ -1618,16 +1629,47 @@ static void AppendType( builders.CppTypeDeclarations); // C++ type definition (beginning) - Type baseType = type.BaseType ?? typeof(object); Type[] interfaceTypes = GetDirectInterfaces(type); + string baseTypeName; + string baseTypeNamespace; + Type[] baseTypeTypeParams; + switch (typeKind) + { + case TypeKind.FullStruct: + baseTypeName = null; + baseTypeNamespace = null; + baseTypeTypeParams = null; + break; + case TypeKind.ManagedStruct: + if (interfaceTypes.Length == 0) + { + baseTypeName = "ManagedType"; + baseTypeNamespace = "Plugin"; + baseTypeTypeParams = null; + } + else + { + baseTypeName = null; + baseTypeNamespace = null; + baseTypeTypeParams = null; + } + break; + default: + Type baseType = type.BaseType ?? typeof(object); + baseTypeName = baseType.Name; + baseTypeNamespace = baseType.Namespace; + baseTypeTypeParams = baseType.GetGenericArguments(); + break; + } + AppendCppTypeDefinitionBegin( type.Name, type.Namespace, typeKind, typeParams, - baseType.Name, - baseType.Namespace, - baseType.GetGenericArguments(), + baseTypeName, + baseTypeNamespace, + baseTypeTypeParams, interfaceTypes, isStatic, indent, @@ -1642,9 +1684,9 @@ static void AppendType( type.Namespace, typeKind, typeParams, - baseType.Name, - baseType.Namespace, - baseType.GetGenericArguments(), + baseTypeName, + baseTypeNamespace, + baseTypeTypeParams, cppCtorInterfaceTypes, isStatic, (extraIndent, subject) => {}, @@ -1725,6 +1767,7 @@ static void AppendType( } } + // Events if (jsonType.Events != null) { foreach (JsonEvent jsonEvent in jsonType.Events) @@ -1761,6 +1804,17 @@ static void AppendType( } } + // Boxing + if (typeKind != TypeKind.Class) + { + AppendBoxing( + type, + typeKind, + typeParams, + indent, + builders); + } + // C++ type definition (ending) AppendCppTypeDefinitionEnd( isStatic, @@ -1883,24 +1937,39 @@ static void AppendEnum( Type type, StringBuilders builders) { - // C++ type declaration (actually definition) - int indent = AppendNamespaceBeginning( + // C++ type declaration + int indent = AppendCppTypeDeclaration( type.Namespace, + type.Name, + false, + null, builders.CppTypeDeclarations); - AppendIndent( + + // C++ type definition (begin) + AppendCppTypeDefinitionBegin( + type.Name, + type.Namespace, + TypeKind.FullStruct, + null, + null, + null, + null, + null, + false, indent, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append("enum struct "); - builders.CppTypeDeclarations.Append(type.Name); - builders.CppTypeDeclarations.Append(" : "); - AppendCppTypeName( - Enum.GetUnderlyingType(type), - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append('\n'); + builders.CppTypeDefinitions); AppendIndent( - indent, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append("{\n"); + indent + 1, + builders.CppTypeDefinitions); + + // Primitive type field + Type underlyingType = Enum.GetUnderlyingType(type); + AppendCppPrimitiveTypeName( + underlyingType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(" Value;\n"); + + // Enumerator fields FieldInfo[] fields = type.GetFields( BindingFlags.Static | BindingFlags.Public); @@ -1909,32 +1978,295 @@ static void AppendEnum( FieldInfo field = fields[i]; AppendIndent( indent + 1, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append(field.Name); - builders.CppTypeDeclarations.Append(" = "); - builders.CppTypeDeclarations.Append( - field.GetRawConstantValue()); - if (i != fields.Length - 1) - { - builders.CppTypeDeclarations.Append(','); - } - builders.CppTypeDeclarations.Append('\n'); + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("static const "); + AppendCppTypeName( + type, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(' '); + builders.CppTypeDefinitions.Append(field.Name); + builders.CppTypeDefinitions.Append(";\n"); } + + // Constructor from primitive type + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("explicit "); + builders.CppTypeDefinitions.Append(type.Name); + builders.CppTypeDefinitions.Append('('); + AppendCppPrimitiveTypeName( + underlyingType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(" value);\n"); + + // Conversion operator to primitive type + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("explicit operator "); + AppendCppPrimitiveTypeName( + underlyingType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("() const;\n"); + + // Equality operator + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("bool operator==("); + builders.CppTypeDefinitions.Append(type.Name); + builders.CppTypeDefinitions.Append(" other);\n"); + + // Inequality operator + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("bool operator!=("); + builders.CppTypeDefinitions.Append(type.Name); + builders.CppTypeDefinitions.Append(" other);\n"); + + AppendNamespaceBeginning( + type.Namespace, + builders.CppMethodDefinitions); + + // Constructor from primitive type AppendIndent( indent, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append("};\n"); + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(type.Name); + builders.CppMethodDefinitions.Append("::"); + builders.CppMethodDefinitions.Append(type.Name); + builders.CppMethodDefinitions.Append('('); + AppendCppPrimitiveTypeName( + underlyingType, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(" value)\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(": Value(value)\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // Conversion operator to primitive type + AppendIndent( + indent, + builders.CppMethodDefinitions); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator "); + AppendCppPrimitiveTypeName( + underlyingType, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("() const\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return Value;\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // Equality operator + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("bool "); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator==("); + builders.CppMethodDefinitions.Append(type.Name); + builders.CppMethodDefinitions.Append(" other)\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return Value == other.Value;\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // Inequality operator + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("bool "); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator!=("); + builders.CppMethodDefinitions.Append(type.Name); + builders.CppMethodDefinitions.Append(" other)\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return Value != other.Value;\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + AppendBoxing( + type, + TypeKind.Enum, + null, + indent, + builders); + AppendNamespaceEnding( indent, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append('\n'); + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("};\n"); + AppendNamespaceEnding( + indent, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append('\n'); + + // Static initialization + for (int i = 0; i < fields.Length; ++i) + { + FieldInfo field = fields[i]; + builders.CppMethodDefinitions.Append("const "); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(' '); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::"); + builders.CppMethodDefinitions.Append(field.Name); + builders.CppMethodDefinitions.Append('('); + builders.CppMethodDefinitions.Append( + field.GetRawConstantValue()); + builders.CppMethodDefinitions.Append(");\n"); + } + builders.CppMethodDefinitions.Append('\n'); } - static void AppendBoxingUnboxing( + static void AppendBoxing( Type type, TypeKind typeKind, Type[] typeParams, + int indent, StringBuilders builders) + { + string boxFuncName; + ParameterInfo[] boxCppParams; + AppendBoxingBindings( + type, + typeKind, + typeParams, + builders, + out boxFuncName, + out boxCppParams); + + for (Type baseType = type.BaseType; + baseType != null; + baseType = baseType.BaseType) + { + string boxMethodDefinitionName; + string boxMethodDeclarationName; + AppendCppBoxingMethodNames( + baseType, + builders.TempStrBuilder, + out boxMethodDefinitionName, + out boxMethodDeclarationName); + AppendCppBoxingMethodDeclaration( + baseType, + baseType.GetGenericArguments(), + boxMethodDeclarationName, + boxCppParams, + indent + 1, + builders.CppTypeDefinitions); + AppendCppBoxingMethodDefinition( + type, + typeParams, + baseType, + typeKind, + boxMethodDefinitionName, + boxFuncName, + boxCppParams, + indent, + builders.CppMethodDefinitions); + } + foreach (Type interfaceType in type.GetInterfaces()) + { + string boxMethodDefinitionName; + string boxMethodDeclarationName; + AppendCppBoxingMethodNames( + interfaceType, + builders.TempStrBuilder, + out boxMethodDefinitionName, + out boxMethodDeclarationName); + AppendCppBoxingMethodDeclaration( + interfaceType, + interfaceType.GetGenericArguments(), + boxMethodDeclarationName, + boxCppParams, + indent + 1, + builders.CppTypeDefinitions); + AppendCppBoxingMethodDefinition( + type, + typeParams, + interfaceType, + typeKind, + boxMethodDefinitionName, + boxFuncName, + boxCppParams, + indent, + builders.CppMethodDefinitions); + } + } + + static void AppendBoxingBindings( + Type type, + TypeKind typeKind, + Type[] typeParams, + StringBuilders builders, + out string boxFuncName, + out ParameterInfo[] boxCppParams) { builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Box"); @@ -1944,12 +2276,100 @@ static void AppendBoxingUnboxing( AppendTypeNames( typeParams, builders.TempStrBuilder); - string boxFuncName = builders.TempStrBuilder.ToString(); + boxFuncName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder[0] = char.ToLower( builders.TempStrBuilder[0]); string boxFuncNameLower = builders.TempStrBuilder.ToString(); + ParameterInfo[] boxParams = { + new ParameterInfo + { + Name = "val", + ParameterType = type, + DereferencedParameterType = type, + IsOut = false, + IsRef = false, + Kind = typeKind + } + }; + + boxCppParams = new ParameterInfo[0]; + + // C# init params + AppendCsharpInitParam( + boxFuncNameLower, + builders.CsharpInitParams); + + // C# delegate types + AppendCsharpDelegateType( + boxFuncName, + true, + type, + typeKind, + typeof(object), + boxParams, + builders.CsharpDelegateTypes); + + // C# init call args + AppendCsharpInitCallArg( + boxFuncName, + builders.CsharpInitCall); + + // C# box function + AppendCsharpFunctionBeginning( + typeof(object), + boxFuncName, + true, + TypeKind.Class, + typeof(object), + boxParams, + builders.CsharpFunctions); + builders.CsharpFunctions.Append( + "NativeScript.Bindings.ObjectStore.Store((object)val);"); + AppendCsharpFunctionReturn( + boxParams, + typeof(object), + TypeKind.Class, + null, + true, + builders.CsharpFunctions); + + // C++ function pointers + AppendCppFunctionPointerDefinition( + boxFuncName, + true, + type.Name, + type.Namespace, + typeKind, + boxParams, + typeof(object), + builders.CppFunctionPointers); + + // C++ init params + AppendCppInitParam( + boxFuncNameLower, + true, + type.Name, + type.Namespace, + typeKind, + boxParams, + typeof(object), + builders.CppInitParams); + + // C++ init body + AppendCppInitBody( + boxFuncName, + boxFuncNameLower, + builders.CppInitBody); + } + + static void AppendUnboxing( + Type type, + TypeKind typeKind, + Type[] typeParams, + StringBuilders builders) + { builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Unbox"); AppendTypeNameWithoutSuffixes( @@ -1976,18 +2396,6 @@ static void AppendBoxingUnboxing( builders.TempStrBuilder.Append(unboxMethodDefinitionName); string unboxMethodDeclarationName = builders.TempStrBuilder.ToString(); - ParameterInfo[] boxParams = { - new ParameterInfo - { - Name = "val", - ParameterType = type, - DereferencedParameterType = type, - IsOut = false, - IsRef = false, - Kind = typeKind - } - }; - ParameterInfo[] unboxParams = { new ParameterInfo { @@ -2003,22 +2411,11 @@ static void AppendBoxingUnboxing( ParameterInfo[] unboxCppParams = new ParameterInfo[0]; // C# init params - AppendCsharpInitParam( - boxFuncNameLower, - builders.CsharpInitParams); AppendCsharpInitParam( unboxFuncNameLower, builders.CsharpInitParams); // C# delegate types - AppendCsharpDelegateType( - boxFuncName, - true, - type, - typeKind, - typeof(object), - boxParams, - builders.CsharpDelegateTypes); AppendCsharpDelegateType( unboxFuncName, true, @@ -2029,32 +2426,10 @@ static void AppendBoxingUnboxing( builders.CsharpDelegateTypes); // C# init call args - AppendCsharpInitCallArg( - boxFuncName, - builders.CsharpInitCall); AppendCsharpInitCallArg( unboxFuncName, builders.CsharpInitCall); - // C# box function - AppendCsharpFunctionBeginning( - typeof(object), - boxFuncName, - true, - TypeKind.Class, - typeof(object), - boxParams, - builders.CsharpFunctions); - builders.CsharpFunctions.Append( - "NativeScript.Bindings.ObjectStore.Store((object)val);"); - AppendCsharpFunctionReturn( - boxParams, - typeof(object), - TypeKind.Class, - null, - true, - builders.CsharpFunctions); - // C# unbox function AppendCsharpFunctionBeginning( typeof(object), @@ -2094,15 +2469,6 @@ static void AppendBoxingUnboxing( builders.CsharpFunctions); // C++ function pointers - AppendCppFunctionPointerDefinition( - boxFuncName, - true, - type.Name, - type.Namespace, - typeKind, - boxParams, - typeof(object), - builders.CppFunctionPointers); AppendCppFunctionPointerDefinition( unboxFuncName, true, @@ -2113,103 +2479,23 @@ static void AppendBoxingUnboxing( type, builders.CppFunctionPointers); - // C++ method declarations - AppendIndent( - 2, - builders.CppBoxingMethodDeclarations); - AppendCppMethodDeclaration( - "Object", - false, - false, - false, - null, - typeParams, - null, - boxParams, - builders.CppBoxingMethodDeclarations); + // C++ unbox method declaration and definition AppendIndent( 2, - builders.CppBoxingMethodDeclarations); + builders.CppUnboxingMethodDeclarations); AppendCppMethodDeclaration( unboxMethodDeclarationName, false, - false, - false, - null, - typeParams, - null, - unboxCppParams, - builders.CppBoxingMethodDeclarations); - - // C++ method definitions (begin) - int indent = AppendNamespaceBeginning( - "System", - builders.CppMethodDefinitions); - - // C++ box method definition - AppendCppMethodDefinitionBegin( - "Object", - null, - "Object", - null, - null, - boxParams, - indent, - builders.CppMethodDefinitions); - AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t handle = Plugin::"); - builders.CppMethodDefinitions.Append(boxFuncName); - builders.CppMethodDefinitions.Append("(val"); - if (typeKind == TypeKind.ManagedStruct) - { - builders.CppMethodDefinitions.Append(".Handle"); - } - builders.CppMethodDefinitions.Append(");\n"); - AppendCppUnhandledExceptionHandling( - indent + 1, - builders.CppMethodDefinitions); - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "if (handle)\n"); - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "{\n"); - AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - AppendReferenceManagedHandleFunctionCall( - "Object", - "System", - TypeKind.Class, - null, - "handle", - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(";\n"); - AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = handle;\n"); - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "}\n"); - AppendIndent( - indent, + false, + false, + null, + typeParams, + null, + unboxCppParams, + builders.CppUnboxingMethodDeclarations); + int indent = AppendNamespaceBeginning( + "System", builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n\t\n"); - - // C++ unbox method definition AppendCppMethodDefinitionBegin( "Object", null, @@ -2255,15 +2541,6 @@ static void AppendBoxingUnboxing( builders.CppMethodDefinitions); // C++ init params - AppendCppInitParam( - boxFuncNameLower, - true, - type.Name, - type.Namespace, - typeKind, - boxParams, - typeof(object), - builders.CppInitParams); AppendCppInitParam( unboxFuncNameLower, true, @@ -2275,16 +2552,144 @@ static void AppendBoxingUnboxing( builders.CppInitParams); // C++ init body - AppendCppInitBody( - boxFuncName, - boxFuncNameLower, - builders.CppInitBody); AppendCppInitBody( unboxFuncName, unboxFuncNameLower, builders.CppInitBody); } + static void AppendCppBoxingMethodNames( + Type baseType, + StringBuilder tempBuilder, + out string boxMethodDefinitionName, + out string boxMethodDeclarationName) + { + tempBuilder.Length = 0; + tempBuilder.Append("operator "); + AppendCppTypeName( + baseType, + tempBuilder); + boxMethodDefinitionName = tempBuilder.ToString(); + + tempBuilder.Length = 0; + tempBuilder.Append("explicit "); + tempBuilder.Append(boxMethodDefinitionName); + boxMethodDeclarationName = tempBuilder.ToString(); + } + + static void AppendCppBoxingMethodDeclaration( + Type type, + Type[] typeParams, + string boxMethodDeclarationName, + ParameterInfo[] boxCppParams, + int indent, + StringBuilder output) + { + AppendIndent( + indent, + output); + AppendCppMethodDeclaration( + boxMethodDeclarationName, + false, + false, + false, + null, + typeParams, + null, + boxCppParams, + output); + } + + static void AppendCppBoxingMethodDefinition( + Type enclosingType, + Type[] enclosingTypeTypeParams, + Type boxedType, + TypeKind typeKind, + string boxMethodDefinitionName, + string boxFuncName, + ParameterInfo[] boxCppParams, + int indent, + StringBuilder output) + { + AppendCppMethodDefinitionBegin( + enclosingType.Name, + null, + boxMethodDefinitionName, + enclosingTypeTypeParams, + null, + boxCppParams, + indent, + output); + AppendIndent( + indent, + output); + output.Append("{\n"); + AppendIndent( + indent + 1, + output); + output.Append("int32_t handle = Plugin::"); + output.Append(boxFuncName); + output.Append('('); + if (typeKind == TypeKind.ManagedStruct) + { + output.Append("Handle"); + } + else + { + output.Append("*this"); + } + output.Append(");\n"); + AppendCppUnhandledExceptionHandling( + indent + 1, + output); + AppendIndent( + indent + 1, + output); + output.Append( + "if (handle)\n"); + AppendIndent( + indent + 1, + output); + output.Append( + "{\n"); + AppendIndent( + indent + 2, + output); + AppendReferenceManagedHandleFunctionCall( + "Object", + "System", + TypeKind.Class, + null, + "handle", + output); + output.Append(";\n"); + AppendIndent( + indent + 2, + output); + output.Append("return "); + AppendCppTypeName( + boxedType, + output); + output.Append("(Plugin::InternalUse::Only, handle);\n"); + AppendIndent( + indent + 1, + output); + output.Append( + "}\n"); + AppendIndent( + indent + 1, + output); + output.Append("return nullptr;\n"); + AppendIndent( + indent, + output); + output.Append("}\n"); + AppendIndent( + indent, + output); + output.Append('\n'); + } + static void AppendHandleStoreTypeName( Type type, StringBuilder output) @@ -5202,7 +5607,7 @@ static void AppendArrayElementProxy( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(cppElementProxyTypeName); builders.CppTypeDefinitions.Append( - "(Plugin::InternalUse iu, int32_t handle, "); + "(Plugin::InternalUse, int32_t handle, "); for (int i = 0; i < rank; ++i) { builders.CppTypeDefinitions.Append("int32_t index"); @@ -5269,7 +5674,7 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append('_'); builders.CppMethodDefinitions.Append(maxRank); builders.CppMethodDefinitions.Append( - "(Plugin::InternalUse iu, int32_t handle, "); + "(Plugin::InternalUse, int32_t handle, "); for (int i = 0; i < rank; ++i) { builders.CppMethodDefinitions.Append("int32_t index"); @@ -8640,6 +9045,11 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( case TypeKind.ManagedStruct: output.Append("int32_t"); break; + case TypeKind.Primitive: + AppendCppPrimitiveTypeName( + method.ReturnType, + output); + break; default: AppendCppTypeName( method.ReturnType, @@ -8670,6 +9080,13 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output.Append(param.Name); output.Append("Handle"); break; + case TypeKind.Primitive: + AppendCppPrimitiveTypeName( + param.ParameterType, + output); + output.Append(' '); + output.Append(param.Name); + break; default: AppendCppTypeName( param.ParameterType, @@ -9378,7 +9795,7 @@ static void AppendCppBaseTypeHandleConstructor( cppTypeName, output); output.Append( - "(Plugin::InternalUse iu, int32_t handle)\n"); + "(Plugin::InternalUse, int32_t handle)\n"); string separator = ": "; foreach (Type interfaceType in interfaceTypes) { @@ -9747,7 +10164,7 @@ static void AppendCppBaseTypeConstructor( AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("int32_t* handle = &Handle;\n"); + output.Append("System::Int32* handle = (System::Int32*)&Handle;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, output); @@ -9757,7 +10174,7 @@ static void AppendCppBaseTypeConstructor( AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("int32_t* classHandle = &ClassHandle;\n"); + output.Append("System::Int32* classHandle = (System::Int32*)&ClassHandle;\n"); } AppendCppPluginFunctionCall( true, @@ -10965,7 +11382,6 @@ static void AppendCppTypeDefinitionBegin( switch (typeKind) { case TypeKind.Class: - case TypeKind.ManagedStruct: // Only add the base type if it's not System.Object or // there are no interfaces (since they always extend it) string separator = " : virtual "; @@ -11002,6 +11418,9 @@ static void AppendCppTypeDefinitionBegin( } } break; + case TypeKind.ManagedStruct: + output.Append(" : Plugin::ManagedType"); + break; } } output.Append('\n'); @@ -11034,7 +11453,7 @@ static void AppendCppTypeDefinitionBegin( typeParams, output); output.Append( - "(Plugin::InternalUse iu, int32_t handle);\n"); + "(Plugin::InternalUse, int32_t handle);\n"); // Copy constructor AppendIndent(indent + 1, output); @@ -11212,18 +11631,21 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeName, output); output.Append("(decltype(nullptr))\n"); - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) + if (enclosingTypeKind == TypeKind.Class) { - AppendIndent( - indent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; + string separator = ": "; + foreach (Type interfaceType in interfaceTypes) + { + AppendIndent( + indent + 1, + output); + output.Append(separator); + AppendCppTypeName( + interfaceType, + output); + output.Append("(nullptr)\n"); + separator = ", "; + } } AppendIndent(indent, output); output.Append("{\n"); @@ -11245,19 +11667,22 @@ static int AppendCppMethodDefinitionsBegin( AppendTypeNameWithoutGenericSuffix( enclosingTypeName, output); - output.Append("(Plugin::InternalUse iu, int32_t handle)\n"); - separator = ": "; - foreach (Type interfaceType in interfaceTypes) + output.Append("(Plugin::InternalUse, int32_t handle)\n"); + if (enclosingTypeKind == TypeKind.Class) { - AppendIndent( - indent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; + string separator = ": "; + foreach (Type interfaceType in interfaceTypes) + { + AppendIndent( + indent + 1, + output); + output.Append(separator); + AppendCppTypeName( + interfaceType, + output); + output.Append("(nullptr)\n"); + separator = ", "; + } } AppendIndent(indent, output); output.Append("{\n"); @@ -12390,7 +12815,7 @@ static void AppendCppMethodDefinitionBegin( string enclosingTypeName, Type returnType, string methodName, - Type[] typeTypeParams, + Type[] enclosingTypeTypeParams, Type[] methodTypeParams, ParameterInfo[] parameters, int indent, @@ -12421,7 +12846,7 @@ static void AppendCppMethodDefinitionBegin( enclosingTypeName, output); AppendCppTypeParameters( - typeTypeParams, + enclosingTypeTypeParams, output); output.Append("::"); @@ -12532,10 +12957,21 @@ static void AppendCppPluginFunctionCall( switch (param.Kind) { case TypeKind.FullStruct: - case TypeKind.Primitive: case TypeKind.Enum: output.Append(param.Name); break; + case TypeKind.Primitive: + if (param.IsOut || param.IsRef) + { + output.Append("&"); + output.Append(param.Name); + output.Append("->Value"); + } + else + { + output.Append(param.Name); + } + break; default: if (param.IsOut || param.IsRef) { @@ -12714,6 +13150,14 @@ static void AppendCppFunctionPointer( switch (param.Kind) { case TypeKind.Primitive: + AppendCppPrimitiveTypeName( + param.DereferencedParameterType, + output); + if (param.IsOut || param.IsRef) + { + output.Append('*'); + } + break; case TypeKind.Enum: AppendCppTypeName( param.DereferencedParameterType, @@ -12950,35 +13394,35 @@ static void AppendCppTypeName( } else if (type == typeof(sbyte)) { - output.Append("int8_t"); + output.Append("System::SByte"); } else if (type == typeof(byte)) { - output.Append("uint8_t"); + output.Append("System::Byte"); } else if (type == typeof(short)) { - output.Append("int16_t"); + output.Append("System::Int16"); } else if (type == typeof(ushort)) { - output.Append("uint16_t"); + output.Append("System::UInt16"); } else if (type == typeof(int)) { - output.Append("int32_t"); + output.Append("System::Int32"); } else if (type == typeof(uint)) { - output.Append("uint32_t"); + output.Append("System::UInt32"); } else if (type == typeof(long)) { - output.Append("int64_t"); + output.Append("System::Int64"); } else if (type == typeof(ulong)) { - output.Append("uint64_t"); + output.Append("System::UInt64"); } else if (type == typeof(char)) { @@ -12986,11 +13430,11 @@ static void AppendCppTypeName( } else if (type == typeof(float)) { - output.Append("float"); + output.Append("System::Single"); } else if (type == typeof(double)) { - output.Append("double"); + output.Append("System::Double"); } else if (type == typeof(string)) { @@ -13059,6 +13503,72 @@ static void AppendCppTypeName( output); } + static void AppendCppPrimitiveTypeName( + Type type, + StringBuilder output) + { + if (type == typeof(void)) + { + output.Append("void"); + } + else if (type == typeof(bool)) + { + output.Append("uint32_t"); // C# bool is 4 bytes + } + else if (type == typeof(sbyte)) + { + output.Append("int8_t"); + } + else if (type == typeof(byte)) + { + output.Append("uint8_t"); + } + else if (type == typeof(short)) + { + output.Append("int16_t"); + } + else if (type == typeof(ushort)) + { + output.Append("uint16_t"); + } + else if (type == typeof(int)) + { + output.Append("int32_t"); + } + else if (type == typeof(uint)) + { + output.Append("uint32_t"); + } + else if (type == typeof(long)) + { + output.Append("int64_t"); + } + else if (type == typeof(ulong)) + { + output.Append("uint64_t"); + } + else if (type == typeof(char)) + { + output.Append("uint16_t"); // C# char is 2 bytes + } + else if (type == typeof(float)) + { + output.Append("float"); + } + else if (type == typeof(double)) + { + output.Append("double"); + } + else if (type == typeof(IntPtr)) + { + output.Append("void*"); + } + else + { + throw new Exception(type + " is not a C++ primitive"); + } + } + static void RemoveTrailingChars( StringBuilders builders) { @@ -13084,7 +13594,7 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CppInitBodyFirstBoot); RemoveTrailingChars(builders.CppMonoBehaviourMessages); RemoveTrailingChars(builders.CppGlobalStateAndFunctions); - RemoveTrailingChars(builders.CppBoxingMethodDeclarations); + RemoveTrailingChars(builders.CppUnboxingMethodDeclarations); } // Remove trailing chars (e.g. commas) for last elements @@ -13227,9 +13737,9 @@ static void InjectBuilders( builders.CppGlobalStateAndFunctions.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN BOXING METHOD DECLARATIONS*/\n", - "\n\t\t/*END BOXING METHOD DECLARATIONS*/", - builders.CppBoxingMethodDeclarations.ToString()); + "/*BEGIN UNBOXING METHOD DECLARATIONS*/\n", + "\n\t\t/*END UNBOXING METHOD DECLARATIONS*/", + builders.CppUnboxingMethodDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, "/*BEGIN STRING DEFAULT PARAMETERS*/\n", diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 7e8f7a3..aaf5ac5 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -3,6 +3,23 @@ "DOTNET_DLLS/System.Xml.dll" ], "Types": [ + { + "Name": " System.IFormattable" + }, + { + "Name": " System.IConvertible" + }, + { + "Name": " System.IComparable", + "Methods": [ + { + "Name": "CompareTo", + "ParamTypes": [ + "System.Object" + ] + } + ] + }, { "Name": " System.IDisposable", "Methods": [ @@ -117,6 +134,11 @@ }, { "Name": "UnityEngine.Resolution", + "Constructors": [ + { + "ParamTypes": [] + } + ], "Properties": [ { "Name": "width", @@ -165,158 +187,6 @@ } ] }, - { - "Name": "System.Collections.Generic.IEnumerator`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ], - "Properties": [ - { - "Name": "Current", - "Get": {} - } - ] - }, - { - "Name": "System.Collections.Generic.IEnumerable`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ], - "Methods": [ - { - "Name": "GetEnumerator", - "ParamTypes": [] - } - ] - }, - { - "Name": "System.Collections.Generic.ICollection`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ] - }, - { - "Name": "System.Collections.Generic.IList`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ] - }, { "Name": "System.Runtime.Serialization.ISerializable" }, @@ -382,6 +252,12 @@ { "Name": "UnityEngine.Experimental.UIElements.IEventHandler" }, + { + "Name": "UnityEngine.Experimental.UIElements.CallbackEventHandler" + }, + { + "Name": "UnityEngine.Experimental.UIElements.Focusable" + }, { "Name": "UnityEngine.Experimental.UIElements.IStyle" }, @@ -602,47 +478,6 @@ } ] }, - { - "Name": "System.Collections.Generic.List`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - } - ], - "Constructors": [ - { - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "Item", - "Get": {}, - "Set": {} - } - ], - "Methods": [ - { - "Name": "Add", - "ParamTypes": [ - "T" - ] - }, - { - "Name": "Sort", - "ParamTypes": [ - "System.Collections.Generic.IComparer`1" - ] - } - ] - }, { "Name": "System.Collections.Generic.LinkedListNode`1", "GenericParams": [ @@ -687,27 +522,6 @@ } ] }, - { - "Name": "System.Collections.ObjectModel.Collection`1", - "GenericParams": [ - { - "Types": [ - "System.Int32" - ] - } - ] - }, - { - "Name": "System.Collections.ObjectModel.KeyedCollection`2", - "GenericParams": [ - { - "Types": [ - "System.String", - "System.Int32" - ] - } - ] - }, { "Name": "System.Exception", "Constructors": [ @@ -958,7 +772,45 @@ "Name": "UnityEngine.Playables.PlayableHandle" }, { - "Name": "UnityEngine.Experimental.UIElements.CallbackEventHandler" + "Name": "UnityEngine.Experimental.UIElements.ITransform" + }, + { + "Name": "UnityEngine.Experimental.UIElements.IUIElementDataWatch" + }, + { + "Name": "UnityEngine.Experimental.UIElements.IVisualElementScheduler" + }, + { + "Name": "System.Collections.Generic.IEnumerator`1", + "GenericParams": [ + { + "Types": [ + "UnityEngine.Experimental.UIElements.VisualElement" + ] + } + ], + "Properties": [ + { + "Name": "Current", + "Get": {} + } + ] + }, + { + "Name": "System.Collections.Generic.IEnumerable`1", + "GenericParams": [ + { + "Types": [ + "UnityEngine.Experimental.UIElements.VisualElement" + ] + } + ], + "Methods": [ + { + "Name": "GetEnumerator", + "ParamTypes": [] + } + ] }, { "Name": "UnityEngine.Experimental.UIElements.VisualElement" @@ -1001,6 +853,220 @@ ] } ] + }, + { + "Name": "System.Collections.Generic.IEnumerator`1", + "GenericParams": [ + { + "Types": [ + "System.String" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "UnityEngine.RaycastHit" + ] + }, + { + "Types": [ + "UnityEngine.GradientColorKey" + ] + }, + { + "Types": [ + "UnityEngine.Resolution" + ] + } + ], + "Properties": [ + { + "Name": "Current", + "Get": {} + } + ] + }, + { + "Name": "System.Collections.Generic.IEnumerable`1", + "GenericParams": [ + { + "Types": [ + "System.String" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "UnityEngine.RaycastHit" + ] + }, + { + "Types": [ + "UnityEngine.GradientColorKey" + ] + }, + { + "Types": [ + "UnityEngine.Resolution" + ] + } + ], + "Methods": [ + { + "Name": "GetEnumerator", + "ParamTypes": [] + } + ] + }, + { + "Name": "System.Collections.Generic.ICollection`1", + "GenericParams": [ + { + "Types": [ + "System.String" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "UnityEngine.RaycastHit" + ] + }, + { + "Types": [ + "UnityEngine.GradientColorKey" + ] + }, + { + "Types": [ + "UnityEngine.Resolution" + ] + } + ] + }, + { + "Name": "System.Collections.Generic.IList`1", + "GenericParams": [ + { + "Types": [ + "System.String" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "UnityEngine.RaycastHit" + ] + }, + { + "Types": [ + "UnityEngine.GradientColorKey" + ] + }, + { + "Types": [ + "UnityEngine.Resolution" + ] + } + ] + }, + { + "Name": "System.Collections.Generic.List`1", + "GenericParams": [ + { + "Types": [ + "System.String" + ] + }, + { + "Types": [ + "System.Int32" + ] + } + ], + "Constructors": [ + { + "ParamTypes": [] + } + ], + "Properties": [ + { + "Name": "Item", + "Get": {}, + "Set": {} + } + ], + "Methods": [ + { + "Name": "Add", + "ParamTypes": [ + "T" + ] + }, + { + "Name": "Sort", + "ParamTypes": [ + "System.Collections.Generic.IComparer`1" + ] + } + ] + }, + { + "Name": "System.Collections.ObjectModel.Collection`1", + "GenericParams": [ + { + "Types": [ + "System.Int32" + ] + } + ] + }, + { + "Name": "System.Collections.ObjectModel.KeyedCollection`2", + "GenericParams": [ + { + "Types": [ + "System.String", + "System.Int32" + ] + } + ] } ], "MonoBehaviours": [ diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index a44f151..796ae83 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -52,7 +52,7 @@ void MyGame::MonoBehaviours::TestScript::Awake() Debug::Log(message); } -void MyGame::MonoBehaviours::TestScript::OnAnimatorIK(int32_t param0) +void MyGame::MonoBehaviours::TestScript::OnAnimatorIK(Int32 param0) { String message("C++ TestScript OnAnimatorIK"); Debug::Log(message); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 875abad..795eec0 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -31,53 +31,6 @@ #define DLLEXPORT extern "C" #endif -//////////////////////////////////////////////////////////////// -// Global variables -//////////////////////////////////////////////////////////////// - -namespace Plugin -{ - System::String NullString(nullptr); -} - -//////////////////////////////////////////////////////////////// -// Support for using IEnumerable with range for loops -//////////////////////////////////////////////////////////////// - -namespace Plugin -{ - // End iterators are dummies full of null - EnumerableIterator::EnumerableIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - // Begin iterators keep track of an IEnumerator - EnumerableIterator::EnumerableIterator( - System::Collections::IEnumerable& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - EnumerableIterator& EnumerableIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool EnumerableIterator::operator!=(const EnumerableIterator& other) - { - return hasMore; - } - - System::Object EnumerableIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - //////////////////////////////////////////////////////////////// // C# functions for C++ to call //////////////////////////////////////////////////////////////// @@ -91,9 +44,10 @@ namespace Plugin int32_t (*EnumerableGetEnumerator)(int32_t handle); /*BEGIN FUNCTION POINTERS*/ + System::Int32 (*SystemIComparableMethodCompareToSystemObject)(int32_t thisHandle, int32_t objHandle); void (*SystemIDisposableMethodDispose)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); - float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz); + System::Single (*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); @@ -112,11 +66,12 @@ namespace Plugin int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); UnityEngine::GradientColorKey (*UnboxGradientColorKey)(int32_t valHandle); void (*ReleaseUnityEngineResolution)(int32_t handle); - int32_t (*UnityEngineResolutionPropertyGetWidth)(int32_t thisHandle); + int32_t (*UnityEngineResolutionConstructor)(); + System::Int32 (*UnityEngineResolutionPropertyGetWidth)(int32_t thisHandle); void (*UnityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value); - int32_t (*UnityEngineResolutionPropertyGetHeight)(int32_t thisHandle); + System::Int32 (*UnityEngineResolutionPropertyGetHeight)(int32_t thisHandle); void (*UnityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value); - int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle); + System::Int32 (*UnityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle); void (*UnityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value); int32_t (*BoxResolution)(int32_t valHandle); int32_t (*UnboxResolution)(int32_t valHandle); @@ -128,27 +83,15 @@ namespace Plugin int32_t (*UnboxRaycastHit)(int32_t valHandle); int32_t (*SystemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle); int32_t (*SystemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)(int32_t thisHandle); - float (*SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)(int32_t thisHandle); - UnityEngine::GradientColorKey (*SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)(int32_t thisHandle); void (*ReleaseUnityEnginePlayablesPlayableGraph)(int32_t handle); int32_t (*BoxPlayableGraph)(int32_t valHandle); int32_t (*UnboxPlayableGraph)(int32_t valHandle); void (*ReleaseUnityEngineAnimationsAnimationMixerPlayable)(int32_t handle); - int32_t (*UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)(int32_t graphHandle, int32_t inputCount, System::Boolean normalizeWeights); + int32_t (*UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)(int32_t graphHandle, int32_t inputCount, uint32_t normalizeWeights); int32_t (*BoxAnimationMixerPlayable)(int32_t valHandle); int32_t (*UnboxAnimationMixerPlayable)(int32_t valHandle); int32_t (*SystemDiagnosticsStopwatchConstructor)(); - int64_t (*SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle); + System::Int64 (*SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle); void (*SystemDiagnosticsStopwatchMethodStart)(int32_t thisHandle); void (*SystemDiagnosticsStopwatchMethodReset)(int32_t thisHandle); int32_t (*UnityEngineGameObjectConstructor)(); @@ -159,7 +102,7 @@ namespace Plugin int32_t (*UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type); void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle); int32_t (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); - void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value); + void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(uint32_t value); void (*UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle); void (*UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle); int32_t (*UnityEngineMonoBehaviourPropertyGetTransform)(int32_t thisHandle); @@ -168,7 +111,7 @@ namespace Plugin void (*UnityEngineNetworkingNetworkTransportMethodInit)(); int32_t (*BoxQuaternion)(UnityEngine::Quaternion& val); UnityEngine::Quaternion (*UnboxQuaternion)(int32_t valHandle); - float (*UnityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column); + System::Single (*UnityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column); void (*UnityEngineMatrix4x4PropertySetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column, float value); int32_t (*BoxMatrix4x4)(UnityEngine::Matrix4x4& val); UnityEngine::Matrix4x4 (*UnboxMatrix4x4)(int32_t valHandle); @@ -177,19 +120,9 @@ namespace Plugin 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); + System::Double (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)(int32_t thisHandle); int32_t (*BoxKeyValuePairSystemString_SystemDouble)(int32_t valHandle); int32_t (*UnboxKeyValuePairSystemString_SystemDouble)(int32_t valHandle); - 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); - void (*SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle); - int32_t (*SystemCollectionsGenericListSystemInt32Constructor)(); - int32_t (*SystemCollectionsGenericListSystemInt32PropertyGetItem)(int32_t thisHandle, int32_t index); - void (*SystemCollectionsGenericListSystemInt32PropertySetItem)(int32_t thisHandle, int32_t index, int32_t value); - void (*SystemCollectionsGenericListSystemInt32MethodAddSystemInt32)(int32_t thisHandle, int32_t item); - void (*SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle); int32_t (*SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString)(int32_t valueHandle); int32_t (*SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue)(int32_t thisHandle); void (*SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue)(int32_t thisHandle, int32_t valueHandle); @@ -202,7 +135,7 @@ namespace Plugin int32_t (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); int32_t (*BoxRay)(int32_t valHandle); int32_t (*UnboxRay)(int32_t valHandle); - int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle); + System::Int32 (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle); int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle); int32_t (*UnityEngineGradientConstructor)(); int32_t (*UnityEngineGradientPropertyGetColorKeys)(int32_t thisHandle); @@ -221,7 +154,7 @@ namespace Plugin UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); int32_t (*BoxPrimitiveType)(UnityEngine::PrimitiveType val); UnityEngine::PrimitiveType (*UnboxPrimitiveType)(int32_t valHandle); - float (*UnityEngineTimePropertyGetDeltaTime)(); + System::Single (*UnityEngineTimePropertyGetDeltaTime)(); int32_t (*BoxFileMode)(System::IO::FileMode val); System::IO::FileMode (*UnboxFileMode)(int32_t valHandle); void (*ReleaseSystemCollectionsGenericBaseIComparerSystemInt32)(int32_t handle); @@ -230,7 +163,7 @@ namespace Plugin void (*SystemCollectionsGenericBaseIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemBaseStringComparer)(int32_t handle); void (*SystemBaseStringComparerConstructor)(int32_t cppHandle, int32_t* handle); - int32_t (*SystemCollectionsQueuePropertyGetCount)(int32_t thisHandle); + System::Int32 (*SystemCollectionsQueuePropertyGetCount)(int32_t thisHandle); void (*ReleaseSystemCollectionsBaseQueue)(int32_t handle); void (*SystemCollectionsBaseQueueConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemComponentModelDesignBaseIComponentChangeService)(int32_t handle); @@ -242,6 +175,8 @@ namespace Plugin void (*ReleaseUnityEnginePlayablesPlayableHandle)(int32_t handle); int32_t (*BoxPlayableHandle)(int32_t valHandle); int32_t (*UnboxPlayableHandle)(int32_t valHandle); + int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator)(int32_t thisHandle); int32_t (*UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)(int32_t eHandle, int32_t nameHandle, int32_t classesHandle); int32_t (*UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)(int32_t eHandle, int32_t nameHandle, int32_t classNameHandle); int32_t (*BoxInteractionSourcePositionAccuracy)(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val); @@ -252,43 +187,65 @@ namespace Plugin int32_t (*UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)(int32_t thisHandle, UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node); int32_t (*BoxInteractionSourcePose)(int32_t valHandle); int32_t (*UnboxInteractionSourcePose)(int32_t valHandle); - int32_t (*BoxBoolean)(System::Boolean val); + int32_t (*SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)(int32_t thisHandle); + System::Int32 (*SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)(int32_t thisHandle); + System::Single (*SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)(int32_t thisHandle); + UnityEngine::GradientColorKey (*SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)(int32_t thisHandle); + int32_t (*SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)(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); + void (*SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle); + int32_t (*SystemCollectionsGenericListSystemInt32Constructor)(); + System::Int32 (*SystemCollectionsGenericListSystemInt32PropertyGetItem)(int32_t thisHandle, int32_t index); + void (*SystemCollectionsGenericListSystemInt32PropertySetItem)(int32_t thisHandle, int32_t index, int32_t value); + void (*SystemCollectionsGenericListSystemInt32MethodAddSystemInt32)(int32_t thisHandle, int32_t item); + void (*SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle); + int32_t (*BoxBoolean)(uint32_t val); int32_t (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); - int8_t (*UnboxSByte)(int32_t valHandle); + System::SByte (*UnboxSByte)(int32_t valHandle); int32_t (*BoxByte)(uint8_t val); - uint8_t (*UnboxByte)(int32_t valHandle); + System::Byte (*UnboxByte)(int32_t valHandle); int32_t (*BoxInt16)(int16_t val); - int16_t (*UnboxInt16)(int32_t valHandle); + System::Int16 (*UnboxInt16)(int32_t valHandle); int32_t (*BoxUInt16)(uint16_t val); - uint16_t (*UnboxUInt16)(int32_t valHandle); + System::UInt16 (*UnboxUInt16)(int32_t valHandle); int32_t (*BoxInt32)(int32_t val); - int32_t (*UnboxInt32)(int32_t valHandle); + System::Int32 (*UnboxInt32)(int32_t valHandle); int32_t (*BoxUInt32)(uint32_t val); - uint32_t (*UnboxUInt32)(int32_t valHandle); + System::UInt32 (*UnboxUInt32)(int32_t valHandle); int32_t (*BoxInt64)(int64_t val); - int64_t (*UnboxInt64)(int32_t valHandle); + System::Int64 (*UnboxInt64)(int32_t valHandle); int32_t (*BoxUInt64)(uint64_t val); - uint64_t (*UnboxUInt64)(int32_t valHandle); - int32_t (*BoxChar)(System::Char val); + System::UInt64 (*UnboxUInt64)(int32_t valHandle); + int32_t (*BoxChar)(uint16_t val); int16_t (*UnboxChar)(int32_t valHandle); int32_t (*BoxSingle)(float val); - float (*UnboxSingle)(int32_t valHandle); + System::Single (*UnboxSingle)(int32_t valHandle); int32_t (*BoxDouble)(double val); - double (*UnboxDouble)(int32_t valHandle); + System::Double (*UnboxDouble)(int32_t valHandle); int32_t (*SystemSystemInt32Array1Constructor1)(int32_t length0); - int32_t (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0); + System::Int32 (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*SystemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item); int32_t (*SystemSystemSingleArray1Constructor1)(int32_t length0); - float (*SystemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0); + System::Single (*SystemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*SystemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item); int32_t (*SystemSystemSingleArray2Constructor2)(int32_t length0, int32_t length1); int32_t (*SystemSystemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension); - float (*SystemSingleArray2GetItem2)(int32_t thisHandle, int32_t index0, int32_t index1); + System::Single (*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 (*SystemSystemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2); int32_t (*SystemSystemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension); - float (*SystemSingleArray3GetItem3)(int32_t thisHandle, int32_t index0, int32_t index1, int32_t index2); + System::Single (*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 (*SystemSystemStringArray1Constructor1)(int32_t length0); int32_t (*SystemStringArray1GetItem1)(int32_t thisHandle, int32_t index0); @@ -321,7 +278,7 @@ namespace Plugin void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle); - double (*SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2); + System::Double (*SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2); void (*ReleaseSystemFuncSystemInt16_SystemInt32_SystemString)(int32_t handle, int32_t classHandle); void (*SystemFuncSystemInt16_SystemInt32_SystemStringConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); void (*SystemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle); @@ -366,4343 +323,3011 @@ namespace Plugin } //////////////////////////////////////////////////////////////// -// Reference counting of managed objects +// Global variables //////////////////////////////////////////////////////////////// namespace Plugin { - int32_t RefCountsLenClass; - int32_t* RefCountsClass; + System::String NullString(nullptr); +} - void ReferenceManagedClass(int32_t handle) +//////////////////////////////////////////////////////////////// +// Plugin Types +//////////////////////////////////////////////////////////////// + +namespace Plugin +{ + ManagedType::ManagedType() + : Handle(0) + { + } + + ManagedType::ManagedType(decltype(nullptr)) + : Handle(0) + { + } + + ManagedType::ManagedType(Plugin::InternalUse iu, int32_t handle) + : Handle(handle) { - assert(handle >= 0 && handle < RefCountsLenClass); - if (handle != 0) - { - RefCountsClass[handle]++; - } } +} - void DereferenceManagedClass(int32_t handle) +//////////////////////////////////////////////////////////////// +// C# Primitive Types +//////////////////////////////////////////////////////////////// + +namespace System +{ + Boolean::Boolean() + : Value(0) { - assert(handle >= 0 && handle < RefCountsLenClass); - if (handle != 0) - { - int32_t numRemain = --RefCountsClass[handle]; - if (numRemain == 0) - { - ReleaseObject(handle); - } - } } - bool DereferenceManagedClassNoRelease(int32_t handle) + Boolean::Boolean(bool value) + : Value((int32_t)value) { - assert(handle >= 0 && handle < RefCountsLenClass); - if (handle != 0) - { - int32_t numRemain = --RefCountsClass[handle]; - if (numRemain == 0) - { - return true; - } - } - return false; } - /*BEGIN GLOBAL STATE AND FUNCTIONS*/ - int32_t RefCountsLenUnityEngineResolution; - int32_t* RefCountsUnityEngineResolution; + Boolean::Boolean(int32_t value) + : Value(value) + { + } - void ReferenceManagedUnityEngineResolution(int32_t handle) + Boolean::Boolean(uint32_t value) + : Value(value) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); - if (handle != 0) - { - RefCountsUnityEngineResolution[handle]++; - } } - void DereferenceManagedUnityEngineResolution(int32_t handle) + Boolean::operator bool() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineResolution[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineResolution(handle); - } - } + return (bool)Value; } - int32_t RefCountsLenUnityEngineRaycastHit; - int32_t* RefCountsUnityEngineRaycastHit; + Boolean::operator int32_t() const + { + return Value; + } - void ReferenceManagedUnityEngineRaycastHit(int32_t handle) + Boolean::operator uint32_t() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit); - if (handle != 0) - { - RefCountsUnityEngineRaycastHit[handle]++; - } + return Value; } - void DereferenceManagedUnityEngineRaycastHit(int32_t handle) + Boolean::operator Object() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineRaycastHit[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineRaycastHit(handle); - } - } + return Object(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); } - int32_t RefCountsLenUnityEnginePlayablesPlayableGraph; - int32_t* RefCountsUnityEnginePlayablesPlayableGraph; + Boolean::operator ValueType() const + { + return ValueType(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); + } - void ReferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) + Boolean::operator IComparable() const { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); - if (handle != 0) - { - RefCountsUnityEnginePlayablesPlayableGraph[handle]++; - } + return IComparable(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); } - void DereferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) + Boolean::operator IFormattable() const { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableGraph[handle]; - if (numRemain == 0) - { - ReleaseUnityEnginePlayablesPlayableGraph(handle); - } - } + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); } - int32_t RefCountsLenUnityEngineAnimationsAnimationMixerPlayable; - int32_t* RefCountsUnityEngineAnimationsAnimationMixerPlayable; + Boolean::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); + } - void ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) + Char::Char() + : Value(0) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); - if (handle != 0) - { - RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]++; - } } - void DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) + Char::Char(char value) + : Value(value) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineAnimationsAnimationMixerPlayable(handle); - } - } } - int32_t RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; - int32_t* RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + Char::Char(int16_t value) + : Value(value) + { + } - void ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + Char::operator int16_t() const { - assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); - if (handle != 0) - { - RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]++; - } + return Value; } - void DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + Char::operator Object() const { - assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); - if (handle != 0) - { - int32_t numRemain = --RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]; - if (numRemain == 0) - { - ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(handle); - } - } + return Object(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); } - int32_t RefCountsLenUnityEngineRay; - int32_t* RefCountsUnityEngineRay; + Char::operator ValueType() const + { + return ValueType(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); + } - void ReferenceManagedUnityEngineRay(int32_t handle) + Char::operator IComparable() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); - if (handle != 0) - { - RefCountsUnityEngineRay[handle]++; - } + return IComparable(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); } - void DereferenceManagedUnityEngineRay(int32_t handle) + Char::operator IFormattable() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineRay[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineRay(handle); - } - } + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); } - int32_t RefCountsLenUnityEngineSceneManagementScene; - int32_t* RefCountsUnityEngineSceneManagementScene; - - void ReferenceManagedUnityEngineSceneManagementScene(int32_t handle) + Char::operator IConvertible() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); - if (handle != 0) - { - RefCountsUnityEngineSceneManagementScene[handle]++; - } + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); } - - void DereferenceManagedUnityEngineSceneManagementScene(int32_t handle) + + SByte::SByte() + : Value(0) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineSceneManagementScene[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineSceneManagementScene(handle); - } - } } - int32_t SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize; - System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemInt32FreeList; - System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; + SByte::SByte(int8_t val) + : Value(val) + { + } - int32_t StoreSystemCollectionsGenericBaseIComparerSystemInt32(System::Collections::Generic::BaseIComparer* del) + SByte::operator int8_t() const { - assert(NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 != nullptr); - System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; - NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = (System::Collections::Generic::BaseIComparer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemInt32FreeList); + return Value; } - System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) + SByte::operator Object() const { - assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize); - return SystemCollectionsGenericBaseIComparerSystemInt32FreeList[handle]; + return Object(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); } - void RemoveSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) + SByte::operator ValueType() const { - System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemInt32FreeList + handle; - *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; - NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = pRelease; + return ValueType(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); } - int32_t SystemCollectionsGenericBaseIComparerSystemStringFreeListSize; - System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemStringFreeList; - System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemString; - int32_t StoreSystemCollectionsGenericBaseIComparerSystemString(System::Collections::Generic::BaseIComparer* del) + SByte::operator IComparable() const { - assert(NextFreeSystemCollectionsGenericBaseIComparerSystemString != nullptr); - System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemString; - NextFreeSystemCollectionsGenericBaseIComparerSystemString = (System::Collections::Generic::BaseIComparer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemStringFreeList); + return IComparable(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); } - System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) + SByte::operator IFormattable() const { - assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemStringFreeListSize); - return SystemCollectionsGenericBaseIComparerSystemStringFreeList[handle]; + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); } - void RemoveSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) + SByte::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); + } + + Byte::Byte() + : Value(0) { - System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemStringFreeList + handle; - *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemString; - NextFreeSystemCollectionsGenericBaseIComparerSystemString = pRelease; } - int32_t SystemBaseStringComparerFreeListSize; - System::BaseStringComparer** SystemBaseStringComparerFreeList; - System::BaseStringComparer** NextFreeSystemBaseStringComparer; - int32_t StoreSystemBaseStringComparer(System::BaseStringComparer* del) + Byte::Byte(uint8_t value) + : Value(value) { - assert(NextFreeSystemBaseStringComparer != nullptr); - System::BaseStringComparer** pNext = NextFreeSystemBaseStringComparer; - NextFreeSystemBaseStringComparer = (System::BaseStringComparer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemBaseStringComparerFreeList); } - System::BaseStringComparer* GetSystemBaseStringComparer(int32_t handle) + Byte::operator uint8_t() const { - assert(handle >= 0 && handle < SystemBaseStringComparerFreeListSize); - return SystemBaseStringComparerFreeList[handle]; + return Value; } - void RemoveSystemBaseStringComparer(int32_t handle) + Byte::operator Object() const { - System::BaseStringComparer** pRelease = SystemBaseStringComparerFreeList + handle; - *pRelease = (System::BaseStringComparer*)NextFreeSystemBaseStringComparer; - NextFreeSystemBaseStringComparer = pRelease; + return Object(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); } - int32_t SystemCollectionsBaseQueueFreeListSize; - System::Collections::BaseQueue** SystemCollectionsBaseQueueFreeList; - System::Collections::BaseQueue** NextFreeSystemCollectionsBaseQueue; - int32_t StoreSystemCollectionsBaseQueue(System::Collections::BaseQueue* del) + Byte::operator ValueType() const { - assert(NextFreeSystemCollectionsBaseQueue != nullptr); - System::Collections::BaseQueue** pNext = NextFreeSystemCollectionsBaseQueue; - NextFreeSystemCollectionsBaseQueue = (System::Collections::BaseQueue**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsBaseQueueFreeList); + return ValueType(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); } - System::Collections::BaseQueue* GetSystemCollectionsBaseQueue(int32_t handle) + Byte::operator IComparable() const { - assert(handle >= 0 && handle < SystemCollectionsBaseQueueFreeListSize); - return SystemCollectionsBaseQueueFreeList[handle]; + return IComparable(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); } - void RemoveSystemCollectionsBaseQueue(int32_t handle) + Byte::operator IFormattable() const { - System::Collections::BaseQueue** pRelease = SystemCollectionsBaseQueueFreeList + handle; - *pRelease = (System::Collections::BaseQueue*)NextFreeSystemCollectionsBaseQueue; - NextFreeSystemCollectionsBaseQueue = pRelease; + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); } - int32_t SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize; - System::ComponentModel::Design::BaseIComponentChangeService** SystemComponentModelDesignBaseIComponentChangeServiceFreeList; - System::ComponentModel::Design::BaseIComponentChangeService** NextFreeSystemComponentModelDesignBaseIComponentChangeService; - int32_t StoreSystemComponentModelDesignBaseIComponentChangeService(System::ComponentModel::Design::BaseIComponentChangeService* del) + Byte::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); + } + + Int16::Int16() + : Value(0) { - assert(NextFreeSystemComponentModelDesignBaseIComponentChangeService != nullptr); - System::ComponentModel::Design::BaseIComponentChangeService** pNext = NextFreeSystemComponentModelDesignBaseIComponentChangeService; - NextFreeSystemComponentModelDesignBaseIComponentChangeService = (System::ComponentModel::Design::BaseIComponentChangeService**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignBaseIComponentChangeServiceFreeList); } - System::ComponentModel::Design::BaseIComponentChangeService* GetSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) + Int16::Int16(int16_t value) + : Value(value) { - assert(handle >= 0 && handle < SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize); - return SystemComponentModelDesignBaseIComponentChangeServiceFreeList[handle]; } - void RemoveSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) + Int16::operator int16_t() const { - System::ComponentModel::Design::BaseIComponentChangeService** pRelease = SystemComponentModelDesignBaseIComponentChangeServiceFreeList + handle; - *pRelease = (System::ComponentModel::Design::BaseIComponentChangeService*)NextFreeSystemComponentModelDesignBaseIComponentChangeService; - NextFreeSystemComponentModelDesignBaseIComponentChangeService = pRelease; + return Value; } - int32_t SystemIOBaseFileStreamFreeListSize; - System::IO::BaseFileStream** SystemIOBaseFileStreamFreeList; - System::IO::BaseFileStream** NextFreeSystemIOBaseFileStream; - int32_t StoreSystemIOBaseFileStream(System::IO::BaseFileStream* del) + Int16::operator Object() const { - assert(NextFreeSystemIOBaseFileStream != nullptr); - System::IO::BaseFileStream** pNext = NextFreeSystemIOBaseFileStream; - NextFreeSystemIOBaseFileStream = (System::IO::BaseFileStream**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemIOBaseFileStreamFreeList); + return Object(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); } - System::IO::BaseFileStream* GetSystemIOBaseFileStream(int32_t handle) + Int16::operator ValueType() const { - assert(handle >= 0 && handle < SystemIOBaseFileStreamFreeListSize); - return SystemIOBaseFileStreamFreeList[handle]; + return ValueType(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); } - void RemoveSystemIOBaseFileStream(int32_t handle) + Int16::operator IComparable() const { - System::IO::BaseFileStream** pRelease = SystemIOBaseFileStreamFreeList + handle; - *pRelease = (System::IO::BaseFileStream*)NextFreeSystemIOBaseFileStream; - NextFreeSystemIOBaseFileStream = pRelease; + return IComparable(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); } - int32_t RefCountsLenUnityEnginePlayablesPlayableHandle; - int32_t* RefCountsUnityEnginePlayablesPlayableHandle; - void ReferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) + Int16::operator IFormattable() const { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); - if (handle != 0) - { - RefCountsUnityEnginePlayablesPlayableHandle[handle]++; - } + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); } - void DereferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) + Int16::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); + } + + UInt16::UInt16() + : Value(0) { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableHandle[handle]; - if (numRemain == 0) - { - ReleaseUnityEnginePlayablesPlayableHandle(handle); - } - } } - int32_t RefCountsLenUnityEngineXRWSAInputInteractionSourcePose; - int32_t* RefCountsUnityEngineXRWSAInputInteractionSourcePose; + UInt16::UInt16(uint16_t value) + : Value(value) + { + } - void ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) + UInt16::operator uint16_t() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); - if (handle != 0) - { - RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]++; - } + return Value; } - void DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) + UInt16::operator Object() const { - assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineXRWSAInputInteractionSourcePose(handle); - } - } + return Object(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); } - int32_t SystemActionFreeListSize; - System::Action** SystemActionFreeList; - System::Action** NextFreeSystemAction; + UInt16::operator ValueType() const + { + return ValueType(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); + } - int32_t StoreSystemAction(System::Action* del) + UInt16::operator IComparable() const { - assert(NextFreeSystemAction != nullptr); - System::Action** pNext = NextFreeSystemAction; - NextFreeSystemAction = (System::Action**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemActionFreeList); + return IComparable(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); } - System::Action* GetSystemAction(int32_t handle) + UInt16::operator IFormattable() const { - assert(handle >= 0 && handle < SystemActionFreeListSize); - return SystemActionFreeList[handle]; + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); } - void RemoveSystemAction(int32_t handle) + UInt16::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); + } + + Int32::Int32() + : Value(0) { - 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) + Int32::Int32(int32_t value) + : Value(value) { - assert(NextFreeSystemActionSystemSingle != nullptr); - System::Action1** pNext = NextFreeSystemActionSystemSingle; - NextFreeSystemActionSystemSingle = (System::Action1**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemActionSystemSingleFreeList); } - System::Action1* GetSystemActionSystemSingle(int32_t handle) + Int32::operator int32_t() const { - assert(handle >= 0 && handle < SystemActionSystemSingleFreeListSize); - return SystemActionSystemSingleFreeList[handle]; + return Value; } - void RemoveSystemActionSystemSingle(int32_t handle) + Int32::operator Object() const { - System::Action1** pRelease = SystemActionSystemSingleFreeList + handle; - *pRelease = (System::Action1*)NextFreeSystemActionSystemSingle; - NextFreeSystemActionSystemSingle = pRelease; + return Object(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); } - int32_t SystemActionSystemSingle_SystemSingleFreeListSize; - System::Action2** SystemActionSystemSingle_SystemSingleFreeList; - System::Action2** NextFreeSystemActionSystemSingle_SystemSingle; - int32_t StoreSystemActionSystemSingle_SystemSingle(System::Action2* del) + Int32::operator ValueType() const { - assert(NextFreeSystemActionSystemSingle_SystemSingle != nullptr); - System::Action2** pNext = NextFreeSystemActionSystemSingle_SystemSingle; - NextFreeSystemActionSystemSingle_SystemSingle = (System::Action2**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemActionSystemSingle_SystemSingleFreeList); + return ValueType(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); } - System::Action2* GetSystemActionSystemSingle_SystemSingle(int32_t handle) + Int32::operator IComparable() const { - assert(handle >= 0 && handle < SystemActionSystemSingle_SystemSingleFreeListSize); - return SystemActionSystemSingle_SystemSingleFreeList[handle]; + return IComparable(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); } - void RemoveSystemActionSystemSingle_SystemSingle(int32_t handle) + Int32::operator IFormattable() const { - System::Action2** pRelease = SystemActionSystemSingle_SystemSingleFreeList + handle; - *pRelease = (System::Action2*)NextFreeSystemActionSystemSingle_SystemSingle; - NextFreeSystemActionSystemSingle_SystemSingle = pRelease; + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); } - int32_t SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize; - System::Func3** SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList; - System::Func3** NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble; - int32_t StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(System::Func3* del) + Int32::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); + } + + UInt32::UInt32() + : Value(0) { - 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) + UInt32::UInt32(uint32_t value) + : Value(value) { - assert(handle >= 0 && handle < SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize); - return SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[handle]; } - void RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle) + UInt32::operator uint32_t() const { - System::Func3** pRelease = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + handle; - *pRelease = (System::Func3*)NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble; - NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = pRelease; + return Value; } - int32_t SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize; - System::Func3** SystemFuncSystemInt16_SystemInt32_SystemStringFreeList; - System::Func3** NextFreeSystemFuncSystemInt16_SystemInt32_SystemString; - int32_t StoreSystemFuncSystemInt16_SystemInt32_SystemString(System::Func3* del) + UInt32::operator Object() const { - 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); + return Object(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); } - System::Func3* GetSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle) + UInt32::operator ValueType() const { - assert(handle >= 0 && handle < SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize); - return SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[handle]; + return ValueType(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); } - void RemoveSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle) + UInt32::operator IComparable() const { - System::Func3** pRelease = SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + handle; - *pRelease = (System::Func3*)NextFreeSystemFuncSystemInt16_SystemInt32_SystemString; - NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = pRelease; + return IComparable(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); } - int32_t SystemAppDomainInitializerFreeListSize; - System::AppDomainInitializer** SystemAppDomainInitializerFreeList; - System::AppDomainInitializer** NextFreeSystemAppDomainInitializer; - int32_t StoreSystemAppDomainInitializer(System::AppDomainInitializer* del) + UInt32::operator IFormattable() const { - assert(NextFreeSystemAppDomainInitializer != nullptr); - System::AppDomainInitializer** pNext = NextFreeSystemAppDomainInitializer; - NextFreeSystemAppDomainInitializer = (System::AppDomainInitializer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemAppDomainInitializerFreeList); + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); } - System::AppDomainInitializer* GetSystemAppDomainInitializer(int32_t handle) + UInt32::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); + } + + Int64::Int64() + : Value(0) { - assert(handle >= 0 && handle < SystemAppDomainInitializerFreeListSize); - return SystemAppDomainInitializerFreeList[handle]; } - void RemoveSystemAppDomainInitializer(int32_t handle) + Int64::Int64(int64_t value) + : Value(value) { - System::AppDomainInitializer** pRelease = SystemAppDomainInitializerFreeList + handle; - *pRelease = (System::AppDomainInitializer*)NextFreeSystemAppDomainInitializer; - NextFreeSystemAppDomainInitializer = pRelease; } - int32_t UnityEngineEventsUnityActionFreeListSize; - UnityEngine::Events::UnityAction** UnityEngineEventsUnityActionFreeList; - UnityEngine::Events::UnityAction** NextFreeUnityEngineEventsUnityAction; - int32_t StoreUnityEngineEventsUnityAction(UnityEngine::Events::UnityAction* del) + Int64::operator int64_t() const { - assert(NextFreeUnityEngineEventsUnityAction != nullptr); - UnityEngine::Events::UnityAction** pNext = NextFreeUnityEngineEventsUnityAction; - NextFreeUnityEngineEventsUnityAction = (UnityEngine::Events::UnityAction**)*pNext; - *pNext = del; - return (int32_t)(pNext - UnityEngineEventsUnityActionFreeList); + return Value; } - UnityEngine::Events::UnityAction* GetUnityEngineEventsUnityAction(int32_t handle) + Int64::operator Object() const { - assert(handle >= 0 && handle < UnityEngineEventsUnityActionFreeListSize); - return UnityEngineEventsUnityActionFreeList[handle]; + return Object(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); } - void RemoveUnityEngineEventsUnityAction(int32_t handle) + Int64::operator ValueType() const { - UnityEngine::Events::UnityAction** pRelease = UnityEngineEventsUnityActionFreeList + handle; - *pRelease = (UnityEngine::Events::UnityAction*)NextFreeUnityEngineEventsUnityAction; - NextFreeUnityEngineEventsUnityAction = pRelease; + return ValueType(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); } - int32_t UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize; - UnityEngine::Events::UnityAction2** UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList; - UnityEngine::Events::UnityAction2** NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - int32_t StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(UnityEngine::Events::UnityAction2* del) + Int64::operator IComparable() const { - assert(NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode != nullptr); - UnityEngine::Events::UnityAction2** pNext = NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = (UnityEngine::Events::UnityAction2**)*pNext; - *pNext = del; - return (int32_t)(pNext - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList); + return IComparable(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); } - UnityEngine::Events::UnityAction2* GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) + Int64::operator IFormattable() const { - assert(handle >= 0 && handle < UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize); - return UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[handle]; + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); } - void RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) + Int64::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); + } + + UInt64::UInt64() + : Value(0) { - UnityEngine::Events::UnityAction2** pRelease = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + handle; - *pRelease = (UnityEngine::Events::UnityAction2*)NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = pRelease; } - int32_t SystemComponentModelDesignComponentEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentEventHandler** SystemComponentModelDesignComponentEventHandlerFreeList; - System::ComponentModel::Design::ComponentEventHandler** NextFreeSystemComponentModelDesignComponentEventHandler; - int32_t StoreSystemComponentModelDesignComponentEventHandler(System::ComponentModel::Design::ComponentEventHandler* del) + UInt64::UInt64(uint64_t value) + : Value(value) { - assert(NextFreeSystemComponentModelDesignComponentEventHandler != nullptr); - System::ComponentModel::Design::ComponentEventHandler** pNext = NextFreeSystemComponentModelDesignComponentEventHandler; - NextFreeSystemComponentModelDesignComponentEventHandler = (System::ComponentModel::Design::ComponentEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentEventHandlerFreeList); } - System::ComponentModel::Design::ComponentEventHandler* GetSystemComponentModelDesignComponentEventHandler(int32_t handle) + UInt64::operator uint64_t() const { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentEventHandlerFreeListSize); - return SystemComponentModelDesignComponentEventHandlerFreeList[handle]; + return Value; } - void RemoveSystemComponentModelDesignComponentEventHandler(int32_t handle) + UInt64::operator Object() const { - System::ComponentModel::Design::ComponentEventHandler** pRelease = SystemComponentModelDesignComponentEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentEventHandler*)NextFreeSystemComponentModelDesignComponentEventHandler; - NextFreeSystemComponentModelDesignComponentEventHandler = pRelease; + return Object(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); } - int32_t SystemComponentModelDesignComponentChangingEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentChangingEventHandler** SystemComponentModelDesignComponentChangingEventHandlerFreeList; - System::ComponentModel::Design::ComponentChangingEventHandler** NextFreeSystemComponentModelDesignComponentChangingEventHandler; - int32_t StoreSystemComponentModelDesignComponentChangingEventHandler(System::ComponentModel::Design::ComponentChangingEventHandler* del) + UInt64::operator ValueType() const { - assert(NextFreeSystemComponentModelDesignComponentChangingEventHandler != nullptr); - System::ComponentModel::Design::ComponentChangingEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangingEventHandler; - NextFreeSystemComponentModelDesignComponentChangingEventHandler = (System::ComponentModel::Design::ComponentChangingEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentChangingEventHandlerFreeList); + return ValueType(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); } - System::ComponentModel::Design::ComponentChangingEventHandler* GetSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) + UInt64::operator IComparable() const { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangingEventHandlerFreeListSize); - return SystemComponentModelDesignComponentChangingEventHandlerFreeList[handle]; + return IComparable(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); } - void RemoveSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) + UInt64::operator IFormattable() const { - System::ComponentModel::Design::ComponentChangingEventHandler** pRelease = SystemComponentModelDesignComponentChangingEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentChangingEventHandler*)NextFreeSystemComponentModelDesignComponentChangingEventHandler; - NextFreeSystemComponentModelDesignComponentChangingEventHandler = pRelease; + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); } - int32_t SystemComponentModelDesignComponentChangedEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentChangedEventHandler** SystemComponentModelDesignComponentChangedEventHandlerFreeList; - System::ComponentModel::Design::ComponentChangedEventHandler** NextFreeSystemComponentModelDesignComponentChangedEventHandler; - int32_t StoreSystemComponentModelDesignComponentChangedEventHandler(System::ComponentModel::Design::ComponentChangedEventHandler* del) + UInt64::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); + } + + Single::Single() + : Value(0.0f) { - assert(NextFreeSystemComponentModelDesignComponentChangedEventHandler != nullptr); - System::ComponentModel::Design::ComponentChangedEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangedEventHandler; - NextFreeSystemComponentModelDesignComponentChangedEventHandler = (System::ComponentModel::Design::ComponentChangedEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentChangedEventHandlerFreeList); } - System::ComponentModel::Design::ComponentChangedEventHandler* GetSystemComponentModelDesignComponentChangedEventHandler(int32_t handle) + Single::Single(float value) + : Value(value) { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangedEventHandlerFreeListSize); - return SystemComponentModelDesignComponentChangedEventHandlerFreeList[handle]; } - void RemoveSystemComponentModelDesignComponentChangedEventHandler(int32_t handle) + Single::operator float() const { - System::ComponentModel::Design::ComponentChangedEventHandler** pRelease = SystemComponentModelDesignComponentChangedEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentChangedEventHandler*)NextFreeSystemComponentModelDesignComponentChangedEventHandler; - NextFreeSystemComponentModelDesignComponentChangedEventHandler = pRelease; + return Value; } - int32_t SystemComponentModelDesignComponentRenameEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentRenameEventHandler** SystemComponentModelDesignComponentRenameEventHandlerFreeList; - System::ComponentModel::Design::ComponentRenameEventHandler** NextFreeSystemComponentModelDesignComponentRenameEventHandler; - int32_t StoreSystemComponentModelDesignComponentRenameEventHandler(System::ComponentModel::Design::ComponentRenameEventHandler* del) + Single::operator Object() const { - assert(NextFreeSystemComponentModelDesignComponentRenameEventHandler != nullptr); - System::ComponentModel::Design::ComponentRenameEventHandler** pNext = NextFreeSystemComponentModelDesignComponentRenameEventHandler; - NextFreeSystemComponentModelDesignComponentRenameEventHandler = (System::ComponentModel::Design::ComponentRenameEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentRenameEventHandlerFreeList); + return Object(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); } - System::ComponentModel::Design::ComponentRenameEventHandler* GetSystemComponentModelDesignComponentRenameEventHandler(int32_t handle) + Single::operator ValueType() const { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentRenameEventHandlerFreeListSize); - return SystemComponentModelDesignComponentRenameEventHandlerFreeList[handle]; + return ValueType(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); } - void RemoveSystemComponentModelDesignComponentRenameEventHandler(int32_t handle) + Single::operator IComparable() const { - System::ComponentModel::Design::ComponentRenameEventHandler** pRelease = SystemComponentModelDesignComponentRenameEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentRenameEventHandler*)NextFreeSystemComponentModelDesignComponentRenameEventHandler; - NextFreeSystemComponentModelDesignComponentRenameEventHandler = pRelease; + return IComparable(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); } - /*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() - : Handle(0) + + Single::operator IFormattable() const { + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); } - Object::Object(Plugin::InternalUse iu, int32_t handle) - : Handle(handle) + Single::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); + } + + Double::Double() + : Value(0.0) { } - Object::Object(decltype(nullptr)) - : Handle(0) + Double::Double(double value) + : Value(value) { } - bool Object::operator==(decltype(nullptr)) const + Double::operator double() const { - return Handle == 0; + return Value; } - bool Object::operator!=(decltype(nullptr)) const + Double::operator Object() const { - return Handle != 0; + return Object(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); } - void Object::ThrowReferenceToThis() + Double::operator ValueType() const { - throw *this; + return ValueType(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); } - ValueType::ValueType(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) + Double::operator IComparable() const { + return IComparable(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); } - ValueType::ValueType(decltype(nullptr)) - : Object(nullptr) + Double::operator IFormattable() const { + return IFormattable(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); } - String::String(decltype(nullptr)) - : Object(Plugin::InternalUse::Only, 0) + Double::operator IConvertible() const + { + return IConvertible(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); + } +} + +//////////////////////////////////////////////////////////////// +// Support for using IEnumerable with range for loops +//////////////////////////////////////////////////////////////// + +namespace Plugin +{ + // End iterators are dummies full of null + EnumerableIterator::EnumerableIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { } - String::String(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) + // Begin iterators keep track of an IEnumerator + EnumerableIterator::EnumerableIterator( + System::Collections::IEnumerable& enumerable) + : enumerator(enumerable.GetEnumerator()) { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + hasMore = enumerator.MoveNext(); } - String::String(const String& other) - : Object(Plugin::InternalUse::Only, other.Handle) + EnumerableIterator& EnumerableIterator::operator++() { - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + hasMore = enumerator.MoveNext(); + return *this; } - String::String(String&& other) - : Object(Plugin::InternalUse::Only, other.Handle) + bool EnumerableIterator::operator!=(const EnumerableIterator& other) { - other.Handle = 0; + return hasMore; } - String::~String() + System::Object EnumerableIterator::operator*() { - if (Handle) + return enumerator.GetCurrent(); + } +} + +//////////////////////////////////////////////////////////////// +// 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) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + RefCountsClass[handle]++; } } - - String& String::operator=(const String& other) + + void DereferenceManagedClass(int32_t handle) { - if (Handle != other.Handle) + assert(handle >= 0 && handle < RefCountsLenClass); + if (handle != 0) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - if (Handle) + int32_t numRemain = --RefCountsClass[handle]; + if (numRemain == 0) { - Plugin::ReferenceManagedClass(Handle); + ReleaseObject(handle); } } - return *this; } - String& String::operator=(decltype(nullptr)) + bool DereferenceManagedClassNoRelease(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenClass); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + int32_t numRemain = --RefCountsClass[handle]; + if (numRemain == 0) + { + return true; + } } - return *this; + return false; } - String& String::operator=(String&& other) + /*BEGIN GLOBAL STATE AND FUNCTIONS*/ + int32_t RefCountsLenUnityEngineResolution; + int32_t* RefCountsUnityEngineResolution; + + void ReferenceManagedUnityEngineResolution(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); + RefCountsUnityEngineResolution[handle]++; } - Handle = other.Handle; - other.Handle = 0; - return *this; } - String::String(const char* chars) - : Object(Plugin::InternalUse::Only, Plugin::StringNew(chars)) + void DereferenceManagedUnityEngineResolution(int32_t handle) { + assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineResolution[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineResolution(handle); + } + } } - ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - { - } + int32_t RefCountsLenUnityEngineRaycastHit; + int32_t* RefCountsUnityEngineRaycastHit; - ICloneable::ICloneable(decltype(nullptr)) - : Object(nullptr) + void ReferenceManagedUnityEngineRaycastHit(int32_t handle) { + assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit); + if (handle != 0) + { + RefCountsUnityEngineRaycastHit[handle]++; + } } - namespace Collections + void DereferenceManagedUnityEngineRaycastHit(int32_t handle) { - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - { - } - - IEnumerable::IEnumerable(decltype(nullptr)) - : Object(nullptr) - { - } - - IEnumerator IEnumerable::GetEnumerator() - { - return IEnumerator( - Plugin::InternalUse::Only, - Plugin::EnumerableGetEnumerator(Handle)); - } - - Plugin::EnumerableIterator begin( - System::Collections::IEnumerable& enumerable) - { - return Plugin::EnumerableIterator(enumerable); - } - - Plugin::EnumerableIterator end( - System::Collections::IEnumerable& enumerable) - { - return Plugin::EnumerableIterator(nullptr); - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - , IEnumerable(nullptr) - { - } - - ICollection::ICollection(decltype(nullptr)) - : Object(nullptr) - , IEnumerable(nullptr) - { - } - - IList::IList(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - , IEnumerable(nullptr) - , ICollection(nullptr) - { - } - - IList::IList(decltype(nullptr)) - : Object(nullptr) - , IEnumerable(nullptr) - , ICollection(nullptr) + assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit); + if (handle != 0) { + int32_t numRemain = --RefCountsUnityEngineRaycastHit[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineRaycastHit(handle); + } } } - Array::Array(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - , ICloneable(nullptr) - , Collections::IEnumerable(nullptr) - , Collections::ICollection(nullptr) - , Collections::IList(nullptr) - { - } + int32_t RefCountsLenUnityEnginePlayablesPlayableGraph; + int32_t* RefCountsUnityEnginePlayablesPlayableGraph; - Array::Array(decltype(nullptr)) - : Object(nullptr) - , ICloneable(nullptr) - , Collections::IEnumerable(nullptr) - , Collections::ICollection(nullptr) - , Collections::IList(nullptr) + void ReferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) { + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); + if (handle != 0) + { + RefCountsUnityEnginePlayablesPlayableGraph[handle]++; + } } - int32_t Array::GetLength() + void DereferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) { - return Plugin::ArrayGetLength(Handle); + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableGraph[handle]; + if (numRemain == 0) + { + ReleaseUnityEnginePlayablesPlayableGraph(handle); + } + } } - int32_t Array::GetRank() - { - return 0; - } -} - -/*BEGIN METHOD DEFINITIONS*/ -namespace System -{ - IDisposable::IDisposable(decltype(nullptr)) - { - } + int32_t RefCountsLenUnityEngineAnimationsAnimationMixerPlayable; + int32_t* RefCountsUnityEngineAnimationsAnimationMixerPlayable; - IDisposable::IDisposable(Plugin::InternalUse iu, int32_t handle) + void ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) { - Handle = handle; - if (handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); + if (handle != 0) { - Plugin::ReferenceManagedClass(handle); + RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]++; } } - IDisposable::IDisposable(const IDisposable& other) - : IDisposable(Plugin::InternalUse::Only, other.Handle) + void DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) { + assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineAnimationsAnimationMixerPlayable(handle); + } + } } - IDisposable::IDisposable(IDisposable&& other) - : IDisposable(Plugin::InternalUse::Only, other.Handle) + int32_t RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + int32_t* RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + + void ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) { - other.Handle = 0; + assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); + if (handle != 0) + { + RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]++; + } } - IDisposable::~IDisposable() + void DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + int32_t numRemain = --RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]; + if (numRemain == 0) + { + ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(handle); + } } } - IDisposable& IDisposable::operator=(const IDisposable& other) + int32_t RefCountsLenUnityEngineRay; + int32_t* RefCountsUnityEngineRay; + + void ReferenceManagedUnityEngineRay(int32_t handle) { - if (this->Handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); + if (handle != 0) { - Plugin::DereferenceManagedClass(this->Handle); + RefCountsUnityEngineRay[handle]++; } - this->Handle = other.Handle; - if (this->Handle) + } + + void DereferenceManagedUnityEngineRay(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); + if (handle != 0) { - Plugin::ReferenceManagedClass(this->Handle); + int32_t numRemain = --RefCountsUnityEngineRay[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineRay(handle); + } } - return *this; } - IDisposable& IDisposable::operator=(decltype(nullptr)) + int32_t RefCountsLenUnityEngineSceneManagementScene; + int32_t* RefCountsUnityEngineSceneManagementScene; + + void ReferenceManagedUnityEngineSceneManagementScene(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + RefCountsUnityEngineSceneManagementScene[handle]++; } - return *this; } - IDisposable& IDisposable::operator=(IDisposable&& other) + void DereferenceManagedUnityEngineSceneManagementScene(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); + int32_t numRemain = --RefCountsUnityEngineSceneManagementScene[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineSceneManagementScene(handle); + } } - Handle = other.Handle; - other.Handle = 0; - return *this; } - bool IDisposable::operator==(const IDisposable& other) const + int32_t SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize; + System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemInt32FreeList; + System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; + + int32_t StoreSystemCollectionsGenericBaseIComparerSystemInt32(System::Collections::Generic::BaseIComparer* del) { - return Handle == other.Handle; + assert(NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 != nullptr); + System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; + NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = (System::Collections::Generic::BaseIComparer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemInt32FreeList); } - bool IDisposable::operator!=(const IDisposable& other) const + System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) { - return Handle != other.Handle; + assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize); + return SystemCollectionsGenericBaseIComparerSystemInt32FreeList[handle]; } - void IDisposable::Dispose() + void RemoveSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) { - Plugin::SystemIDisposableMethodDispose(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemInt32FreeList + handle; + *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; + NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = pRelease; } -} - -namespace UnityEngine -{ - Vector3::Vector3() + int32_t SystemCollectionsGenericBaseIComparerSystemStringFreeListSize; + System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemStringFreeList; + System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemString; + + int32_t StoreSystemCollectionsGenericBaseIComparerSystemString(System::Collections::Generic::BaseIComparer* del) { + assert(NextFreeSystemCollectionsGenericBaseIComparerSystemString != nullptr); + System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemString; + NextFreeSystemCollectionsGenericBaseIComparerSystemString = (System::Collections::Generic::BaseIComparer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemStringFreeList); } - Vector3::Vector3(float x, float y, float z) + System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) { - 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; + assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemStringFreeListSize); + return SystemCollectionsGenericBaseIComparerSystemStringFreeList[handle]; } - float Vector3::GetMagnitude() + void RemoveSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) { - auto returnValue = Plugin::UnityEngineVector3PropertyGetMagnitude(this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemStringFreeList + handle; + *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemString; + NextFreeSystemCollectionsGenericBaseIComparerSystemString = pRelease; } + int32_t SystemBaseStringComparerFreeListSize; + System::BaseStringComparer** SystemBaseStringComparerFreeList; + System::BaseStringComparer** NextFreeSystemBaseStringComparer; - void Vector3::Set(float newX, float newY, float newZ) + int32_t StoreSystemBaseStringComparer(System::BaseStringComparer* del) { - Plugin::UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(this, newX, newY, newZ); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + assert(NextFreeSystemBaseStringComparer != nullptr); + System::BaseStringComparer** pNext = NextFreeSystemBaseStringComparer; + NextFreeSystemBaseStringComparer = (System::BaseStringComparer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemBaseStringComparerFreeList); } - UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a) + System::BaseStringComparer* GetSystemBaseStringComparer(int32_t handle) { - 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; + assert(handle >= 0 && handle < SystemBaseStringComparerFreeListSize); + return SystemBaseStringComparerFreeList[handle]; } - UnityEngine::Vector3 Vector3::operator-() + void RemoveSystemBaseStringComparer(int32_t handle) { - auto returnValue = Plugin::UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + System::BaseStringComparer** pRelease = SystemBaseStringComparerFreeList + handle; + *pRelease = (System::BaseStringComparer*)NextFreeSystemBaseStringComparer; + NextFreeSystemBaseStringComparer = pRelease; } -} - -namespace System -{ - Object::Object(UnityEngine::Vector3& val) + int32_t SystemCollectionsBaseQueueFreeListSize; + System::Collections::BaseQueue** SystemCollectionsBaseQueueFreeList; + System::Collections::BaseQueue** NextFreeSystemCollectionsBaseQueue; + + int32_t StoreSystemCollectionsBaseQueue(System::Collections::BaseQueue* del) { - int32_t handle = Plugin::BoxVector3(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } + assert(NextFreeSystemCollectionsBaseQueue != nullptr); + System::Collections::BaseQueue** pNext = NextFreeSystemCollectionsBaseQueue; + NextFreeSystemCollectionsBaseQueue = (System::Collections::BaseQueue**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsBaseQueueFreeList); } - Object::operator UnityEngine::Vector3() + System::Collections::BaseQueue* GetSystemCollectionsBaseQueue(int32_t handle) { - UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + assert(handle >= 0 && handle < SystemCollectionsBaseQueueFreeListSize); + return SystemCollectionsBaseQueueFreeList[handle]; } -} - -namespace UnityEngine -{ - Object::Object(decltype(nullptr)) + + void RemoveSystemCollectionsBaseQueue(int32_t handle) { + System::Collections::BaseQueue** pRelease = SystemCollectionsBaseQueueFreeList + handle; + *pRelease = (System::Collections::BaseQueue*)NextFreeSystemCollectionsBaseQueue; + NextFreeSystemCollectionsBaseQueue = pRelease; } + int32_t SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize; + System::ComponentModel::Design::BaseIComponentChangeService** SystemComponentModelDesignBaseIComponentChangeServiceFreeList; + System::ComponentModel::Design::BaseIComponentChangeService** NextFreeSystemComponentModelDesignBaseIComponentChangeService; - Object::Object(Plugin::InternalUse iu, int32_t handle) + int32_t StoreSystemComponentModelDesignBaseIComponentChangeService(System::ComponentModel::Design::BaseIComponentChangeService* del) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + assert(NextFreeSystemComponentModelDesignBaseIComponentChangeService != nullptr); + System::ComponentModel::Design::BaseIComponentChangeService** pNext = NextFreeSystemComponentModelDesignBaseIComponentChangeService; + NextFreeSystemComponentModelDesignBaseIComponentChangeService = (System::ComponentModel::Design::BaseIComponentChangeService**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignBaseIComponentChangeServiceFreeList); } - Object::Object(const Object& other) - : Object(Plugin::InternalUse::Only, other.Handle) + System::ComponentModel::Design::BaseIComponentChangeService* GetSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) { + assert(handle >= 0 && handle < SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize); + return SystemComponentModelDesignBaseIComponentChangeServiceFreeList[handle]; } - Object::Object(Object&& other) - : Object(Plugin::InternalUse::Only, other.Handle) + void RemoveSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) { - other.Handle = 0; + System::ComponentModel::Design::BaseIComponentChangeService** pRelease = SystemComponentModelDesignBaseIComponentChangeServiceFreeList + handle; + *pRelease = (System::ComponentModel::Design::BaseIComponentChangeService*)NextFreeSystemComponentModelDesignBaseIComponentChangeService; + NextFreeSystemComponentModelDesignBaseIComponentChangeService = pRelease; + } + int32_t SystemIOBaseFileStreamFreeListSize; + System::IO::BaseFileStream** SystemIOBaseFileStreamFreeList; + System::IO::BaseFileStream** NextFreeSystemIOBaseFileStream; + + int32_t StoreSystemIOBaseFileStream(System::IO::BaseFileStream* del) + { + assert(NextFreeSystemIOBaseFileStream != nullptr); + System::IO::BaseFileStream** pNext = NextFreeSystemIOBaseFileStream; + NextFreeSystemIOBaseFileStream = (System::IO::BaseFileStream**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemIOBaseFileStreamFreeList); } - Object::~Object() + System::IO::BaseFileStream* GetSystemIOBaseFileStream(int32_t handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + assert(handle >= 0 && handle < SystemIOBaseFileStreamFreeListSize); + return SystemIOBaseFileStreamFreeList[handle]; } - Object& Object::operator=(const Object& other) + void RemoveSystemIOBaseFileStream(int32_t handle) { - if (this->Handle) + System::IO::BaseFileStream** pRelease = SystemIOBaseFileStreamFreeList + handle; + *pRelease = (System::IO::BaseFileStream*)NextFreeSystemIOBaseFileStream; + NextFreeSystemIOBaseFileStream = pRelease; + } + int32_t RefCountsLenUnityEnginePlayablesPlayableHandle; + int32_t* RefCountsUnityEnginePlayablesPlayableHandle; + + void ReferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); + if (handle != 0) { - Plugin::DereferenceManagedClass(this->Handle); + RefCountsUnityEnginePlayablesPlayableHandle[handle]++; } - this->Handle = other.Handle; - if (this->Handle) + } + + void DereferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); + if (handle != 0) { - Plugin::ReferenceManagedClass(this->Handle); + int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableHandle[handle]; + if (numRemain == 0) + { + ReleaseUnityEnginePlayablesPlayableHandle(handle); + } } - return *this; } - Object& Object::operator=(decltype(nullptr)) + int32_t RefCountsLenUnityEngineXRWSAInputInteractionSourcePose; + int32_t* RefCountsUnityEngineXRWSAInputInteractionSourcePose; + + void ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]++; } - return *this; } - Object& Object::operator=(Object&& other) + void DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) { - if (Handle) + assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); + if (handle != 0) { - Plugin::DereferenceManagedClass(Handle); + int32_t numRemain = --RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineXRWSAInputInteractionSourcePose(handle); + } } - Handle = other.Handle; - other.Handle = 0; - return *this; } - bool Object::operator==(const Object& other) const + int32_t SystemActionFreeListSize; + System::Action** SystemActionFreeList; + System::Action** NextFreeSystemAction; + + int32_t StoreSystemAction(System::Action* del) { - return Handle == other.Handle; + assert(NextFreeSystemAction != nullptr); + System::Action** pNext = NextFreeSystemAction; + NextFreeSystemAction = (System::Action**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemActionFreeList); } - bool Object::operator!=(const Object& other) const + System::Action* GetSystemAction(int32_t handle) { - return Handle != other.Handle; + assert(handle >= 0 && handle < SystemActionFreeListSize); + return SystemActionFreeList[handle]; } - System::String Object::GetName() + void RemoveSystemAction(int32_t handle) { - 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); + System::Action** pRelease = SystemActionFreeList + handle; + *pRelease = (System::Action*)NextFreeSystemAction; + NextFreeSystemAction = pRelease; } + int32_t SystemActionSystemSingleFreeListSize; + System::Action1** SystemActionSystemSingleFreeList; + System::Action1** NextFreeSystemActionSystemSingle; - void Object::SetName(System::String& value) + int32_t StoreSystemActionSystemSingle(System::Action1* del) { - Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + assert(NextFreeSystemActionSystemSingle != nullptr); + System::Action1** pNext = NextFreeSystemActionSystemSingle; + NextFreeSystemActionSystemSingle = (System::Action1**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemActionSystemSingleFreeList); } - System::Boolean Object::operator==(UnityEngine::Object& x) + System::Action1* GetSystemActionSystemSingle(int32_t handle) { - 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; + assert(handle >= 0 && handle < SystemActionSystemSingleFreeListSize); + return SystemActionSystemSingleFreeList[handle]; } - 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 -{ - Component::Component(decltype(nullptr)) - : UnityEngine::Object(nullptr) + 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; - Component::Component(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Object(nullptr) + int32_t StoreSystemActionSystemSingle_SystemSingle(System::Action2* del) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + assert(NextFreeSystemActionSystemSingle_SystemSingle != nullptr); + System::Action2** pNext = NextFreeSystemActionSystemSingle_SystemSingle; + NextFreeSystemActionSystemSingle_SystemSingle = (System::Action2**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemActionSystemSingle_SystemSingleFreeList); } - Component::Component(const Component& other) - : Component(Plugin::InternalUse::Only, other.Handle) + System::Action2* GetSystemActionSystemSingle_SystemSingle(int32_t handle) { + assert(handle >= 0 && handle < SystemActionSystemSingle_SystemSingleFreeListSize); + return SystemActionSystemSingle_SystemSingleFreeList[handle]; } - Component::Component(Component&& other) - : Component(Plugin::InternalUse::Only, other.Handle) + void RemoveSystemActionSystemSingle_SystemSingle(int32_t handle) { - other.Handle = 0; + 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; - Component::~Component() + int32_t StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(System::Func3* del) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + 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); } - Component& Component::operator=(const Component& other) + System::Func3* GetSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + assert(handle >= 0 && handle < SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize); + return SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[handle]; } - Component& Component::operator=(decltype(nullptr)) + void RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + 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; - Component& Component::operator=(Component&& other) + int32_t StoreSystemFuncSystemInt16_SystemInt32_SystemString(System::Func3* del) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + 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); } - bool Component::operator==(const Component& other) const + System::Func3* GetSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle) { - return Handle == other.Handle; + assert(handle >= 0 && handle < SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize); + return SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[handle]; } - bool Component::operator!=(const Component& other) const + void RemoveSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle) { - return Handle != other.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; - UnityEngine::Transform Component::GetTransform() + int32_t StoreSystemAppDomainInitializer(System::AppDomainInitializer* del) { - 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); + assert(NextFreeSystemAppDomainInitializer != nullptr); + System::AppDomainInitializer** pNext = NextFreeSystemAppDomainInitializer; + NextFreeSystemAppDomainInitializer = (System::AppDomainInitializer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemAppDomainInitializerFreeList); } -} - -namespace UnityEngine -{ - Transform::Transform(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , System::Collections::IEnumerable(nullptr) + + System::AppDomainInitializer* GetSystemAppDomainInitializer(int32_t handle) { + assert(handle >= 0 && handle < SystemAppDomainInitializerFreeListSize); + return SystemAppDomainInitializerFreeList[handle]; } - Transform::Transform(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , System::Collections::IEnumerable(nullptr) + void RemoveSystemAppDomainInitializer(int32_t handle) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + System::AppDomainInitializer** pRelease = SystemAppDomainInitializerFreeList + handle; + *pRelease = (System::AppDomainInitializer*)NextFreeSystemAppDomainInitializer; + NextFreeSystemAppDomainInitializer = pRelease; } + int32_t UnityEngineEventsUnityActionFreeListSize; + UnityEngine::Events::UnityAction** UnityEngineEventsUnityActionFreeList; + UnityEngine::Events::UnityAction** NextFreeUnityEngineEventsUnityAction; - Transform::Transform(const Transform& other) - : Transform(Plugin::InternalUse::Only, other.Handle) + int32_t StoreUnityEngineEventsUnityAction(UnityEngine::Events::UnityAction* del) { + assert(NextFreeUnityEngineEventsUnityAction != nullptr); + UnityEngine::Events::UnityAction** pNext = NextFreeUnityEngineEventsUnityAction; + NextFreeUnityEngineEventsUnityAction = (UnityEngine::Events::UnityAction**)*pNext; + *pNext = del; + return (int32_t)(pNext - UnityEngineEventsUnityActionFreeList); } - Transform::Transform(Transform&& other) - : Transform(Plugin::InternalUse::Only, other.Handle) + UnityEngine::Events::UnityAction* GetUnityEngineEventsUnityAction(int32_t handle) { - other.Handle = 0; + assert(handle >= 0 && handle < UnityEngineEventsUnityActionFreeListSize); + return UnityEngineEventsUnityActionFreeList[handle]; } - Transform::~Transform() + void RemoveUnityEngineEventsUnityAction(int32_t handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + UnityEngine::Events::UnityAction** pRelease = UnityEngineEventsUnityActionFreeList + handle; + *pRelease = (UnityEngine::Events::UnityAction*)NextFreeUnityEngineEventsUnityAction; + NextFreeUnityEngineEventsUnityAction = pRelease; } + int32_t UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize; + UnityEngine::Events::UnityAction2** UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList; + UnityEngine::Events::UnityAction2** NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - Transform& Transform::operator=(const Transform& other) + int32_t StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(UnityEngine::Events::UnityAction2* del) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + assert(NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode != nullptr); + UnityEngine::Events::UnityAction2** pNext = NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; + NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = (UnityEngine::Events::UnityAction2**)*pNext; + *pNext = del; + return (int32_t)(pNext - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList); } - Transform& Transform::operator=(decltype(nullptr)) + UnityEngine::Events::UnityAction2* GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + assert(handle >= 0 && handle < UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize); + return UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[handle]; } - Transform& Transform::operator=(Transform&& other) + void RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + UnityEngine::Events::UnityAction2** pRelease = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + handle; + *pRelease = (UnityEngine::Events::UnityAction2*)NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; + NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = pRelease; } + int32_t SystemComponentModelDesignComponentEventHandlerFreeListSize; + System::ComponentModel::Design::ComponentEventHandler** SystemComponentModelDesignComponentEventHandlerFreeList; + System::ComponentModel::Design::ComponentEventHandler** NextFreeSystemComponentModelDesignComponentEventHandler; - bool Transform::operator==(const Transform& other) const + int32_t StoreSystemComponentModelDesignComponentEventHandler(System::ComponentModel::Design::ComponentEventHandler* del) { - return Handle == other.Handle; + assert(NextFreeSystemComponentModelDesignComponentEventHandler != nullptr); + System::ComponentModel::Design::ComponentEventHandler** pNext = NextFreeSystemComponentModelDesignComponentEventHandler; + NextFreeSystemComponentModelDesignComponentEventHandler = (System::ComponentModel::Design::ComponentEventHandler**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignComponentEventHandlerFreeList); } - bool Transform::operator!=(const Transform& other) const + System::ComponentModel::Design::ComponentEventHandler* GetSystemComponentModelDesignComponentEventHandler(int32_t handle) { - return Handle != other.Handle; + assert(handle >= 0 && handle < SystemComponentModelDesignComponentEventHandlerFreeListSize); + return SystemComponentModelDesignComponentEventHandlerFreeList[handle]; } - UnityEngine::Vector3 Transform::GetPosition() + void RemoveSystemComponentModelDesignComponentEventHandler(int32_t handle) { - auto returnValue = Plugin::UnityEngineTransformPropertyGetPosition(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + System::ComponentModel::Design::ComponentEventHandler** pRelease = SystemComponentModelDesignComponentEventHandlerFreeList + handle; + *pRelease = (System::ComponentModel::Design::ComponentEventHandler*)NextFreeSystemComponentModelDesignComponentEventHandler; + NextFreeSystemComponentModelDesignComponentEventHandler = pRelease; } + int32_t SystemComponentModelDesignComponentChangingEventHandlerFreeListSize; + System::ComponentModel::Design::ComponentChangingEventHandler** SystemComponentModelDesignComponentChangingEventHandlerFreeList; + System::ComponentModel::Design::ComponentChangingEventHandler** NextFreeSystemComponentModelDesignComponentChangingEventHandler; - void Transform::SetPosition(UnityEngine::Vector3& value) + int32_t StoreSystemComponentModelDesignComponentChangingEventHandler(System::ComponentModel::Design::ComponentChangingEventHandler* del) { - Plugin::UnityEngineTransformPropertySetPosition(Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + assert(NextFreeSystemComponentModelDesignComponentChangingEventHandler != nullptr); + System::ComponentModel::Design::ComponentChangingEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangingEventHandler; + NextFreeSystemComponentModelDesignComponentChangingEventHandler = (System::ComponentModel::Design::ComponentChangingEventHandler**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignComponentChangingEventHandlerFreeList); } - void Transform::SetParent(UnityEngine::Transform& parent) + System::ComponentModel::Design::ComponentChangingEventHandler* GetSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) { - Plugin::UnityEngineTransformMethodSetParentUnityEngineTransform(Handle, parent.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangingEventHandlerFreeListSize); + return SystemComponentModelDesignComponentChangingEventHandlerFreeList[handle]; } -} - -namespace UnityEngine -{ - Color::Color() + + void RemoveSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) { + System::ComponentModel::Design::ComponentChangingEventHandler** pRelease = SystemComponentModelDesignComponentChangingEventHandlerFreeList + handle; + *pRelease = (System::ComponentModel::Design::ComponentChangingEventHandler*)NextFreeSystemComponentModelDesignComponentChangingEventHandler; + NextFreeSystemComponentModelDesignComponentChangingEventHandler = pRelease; } -} - -namespace System -{ - Object::Object(UnityEngine::Color& val) + int32_t SystemComponentModelDesignComponentChangedEventHandlerFreeListSize; + System::ComponentModel::Design::ComponentChangedEventHandler** SystemComponentModelDesignComponentChangedEventHandlerFreeList; + System::ComponentModel::Design::ComponentChangedEventHandler** NextFreeSystemComponentModelDesignComponentChangedEventHandler; + + int32_t StoreSystemComponentModelDesignComponentChangedEventHandler(System::ComponentModel::Design::ComponentChangedEventHandler* del) { - int32_t handle = Plugin::BoxColor(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } + assert(NextFreeSystemComponentModelDesignComponentChangedEventHandler != nullptr); + System::ComponentModel::Design::ComponentChangedEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangedEventHandler; + NextFreeSystemComponentModelDesignComponentChangedEventHandler = (System::ComponentModel::Design::ComponentChangedEventHandler**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignComponentChangedEventHandlerFreeList); } - Object::operator UnityEngine::Color() + System::ComponentModel::Design::ComponentChangedEventHandler* GetSystemComponentModelDesignComponentChangedEventHandler(int32_t handle) { - UnityEngine::Color returnVal(Plugin::UnboxColor(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangedEventHandlerFreeListSize); + return SystemComponentModelDesignComponentChangedEventHandlerFreeList[handle]; + } + + void RemoveSystemComponentModelDesignComponentChangedEventHandler(int32_t handle) + { + System::ComponentModel::Design::ComponentChangedEventHandler** pRelease = SystemComponentModelDesignComponentChangedEventHandlerFreeList + handle; + *pRelease = (System::ComponentModel::Design::ComponentChangedEventHandler*)NextFreeSystemComponentModelDesignComponentChangedEventHandler; + NextFreeSystemComponentModelDesignComponentChangedEventHandler = pRelease; + } + int32_t SystemComponentModelDesignComponentRenameEventHandlerFreeListSize; + System::ComponentModel::Design::ComponentRenameEventHandler** SystemComponentModelDesignComponentRenameEventHandlerFreeList; + System::ComponentModel::Design::ComponentRenameEventHandler** NextFreeSystemComponentModelDesignComponentRenameEventHandler; + + int32_t StoreSystemComponentModelDesignComponentRenameEventHandler(System::ComponentModel::Design::ComponentRenameEventHandler* del) + { + assert(NextFreeSystemComponentModelDesignComponentRenameEventHandler != nullptr); + System::ComponentModel::Design::ComponentRenameEventHandler** pNext = NextFreeSystemComponentModelDesignComponentRenameEventHandler; + NextFreeSystemComponentModelDesignComponentRenameEventHandler = (System::ComponentModel::Design::ComponentRenameEventHandler**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignComponentRenameEventHandlerFreeList); } + + System::ComponentModel::Design::ComponentRenameEventHandler* GetSystemComponentModelDesignComponentRenameEventHandler(int32_t handle) + { + assert(handle >= 0 && handle < SystemComponentModelDesignComponentRenameEventHandlerFreeListSize); + return SystemComponentModelDesignComponentRenameEventHandlerFreeList[handle]; + } + + void RemoveSystemComponentModelDesignComponentRenameEventHandler(int32_t handle) + { + System::ComponentModel::Design::ComponentRenameEventHandler** pRelease = SystemComponentModelDesignComponentRenameEventHandlerFreeList + handle; + *pRelease = (System::ComponentModel::Design::ComponentRenameEventHandler*)NextFreeSystemComponentModelDesignComponentRenameEventHandler; + NextFreeSystemComponentModelDesignComponentRenameEventHandler = pRelease; + } + /*END GLOBAL STATE AND FUNCTIONS*/ } -namespace UnityEngine +namespace Plugin { - GradientColorKey::GradientColorKey() - { - } + // 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(UnityEngine::GradientColorKey& val) + Object::Object() + : Plugin::ManagedType(nullptr) { - int32_t handle = Plugin::BoxGradientColorKey(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } } - Object::operator UnityEngine::GradientColorKey() + Object::Object(Plugin::InternalUse iu, int32_t handle) + : ManagedType(Plugin::InternalUse::Only, handle) { - UnityEngine::GradientColorKey returnVal(Plugin::UnboxGradientColorKey(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; } -} - -namespace UnityEngine -{ - Resolution::Resolution(decltype(nullptr)) - : System::ValueType(nullptr) + + Object::Object(decltype(nullptr)) + : ManagedType(nullptr) { } - Resolution::Resolution(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) + bool Object::operator==(decltype(nullptr)) const + { + return Handle == 0; + } + + bool Object::operator!=(decltype(nullptr)) const + { + return Handle != 0; + } + + void Object::ThrowReferenceToThis() + { + throw *this; + } + + ValueType::ValueType(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + { + } + + ValueType::ValueType(decltype(nullptr)) + : Object(nullptr) + { + } + + Enum::Enum(Plugin::InternalUse iu, int32_t handle) + : ValueType(iu, handle) + { + } + + Enum::Enum(decltype(nullptr)) + : ValueType(nullptr) + { + } + + String::String(decltype(nullptr)) + : Object(Plugin::InternalUse::Only, 0) + { + } + + String::String(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - Handle = handle; if (handle) { - Plugin::ReferenceManagedUnityEngineResolution(Handle); + Plugin::ReferenceManagedClass(handle); } } - Resolution::Resolution(const Resolution& other) - : Resolution(Plugin::InternalUse::Only, other.Handle) + String::String(const String& other) + : Object(Plugin::InternalUse::Only, other.Handle) { + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - Resolution::Resolution(Resolution&& other) - : Resolution(Plugin::InternalUse::Only, other.Handle) + String::String(String&& other) + : Object(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Resolution::~Resolution() + String::~String() { if (Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } } - Resolution& Resolution::operator=(const Resolution& other) + String& String::operator=(const String& other) { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineResolution(Handle); - } - this->Handle = other.Handle; - if (this->Handle) + if (Handle != other.Handle) { - Plugin::ReferenceManagedUnityEngineResolution(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } return *this; } - Resolution& Resolution::operator=(decltype(nullptr)) + String& String::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } return *this; } - Resolution& Resolution::operator=(Resolution&& other) + String& String::operator=(String&& other) { if (Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool Resolution::operator==(const Resolution& other) const + String::String(const char* chars) + : Object(Plugin::InternalUse::Only, Plugin::StringNew(chars)) { - return Handle == other.Handle; } - bool Resolution::operator!=(const Resolution& other) const + ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - return Handle != other.Handle; } - int32_t Resolution::GetWidth() + ICloneable::ICloneable(decltype(nullptr)) + : Object(nullptr) { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; } - void Resolution::SetWidth(int32_t value) + namespace Collections { - Plugin::UnityEngineResolutionPropertySetWidth(Handle, value); - if (Plugin::unhandledCsharpException) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - } - - int32_t Resolution::GetHeight() - { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + + IEnumerable::IEnumerable(decltype(nullptr)) + : Object(nullptr) + { } - return returnValue; - } - - void Resolution::SetHeight(int32_t value) - { - Plugin::UnityEngineResolutionPropertySetHeight(Handle, value); - if (Plugin::unhandledCsharpException) + + IEnumerator IEnumerable::GetEnumerator() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return IEnumerator( + Plugin::InternalUse::Only, + Plugin::EnumerableGetEnumerator(Handle)); } - } - - int32_t Resolution::GetRefreshRate() - { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(Handle); - if (Plugin::unhandledCsharpException) + + Plugin::EnumerableIterator begin( + System::Collections::IEnumerable& enumerable) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Plugin::EnumerableIterator(enumerable); } - return returnValue; - } - - void Resolution::SetRefreshRate(int32_t value) - { - Plugin::UnityEngineResolutionPropertySetRefreshRate(Handle, value); - if (Plugin::unhandledCsharpException) + + Plugin::EnumerableIterator end( + System::Collections::IEnumerable& enumerable) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Plugin::EnumerableIterator(nullptr); } - } -} - -namespace System -{ - Object::Object(UnityEngine::Resolution& val) - { - int32_t handle = Plugin::BoxResolution(val.Handle); - if (Plugin::unhandledCsharpException) + + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , IEnumerable(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - if (handle) + + ICollection::ICollection(decltype(nullptr)) + : Object(nullptr) + , IEnumerable(nullptr) + { + } + + IList::IList(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , IEnumerable(nullptr) + , ICollection(nullptr) + { + } + + IList::IList(decltype(nullptr)) + : Object(nullptr) + , IEnumerable(nullptr) + , ICollection(nullptr) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; } } - Object::operator UnityEngine::Resolution() + Array::Array(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , ICloneable(nullptr) + , Collections::IEnumerable(nullptr) + , Collections::ICollection(nullptr) + , Collections::IList(nullptr) { - UnityEngine::Resolution returnVal(Plugin::InternalUse::Only, Plugin::UnboxResolution(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + } + + Array::Array(decltype(nullptr)) + : Object(nullptr) + , ICloneable(nullptr) + , Collections::IEnumerable(nullptr) + , Collections::ICollection(nullptr) + , Collections::IList(nullptr) + { + } + + int32_t Array::GetLength() + { + return Plugin::ArrayGetLength(Handle); + } + + int32_t Array::GetRank() + { + return 0; } } -namespace UnityEngine +/*BEGIN METHOD DEFINITIONS*/ +namespace System { - RaycastHit::RaycastHit(decltype(nullptr)) - : System::ValueType(nullptr) + IFormattable::IFormattable(decltype(nullptr)) { } - RaycastHit::RaycastHit(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) + IFormattable::IFormattable(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); + Plugin::ReferenceManagedClass(handle); } } - RaycastHit::RaycastHit(const RaycastHit& other) - : RaycastHit(Plugin::InternalUse::Only, other.Handle) + IFormattable::IFormattable(const IFormattable& other) + : IFormattable(Plugin::InternalUse::Only, other.Handle) { } - RaycastHit::RaycastHit(RaycastHit&& other) - : RaycastHit(Plugin::InternalUse::Only, other.Handle) + IFormattable::IFormattable(IFormattable&& other) + : IFormattable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - RaycastHit::~RaycastHit() + IFormattable::~IFormattable() { if (Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } } - RaycastHit& RaycastHit::operator=(const RaycastHit& other) + IFormattable& IFormattable::operator=(const IFormattable& other) { if (this->Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Plugin::DereferenceManagedClass(this->Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - RaycastHit& RaycastHit::operator=(decltype(nullptr)) + IFormattable& IFormattable::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } return *this; } - RaycastHit& RaycastHit::operator=(RaycastHit&& other) + IFormattable& IFormattable::operator=(IFormattable&& other) { if (Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool RaycastHit::operator==(const RaycastHit& other) const + bool IFormattable::operator==(const IFormattable& other) const { return Handle == other.Handle; } - bool RaycastHit::operator!=(const RaycastHit& other) const + bool IFormattable::operator!=(const IFormattable& other) const { return Handle != other.Handle; } +} + +namespace System +{ + IConvertible::IConvertible(decltype(nullptr)) + { + } - UnityEngine::Vector3 RaycastHit::GetPoint() + IConvertible::IConvertible(Plugin::InternalUse, int32_t handle) { - auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetPoint(Handle); - if (Plugin::unhandledCsharpException) + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } - return returnValue; } - void RaycastHit::SetPoint(UnityEngine::Vector3& value) + IConvertible::IConvertible(const IConvertible& other) + : IConvertible(Plugin::InternalUse::Only, other.Handle) { - Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } } - UnityEngine::Transform RaycastHit::GetTransform() + IConvertible::IConvertible(IConvertible&& other) + : IConvertible(Plugin::InternalUse::Only, other.Handle) { - auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetTransform(Handle); - if (Plugin::unhandledCsharpException) + other.Handle = 0; + } + + IConvertible::~IConvertible() + { + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); } -} - -namespace System -{ - Object::Object(UnityEngine::RaycastHit& val) + + IConvertible& IConvertible::operator=(const IConvertible& other) { - int32_t handle = Plugin::BoxRaycastHit(val.Handle); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); } - if (handle) + this->Handle = other.Handle; + if (this->Handle) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - Object::operator UnityEngine::RaycastHit() + IConvertible& IConvertible::operator=(decltype(nullptr)) { - UnityEngine::RaycastHit returnVal(Plugin::InternalUse::Only, Plugin::UnboxRaycastHit(Handle)); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return returnVal; + return *this; + } + + IConvertible& IConvertible::operator=(IConvertible&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IConvertible::operator==(const IConvertible& other) const + { + return Handle == other.Handle; + } + + bool IConvertible::operator!=(const IConvertible& other) const + { + return Handle != other.Handle; } } namespace System { - namespace Collections + IComparable::IComparable(decltype(nullptr)) { - IEnumerator::IEnumerator(decltype(nullptr)) + } + + IComparable::IComparable(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { + Plugin::ReferenceManagedClass(handle); } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + } + + IComparable::IComparable(const IComparable& other) + : IComparable(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable::IComparable(IComparable&& other) + : IComparable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable::~IComparable() + { + if (Handle) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) + } + + IComparable& IComparable::operator=(const IComparable& other) + { + if (this->Handle) { + Plugin::DereferenceManagedClass(this->Handle); } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) + this->Handle = other.Handle; + if (this->Handle) { - other.Handle = 0; + Plugin::ReferenceManagedClass(this->Handle); } - - IEnumerator::~IEnumerator() + return *this; + } + + IComparable& IComparable::operator=(decltype(nullptr)) + { + if (Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) + return *this; + } + + IComparable& IComparable::operator=(IComparable&& other) + { + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + Plugin::DereferenceManagedClass(Handle); } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable::operator==(const IComparable& other) const + { + return Handle == other.Handle; + } + + bool IComparable::operator!=(const IComparable& other) const + { + return Handle != other.Handle; + } + + System::Int32 IComparable::CompareTo(System::Object& obj) + { + auto returnValue = Plugin::SystemIComparableMethodCompareToSystemObject(Handle, obj.Handle); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) + return returnValue; + } +} + +namespace System +{ + IDisposable::IDisposable(decltype(nullptr)) + { + } + + IDisposable::IDisposable(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + Plugin::ReferenceManagedClass(handle); } - - bool IEnumerator::operator==(const IEnumerator& other) const + } + + IDisposable::IDisposable(const IDisposable& other) + : IDisposable(Plugin::InternalUse::Only, other.Handle) + { + } + + IDisposable::IDisposable(IDisposable&& other) + : IDisposable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IDisposable::~IDisposable() + { + if (Handle) { - return Handle == other.Handle; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - bool IEnumerator::operator!=(const IEnumerator& other) const + } + + IDisposable& IDisposable::operator=(const IDisposable& other) + { + if (this->Handle) { - return Handle != other.Handle; + Plugin::DereferenceManagedClass(this->Handle); } - - System::Object IEnumerator::GetCurrent() + this->Handle = other.Handle; + if (this->Handle) { - auto returnValue = Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Object(Plugin::InternalUse::Only, returnValue); + Plugin::ReferenceManagedClass(this->Handle); } - - System::Boolean IEnumerator::MoveNext() + return *this; + } + + IDisposable& IDisposable::operator=(decltype(nullptr)) + { + if (Handle) { - auto returnValue = Plugin::SystemCollectionsIEnumeratorMethodMoveNext(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IDisposable& IDisposable::operator=(IDisposable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IDisposable::operator==(const IDisposable& other) const + { + return Handle == other.Handle; + } + + bool IDisposable::operator!=(const IDisposable& other) const + { + return Handle != other.Handle; + } + + void IDisposable::Dispose() + { + Plugin::SystemIDisposableMethodDispose(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } } -namespace System +namespace UnityEngine { - namespace Collections + Vector3::Vector3() { - namespace Generic + } + + Vector3::Vector3(System::Single x, System::Single y, System::Single z) + { + auto returnValue = Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(x, y, z); + if (Plugin::unhandledCsharpException) { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - System::String IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::String(Plugin::InternalUse::Only, returnValue); - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + *this = returnValue; + } + + System::Single 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(System::Single newX, System::Single newY, System::Single 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; + } + + Vector3::operator System::ValueType() + { + int32_t handle = Plugin::BoxVector3(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + Vector3::operator System::Object() + { + int32_t handle = Plugin::BoxVector3(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); } + return nullptr; } } namespace System { - namespace Collections + Object::operator UnityEngine::Vector3() { - namespace Generic + UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); + if (Plugin::unhandledCsharpException) { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - int32_t IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; } } -namespace System +namespace UnityEngine { - namespace Collections + Object::Object(decltype(nullptr)) { - namespace Generic + } + + Object::Object(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - float IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } + Plugin::ReferenceManagedClass(handle); } } -} - -namespace System -{ - namespace Collections + + Object::Object(const Object& other) + : Object(Plugin::InternalUse::Only, other.Handle) { - namespace Generic + } + + Object::Object(Object&& other) + : Object(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Object::~Object() + { + if (Handle) { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::RaycastHit IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } -} - -namespace System -{ - namespace Collections + + Object& Object::operator=(const Object& other) { - namespace Generic + if (this->Handle) { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::GradientColorKey IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } -} - -namespace System -{ - namespace Collections + + Object& Object::operator=(decltype(nullptr)) { - namespace Generic + if (Handle) { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::Resolution IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Resolution(Plugin::InternalUse::Only, returnValue); - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } + return *this; } -} - -namespace System -{ - namespace Collections + + Object& Object::operator=(Object&& other) { - namespace Generic + if (Handle) { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } -} - -namespace System -{ - namespace Collections + + bool Object::operator==(const Object& other) const { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } + 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); } -} - -namespace System -{ - namespace Collections + + void Object::SetName(System::String& value) { - namespace Generic + Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); + if (Plugin::unhandledCsharpException) { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } + 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 System +namespace UnityEngine { - namespace Collections + Component::Component(decltype(nullptr)) + : UnityEngine::Object(nullptr) { - namespace Generic + } + + Component::Component(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + { + Handle = handle; + if (handle) { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } + Plugin::ReferenceManagedClass(handle); } } -} - -namespace System -{ - namespace Collections + + Component::Component(const Component& other) + : Component(Plugin::InternalUse::Only, other.Handle) { - namespace Generic + } + + Component::Component(Component&& other) + : Component(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Component::~Component() + { + if (Handle) { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Component& Component::operator=(const Component& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Component& Component::operator=(decltype(nullptr)) + { + 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 System +namespace UnityEngine { - namespace Collections + Transform::Transform(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , System::Collections::IEnumerable(nullptr) { - namespace Generic + } + + Transform::Transform(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , System::Collections::IEnumerable(nullptr) + { + Handle = handle; + if (handle) { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } + Plugin::ReferenceManagedClass(handle); } } -} - -namespace System -{ - namespace Collections + + Transform::Transform(const Transform& other) + : Transform(Plugin::InternalUse::Only, other.Handle) { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionSystemStringIterator::SystemCollectionsGenericICollectionSystemStringIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + + Transform::Transform(Transform&& other) + : Transform(Plugin::InternalUse::Only, other.Handle) { + other.Handle = 0; } - SystemCollectionsGenericICollectionSystemStringIterator::SystemCollectionsGenericICollectionSystemStringIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) + Transform::~Transform() { - hasMore = enumerator.MoveNext(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - SystemCollectionsGenericICollectionSystemStringIterator::~SystemCollectionsGenericICollectionSystemStringIterator() + Transform& Transform::operator=(const Transform& other) { - if (enumerator != nullptr) + if (this->Handle) { - enumerator.Dispose(); + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - SystemCollectionsGenericICollectionSystemStringIterator& SystemCollectionsGenericICollectionSystemStringIterator::operator++() + Transform& Transform::operator=(decltype(nullptr)) { - hasMore = enumerator.MoveNext(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } return *this; } - bool SystemCollectionsGenericICollectionSystemStringIterator::operator!=(const SystemCollectionsGenericICollectionSystemStringIterator& other) + Transform& Transform::operator=(Transform&& other) { - return hasMore; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - System::String SystemCollectionsGenericICollectionSystemStringIterator::operator*() + bool Transform::operator==(const Transform& other) const { - return enumerator.GetCurrent(); + return Handle == other.Handle; } -} - -namespace System -{ - namespace Collections + + bool Transform::operator!=(const Transform& other) const { - namespace Generic + return Handle != other.Handle; + } + + UnityEngine::Vector3 Transform::GetPosition() + { + auto returnValue = Plugin::UnityEngineTransformPropertyGetPosition(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::SystemCollectionsGenericICollectionSystemStringIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemStringIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionSystemStringIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemStringIterator(nullptr); - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } -} - -namespace System -{ - namespace Collections + + void Transform::SetPosition(UnityEngine::Vector3& value) { - namespace Generic + Plugin::UnityEngineTransformPropertySetPosition(Handle, value); + if (Plugin::unhandledCsharpException) { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + void Transform::SetParent(UnityEngine::Transform& parent) + { + Plugin::UnityEngineTransformMethodSetParentUnityEngineTransform(Handle, parent.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } } -namespace Plugin +namespace UnityEngine { - SystemCollectionsGenericICollectionSystemInt32Iterator::SystemCollectionsGenericICollectionSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + Color::Color() { } - SystemCollectionsGenericICollectionSystemInt32Iterator::SystemCollectionsGenericICollectionSystemInt32Iterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) + Color::operator System::ValueType() { - hasMore = enumerator.MoveNext(); + int32_t handle = Plugin::BoxColor(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; } - SystemCollectionsGenericICollectionSystemInt32Iterator::~SystemCollectionsGenericICollectionSystemInt32Iterator() + Color::operator System::Object() { - if (enumerator != nullptr) + int32_t handle = Plugin::BoxColor(*this); + if (Plugin::unhandledCsharpException) { - enumerator.Dispose(); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } +} + +namespace System +{ + Object::operator UnityEngine::Color() + { + UnityEngine::Color returnVal(Plugin::UnboxColor(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; } - - SystemCollectionsGenericICollectionSystemInt32Iterator& SystemCollectionsGenericICollectionSystemInt32Iterator::operator++() +} + +namespace UnityEngine +{ + GradientColorKey::GradientColorKey() { - hasMore = enumerator.MoveNext(); - return *this; } - bool SystemCollectionsGenericICollectionSystemInt32Iterator::operator!=(const SystemCollectionsGenericICollectionSystemInt32Iterator& other) + GradientColorKey::operator System::ValueType() { - return hasMore; + int32_t handle = Plugin::BoxGradientColorKey(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; } - int32_t SystemCollectionsGenericICollectionSystemInt32Iterator::operator*() + GradientColorKey::operator System::Object() { - return enumerator.GetCurrent(); + int32_t handle = Plugin::BoxGradientColorKey(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } } namespace System { - namespace Collections + Object::operator UnityEngine::GradientColorKey() { - namespace Generic + UnityEngine::GradientColorKey returnVal(Plugin::UnboxGradientColorKey(Handle)); + if (Plugin::unhandledCsharpException) { - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator(nullptr); - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; } } -namespace System +namespace UnityEngine { - namespace Collections + Resolution::Resolution(decltype(nullptr)) { - namespace Generic + } + + Resolution::Resolution(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } + Plugin::ReferenceManagedUnityEngineResolution(Handle); } } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionSystemSingleIterator::SystemCollectionsGenericICollectionSystemSingleIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + + Resolution::Resolution(const Resolution& other) + : Resolution(Plugin::InternalUse::Only, other.Handle) { } - SystemCollectionsGenericICollectionSystemSingleIterator::SystemCollectionsGenericICollectionSystemSingleIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) + Resolution::Resolution(Resolution&& other) + : Resolution(Plugin::InternalUse::Only, other.Handle) { - hasMore = enumerator.MoveNext(); + other.Handle = 0; } - SystemCollectionsGenericICollectionSystemSingleIterator::~SystemCollectionsGenericICollectionSystemSingleIterator() + Resolution::~Resolution() { - if (enumerator != nullptr) + if (Handle) { - enumerator.Dispose(); + Plugin::DereferenceManagedUnityEngineResolution(Handle); + Handle = 0; } } - SystemCollectionsGenericICollectionSystemSingleIterator& SystemCollectionsGenericICollectionSystemSingleIterator::operator++() + Resolution& Resolution::operator=(const Resolution& other) { - hasMore = enumerator.MoveNext(); + if (this->Handle) + { + Plugin::DereferenceManagedUnityEngineResolution(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineResolution(Handle); + } return *this; } - bool SystemCollectionsGenericICollectionSystemSingleIterator::operator!=(const SystemCollectionsGenericICollectionSystemSingleIterator& other) - { - return hasMore; - } - - float SystemCollectionsGenericICollectionSystemSingleIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections + Resolution& Resolution::operator=(decltype(nullptr)) { - namespace Generic + if (Handle) { - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemSingleIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemSingleIterator(nullptr); - } + Plugin::DereferenceManagedUnityEngineResolution(Handle); + Handle = 0; } + return *this; } -} - -namespace System -{ - namespace Collections + + Resolution& Resolution::operator=(Resolution&& other) { - namespace Generic + if (Handle) { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } + Plugin::DereferenceManagedUnityEngineResolution(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + + bool Resolution::operator==(const Resolution& other) const { + return Handle == other.Handle; } - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) + bool Resolution::operator!=(const Resolution& other) const { - hasMore = enumerator.MoveNext(); + return Handle != other.Handle; } - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::~SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator() + Resolution::Resolution() { - if (enumerator != nullptr) + auto returnValue = Plugin::UnityEngineResolutionConstructor(); + if (Plugin::unhandledCsharpException) { - enumerator.Dispose(); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedUnityEngineResolution(Handle); } } - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator++() + System::Int32 Resolution::GetWidth() { - hasMore = enumerator.MoveNext(); - return *this; + auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; } - bool SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& other) + void Resolution::SetWidth(System::Int32 value) { - return hasMore; + Plugin::UnityEngineResolutionPropertySetWidth(Handle, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - UnityEngine::RaycastHit SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections + System::Int32 Resolution::GetHeight() { - namespace Generic + auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(nullptr); - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } -} - -namespace System -{ - namespace Collections + + void Resolution::SetHeight(System::Int32 value) { - namespace Generic + Plugin::UnityEngineResolutionPropertySetHeight(Handle, value); + if (Plugin::unhandledCsharpException) { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::~SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator() + System::Int32 Resolution::GetRefreshRate() { - if (enumerator != nullptr) + auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(Handle); + if (Plugin::unhandledCsharpException) { - enumerator.Dispose(); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator++() + void Resolution::SetRefreshRate(System::Int32 value) { - hasMore = enumerator.MoveNext(); - return *this; + Plugin::UnityEngineResolutionPropertySetRefreshRate(Handle, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - bool SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& other) + Resolution::operator System::ValueType() { - return hasMore; + int32_t handle = Plugin::BoxResolution(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; } - UnityEngine::GradientColorKey SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator*() + Resolution::operator System::Object() { - return enumerator.GetCurrent(); + int32_t handle = Plugin::BoxResolution(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } } namespace System { - namespace Collections + Object::operator UnityEngine::Resolution() { - namespace Generic + UnityEngine::Resolution returnVal(Plugin::InternalUse::Only, Plugin::UnboxResolution(Handle)); + if (Plugin::unhandledCsharpException) { - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(nullptr); - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; } } -namespace System +namespace UnityEngine { - namespace Collections + RaycastHit::RaycastHit(decltype(nullptr)) { - namespace Generic + } + + RaycastHit::RaycastHit(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } + Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); } } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionUnityEngineResolutionIterator::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + + RaycastHit::RaycastHit(const RaycastHit& other) + : RaycastHit(Plugin::InternalUse::Only, other.Handle) { } - SystemCollectionsGenericICollectionUnityEngineResolutionIterator::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) + RaycastHit::RaycastHit(RaycastHit&& other) + : RaycastHit(Plugin::InternalUse::Only, other.Handle) { - hasMore = enumerator.MoveNext(); + other.Handle = 0; } - SystemCollectionsGenericICollectionUnityEngineResolutionIterator::~SystemCollectionsGenericICollectionUnityEngineResolutionIterator() + RaycastHit::~RaycastHit() { - if (enumerator != nullptr) + if (Handle) { - enumerator.Dispose(); + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Handle = 0; } } - SystemCollectionsGenericICollectionUnityEngineResolutionIterator& SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator++() + RaycastHit& RaycastHit::operator=(const RaycastHit& other) { - hasMore = enumerator.MoveNext(); + if (this->Handle) + { + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); + } return *this; } - bool SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineResolutionIterator& other) - { - return hasMore; - } - - UnityEngine::Resolution SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections + RaycastHit& RaycastHit::operator=(decltype(nullptr)) { - namespace Generic + if (Handle) { - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(nullptr); - } + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Handle = 0; } + return *this; } -} - -namespace System -{ - namespace Collections + + RaycastHit& RaycastHit::operator=(RaycastHit&& other) { - namespace Generic + if (Handle) { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } -} - -namespace Plugin -{ - SystemCollectionsGenericIListSystemStringIterator::SystemCollectionsGenericIListSystemStringIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + + bool RaycastHit::operator==(const RaycastHit& other) const { + return Handle == other.Handle; } - SystemCollectionsGenericIListSystemStringIterator::SystemCollectionsGenericIListSystemStringIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) + bool RaycastHit::operator!=(const RaycastHit& other) const { - hasMore = enumerator.MoveNext(); + return Handle != other.Handle; } - SystemCollectionsGenericIListSystemStringIterator::~SystemCollectionsGenericIListSystemStringIterator() + UnityEngine::Vector3 RaycastHit::GetPoint() { - if (enumerator != nullptr) + auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetPoint(Handle); + if (Plugin::unhandledCsharpException) { - enumerator.Dispose(); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } - SystemCollectionsGenericIListSystemStringIterator& SystemCollectionsGenericIListSystemStringIterator::operator++() + void RaycastHit::SetPoint(UnityEngine::Vector3& value) { - hasMore = enumerator.MoveNext(); - return *this; + Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - bool SystemCollectionsGenericIListSystemStringIterator::operator!=(const SystemCollectionsGenericIListSystemStringIterator& other) + UnityEngine::Transform RaycastHit::GetTransform() { - return hasMore; + 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); } - System::String SystemCollectionsGenericIListSystemStringIterator::operator*() + RaycastHit::operator System::ValueType() { - return enumerator.GetCurrent(); + int32_t handle = Plugin::BoxRaycastHit(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; } -} - -namespace System -{ - namespace Collections + + RaycastHit::operator System::Object() { - namespace Generic + int32_t handle = Plugin::BoxRaycastHit(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::SystemCollectionsGenericIListSystemStringIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemStringIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListSystemStringIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemStringIterator(nullptr); - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); } + return nullptr; } } namespace System { - namespace Collections + Object::operator UnityEngine::RaycastHit() { - namespace Generic + UnityEngine::RaycastHit returnVal(Plugin::InternalUse::Only, Plugin::UnboxRaycastHit(Handle)); + if (Plugin::unhandledCsharpException) { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + namespace Collections + { + IEnumerator::IEnumerator(decltype(nullptr)) + { + } + + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerator::~IEnumerator() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerator& IEnumerator::operator=(const IEnumerator& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerator& IEnumerator::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerator& IEnumerator::operator=(IEnumerator&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerator::operator==(const IEnumerator& other) const + { + return Handle == other.Handle; + } + + bool IEnumerator::operator!=(const IEnumerator& other) const + { + return Handle != other.Handle; + } + + System::Object IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Object(Plugin::InternalUse::Only, returnValue); + } + + System::Boolean IEnumerator::MoveNext() + { + auto returnValue = Plugin::SystemCollectionsIEnumeratorMethodMoveNext(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } + } +} + +namespace System +{ + namespace Runtime + { + namespace Serialization + { + ISerializable::ISerializable(decltype(nullptr)) { } - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + ISerializable::ISerializable(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -4711,18 +3336,18 @@ namespace System } } - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) + ISerializable::ISerializable(const ISerializable& other) + : ISerializable(Plugin::InternalUse::Only, other.Handle) { } - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) + ISerializable::ISerializable(ISerializable&& other) + : ISerializable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IList::~IList() + ISerializable::~ISerializable() { if (Handle) { @@ -4731,7 +3356,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + ISerializable& ISerializable::operator=(const ISerializable& other) { if (this->Handle) { @@ -4745,7 +3370,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr)) + ISerializable& ISerializable::operator=(decltype(nullptr)) { if (Handle) { @@ -4755,7 +3380,7 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + ISerializable& ISerializable::operator=(ISerializable&& other) { if (Handle) { @@ -4766,12 +3391,12 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool ISerializable::operator==(const ISerializable& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool ISerializable::operator!=(const ISerializable& other) const { return Handle != other.Handle; } @@ -4779,81 +3404,17 @@ namespace System } } -namespace Plugin -{ - SystemCollectionsGenericIListSystemInt32Iterator::SystemCollectionsGenericIListSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListSystemInt32Iterator::SystemCollectionsGenericIListSystemInt32Iterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListSystemInt32Iterator::~SystemCollectionsGenericIListSystemInt32Iterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListSystemInt32Iterator& SystemCollectionsGenericIListSystemInt32Iterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListSystemInt32Iterator::operator!=(const SystemCollectionsGenericIListSystemInt32Iterator& other) - { - return hasMore; - } - - int32_t SystemCollectionsGenericIListSystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemInt32Iterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListSystemInt32Iterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemInt32Iterator(nullptr); - } - } - } -} - namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace InteropServices { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + _Exception::_Exception(decltype(nullptr)) { } - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + _Exception::_Exception(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -4862,18 +3423,18 @@ namespace System } } - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) + _Exception::_Exception(const _Exception& other) + : _Exception(Plugin::InternalUse::Only, other.Handle) { } - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) + _Exception::_Exception(_Exception&& other) + : _Exception(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IList::~IList() + _Exception::~_Exception() { if (Handle) { @@ -4882,7 +3443,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + _Exception& _Exception::operator=(const _Exception& other) { if (this->Handle) { @@ -4896,7 +3457,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr)) + _Exception& _Exception::operator=(decltype(nullptr)) { if (Handle) { @@ -4906,7 +3467,7 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + _Exception& _Exception::operator=(_Exception&& other) { if (Handle) { @@ -4917,12 +3478,12 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool _Exception::operator==(const _Exception& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool _Exception::operator!=(const _Exception& other) const { return Handle != other.Handle; } @@ -4930,60 +3491,251 @@ namespace System } } -namespace Plugin +namespace System { - SystemCollectionsGenericIListSystemSingleIterator::SystemCollectionsGenericIListSystemSingleIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListSystemSingleIterator::SystemCollectionsGenericIListSystemSingleIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) + IAppDomainSetup::IAppDomainSetup(decltype(nullptr)) { - hasMore = enumerator.MoveNext(); } - SystemCollectionsGenericIListSystemSingleIterator::~SystemCollectionsGenericIListSystemSingleIterator() + IAppDomainSetup::IAppDomainSetup(Plugin::InternalUse, int32_t handle) { - if (enumerator != nullptr) + Handle = handle; + if (handle) { - enumerator.Dispose(); + Plugin::ReferenceManagedClass(handle); } } - SystemCollectionsGenericIListSystemSingleIterator& SystemCollectionsGenericIListSystemSingleIterator::operator++() + IAppDomainSetup::IAppDomainSetup(const IAppDomainSetup& other) + : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) { - hasMore = enumerator.MoveNext(); - return *this; } - bool SystemCollectionsGenericIListSystemSingleIterator::operator!=(const SystemCollectionsGenericIListSystemSingleIterator& other) + IAppDomainSetup::IAppDomainSetup(IAppDomainSetup&& other) + : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) { - return hasMore; + other.Handle = 0; } - float SystemCollectionsGenericIListSystemSingleIterator::operator*() + IAppDomainSetup::~IAppDomainSetup() { - return enumerator.GetCurrent(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } -} - -namespace System -{ - namespace Collections + + IAppDomainSetup& IAppDomainSetup::operator=(const IAppDomainSetup& other) { - namespace Generic + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IAppDomainSetup& IAppDomainSetup::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IAppDomainSetup& IAppDomainSetup::operator=(IAppDomainSetup&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IAppDomainSetup::operator==(const IAppDomainSetup& other) const + { + return Handle == other.Handle; + } + + bool IAppDomainSetup::operator!=(const IAppDomainSetup& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + namespace Collections + { + IComparer::IComparer(decltype(nullptr)) + { + } + + IComparer::IComparer(Plugin::InternalUse, int32_t handle) { - Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable) + Handle = handle; + if (handle) { - return Plugin::SystemCollectionsGenericIListSystemSingleIterator(enumerable); + Plugin::ReferenceManagedClass(handle); } - - Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable) + } + + IComparer::IComparer(const IComparer& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparer::IComparer(IComparer&& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparer::~IComparer() + { + if (Handle) { - return Plugin::SystemCollectionsGenericIListSystemSingleIterator(nullptr); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparer& IComparer::operator=(const IComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparer& IComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparer& IComparer::operator=(IComparer&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparer::operator==(const IComparer& other) const + { + return Handle == other.Handle; + } + + bool IComparer::operator!=(const IComparer& other) const + { + return Handle != other.Handle; + } + } +} + +namespace System +{ + namespace Collections + { + IEqualityComparer::IEqualityComparer(decltype(nullptr)) + { + } + + IEqualityComparer::IEqualityComparer(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) + { + } + + IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEqualityComparer::~IEqualityComparer() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEqualityComparer::operator==(const IEqualityComparer& other) const + { + return Handle == other.Handle; + } + + bool IEqualityComparer::operator!=(const IEqualityComparer& other) const + { + return Handle != other.Handle; } } } @@ -4994,17 +3746,11 @@ namespace System { namespace Generic { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + IEqualityComparer::IEqualityComparer(decltype(nullptr)) { } - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + IEqualityComparer::IEqualityComparer(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -5013,18 +3759,18 @@ namespace System } } - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) + IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) { } - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) + IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IList::~IList() + IEqualityComparer::~IEqualityComparer() { if (Handle) { @@ -5033,7 +3779,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) { if (this->Handle) { @@ -5047,7 +3793,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr)) + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -5057,7 +3803,7 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) { if (Handle) { @@ -5068,12 +3814,12 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool IEqualityComparer::operator==(const IEqualityComparer& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool IEqualityComparer::operator!=(const IEqualityComparer& other) const { return Handle != other.Handle; } @@ -5081,81 +3827,17 @@ namespace System } } -namespace Plugin +namespace System { - SystemCollectionsGenericIListUnityEngineRaycastHitIterator::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListUnityEngineRaycastHitIterator::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListUnityEngineRaycastHitIterator::~SystemCollectionsGenericIListUnityEngineRaycastHitIterator() + namespace Collections { - if (enumerator != nullptr) + namespace Generic { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListUnityEngineRaycastHitIterator& SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator!=(const SystemCollectionsGenericIListUnityEngineRaycastHitIterator& other) - { - return hasMore; - } - - UnityEngine::RaycastHit SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + IEqualityComparer::IEqualityComparer(decltype(nullptr)) { } - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + IEqualityComparer::IEqualityComparer(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -5164,18 +3846,18 @@ namespace System } } - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) + IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) { } - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) + IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IList::~IList() + IEqualityComparer::~IEqualityComparer() { if (Handle) { @@ -5184,7 +3866,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) { if (this->Handle) { @@ -5198,7 +3880,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr)) + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -5208,7 +3890,7 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) { if (Handle) { @@ -5219,12 +3901,12 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool IEqualityComparer::operator==(const IEqualityComparer& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool IEqualityComparer::operator!=(const IEqualityComparer& other) const { return Handle != other.Handle; } @@ -5232,255 +3914,532 @@ namespace System } } -namespace Plugin +namespace UnityEngine { - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::~SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator() + namespace Playables { - if (enumerator != nullptr) + PlayableGraph::PlayableGraph(decltype(nullptr)) { - enumerator.Dispose(); } - } - - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator!=(const SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& other) - { - return hasMore; - } - - UnityEngine::GradientColorKey SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic + + PlayableGraph::PlayableGraph(Plugin::InternalUse, int32_t handle) { - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator end(System::Collections::Generic::IList& enumerable) + Handle = handle; + if (handle) { - return Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(nullptr); + Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); } } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic + + PlayableGraph::PlayableGraph(const PlayableGraph& other) + : PlayableGraph(Plugin::InternalUse::Only, other.Handle) { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + } + + PlayableGraph::PlayableGraph(PlayableGraph&& other) + : PlayableGraph(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + PlayableGraph::~PlayableGraph() + { + if (Handle) { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Handle = 0; } - - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) + } + + PlayableGraph& PlayableGraph::operator=(const PlayableGraph& other) + { + if (this->Handle) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) + this->Handle = other.Handle; + if (this->Handle) { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) + return *this; + } + + PlayableGraph& PlayableGraph::operator=(decltype(nullptr)) + { + if (Handle) { - other.Handle = 0; + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Handle = 0; } - - IList::~IList() + return *this; + } + + PlayableGraph& PlayableGraph::operator=(PlayableGraph&& other) + { + if (Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); } - - IList& IList::operator=(const IList& other) + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool PlayableGraph::operator==(const PlayableGraph& other) const + { + return Handle == other.Handle; + } + + bool PlayableGraph::operator!=(const PlayableGraph& other) const + { + return Handle != other.Handle; + } + + PlayableGraph::operator System::ValueType() + { + int32_t handle = Plugin::BoxPlayableGraph(Handle); + if (Plugin::unhandledCsharpException) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - IList& IList::operator=(decltype(nullptr)) + if (handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); } - - IList& IList::operator=(IList&& other) + return nullptr; + } + + PlayableGraph::operator System::Object() + { + int32_t handle = Plugin::BoxPlayableGraph(Handle); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - bool IList::operator==(const IList& other) const + if (handle) { - return Handle == other.Handle; + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); } - - bool IList::operator!=(const IList& other) const + return nullptr; + } + } +} + +namespace System +{ + Object::operator UnityEngine::Playables::PlayableGraph() + { + UnityEngine::Playables::PlayableGraph returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableGraph(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace UnityEngine +{ + namespace Playables + { + IPlayable::IPlayable(decltype(nullptr)) + { + } + + IPlayable::IPlayable(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - return Handle != other.Handle; + Plugin::ReferenceManagedClass(handle); + } + } + + IPlayable::IPlayable(const IPlayable& other) + : IPlayable(Plugin::InternalUse::Only, other.Handle) + { + } + + IPlayable::IPlayable(IPlayable&& other) + : IPlayable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IPlayable::~IPlayable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IPlayable& IPlayable::operator=(const IPlayable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IPlayable& IPlayable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IPlayable& IPlayable::operator=(IPlayable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IPlayable::operator==(const IPlayable& other) const + { + return Handle == other.Handle; + } + + bool IPlayable::operator!=(const IPlayable& other) const + { + return Handle != other.Handle; } } } -namespace Plugin +namespace System { - SystemCollectionsGenericIListUnityEngineResolutionIterator::SystemCollectionsGenericIListUnityEngineResolutionIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + IEquatable::IEquatable(decltype(nullptr)) { } - SystemCollectionsGenericIListUnityEngineResolutionIterator::SystemCollectionsGenericIListUnityEngineResolutionIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) + IEquatable::IEquatable(Plugin::InternalUse, int32_t handle) { - hasMore = enumerator.MoveNext(); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - SystemCollectionsGenericIListUnityEngineResolutionIterator::~SystemCollectionsGenericIListUnityEngineResolutionIterator() + IEquatable::IEquatable(const IEquatable& other) + : IEquatable(Plugin::InternalUse::Only, other.Handle) { - if (enumerator != nullptr) + } + + IEquatable::IEquatable(IEquatable&& other) + : IEquatable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable::~IEquatable() + { + if (Handle) { - enumerator.Dispose(); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - SystemCollectionsGenericIListUnityEngineResolutionIterator& SystemCollectionsGenericIListUnityEngineResolutionIterator::operator++() + IEquatable& IEquatable::operator=(const IEquatable& other) { - hasMore = enumerator.MoveNext(); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } return *this; } - bool SystemCollectionsGenericIListUnityEngineResolutionIterator::operator!=(const SystemCollectionsGenericIListUnityEngineResolutionIterator& other) + IEquatable& IEquatable::operator=(decltype(nullptr)) { - return hasMore; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - UnityEngine::Resolution SystemCollectionsGenericIListUnityEngineResolutionIterator::operator*() + IEquatable& IEquatable::operator=(IEquatable&& other) { - return enumerator.GetCurrent(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable::operator==(const IEquatable& other) const + { + return Handle == other.Handle; + } + + bool IEquatable::operator!=(const IEquatable& other) const + { + return Handle != other.Handle; } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Animations { - namespace Generic + AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr)) { - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator begin(System::Collections::Generic::IList& enumerable) + } + + AnimationMixerPlayable::AnimationMixerPlayable(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - return Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator(enumerable); + Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); } - - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator end(System::Collections::Generic::IList& enumerable) + } + + AnimationMixerPlayable::AnimationMixerPlayable(const AnimationMixerPlayable& other) + : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) + { + } + + AnimationMixerPlayable::AnimationMixerPlayable(AnimationMixerPlayable&& other) + : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + AnimationMixerPlayable::~AnimationMixerPlayable() + { + if (Handle) { - return Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator(nullptr); + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Handle = 0; } } - } -} - -namespace System -{ - namespace Runtime - { - namespace Serialization + + AnimationMixerPlayable& AnimationMixerPlayable::operator=(const AnimationMixerPlayable& other) { - ISerializable::ISerializable(decltype(nullptr)) + if (this->Handle) { + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); } - - ISerializable::ISerializable(Plugin::InternalUse iu, int32_t handle) + this->Handle = other.Handle; + if (this->Handle) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); } - - ISerializable::ISerializable(const ISerializable& other) - : ISerializable(Plugin::InternalUse::Only, other.Handle) + return *this; + } + + AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr)) + { + if (Handle) { + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Handle = 0; } - - ISerializable::ISerializable(ISerializable&& other) - : ISerializable(Plugin::InternalUse::Only, other.Handle) + return *this; + } + + AnimationMixerPlayable& AnimationMixerPlayable::operator=(AnimationMixerPlayable&& other) + { + if (Handle) { - other.Handle = 0; + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); } - - ISerializable::~ISerializable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool AnimationMixerPlayable::operator==(const AnimationMixerPlayable& other) const + { + return Handle == other.Handle; + } + + bool AnimationMixerPlayable::operator!=(const AnimationMixerPlayable& other) const + { + return Handle != other.Handle; + } + + UnityEngine::Animations::AnimationMixerPlayable AnimationMixerPlayable::Create(UnityEngine::Playables::PlayableGraph& graph, System::Int32 inputCount, System::Boolean normalizeWeights) + { + auto returnValue = Plugin::UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(graph.Handle, inputCount, normalizeWeights); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::Animations::AnimationMixerPlayable(Plugin::InternalUse::Only, returnValue); + } + + AnimationMixerPlayable::operator System::ValueType() + { + int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + AnimationMixerPlayable::operator System::Object() + { + int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + AnimationMixerPlayable::operator UnityEngine::Playables::IPlayable() + { + int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return UnityEngine::Playables::IPlayable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + AnimationMixerPlayable::operator System::IEquatable() + { + int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IEquatable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + } +} + +namespace System +{ + Object::operator UnityEngine::Animations::AnimationMixerPlayable() + { + UnityEngine::Animations::AnimationMixerPlayable returnVal(Plugin::InternalUse::Only, Plugin::UnboxAnimationMixerPlayable(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + IStrongBox::IStrongBox(decltype(nullptr)) + { + } + + IStrongBox::IStrongBox(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IStrongBox::IStrongBox(const IStrongBox& other) + : IStrongBox(Plugin::InternalUse::Only, other.Handle) + { + } + + IStrongBox::IStrongBox(IStrongBox&& other) + : IStrongBox(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IStrongBox::~IStrongBox() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); Handle = 0; } } - ISerializable& ISerializable::operator=(const ISerializable& other) + IStrongBox& IStrongBox::operator=(const IStrongBox& other) { if (this->Handle) { @@ -5494,7 +4453,7 @@ namespace System return *this; } - ISerializable& ISerializable::operator=(decltype(nullptr)) + IStrongBox& IStrongBox::operator=(decltype(nullptr)) { if (Handle) { @@ -5504,7 +4463,7 @@ namespace System return *this; } - ISerializable& ISerializable::operator=(ISerializable&& other) + IStrongBox& IStrongBox::operator=(IStrongBox&& other) { if (Handle) { @@ -5515,12 +4474,12 @@ namespace System return *this; } - bool ISerializable::operator==(const ISerializable& other) const + bool IStrongBox::operator==(const IStrongBox& other) const { return Handle == other.Handle; } - bool ISerializable::operator!=(const ISerializable& other) const + bool IStrongBox::operator!=(const IStrongBox& other) const { return Handle != other.Handle; } @@ -5528,17 +4487,17 @@ namespace System } } -namespace System +namespace UnityEngine { - namespace Runtime + namespace Experimental { - namespace InteropServices + namespace UIElements { - _Exception::_Exception(decltype(nullptr)) + IEventHandler::IEventHandler(decltype(nullptr)) { } - _Exception::_Exception(Plugin::InternalUse iu, int32_t handle) + IEventHandler::IEventHandler(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -5547,18 +4506,18 @@ namespace System } } - _Exception::_Exception(const _Exception& other) - : _Exception(Plugin::InternalUse::Only, other.Handle) + IEventHandler::IEventHandler(const IEventHandler& other) + : IEventHandler(Plugin::InternalUse::Only, other.Handle) { } - _Exception::_Exception(_Exception&& other) - : _Exception(Plugin::InternalUse::Only, other.Handle) + IEventHandler::IEventHandler(IEventHandler&& other) + : IEventHandler(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - _Exception::~_Exception() + IEventHandler::~IEventHandler() { if (Handle) { @@ -5567,7 +4526,7 @@ namespace System } } - _Exception& _Exception::operator=(const _Exception& other) + IEventHandler& IEventHandler::operator=(const IEventHandler& other) { if (this->Handle) { @@ -5581,7 +4540,7 @@ namespace System return *this; } - _Exception& _Exception::operator=(decltype(nullptr)) + IEventHandler& IEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -5591,7 +4550,7 @@ namespace System return *this; } - _Exception& _Exception::operator=(_Exception&& other) + IEventHandler& IEventHandler::operator=(IEventHandler&& other) { if (Handle) { @@ -5602,12 +4561,12 @@ namespace System return *this; } - bool _Exception::operator==(const _Exception& other) const + bool IEventHandler::operator==(const IEventHandler& other) const { return Handle == other.Handle; } - bool _Exception::operator!=(const _Exception& other) const + bool IEventHandler::operator!=(const IEventHandler& other) const { return Handle != other.Handle; } @@ -5615,266 +4574,110 @@ namespace System } } -namespace System +namespace UnityEngine { - IAppDomainSetup::IAppDomainSetup(decltype(nullptr)) - { - } - - IAppDomainSetup::IAppDomainSetup(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IAppDomainSetup::IAppDomainSetup(const IAppDomainSetup& other) - : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) - { - } - - IAppDomainSetup::IAppDomainSetup(IAppDomainSetup&& other) - : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IAppDomainSetup::~IAppDomainSetup() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IAppDomainSetup& IAppDomainSetup::operator=(const IAppDomainSetup& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IAppDomainSetup& IAppDomainSetup::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IAppDomainSetup& IAppDomainSetup::operator=(IAppDomainSetup&& other) + namespace Experimental { - if (Handle) + namespace UIElements { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IAppDomainSetup::operator==(const IAppDomainSetup& other) const - { - return Handle == other.Handle; - } - - bool IAppDomainSetup::operator!=(const IAppDomainSetup& other) const - { - return Handle != other.Handle; - } -} - -namespace System -{ - namespace Collections - { - IComparer::IComparer(decltype(nullptr)) - { - } - - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IComparer::~IComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IComparer& IComparer::operator=(const IComparer& other) - { - if (this->Handle) + CallbackEventHandler::CallbackEventHandler(decltype(nullptr)) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + CallbackEventHandler::CallbackEventHandler(Plugin::InternalUse, int32_t handle) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) { - Plugin::ReferenceManagedClass(this->Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - return *this; - } - - IComparer& IComparer::operator=(decltype(nullptr)) - { - if (Handle) + + CallbackEventHandler::CallbackEventHandler(const CallbackEventHandler& other) + : CallbackEventHandler(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - return *this; - } - - IComparer& IComparer::operator=(IComparer&& other) - { - if (Handle) + + CallbackEventHandler::CallbackEventHandler(CallbackEventHandler&& other) + : CallbackEventHandler(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); + other.Handle = 0; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IComparer::operator==(const IComparer& other) const - { - return Handle == other.Handle; - } - - bool IComparer::operator!=(const IComparer& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System -{ - namespace Collections - { - IEqualityComparer::IEqualityComparer(decltype(nullptr)) - { - } - - IEqualityComparer::IEqualityComparer(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) + + CallbackEventHandler::~CallbackEventHandler() { - Plugin::ReferenceManagedClass(handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - } - - IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEqualityComparer::~IEqualityComparer() - { - if (Handle) + + CallbackEventHandler& CallbackEventHandler::operator=(const CallbackEventHandler& other) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - } - - IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) - { - if (this->Handle) + + CallbackEventHandler& CallbackEventHandler::operator=(decltype(nullptr)) { - Plugin::DereferenceManagedClass(this->Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - this->Handle = other.Handle; - if (this->Handle) + + CallbackEventHandler& CallbackEventHandler::operator=(CallbackEventHandler&& other) { - Plugin::ReferenceManagedClass(this->Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) - { - if (Handle) + + bool CallbackEventHandler::operator==(const CallbackEventHandler& other) const { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + return Handle == other.Handle; } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) - { - if (Handle) + + bool CallbackEventHandler::operator!=(const CallbackEventHandler& other) const { - Plugin::DereferenceManagedClass(Handle); + return Handle != other.Handle; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEqualityComparer::operator==(const IEqualityComparer& other) const - { - return Handle == other.Handle; - } - - bool IEqualityComparer::operator!=(const IEqualityComparer& other) const - { - return Handle != other.Handle; } } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - IEqualityComparer::IEqualityComparer(decltype(nullptr)) + Focusable::Focusable(decltype(nullptr)) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) { } - IEqualityComparer::IEqualityComparer(Plugin::InternalUse iu, int32_t handle) + Focusable::Focusable(Plugin::InternalUse, int32_t handle) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) { Handle = handle; if (handle) @@ -5883,18 +4686,18 @@ namespace System } } - IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) + Focusable::Focusable(const Focusable& other) + : Focusable(Plugin::InternalUse::Only, other.Handle) { } - IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) + Focusable::Focusable(Focusable&& other) + : Focusable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEqualityComparer::~IEqualityComparer() + Focusable::~Focusable() { if (Handle) { @@ -5903,7 +4706,7 @@ namespace System } } - IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) + Focusable& Focusable::operator=(const Focusable& other) { if (this->Handle) { @@ -5917,7 +4720,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) + Focusable& Focusable::operator=(decltype(nullptr)) { if (Handle) { @@ -5927,7 +4730,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) + Focusable& Focusable::operator=(Focusable&& other) { if (Handle) { @@ -5938,12 +4741,12 @@ namespace System return *this; } - bool IEqualityComparer::operator==(const IEqualityComparer& other) const + bool Focusable::operator==(const Focusable& other) const { return Handle == other.Handle; } - bool IEqualityComparer::operator!=(const IEqualityComparer& other) const + bool Focusable::operator!=(const Focusable& other) const { return Handle != other.Handle; } @@ -5951,17 +4754,17 @@ namespace System } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - IEqualityComparer::IEqualityComparer(decltype(nullptr)) + IStyle::IStyle(decltype(nullptr)) { } - IEqualityComparer::IEqualityComparer(Plugin::InternalUse iu, int32_t handle) + IStyle::IStyle(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -5970,18 +4773,18 @@ namespace System } } - IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) + IStyle::IStyle(const IStyle& other) + : IStyle(Plugin::InternalUse::Only, other.Handle) { } - IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) + IStyle::IStyle(IStyle&& other) + : IStyle(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEqualityComparer::~IEqualityComparer() + IStyle::~IStyle() { if (Handle) { @@ -5990,7 +4793,7 @@ namespace System } } - IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) + IStyle& IStyle::operator=(const IStyle& other) { if (this->Handle) { @@ -6004,7 +4807,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) + IStyle& IStyle::operator=(decltype(nullptr)) { if (Handle) { @@ -6014,7 +4817,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) + IStyle& IStyle::operator=(IStyle&& other) { if (Handle) { @@ -6025,12 +4828,12 @@ namespace System return *this; } - bool IEqualityComparer::operator==(const IEqualityComparer& other) const + bool IStyle::operator==(const IStyle& other) const { return Handle == other.Handle; } - bool IEqualityComparer::operator!=(const IEqualityComparer& other) const + bool IStyle::operator!=(const IStyle& other) const { return Handle != other.Handle; } @@ -6038,216 +4841,153 @@ namespace System } } -namespace UnityEngine +namespace System { - namespace Playables + namespace Diagnostics { - PlayableGraph::PlayableGraph(decltype(nullptr)) - : System::ValueType(nullptr) + Stopwatch::Stopwatch(decltype(nullptr)) { } - PlayableGraph::PlayableGraph(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) + Stopwatch::Stopwatch(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Plugin::ReferenceManagedClass(handle); } } - PlayableGraph::PlayableGraph(const PlayableGraph& other) - : PlayableGraph(Plugin::InternalUse::Only, other.Handle) + Stopwatch::Stopwatch(const Stopwatch& other) + : Stopwatch(Plugin::InternalUse::Only, other.Handle) { } - PlayableGraph::PlayableGraph(PlayableGraph&& other) - : PlayableGraph(Plugin::InternalUse::Only, other.Handle) + Stopwatch::Stopwatch(Stopwatch&& other) + : Stopwatch(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - PlayableGraph::~PlayableGraph() + Stopwatch::~Stopwatch() { if (Handle) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } } - PlayableGraph& PlayableGraph::operator=(const PlayableGraph& other) + Stopwatch& Stopwatch::operator=(const Stopwatch& other) { if (this->Handle) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Plugin::DereferenceManagedClass(this->Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - PlayableGraph& PlayableGraph::operator=(decltype(nullptr)) + Stopwatch& Stopwatch::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } return *this; } - PlayableGraph& PlayableGraph::operator=(PlayableGraph&& other) + Stopwatch& Stopwatch::operator=(Stopwatch&& other) { if (Handle) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool PlayableGraph::operator==(const PlayableGraph& other) const + bool Stopwatch::operator==(const Stopwatch& other) const { return Handle == other.Handle; } - bool PlayableGraph::operator!=(const PlayableGraph& other) const + bool Stopwatch::operator!=(const Stopwatch& other) const { return Handle != other.Handle; } - } -} - -namespace System -{ - Object::Object(UnityEngine::Playables::PlayableGraph& val) - { - int32_t handle = Plugin::BoxPlayableGraph(val.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator UnityEngine::Playables::PlayableGraph() - { - UnityEngine::Playables::PlayableGraph returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableGraph(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - namespace Playables - { - IPlayable::IPlayable(decltype(nullptr)) - { - } - IPlayable::IPlayable(Plugin::InternalUse iu, int32_t handle) + Stopwatch::Stopwatch() { - Handle = handle; - if (handle) + auto returnValue = Plugin::SystemDiagnosticsStopwatchConstructor(); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - } - - IPlayable::IPlayable(const IPlayable& other) - : IPlayable(Plugin::InternalUse::Only, other.Handle) - { - } - - IPlayable::IPlayable(IPlayable&& other) - : IPlayable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IPlayable::~IPlayable() - { - if (Handle) + Handle = returnValue; + if (returnValue) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Plugin::ReferenceManagedClass(returnValue); } } - IPlayable& IPlayable::operator=(const IPlayable& other) + System::Int64 Stopwatch::GetElapsedMilliseconds() { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + auto returnValue = Plugin::SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; + return returnValue; } - IPlayable& IPlayable::operator=(decltype(nullptr)) + void Stopwatch::Start() { - if (Handle) + Plugin::SystemDiagnosticsStopwatchMethodStart(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; } - - IPlayable& IPlayable::operator=(IPlayable&& other) + + void Stopwatch::Reset() { - if (Handle) + Plugin::SystemDiagnosticsStopwatchMethodReset(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IPlayable::operator==(const IPlayable& other) const - { - return Handle == other.Handle; - } - - bool IPlayable::operator!=(const IPlayable& other) const - { - return Handle != other.Handle; } } } -namespace System +namespace UnityEngine { - IEquatable::IEquatable(decltype(nullptr)) + GameObject::GameObject(decltype(nullptr)) + : UnityEngine::Object(nullptr) { } - IEquatable::IEquatable(Plugin::InternalUse iu, int32_t handle) + GameObject::GameObject(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) { Handle = handle; if (handle) @@ -6256,18 +4996,18 @@ namespace System } } - IEquatable::IEquatable(const IEquatable& other) - : IEquatable(Plugin::InternalUse::Only, other.Handle) + GameObject::GameObject(const GameObject& other) + : GameObject(Plugin::InternalUse::Only, other.Handle) { } - IEquatable::IEquatable(IEquatable&& other) - : IEquatable(Plugin::InternalUse::Only, other.Handle) + GameObject::GameObject(GameObject&& other) + : GameObject(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEquatable::~IEquatable() + GameObject::~GameObject() { if (Handle) { @@ -6276,7 +5016,7 @@ namespace System } } - IEquatable& IEquatable::operator=(const IEquatable& other) + GameObject& GameObject::operator=(const GameObject& other) { if (this->Handle) { @@ -6290,7 +5030,7 @@ namespace System return *this; } - IEquatable& IEquatable::operator=(decltype(nullptr)) + GameObject& GameObject::operator=(decltype(nullptr)) { if (Handle) { @@ -6300,7 +5040,7 @@ namespace System return *this; } - IEquatable& IEquatable::operator=(IEquatable&& other) + GameObject& GameObject::operator=(GameObject&& other) { if (Handle) { @@ -6311,142 +5051,188 @@ namespace System return *this; } - bool IEquatable::operator==(const IEquatable& other) const + bool GameObject::operator==(const GameObject& other) const { return Handle == other.Handle; } - bool IEquatable::operator!=(const IEquatable& other) const + bool GameObject::operator!=(const GameObject& other) const { return Handle != other.Handle; } -} - -namespace UnityEngine -{ - namespace Animations + + GameObject::GameObject() + : UnityEngine::Object(nullptr) { - AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr)) - : System::ValueType(nullptr) - , System::IEquatable(nullptr) - , UnityEngine::Playables::IPlayable(nullptr) + auto returnValue = Plugin::UnityEngineGameObjectConstructor(); + if (Plugin::unhandledCsharpException) { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - AnimationMixerPlayable::AnimationMixerPlayable(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) - , System::IEquatable(nullptr) - , UnityEngine::Playables::IPlayable(nullptr) + Handle = returnValue; + if (returnValue) { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } + Plugin::ReferenceManagedClass(returnValue); } - - AnimationMixerPlayable::AnimationMixerPlayable(const AnimationMixerPlayable& other) - : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) + } + + 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; } - - AnimationMixerPlayable::AnimationMixerPlayable(AnimationMixerPlayable&& other) - : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) + Handle = returnValue; + if (returnValue) { - other.Handle = 0; + Plugin::ReferenceManagedClass(returnValue); } - - AnimationMixerPlayable::~AnimationMixerPlayable() + } + + UnityEngine::Transform GameObject::GetTransform() + { + auto returnValue = Plugin::UnityEngineGameObjectPropertyGetTransform(Handle); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - Handle = 0; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - AnimationMixerPlayable& AnimationMixerPlayable::operator=(const AnimationMixerPlayable& other) + return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); + } + + template<> MyGame::MonoBehaviours::TestScript GameObject::AddComponent() + { + auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(Handle); + if (Plugin::unhandledCsharpException) { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr)) + return MyGame::MonoBehaviours::TestScript(Plugin::InternalUse::Only, returnValue); + } + + template<> MyGame::MonoBehaviours::AnotherScript GameObject::AddComponent() + { + auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(Handle); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - Handle = 0; - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - AnimationMixerPlayable& AnimationMixerPlayable::operator=(AnimationMixerPlayable&& other) + return MyGame::MonoBehaviours::AnotherScript(Plugin::InternalUse::Only, returnValue); + } + + UnityEngine::GameObject GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) + { + auto returnValue = Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(type); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - bool AnimationMixerPlayable::operator==(const AnimationMixerPlayable& other) const + return UnityEngine::GameObject(Plugin::InternalUse::Only, returnValue); + } +} + +namespace UnityEngine +{ + Debug::Debug(decltype(nullptr)) + { + } + + Debug::Debug(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) { - return Handle == other.Handle; + Plugin::ReferenceManagedClass(handle); } - - bool AnimationMixerPlayable::operator!=(const AnimationMixerPlayable& other) const + } + + 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) { - return Handle != other.Handle; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - UnityEngine::Animations::AnimationMixerPlayable AnimationMixerPlayable::Create(UnityEngine::Playables::PlayableGraph& graph, int32_t inputCount, System::Boolean normalizeWeights) + } + + Debug& Debug::operator=(const Debug& other) + { + if (this->Handle) { - auto returnValue = Plugin::UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(graph.Handle, inputCount, normalizeWeights); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Animations::AnimationMixerPlayable(Plugin::InternalUse::Only, returnValue); + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } -} - -namespace System -{ - Object::Object(UnityEngine::Animations::AnimationMixerPlayable& val) + + Debug& Debug::operator=(decltype(nullptr)) { - int32_t handle = Plugin::BoxAnimationMixerPlayable(val.Handle); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - if (handle) + return *this; + } + + Debug& Debug::operator=(Debug&& other) + { + if (Handle) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - Object::operator UnityEngine::Animations::AnimationMixerPlayable() + bool Debug::operator==(const Debug& other) const { - UnityEngine::Animations::AnimationMixerPlayable returnVal(Plugin::InternalUse::Only, Plugin::UnboxAnimationMixerPlayable(Handle)); + 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; @@ -6454,92 +5240,59 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; } } -namespace System +namespace UnityEngine { - namespace Runtime + namespace Assertions { - namespace CompilerServices + System::Boolean Assert::GetRaiseExceptions() { - IStrongBox::IStrongBox(decltype(nullptr)) - { - } - - IStrongBox::IStrongBox(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IStrongBox::IStrongBox(const IStrongBox& other) - : IStrongBox(Plugin::InternalUse::Only, other.Handle) - { - } - - IStrongBox::IStrongBox(IStrongBox&& other) - : IStrongBox(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IStrongBox::~IStrongBox() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IStrongBox& IStrongBox::operator=(const IStrongBox& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IStrongBox& IStrongBox::operator=(decltype(nullptr)) + auto returnValue = Plugin::UnityEngineAssertionsAssertFieldGetRaiseExceptions(); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - IStrongBox& IStrongBox::operator=(IStrongBox&& other) + return returnValue; + } + + void Assert::SetRaiseExceptions(System::Boolean value) + { + Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions(value); + if (Plugin::unhandledCsharpException) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - bool IStrongBox::operator==(const IStrongBox& other) const + } + + template<> void Assert::AreEqual(System::String& expected, System::String& actual) + { + Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.Handle); + if (Plugin::unhandledCsharpException) { - return Handle == other.Handle; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - bool IStrongBox::operator!=(const IStrongBox& other) const + } + + template<> void Assert::AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual) + { + Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle); + if (Plugin::unhandledCsharpException) { - return Handle != other.Handle; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } } @@ -6547,325 +5300,96 @@ namespace System namespace UnityEngine { - namespace Experimental + Collision::Collision(decltype(nullptr)) { - namespace UIElements - { - IEventHandler::IEventHandler(decltype(nullptr)) - { - } - - IEventHandler::IEventHandler(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEventHandler::IEventHandler(const IEventHandler& other) - : IEventHandler(Plugin::InternalUse::Only, other.Handle) - { - } - - IEventHandler::IEventHandler(IEventHandler&& other) - : IEventHandler(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEventHandler::~IEventHandler() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEventHandler& IEventHandler::operator=(const IEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEventHandler& IEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEventHandler& IEventHandler::operator=(IEventHandler&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEventHandler::operator==(const IEventHandler& other) const - { - return Handle == other.Handle; - } - - bool IEventHandler::operator!=(const IEventHandler& other) const - { - return Handle != other.Handle; - } - } } -} - -namespace UnityEngine -{ - namespace Experimental + + Collision::Collision(Plugin::InternalUse, int32_t handle) { - namespace UIElements + Handle = handle; + if (handle) { - IStyle::IStyle(decltype(nullptr)) - { - } - - IStyle::IStyle(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IStyle::IStyle(const IStyle& other) - : IStyle(Plugin::InternalUse::Only, other.Handle) - { - } - - IStyle::IStyle(IStyle&& other) - : IStyle(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IStyle::~IStyle() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IStyle& IStyle::operator=(const IStyle& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IStyle& IStyle::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IStyle& IStyle::operator=(IStyle&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IStyle::operator==(const IStyle& other) const - { - return Handle == other.Handle; - } - - bool IStyle::operator!=(const IStyle& other) const - { - return Handle != other.Handle; - } + Plugin::ReferenceManagedClass(handle); } } -} - -namespace System -{ - namespace Diagnostics + + Collision::Collision(const Collision& other) + : Collision(Plugin::InternalUse::Only, other.Handle) { - Stopwatch::Stopwatch(decltype(nullptr)) - { - } - - Stopwatch::Stopwatch(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Stopwatch::Stopwatch(const Stopwatch& other) - : Stopwatch(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; } - - Stopwatch::Stopwatch(Stopwatch&& other) - : Stopwatch(Plugin::InternalUse::Only, other.Handle) + } + + Collision& Collision::operator=(const Collision& other) + { + if (this->Handle) { - other.Handle = 0; + Plugin::DereferenceManagedClass(this->Handle); } - - Stopwatch::~Stopwatch() + this->Handle = other.Handle; + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + Plugin::ReferenceManagedClass(this->Handle); } - - Stopwatch& Stopwatch::operator=(const Stopwatch& other) + return *this; + } + + Collision& Collision::operator=(decltype(nullptr)) + { + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - Stopwatch& Stopwatch::operator=(decltype(nullptr)) + return *this; + } + + Collision& Collision::operator=(Collision&& other) + { + if (Handle) { - 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() - { - 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; - } + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; + } - void Stopwatch::Reset() - { - Plugin::SystemDiagnosticsStopwatchMethodReset(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + bool Collision::operator==(const Collision& other) const + { + return Handle == other.Handle; + } + + bool Collision::operator!=(const Collision& other) const + { + return Handle != other.Handle; } } namespace UnityEngine { - GameObject::GameObject(decltype(nullptr)) + Behaviour::Behaviour(decltype(nullptr)) : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) { } - GameObject::GameObject(Plugin::InternalUse iu, int32_t handle) + Behaviour::Behaviour(Plugin::InternalUse, int32_t handle) : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) { Handle = handle; if (handle) @@ -6874,18 +5398,18 @@ namespace UnityEngine } } - GameObject::GameObject(const GameObject& other) - : GameObject(Plugin::InternalUse::Only, other.Handle) + Behaviour::Behaviour(const Behaviour& other) + : Behaviour(Plugin::InternalUse::Only, other.Handle) { } - GameObject::GameObject(GameObject&& other) - : GameObject(Plugin::InternalUse::Only, other.Handle) + Behaviour::Behaviour(Behaviour&& other) + : Behaviour(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - GameObject::~GameObject() + Behaviour::~Behaviour() { if (Handle) { @@ -6894,7 +5418,7 @@ namespace UnityEngine } } - GameObject& GameObject::operator=(const GameObject& other) + Behaviour& Behaviour::operator=(const Behaviour& other) { if (this->Handle) { @@ -6908,7 +5432,7 @@ namespace UnityEngine return *this; } - GameObject& GameObject::operator=(decltype(nullptr)) + Behaviour& Behaviour::operator=(decltype(nullptr)) { if (Handle) { @@ -6918,7 +5442,7 @@ namespace UnityEngine return *this; } - GameObject& GameObject::operator=(GameObject&& other) + Behaviour& Behaviour::operator=(Behaviour&& other) { if (Handle) { @@ -6929,94 +5453,106 @@ namespace UnityEngine return *this; } - bool GameObject::operator==(const GameObject& other) const + bool Behaviour::operator==(const Behaviour& other) const { return Handle == other.Handle; } - bool GameObject::operator!=(const GameObject& other) const + bool Behaviour::operator!=(const Behaviour& other) const { return Handle != other.Handle; } +} + +namespace UnityEngine +{ + MonoBehaviour::MonoBehaviour(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + { + } - GameObject::GameObject() + MonoBehaviour::MonoBehaviour(Plugin::InternalUse, int32_t handle) : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) { - auto returnValue = Plugin::UnityEngineGameObjectConstructor(); - if (Plugin::unhandledCsharpException) + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } - Handle = returnValue; - if (returnValue) + } + + 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::ReferenceManagedClass(returnValue); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - GameObject::GameObject(System::String& name) - : UnityEngine::Object(nullptr) + MonoBehaviour& MonoBehaviour::operator=(const MonoBehaviour& other) { - auto returnValue = Plugin::UnityEngineGameObjectConstructorSystemString(name.Handle); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); } - Handle = returnValue; - if (returnValue) + this->Handle = other.Handle; + if (this->Handle) { - Plugin::ReferenceManagedClass(returnValue); + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - UnityEngine::Transform GameObject::GetTransform() + MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr)) { - auto returnValue = Plugin::UnityEngineGameObjectPropertyGetTransform(Handle); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); + return *this; } - template<> MyGame::MonoBehaviours::TestScript GameObject::AddComponent() + MonoBehaviour& MonoBehaviour::operator=(MonoBehaviour&& other) { - auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(Handle); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); } - return MyGame::MonoBehaviours::TestScript(Plugin::InternalUse::Only, returnValue); + Handle = other.Handle; + other.Handle = 0; + return *this; } - template<> MyGame::MonoBehaviours::AnotherScript GameObject::AddComponent() + bool MonoBehaviour::operator==(const MonoBehaviour& other) const { - auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return MyGame::MonoBehaviours::AnotherScript(Plugin::InternalUse::Only, returnValue); + return Handle == other.Handle; } - UnityEngine::GameObject GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) + bool MonoBehaviour::operator!=(const MonoBehaviour& other) const { - auto returnValue = Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(type); + return Handle != other.Handle; + } + + UnityEngine::Transform MonoBehaviour::GetTransform() + { + auto returnValue = Plugin::UnityEngineMonoBehaviourPropertyGetTransform(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7024,17 +5560,17 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::GameObject(Plugin::InternalUse::Only, returnValue); + return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); } } namespace UnityEngine { - Debug::Debug(decltype(nullptr)) + AudioSettings::AudioSettings(decltype(nullptr)) { } - Debug::Debug(Plugin::InternalUse iu, int32_t handle) + AudioSettings::AudioSettings(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -7043,18 +5579,18 @@ namespace UnityEngine } } - Debug::Debug(const Debug& other) - : Debug(Plugin::InternalUse::Only, other.Handle) + AudioSettings::AudioSettings(const AudioSettings& other) + : AudioSettings(Plugin::InternalUse::Only, other.Handle) { } - Debug::Debug(Debug&& other) - : Debug(Plugin::InternalUse::Only, other.Handle) + AudioSettings::AudioSettings(AudioSettings&& other) + : AudioSettings(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Debug::~Debug() + AudioSettings::~AudioSettings() { if (Handle) { @@ -7063,7 +5599,7 @@ namespace UnityEngine } } - Debug& Debug::operator=(const Debug& other) + AudioSettings& AudioSettings::operator=(const AudioSettings& other) { if (this->Handle) { @@ -7077,7 +5613,7 @@ namespace UnityEngine return *this; } - Debug& Debug::operator=(decltype(nullptr)) + AudioSettings& AudioSettings::operator=(decltype(nullptr)) { if (Handle) { @@ -7087,7 +5623,7 @@ namespace UnityEngine return *this; } - Debug& Debug::operator=(Debug&& other) + AudioSettings& AudioSettings::operator=(AudioSettings&& other) { if (Handle) { @@ -7098,19 +5634,19 @@ namespace UnityEngine return *this; } - bool Debug::operator==(const Debug& other) const + bool AudioSettings::operator==(const AudioSettings& other) const { return Handle == other.Handle; } - bool Debug::operator!=(const Debug& other) const + bool AudioSettings::operator!=(const AudioSettings& other) const { return Handle != other.Handle; } - void Debug::Log(System::Object& message) + void AudioSettings::GetDSPBufferSize(System::Int32* bufferLength, System::Int32* numBuffers) { - Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle); + Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(&bufferLength->Value, &numBuffers->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7123,36 +5659,90 @@ namespace UnityEngine namespace UnityEngine { - namespace Assertions + namespace Networking { - System::Boolean Assert::GetRaiseExceptions() + NetworkTransport::NetworkTransport(decltype(nullptr)) { - 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) + NetworkTransport::NetworkTransport(Plugin::InternalUse, int32_t handle) { - Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions(value); - if (Plugin::unhandledCsharpException) + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } } - template<> void Assert::AreEqual(System::String& expected, System::String& actual) + NetworkTransport::NetworkTransport(const NetworkTransport& other) + : NetworkTransport(Plugin::InternalUse::Only, other.Handle) { - Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.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) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + NetworkTransport& NetworkTransport::operator=(decltype(nullptr)) + { + 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(System::Int32 hostId, System::String* address, System::Int32* port, System::Byte* error) + { + int32_t addressHandle = address->Handle; + Plugin::UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(hostId, &addressHandle, &port->Value, &error->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7160,11 +5750,20 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + if (address->Handle) + { + Plugin::DereferenceManagedClass(address->Handle); + } + address->Handle = addressHandle; + if (address->Handle) + { + Plugin::ReferenceManagedClass(address->Handle); + } } - template<> void Assert::AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual) + void NetworkTransport::Init() { - Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle); + Plugin::UnityEngineNetworkingNetworkTransportMethodInit(); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7178,259 +5777,226 @@ namespace UnityEngine namespace UnityEngine { - Collision::Collision(decltype(nullptr)) + Quaternion::Quaternion() { } - Collision::Collision(Plugin::InternalUse iu, int32_t handle) + Quaternion::operator System::ValueType() { - Handle = handle; + int32_t handle = Plugin::BoxQuaternion(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (handle) { Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); } + return nullptr; } - Collision::Collision(const Collision& other) - : Collision(Plugin::InternalUse::Only, other.Handle) - { - } - - Collision::Collision(Collision&& other) - : Collision(Plugin::InternalUse::Only, other.Handle) + Quaternion::operator System::Object() { - other.Handle = 0; + int32_t handle = Plugin::BoxQuaternion(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } - - Collision::~Collision() +} + +namespace System +{ + Object::operator UnityEngine::Quaternion() { - if (Handle) + UnityEngine::Quaternion returnVal(Plugin::UnboxQuaternion(Handle)); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; + } +} + +namespace UnityEngine +{ + Matrix4x4::Matrix4x4() + { } - Collision& Collision::operator=(const Collision& other) + System::Single Matrix4x4::GetItem(System::Int32 row, System::Int32 column) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + auto returnValue = Plugin::UnityEngineMatrix4x4PropertyGetItem(this, row, column); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; + return returnValue; } - Collision& Collision::operator=(decltype(nullptr)) + void Matrix4x4::SetItem(System::Int32 row, System::Int32 column, System::Single value) { - if (Handle) + Plugin::UnityEngineMatrix4x4PropertySetItem(this, row, column, value); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; } - Collision& Collision::operator=(Collision&& other) + Matrix4x4::operator System::ValueType() { - if (Handle) + int32_t handle = Plugin::BoxMatrix4x4(*this); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - Handle = other.Handle; - other.Handle = 0; - return *this; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; } - bool Collision::operator==(const Collision& other) const + Matrix4x4::operator System::Object() { - return Handle == other.Handle; + int32_t handle = Plugin::BoxMatrix4x4(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } - - bool Collision::operator!=(const Collision& other) const +} + +namespace System +{ + Object::operator UnityEngine::Matrix4x4() { - return Handle != other.Handle; + UnityEngine::Matrix4x4 returnVal(Plugin::UnboxMatrix4x4(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; } } namespace UnityEngine { - Behaviour::Behaviour(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) + QueryTriggerInteraction::QueryTriggerInteraction(int32_t value) + : Value(value) { } - Behaviour::Behaviour(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) + UnityEngine::QueryTriggerInteraction::operator int32_t() const { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + return Value; } - Behaviour::Behaviour(const Behaviour& other) - : Behaviour(Plugin::InternalUse::Only, other.Handle) + bool UnityEngine::QueryTriggerInteraction::operator==(QueryTriggerInteraction other) { + return Value == other.Value; } - Behaviour::Behaviour(Behaviour&& other) - : Behaviour(Plugin::InternalUse::Only, other.Handle) + bool UnityEngine::QueryTriggerInteraction::operator!=(QueryTriggerInteraction other) { - other.Handle = 0; + return Value != other.Value; } - Behaviour::~Behaviour() + QueryTriggerInteraction::operator System::Enum() { - if (Handle) + int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Enum(Plugin::InternalUse::Only, handle); } + return nullptr; } - Behaviour& Behaviour::operator=(const Behaviour& other) + QueryTriggerInteraction::operator System::ValueType() { - if (this->Handle) + int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Behaviour& Behaviour::operator=(decltype(nullptr)) - { - 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(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - { - } - - MonoBehaviour::MonoBehaviour(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - { - Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); } + return nullptr; } - 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr)) + QueryTriggerInteraction::operator System::Object() { - if (Handle) + int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; - } - - MonoBehaviour& MonoBehaviour::operator=(MonoBehaviour&& other) - { - if (Handle) + if (handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, 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; + return nullptr; } - UnityEngine::Transform MonoBehaviour::GetTransform() + QueryTriggerInteraction::operator System::IFormattable() { - auto returnValue = Plugin::UnityEngineMonoBehaviourPropertyGetTransform(Handle); + int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7438,93 +6004,60 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); - } -} - -namespace UnityEngine -{ - AudioSettings::AudioSettings(decltype(nullptr)) - { - } - - AudioSettings::AudioSettings(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); } + return nullptr; } - 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) + QueryTriggerInteraction::operator System::IConvertible() { - if (this->Handle) + int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - this->Handle = other.Handle; - if (this->Handle) + if (handle) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); } - return *this; + return nullptr; } - AudioSettings& AudioSettings::operator=(decltype(nullptr)) + QueryTriggerInteraction::operator System::IComparable() { - if (Handle) + int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; - } - - AudioSettings& AudioSettings::operator=(AudioSettings&& other) - { - if (Handle) + if (handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, 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; + return nullptr; } - void AudioSettings::GetDSPBufferSize(int32_t* bufferLength, int32_t* numBuffers) +} +const UnityEngine::QueryTriggerInteraction UnityEngine::QueryTriggerInteraction::UseGlobal(0); +const UnityEngine::QueryTriggerInteraction UnityEngine::QueryTriggerInteraction::Ignore(1); +const UnityEngine::QueryTriggerInteraction UnityEngine::QueryTriggerInteraction::Collide(2); + +namespace System +{ + Object::operator UnityEngine::QueryTriggerInteraction() { - Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(bufferLength, numBuffers); + UnityEngine::QueryTriggerInteraction returnVal(Plugin::UnboxQueryTriggerInteraction(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7532,298 +6065,41 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + return returnVal; } } -namespace UnityEngine +namespace System { - namespace Networking + namespace Collections { - NetworkTransport::NetworkTransport(decltype(nullptr)) - { - } - - NetworkTransport::NetworkTransport(Plugin::InternalUse iu, int32_t handle) + namespace Generic { - Handle = handle; - if (handle) + KeyValuePair::KeyValuePair(decltype(nullptr)) { - 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) + + KeyValuePair::KeyValuePair(Plugin::InternalUse, int32_t handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + } } - } - - NetworkTransport& NetworkTransport::operator=(const NetworkTransport& other) - { - if (this->Handle) + + KeyValuePair::KeyValuePair(const KeyValuePair& other) + : KeyValuePair(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - NetworkTransport& NetworkTransport::operator=(decltype(nullptr)) - { - 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) - { - 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 -{ - Quaternion::Quaternion() - { - } -} - -namespace System -{ - Object::Object(UnityEngine::Quaternion& val) - { - int32_t handle = Plugin::BoxQuaternion(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator UnityEngine::Quaternion() - { - UnityEngine::Quaternion returnVal(Plugin::UnboxQuaternion(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -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 System -{ - Object::Object(UnityEngine::Matrix4x4& val) - { - int32_t handle = Plugin::BoxMatrix4x4(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator UnityEngine::Matrix4x4() - { - UnityEngine::Matrix4x4 returnVal(Plugin::UnboxMatrix4x4(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::Object(UnityEngine::QueryTriggerInteraction val) - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator UnityEngine::QueryTriggerInteraction() - { - UnityEngine::QueryTriggerInteraction returnVal(Plugin::UnboxQueryTriggerInteraction(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - KeyValuePair::KeyValuePair(decltype(nullptr)) - : System::ValueType(nullptr) - { - } - - KeyValuePair::KeyValuePair(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) - { - Handle = 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) + + KeyValuePair::KeyValuePair(KeyValuePair&& other) + : KeyValuePair(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - KeyValuePair::~KeyValuePair() + KeyValuePair::~KeyValuePair() { if (Handle) { @@ -7832,7 +6108,7 @@ namespace System } } - KeyValuePair& KeyValuePair::operator=(const KeyValuePair& other) + KeyValuePair& KeyValuePair::operator=(const KeyValuePair& other) { if (this->Handle) { @@ -7846,7 +6122,7 @@ namespace System return *this; } - KeyValuePair& KeyValuePair::operator=(decltype(nullptr)) + KeyValuePair& KeyValuePair::operator=(decltype(nullptr)) { if (Handle) { @@ -7856,7 +6132,7 @@ namespace System return *this; } - KeyValuePair& KeyValuePair::operator=(KeyValuePair&& other) + KeyValuePair& KeyValuePair::operator=(KeyValuePair&& other) { if (Handle) { @@ -7867,18 +6143,17 @@ namespace System return *this; } - bool KeyValuePair::operator==(const KeyValuePair& other) const + bool KeyValuePair::operator==(const KeyValuePair& other) const { return Handle == other.Handle; } - bool KeyValuePair::operator!=(const KeyValuePair& other) const + bool KeyValuePair::operator!=(const KeyValuePair& other) const { return Handle != other.Handle; } - KeyValuePair::KeyValuePair(System::String& key, double value) - : System::ValueType(nullptr) + KeyValuePair::KeyValuePair(System::String& key, System::Double value) { auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(key.Handle, value); if (Plugin::unhandledCsharpException) @@ -7895,7 +6170,7 @@ namespace System } } - System::String KeyValuePair::GetKey() + System::String KeyValuePair::GetKey() { auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(Handle); if (Plugin::unhandledCsharpException) @@ -7908,7 +6183,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - double KeyValuePair::GetValue() + System::Double KeyValuePair::GetValue() { auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(Handle); if (Plugin::unhandledCsharpException) @@ -7920,32 +6195,51 @@ namespace System } return returnValue; } + + KeyValuePair::operator System::ValueType() + { + int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + KeyValuePair::operator System::Object() + { + int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } } } } namespace System { - Object::Object(System::Collections::Generic::KeyValuePair& val) + Object::operator System::Collections::Generic::KeyValuePair() { - int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(val.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator System::Collections::Generic::KeyValuePair() - { - System::Collections::Generic::KeyValuePair returnVal(Plugin::InternalUse::Only, Plugin::UnboxKeyValuePairSystemString_SystemDouble(Handle)); + System::Collections::Generic::KeyValuePair returnVal(Plugin::InternalUse::Only, Plugin::UnboxKeyValuePairSystemString_SystemDouble(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7963,23 +6257,11 @@ namespace System { namespace Generic { - List::List(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + LinkedListNode::LinkedListNode(decltype(nullptr)) { } - List::List(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + LinkedListNode::LinkedListNode(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -7988,18 +6270,18 @@ namespace System } } - List::List(const List& other) - : List(Plugin::InternalUse::Only, other.Handle) + LinkedListNode::LinkedListNode(const LinkedListNode& other) + : LinkedListNode(Plugin::InternalUse::Only, other.Handle) { } - List::List(List&& other) - : List(Plugin::InternalUse::Only, other.Handle) + LinkedListNode::LinkedListNode(LinkedListNode&& other) + : LinkedListNode(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - List::~List() + LinkedListNode::~LinkedListNode() { if (Handle) { @@ -8008,7 +6290,7 @@ namespace System } } - List& List::operator=(const List& other) + LinkedListNode& LinkedListNode::operator=(const LinkedListNode& other) { if (this->Handle) { @@ -8022,7 +6304,7 @@ namespace System return *this; } - List& List::operator=(decltype(nullptr)) + LinkedListNode& LinkedListNode::operator=(decltype(nullptr)) { if (Handle) { @@ -8032,7 +6314,7 @@ namespace System return *this; } - List& List::operator=(List&& other) + LinkedListNode& LinkedListNode::operator=(LinkedListNode&& other) { if (Handle) { @@ -8043,25 +6325,19 @@ namespace System return *this; } - bool List::operator==(const List& other) const + bool LinkedListNode::operator==(const LinkedListNode& other) const { return Handle == other.Handle; } - bool List::operator!=(const List& other) const + bool LinkedListNode::operator!=(const LinkedListNode& other) const { return Handle != other.Handle; } - List::List() - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + LinkedListNode::LinkedListNode(System::String& value) { - auto returnValue = Plugin::SystemCollectionsGenericListSystemStringConstructor(); + auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(value.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8076,9 +6352,9 @@ namespace System } } - System::String List::GetItem(int32_t index) + System::String LinkedListNode::GetValue() { - auto returnValue = Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem(Handle, index); + auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8089,33 +6365,9 @@ namespace System 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; - } - } - - void List::Sort(System::Collections::Generic::IComparer& comparer) + void LinkedListNode::SetValue(System::String& value) { - Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); + Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(Handle, value.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8128,87 +6380,19 @@ namespace System } } -namespace Plugin -{ - SystemCollectionsGenericListSystemStringIterator::SystemCollectionsGenericListSystemStringIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericListSystemStringIterator::SystemCollectionsGenericListSystemStringIterator(System::Collections::Generic::List& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericListSystemStringIterator::~SystemCollectionsGenericListSystemStringIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericListSystemStringIterator& SystemCollectionsGenericListSystemStringIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericListSystemStringIterator::operator!=(const SystemCollectionsGenericListSystemStringIterator& other) - { - return hasMore; - } - - System::String SystemCollectionsGenericListSystemStringIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericListSystemStringIterator begin(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemStringIterator(enumerable); - } - - Plugin::SystemCollectionsGenericListSystemStringIterator end(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemStringIterator(nullptr); - } - } - } -} - namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace CompilerServices { - List::List(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + StrongBox::StrongBox(decltype(nullptr)) + : System::Runtime::CompilerServices::IStrongBox(nullptr) { } - List::List(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + StrongBox::StrongBox(Plugin::InternalUse, int32_t handle) + : System::Runtime::CompilerServices::IStrongBox(nullptr) { Handle = handle; if (handle) @@ -8217,18 +6401,18 @@ namespace System } } - List::List(const List& other) - : List(Plugin::InternalUse::Only, other.Handle) + StrongBox::StrongBox(const StrongBox& other) + : StrongBox(Plugin::InternalUse::Only, other.Handle) { } - List::List(List&& other) - : List(Plugin::InternalUse::Only, other.Handle) + StrongBox::StrongBox(StrongBox&& other) + : StrongBox(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - List::~List() + StrongBox::~StrongBox() { if (Handle) { @@ -8237,7 +6421,7 @@ namespace System } } - List& List::operator=(const List& other) + StrongBox& StrongBox::operator=(const StrongBox& other) { if (this->Handle) { @@ -8251,7 +6435,7 @@ namespace System return *this; } - List& List::operator=(decltype(nullptr)) + StrongBox& StrongBox::operator=(decltype(nullptr)) { if (Handle) { @@ -8261,7 +6445,7 @@ namespace System return *this; } - List& List::operator=(List&& other) + StrongBox& StrongBox::operator=(StrongBox&& other) { if (Handle) { @@ -8272,25 +6456,20 @@ namespace System return *this; } - bool List::operator==(const List& other) const + bool StrongBox::operator==(const StrongBox& other) const { return Handle == other.Handle; } - bool List::operator!=(const List& other) const + bool StrongBox::operator!=(const StrongBox& other) const { return Handle != other.Handle; } - List::List() - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + StrongBox::StrongBox(System::String& value) + : System::Runtime::CompilerServices::IStrongBox(nullptr) { - auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32Constructor(); + auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(value.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8305,22 +6484,9 @@ namespace System } } - int32_t List::GetItem(int32_t index) - { - auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32PropertyGetItem(Handle, index); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void List::SetItem(int32_t index, int32_t value) + System::String StrongBox::GetValue() { - Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); + auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8328,23 +6494,12 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return System::String(Plugin::InternalUse::Only, returnValue); } - void List::Add(int32_t item) - { - Plugin::SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(Handle, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void List::Sort(System::Collections::Generic::IComparer& comparer) + void StrongBox::SetValue(System::String& value) { - Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); + Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(Handle, value.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8357,652 +6512,293 @@ namespace System } } -namespace Plugin +namespace System { - SystemCollectionsGenericListSystemInt32Iterator::SystemCollectionsGenericListSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericListSystemInt32Iterator::SystemCollectionsGenericListSystemInt32Iterator(System::Collections::Generic::List& enumerable) - : enumerator(enumerable.GetEnumerator()) + Exception::Exception(decltype(nullptr)) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) { - hasMore = enumerator.MoveNext(); } - SystemCollectionsGenericListSystemInt32Iterator::~SystemCollectionsGenericListSystemInt32Iterator() + Exception::Exception(Plugin::InternalUse, int32_t handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) { - if (enumerator != nullptr) + Handle = handle; + if (handle) { - enumerator.Dispose(); + Plugin::ReferenceManagedClass(handle); } } - SystemCollectionsGenericListSystemInt32Iterator& SystemCollectionsGenericListSystemInt32Iterator::operator++() + Exception::Exception(const Exception& other) + : Exception(Plugin::InternalUse::Only, other.Handle) { - hasMore = enumerator.MoveNext(); - return *this; } - bool SystemCollectionsGenericListSystemInt32Iterator::operator!=(const SystemCollectionsGenericListSystemInt32Iterator& other) + Exception::Exception(Exception&& other) + : Exception(Plugin::InternalUse::Only, other.Handle) { - return hasMore; + other.Handle = 0; } - int32_t SystemCollectionsGenericListSystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections + Exception::~Exception() { - namespace Generic + if (Handle) { - Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemInt32Iterator(nullptr); - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } -} - -namespace System -{ - namespace Collections + + Exception& Exception::operator=(const Exception& other) { - namespace Generic + if (this->Handle) { - LinkedListNode::LinkedListNode(decltype(nullptr)) - { - } - - LinkedListNode::LinkedListNode(Plugin::InternalUse iu, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - LinkedListNode& LinkedListNode::operator=(decltype(nullptr)) - { - 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) - { - 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; - } - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Exception& Exception::operator=(decltype(nullptr)) + { + 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::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(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 { - namespace Runtime + SystemException::SystemException(decltype(nullptr)) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) { - namespace CompilerServices + } + + SystemException::SystemException(Plugin::InternalUse, int32_t handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + { + Handle = handle; + if (handle) { - StrongBox::StrongBox(decltype(nullptr)) - : System::Runtime::CompilerServices::IStrongBox(nullptr) - { - } - - StrongBox::StrongBox(Plugin::InternalUse iu, int32_t handle) - : System::Runtime::CompilerServices::IStrongBox(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - StrongBox& StrongBox::operator=(decltype(nullptr)) - { - 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::Runtime::CompilerServices::IStrongBox(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; - } - } + Plugin::ReferenceManagedClass(handle); } } -} - -namespace System -{ - namespace Collections + + SystemException::SystemException(const SystemException& other) + : SystemException(Plugin::InternalUse::Only, other.Handle) { - namespace ObjectModel - { - Collection::Collection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - } - - Collection::Collection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Collection& Collection::operator=(decltype(nullptr)) - { - 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 Plugin -{ - SystemCollectionsObjectModelCollectionSystemInt32Iterator::SystemCollectionsObjectModelCollectionSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) + + SystemException::SystemException(SystemException&& other) + : SystemException(Plugin::InternalUse::Only, other.Handle) { + other.Handle = 0; } - SystemCollectionsObjectModelCollectionSystemInt32Iterator::SystemCollectionsObjectModelCollectionSystemInt32Iterator(System::Collections::ObjectModel::Collection& enumerable) - : enumerator(enumerable.GetEnumerator()) + SystemException::~SystemException() { - hasMore = enumerator.MoveNext(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - SystemCollectionsObjectModelCollectionSystemInt32Iterator::~SystemCollectionsObjectModelCollectionSystemInt32Iterator() + SystemException& SystemException::operator=(const SystemException& other) { - if (enumerator != nullptr) + if (this->Handle) { - enumerator.Dispose(); + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - SystemCollectionsObjectModelCollectionSystemInt32Iterator& SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator++() + SystemException& SystemException::operator=(decltype(nullptr)) { - hasMore = enumerator.MoveNext(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } return *this; } - bool SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator!=(const SystemCollectionsObjectModelCollectionSystemInt32Iterator& other) + SystemException& SystemException::operator=(SystemException&& other) { - return hasMore; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - int32_t SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator*() + bool SystemException::operator==(const SystemException& other) const { - return enumerator.GetCurrent(); + return Handle == other.Handle; + } + + bool SystemException::operator!=(const SystemException& other) const + { + return Handle != other.Handle; } } namespace System { - namespace Collections + NullReferenceException::NullReferenceException(decltype(nullptr)) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + , System::SystemException(nullptr) { - namespace ObjectModel + } + + NullReferenceException::NullReferenceException(Plugin::InternalUse, int32_t handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + , System::SystemException(nullptr) + { + Handle = handle; + if (handle) { - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable) - { - return Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable) - { - return Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator(nullptr); - } + Plugin::ReferenceManagedClass(handle); } } -} - -namespace System -{ - namespace Collections + + NullReferenceException::NullReferenceException(const NullReferenceException& other) + : NullReferenceException(Plugin::InternalUse::Only, other.Handle) { - namespace ObjectModel + } + + NullReferenceException::NullReferenceException(NullReferenceException&& other) + : NullReferenceException(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + NullReferenceException::~NullReferenceException() + { + if (Handle) { - KeyedCollection::KeyedCollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - , System::Collections::ObjectModel::Collection(nullptr) - { - } - - KeyedCollection::KeyedCollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - , System::Collections::ObjectModel::Collection(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - KeyedCollection& KeyedCollection::operator=(decltype(nullptr)) - { - 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; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } -} - -namespace Plugin -{ - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(System::Collections::ObjectModel::KeyedCollection& enumerable) - : enumerator(enumerable.GetEnumerator()) + NullReferenceException& NullReferenceException::operator=(const NullReferenceException& other) { - hasMore = enumerator.MoveNext(); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::~SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator() + NullReferenceException& NullReferenceException::operator=(decltype(nullptr)) { - if (enumerator != nullptr) + if (Handle) { - enumerator.Dispose(); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } + return *this; } - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator++() + NullReferenceException& NullReferenceException::operator=(NullReferenceException&& other) { - hasMore = enumerator.MoveNext(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; return *this; } - bool SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator!=(const SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& other) + bool NullReferenceException::operator==(const NullReferenceException& other) const { - return hasMore; + return Handle == other.Handle; } - int32_t SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections + bool NullReferenceException::operator!=(const NullReferenceException& other) const { - namespace ObjectModel - { - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable) - { - return Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable) - { - return Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(nullptr); - } - } + return Handle != other.Handle; } } -namespace System +namespace UnityEngine { - Exception::Exception(decltype(nullptr)) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) + Screen::Screen(decltype(nullptr)) { } - Exception::Exception(Plugin::InternalUse iu, int32_t handle) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) + Screen::Screen(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -9011,18 +6807,18 @@ namespace System } } - Exception::Exception(const Exception& other) - : Exception(Plugin::InternalUse::Only, other.Handle) + Screen::Screen(const Screen& other) + : Screen(Plugin::InternalUse::Only, other.Handle) { } - Exception::Exception(Exception&& other) - : Exception(Plugin::InternalUse::Only, other.Handle) + Screen::Screen(Screen&& other) + : Screen(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Exception::~Exception() + Screen::~Screen() { if (Handle) { @@ -9031,7 +6827,7 @@ namespace System } } - Exception& Exception::operator=(const Exception& other) + Screen& Screen::operator=(const Screen& other) { if (this->Handle) { @@ -9045,7 +6841,7 @@ namespace System return *this; } - Exception& Exception::operator=(decltype(nullptr)) + Screen& Screen::operator=(decltype(nullptr)) { if (Handle) { @@ -9055,7 +6851,7 @@ namespace System return *this; } - Exception& Exception::operator=(Exception&& other) + Screen& Screen::operator=(Screen&& other) { if (Handle) { @@ -9066,21 +6862,19 @@ namespace System return *this; } - bool Exception::operator==(const Exception& other) const + bool Screen::operator==(const Screen& other) const { return Handle == other.Handle; } - bool Exception::operator!=(const Exception& other) const + bool Screen::operator!=(const Screen& other) const { return Handle != other.Handle; } - Exception::Exception(System::String& message) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) + System::Array1 Screen::GetResolutions() { - auto returnValue = Plugin::SystemExceptionConstructorSystemString(message.Handle); + auto returnValue = Plugin::UnityEngineScreenPropertyGetResolutions(); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9088,136 +6882,187 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - } + return System::Array1(Plugin::InternalUse::Only, returnValue); } } -namespace System +namespace UnityEngine { - SystemException::SystemException(decltype(nullptr)) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) + Ray::Ray(decltype(nullptr)) { } - SystemException::SystemException(Plugin::InternalUse iu, int32_t handle) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) + Ray::Ray(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedUnityEngineRay(Handle); } } - SystemException::SystemException(const SystemException& other) - : SystemException(Plugin::InternalUse::Only, other.Handle) + Ray::Ray(const Ray& other) + : Ray(Plugin::InternalUse::Only, other.Handle) { } - SystemException::SystemException(SystemException&& other) - : SystemException(Plugin::InternalUse::Only, other.Handle) + Ray::Ray(Ray&& other) + : Ray(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - SystemException::~SystemException() + Ray::~Ray() { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineRay(Handle); Handle = 0; } } - SystemException& SystemException::operator=(const SystemException& other) + Ray& Ray::operator=(const Ray& other) { if (this->Handle) { - Plugin::DereferenceManagedClass(this->Handle); + Plugin::DereferenceManagedUnityEngineRay(Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::ReferenceManagedUnityEngineRay(Handle); } return *this; } - SystemException& SystemException::operator=(decltype(nullptr)) + Ray& Ray::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineRay(Handle); Handle = 0; } return *this; } - SystemException& SystemException::operator=(SystemException&& other) + Ray& Ray::operator=(Ray&& other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineRay(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool SystemException::operator==(const SystemException& other) const + bool Ray::operator==(const Ray& other) const { return Handle == other.Handle; } - bool SystemException::operator!=(const SystemException& other) const + bool Ray::operator!=(const Ray& other) const { return Handle != other.Handle; } -} - -namespace System -{ - NullReferenceException::NullReferenceException(decltype(nullptr)) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) - , System::SystemException(nullptr) + + 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; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedUnityEngineRay(Handle); + } } - NullReferenceException::NullReferenceException(Plugin::InternalUse iu, int32_t handle) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) - , System::SystemException(nullptr) + Ray::operator System::ValueType() { - Handle = handle; + int32_t handle = Plugin::BoxRay(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (handle) { Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); } + return nullptr; } - NullReferenceException::NullReferenceException(const NullReferenceException& other) - : NullReferenceException(Plugin::InternalUse::Only, other.Handle) - { - } - - NullReferenceException::NullReferenceException(NullReferenceException&& other) - : NullReferenceException(Plugin::InternalUse::Only, other.Handle) + Ray::operator System::Object() + { + int32_t handle = Plugin::BoxRay(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } +} + +namespace System +{ + Object::operator UnityEngine::Ray() + { + UnityEngine::Ray returnVal(Plugin::InternalUse::Only, Plugin::UnboxRay(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace UnityEngine +{ + Physics::Physics(decltype(nullptr)) + { + } + + Physics::Physics(Plugin::InternalUse, int32_t handle) + { + Handle = 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; } - NullReferenceException::~NullReferenceException() + Physics::~Physics() { if (Handle) { @@ -9226,7 +7071,7 @@ namespace System } } - NullReferenceException& NullReferenceException::operator=(const NullReferenceException& other) + Physics& Physics::operator=(const Physics& other) { if (this->Handle) { @@ -9240,7 +7085,7 @@ namespace System return *this; } - NullReferenceException& NullReferenceException::operator=(decltype(nullptr)) + Physics& Physics::operator=(decltype(nullptr)) { if (Handle) { @@ -9250,7 +7095,7 @@ namespace System return *this; } - NullReferenceException& NullReferenceException::operator=(NullReferenceException&& other) + Physics& Physics::operator=(Physics&& other) { if (Handle) { @@ -9261,24 +7106,175 @@ namespace System return *this; } - bool NullReferenceException::operator==(const NullReferenceException& other) const + bool Physics::operator==(const Physics& other) const { return Handle == other.Handle; } - bool NullReferenceException::operator!=(const NullReferenceException& other) const + bool Physics::operator!=(const Physics& other) const { return Handle != other.Handle; } + + System::Int32 Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results) + { + auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(ray.Handle, 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.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Array1(Plugin::InternalUse::Only, returnValue); + } } namespace UnityEngine { - Screen::Screen(decltype(nullptr)) + Gradient::Gradient(decltype(nullptr)) + { + } + + Gradient::Gradient(Plugin::InternalUse, int32_t handle) + { + Handle = 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) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Gradient& Gradient::operator=(decltype(nullptr)) + { + 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() + { + 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(decltype(nullptr)) + : System::IAppDomainSetup(nullptr) { } - Screen::Screen(Plugin::InternalUse iu, int32_t handle) + AppDomainSetup::AppDomainSetup(Plugin::InternalUse, int32_t handle) + : System::IAppDomainSetup(nullptr) { Handle = handle; if (handle) @@ -9286,427 +7282,4028 @@ namespace UnityEngine 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() + + 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) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr)) + { + 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::IAppDomainSetup(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 UnityEngine +{ + Application::Application(decltype(nullptr)) + { + } + + Application::Application(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + Application::Application(const Application& other) + : Application(Plugin::InternalUse::Only, other.Handle) + { + } + + Application::Application(Application&& other) + : Application(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Application::~Application() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Application& Application::operator=(const Application& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Application& Application::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Application& Application::operator=(Application&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Application::operator==(const Application& other) const + { + return Handle == other.Handle; + } + + bool Application::operator!=(const Application& other) const + { + return Handle != other.Handle; + } + + void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction& del) + { + Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del) + { + Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } +} + +namespace UnityEngine +{ + namespace SceneManagement + { + SceneManager::SceneManager(decltype(nullptr)) + { + } + + SceneManager::SceneManager(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + SceneManager::SceneManager(const SceneManager& other) + : SceneManager(Plugin::InternalUse::Only, other.Handle) + { + } + + SceneManager::SceneManager(SceneManager&& other) + : SceneManager(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + SceneManager::~SceneManager() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + SceneManager& SceneManager::operator=(const SceneManager& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + SceneManager& SceneManager::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + SceneManager& SceneManager::operator=(SceneManager&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool SceneManager::operator==(const SceneManager& other) const + { + return Handle == other.Handle; + } + + bool SceneManager::operator!=(const SceneManager& other) const + { + return Handle != other.Handle; + } + + void SceneManager::AddSceneLoaded(UnityEngine::Events::UnityAction2& del) + { + Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + void SceneManager::RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del) + { + Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } +} + +namespace UnityEngine +{ + namespace SceneManagement + { + Scene::Scene(decltype(nullptr)) + { + } + + Scene::Scene(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); + } + } + + Scene::Scene(const Scene& other) + : Scene(Plugin::InternalUse::Only, other.Handle) + { + } + + Scene::Scene(Scene&& other) + : Scene(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Scene::~Scene() + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); + Handle = 0; + } + } + + Scene& Scene::operator=(const Scene& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); + } + return *this; + } + + Scene& Scene::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); + Handle = 0; + } + return *this; + } + + Scene& Scene::operator=(Scene&& other) + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Scene::operator==(const Scene& other) const + { + return Handle == other.Handle; + } + + bool Scene::operator!=(const Scene& other) const + { + return Handle != other.Handle; + } + + Scene::operator System::ValueType() + { + int32_t handle = Plugin::BoxScene(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + Scene::operator System::Object() + { + int32_t handle = Plugin::BoxScene(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + } +} + +namespace System +{ + Object::operator UnityEngine::SceneManagement::Scene() + { + UnityEngine::SceneManagement::Scene returnVal(Plugin::InternalUse::Only, Plugin::UnboxScene(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace UnityEngine +{ + namespace SceneManagement + { + LoadSceneMode::LoadSceneMode(int32_t value) + : Value(value) + { + } + + UnityEngine::SceneManagement::LoadSceneMode::operator int32_t() const + { + return Value; + } + + bool UnityEngine::SceneManagement::LoadSceneMode::operator==(LoadSceneMode other) + { + return Value == other.Value; + } + + bool UnityEngine::SceneManagement::LoadSceneMode::operator!=(LoadSceneMode other) + { + return Value != other.Value; + } + + LoadSceneMode::operator System::Enum() + { + int32_t handle = Plugin::BoxLoadSceneMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Enum(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + LoadSceneMode::operator System::ValueType() + { + int32_t handle = Plugin::BoxLoadSceneMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + LoadSceneMode::operator System::Object() + { + int32_t handle = Plugin::BoxLoadSceneMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + LoadSceneMode::operator System::IFormattable() + { + int32_t handle = Plugin::BoxLoadSceneMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + LoadSceneMode::operator System::IConvertible() + { + int32_t handle = Plugin::BoxLoadSceneMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + LoadSceneMode::operator System::IComparable() + { + int32_t handle = Plugin::BoxLoadSceneMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + } +} +const UnityEngine::SceneManagement::LoadSceneMode UnityEngine::SceneManagement::LoadSceneMode::Single(0); +const UnityEngine::SceneManagement::LoadSceneMode UnityEngine::SceneManagement::LoadSceneMode::Additive(1); + +namespace System +{ + Object::operator UnityEngine::SceneManagement::LoadSceneMode() + { + UnityEngine::SceneManagement::LoadSceneMode returnVal(Plugin::UnboxLoadSceneMode(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + EventArgs::EventArgs(decltype(nullptr)) + { + } + + EventArgs::EventArgs(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + EventArgs::EventArgs(const EventArgs& other) + : EventArgs(Plugin::InternalUse::Only, other.Handle) + { + } + + EventArgs::EventArgs(EventArgs&& other) + : EventArgs(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + EventArgs::~EventArgs() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + EventArgs& EventArgs::operator=(const EventArgs& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + EventArgs& EventArgs::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + EventArgs& EventArgs::operator=(EventArgs&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool EventArgs::operator==(const EventArgs& other) const + { + return Handle == other.Handle; + } + + bool EventArgs::operator!=(const EventArgs& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentEventArgs::ComponentEventArgs(decltype(nullptr)) + : System::EventArgs(nullptr) + { + } + + ComponentEventArgs::ComponentEventArgs(Plugin::InternalUse, int32_t handle) + : System::EventArgs(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + ComponentEventArgs::ComponentEventArgs(const ComponentEventArgs& other) + : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) + { + } + + ComponentEventArgs::ComponentEventArgs(ComponentEventArgs&& other) + : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ComponentEventArgs::~ComponentEventArgs() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + ComponentEventArgs& ComponentEventArgs::operator=(const ComponentEventArgs& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ComponentEventArgs& ComponentEventArgs::operator=(ComponentEventArgs&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ComponentEventArgs::operator==(const ComponentEventArgs& other) const + { + return Handle == other.Handle; + } + + bool ComponentEventArgs::operator!=(const ComponentEventArgs& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr)) + : System::EventArgs(nullptr) + { + } + + ComponentChangingEventArgs::ComponentChangingEventArgs(Plugin::InternalUse, int32_t handle) + : System::EventArgs(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + ComponentChangingEventArgs::ComponentChangingEventArgs(const ComponentChangingEventArgs& other) + : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) + { + } + + ComponentChangingEventArgs::ComponentChangingEventArgs(ComponentChangingEventArgs&& other) + : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ComponentChangingEventArgs::~ComponentChangingEventArgs() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(const ComponentChangingEventArgs& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(ComponentChangingEventArgs&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ComponentChangingEventArgs::operator==(const ComponentChangingEventArgs& other) const + { + return Handle == other.Handle; + } + + bool ComponentChangingEventArgs::operator!=(const ComponentChangingEventArgs& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr)) + : System::EventArgs(nullptr) + { + } + + ComponentChangedEventArgs::ComponentChangedEventArgs(Plugin::InternalUse, int32_t handle) + : System::EventArgs(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + ComponentChangedEventArgs::ComponentChangedEventArgs(const ComponentChangedEventArgs& other) + : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) + { + } + + ComponentChangedEventArgs::ComponentChangedEventArgs(ComponentChangedEventArgs&& other) + : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ComponentChangedEventArgs::~ComponentChangedEventArgs() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(const ComponentChangedEventArgs& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(ComponentChangedEventArgs&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ComponentChangedEventArgs::operator==(const ComponentChangedEventArgs& other) const + { + return Handle == other.Handle; + } + + bool ComponentChangedEventArgs::operator!=(const ComponentChangedEventArgs& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr)) + : System::EventArgs(nullptr) + { + } + + ComponentRenameEventArgs::ComponentRenameEventArgs(Plugin::InternalUse, int32_t handle) + : System::EventArgs(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + ComponentRenameEventArgs::ComponentRenameEventArgs(const ComponentRenameEventArgs& other) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) + { + } + + ComponentRenameEventArgs::ComponentRenameEventArgs(ComponentRenameEventArgs&& other) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ComponentRenameEventArgs::~ComponentRenameEventArgs() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(const ComponentRenameEventArgs& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(ComponentRenameEventArgs&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ComponentRenameEventArgs::operator==(const ComponentRenameEventArgs& other) const + { + return Handle == other.Handle; + } + + bool ComponentRenameEventArgs::operator!=(const ComponentRenameEventArgs& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + MemberDescriptor::MemberDescriptor(decltype(nullptr)) + { + } + + MemberDescriptor::MemberDescriptor(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + MemberDescriptor::MemberDescriptor(const MemberDescriptor& other) + : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) + { + } + + MemberDescriptor::MemberDescriptor(MemberDescriptor&& other) + : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + MemberDescriptor::~MemberDescriptor() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + MemberDescriptor& MemberDescriptor::operator=(const MemberDescriptor& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + MemberDescriptor& MemberDescriptor::operator=(MemberDescriptor&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool MemberDescriptor::operator==(const MemberDescriptor& other) const + { + return Handle == other.Handle; + } + + bool MemberDescriptor::operator!=(const MemberDescriptor& other) const + { + return Handle != other.Handle; + } + } +} + +namespace UnityEngine +{ + PrimitiveType::PrimitiveType(int32_t value) + : Value(value) + { + } + + UnityEngine::PrimitiveType::operator int32_t() const + { + return Value; + } + + bool UnityEngine::PrimitiveType::operator==(PrimitiveType other) + { + return Value == other.Value; + } + + bool UnityEngine::PrimitiveType::operator!=(PrimitiveType other) + { + return Value != other.Value; + } + + PrimitiveType::operator System::Enum() + { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Enum(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + PrimitiveType::operator System::ValueType() + { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + PrimitiveType::operator System::Object() + { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + PrimitiveType::operator System::IFormattable() + { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + PrimitiveType::operator System::IConvertible() + { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + PrimitiveType::operator System::IComparable() + { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + +} +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Sphere(0); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Capsule(1); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Cylinder(2); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Cube(3); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Plane(4); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Quad(5); + +namespace System +{ + Object::operator UnityEngine::PrimitiveType() + { + UnityEngine::PrimitiveType returnVal(Plugin::UnboxPrimitiveType(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace UnityEngine +{ + Time::Time(decltype(nullptr)) + { + } + + Time::Time(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + Time::Time(const Time& other) + : Time(Plugin::InternalUse::Only, other.Handle) + { + } + + Time::Time(Time&& other) + : Time(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Time::~Time() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Time& Time::operator=(const Time& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Time& Time::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Time& Time::operator=(Time&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Time::operator==(const Time& other) const + { + return Handle == other.Handle; + } + + bool Time::operator!=(const Time& other) const + { + return Handle != other.Handle; + } + + System::Single Time::GetDeltaTime() + { + auto returnValue = Plugin::UnityEngineTimePropertyGetDeltaTime(); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } +} + +namespace System +{ + namespace IO + { + FileMode::FileMode(int32_t value) + : Value(value) + { + } + + System::IO::FileMode::operator int32_t() const + { + return Value; + } + + bool System::IO::FileMode::operator==(FileMode other) + { + return Value == other.Value; + } + + bool System::IO::FileMode::operator!=(FileMode other) + { + return Value != other.Value; + } + + FileMode::operator System::Enum() + { + int32_t handle = Plugin::BoxFileMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Enum(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + FileMode::operator System::ValueType() + { + int32_t handle = Plugin::BoxFileMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + FileMode::operator System::Object() + { + int32_t handle = Plugin::BoxFileMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + FileMode::operator System::IFormattable() + { + int32_t handle = Plugin::BoxFileMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + FileMode::operator System::IConvertible() + { + int32_t handle = Plugin::BoxFileMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + FileMode::operator System::IComparable() + { + int32_t handle = Plugin::BoxFileMode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + } +} +const System::IO::FileMode System::IO::FileMode::CreateNew(1); +const System::IO::FileMode System::IO::FileMode::Create(2); +const System::IO::FileMode System::IO::FileMode::Open(3); +const System::IO::FileMode System::IO::FileMode::OpenOrCreate(4); +const System::IO::FileMode System::IO::FileMode::Truncate(5); +const System::IO::FileMode System::IO::FileMode::Append(6); + +namespace System +{ + Object::operator System::IO::FileMode() + { + System::IO::FileMode returnVal(Plugin::UnboxFileMode(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + MarshalByRefObject::MarshalByRefObject(decltype(nullptr)) + { + } + + MarshalByRefObject::MarshalByRefObject(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + MarshalByRefObject::MarshalByRefObject(const MarshalByRefObject& other) + : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) + { + } + + MarshalByRefObject::MarshalByRefObject(MarshalByRefObject&& other) + : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + MarshalByRefObject::~MarshalByRefObject() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + MarshalByRefObject& MarshalByRefObject::operator=(const MarshalByRefObject& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + MarshalByRefObject& MarshalByRefObject::operator=(MarshalByRefObject&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool MarshalByRefObject::operator==(const MarshalByRefObject& other) const + { + return Handle == other.Handle; + } + + bool MarshalByRefObject::operator!=(const MarshalByRefObject& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + namespace IO + { + Stream::Stream(decltype(nullptr)) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + { + } + + Stream::Stream(Plugin::InternalUse, int32_t handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + Stream::Stream(const Stream& other) + : Stream(Plugin::InternalUse::Only, other.Handle) + { + } + + Stream::Stream(Stream&& other) + : Stream(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Stream::~Stream() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Stream& Stream::operator=(const Stream& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Stream& Stream::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Stream& Stream::operator=(Stream&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Stream::operator==(const Stream& other) const + { + return Handle == other.Handle; + } + + bool Stream::operator!=(const Stream& other) const + { + return Handle != other.Handle; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IComparer::IComparer(decltype(nullptr)) + { + } + + IComparer::IComparer(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparer::IComparer(const IComparer& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparer::IComparer(IComparer&& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparer::~IComparer() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparer& IComparer::operator=(const IComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparer& IComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparer& IComparer::operator=(IComparer&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparer::operator==(const IComparer& other) const + { + return Handle == other.Handle; + } + + bool IComparer::operator!=(const IComparer& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IComparer::IComparer(decltype(nullptr)) + { + } + + IComparer::IComparer(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparer::IComparer(const IComparer& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparer::IComparer(IComparer&& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparer::~IComparer() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparer& IComparer::operator=(const IComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparer& IComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparer& IComparer::operator=(IComparer&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparer::operator==(const IComparer& other) const + { + return Handle == other.Handle; + } + + bool IComparer::operator!=(const IComparer& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + BaseIComparer::BaseIComparer() + : System::Collections::Generic::IComparer(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor(cppHandle, &handle->Value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + BaseIComparer::BaseIComparer(decltype(nullptr)) + : System::Collections::Generic::IComparer(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); + } + + BaseIComparer::BaseIComparer(const BaseIComparer& other) + : System::Collections::Generic::IComparer(nullptr) + { + Handle = other.Handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseIComparer::BaseIComparer(BaseIComparer&& other) + : System::Collections::Generic::IComparer(nullptr) + { + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + BaseIComparer::BaseIComparer(Plugin::InternalUse, int32_t handle) + : System::Collections::Generic::IComparer(nullptr) + { + Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseIComparer::~BaseIComparer() + { + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) + { + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool BaseIComparer::operator==(const BaseIComparer& other) const + { + return Handle == other.Handle; + } + + bool BaseIComparer::operator!=(const BaseIComparer& other) const + { + return Handle != other.Handle; + } + + System::Int32 BaseIComparer::Compare(System::Int32 x, System::Int32 y) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) + { + try + { + return Plugin::GetSystemCollectionsGenericBaseIComparerSystemInt32(cppHandle)->Compare(x, y); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + BaseIComparer::BaseIComparer() + : System::Collections::Generic::IComparer(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor(cppHandle, &handle->Value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + BaseIComparer::BaseIComparer(decltype(nullptr)) + : System::Collections::Generic::IComparer(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); + } + + BaseIComparer::BaseIComparer(const BaseIComparer& other) + : System::Collections::Generic::IComparer(nullptr) + { + Handle = other.Handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseIComparer::BaseIComparer(BaseIComparer&& other) + : System::Collections::Generic::IComparer(nullptr) + { + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + BaseIComparer::BaseIComparer(Plugin::InternalUse, int32_t handle) + : System::Collections::Generic::IComparer(nullptr) + { + Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseIComparer::~BaseIComparer() + { + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) + { + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool BaseIComparer::operator==(const BaseIComparer& other) const + { + return Handle == other.Handle; + } + + bool BaseIComparer::operator!=(const BaseIComparer& other) const + { + return Handle != other.Handle; + } + + System::Int32 BaseIComparer::Compare(System::String& x, System::String& y) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemCollectionsGenericBaseIComparerSystemString(cppHandle)->Compare(x, y); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } + } +} + +namespace System +{ + StringComparer::StringComparer(decltype(nullptr)) + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + { + } + + StringComparer::StringComparer(Plugin::InternalUse, int32_t handle) + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + StringComparer::StringComparer(const StringComparer& other) + : StringComparer(Plugin::InternalUse::Only, other.Handle) + { + } + + StringComparer::StringComparer(StringComparer&& other) + : StringComparer(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + StringComparer::~StringComparer() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + StringComparer& StringComparer::operator=(const StringComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + StringComparer& StringComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + StringComparer& StringComparer::operator=(StringComparer&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool StringComparer::operator==(const StringComparer& other) const + { + return Handle == other.Handle; + } + + bool StringComparer::operator!=(const StringComparer& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + BaseStringComparer::BaseStringComparer() + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + , System::StringComparer(nullptr) + { + CppHandle = Plugin::StoreSystemBaseStringComparer(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemBaseStringComparerConstructor(cppHandle, &handle->Value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemBaseStringComparer(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + BaseStringComparer::BaseStringComparer(decltype(nullptr)) + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + , System::StringComparer(nullptr) + { + CppHandle = Plugin::StoreSystemBaseStringComparer(this); + } + + BaseStringComparer::BaseStringComparer(const BaseStringComparer& other) + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + , System::StringComparer(nullptr) + { + Handle = other.Handle; + CppHandle = Plugin::StoreSystemBaseStringComparer(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseStringComparer::BaseStringComparer(BaseStringComparer&& other) + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + , System::StringComparer(nullptr) + { + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + BaseStringComparer::BaseStringComparer(Plugin::InternalUse, int32_t handle) + : System::Collections::IComparer(nullptr) + , System::Collections::Generic::IComparer(nullptr) + , System::Collections::IEqualityComparer(nullptr) + , System::Collections::Generic::IEqualityComparer(nullptr) + , System::StringComparer(nullptr) + { + Handle = handle; + CppHandle = Plugin::StoreSystemBaseStringComparer(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseStringComparer::~BaseStringComparer() + { + Plugin::RemoveSystemBaseStringComparer(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemBaseStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + BaseStringComparer& BaseStringComparer::operator=(const BaseStringComparer& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr)) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemBaseStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + BaseStringComparer& BaseStringComparer::operator=(BaseStringComparer&& other) + { + Plugin::RemoveSystemBaseStringComparer(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemBaseStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool BaseStringComparer::operator==(const BaseStringComparer& other) const + { + return Handle == other.Handle; + } + + bool BaseStringComparer::operator!=(const BaseStringComparer& other) const + { + return Handle != other.Handle; + } + + System::Int32 BaseStringComparer::Compare(System::String& x, System::String& y) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemBaseStringComparer(cppHandle)->Compare(x, y); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::StringComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Boolean BaseStringComparer::Equals(System::String& x, System::String& y) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemBaseStringComparer(cppHandle)->Equals(x, y); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::StringComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Int32 BaseStringComparer::GetHashCode(System::String& obj) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) + { + try + { + auto obj = System::String(Plugin::InternalUse::Only, objHandle); + return Plugin::GetSystemBaseStringComparer(cppHandle)->GetHashCode(obj); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::StringComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } +} + +namespace System +{ + namespace Collections + { + Queue::Queue(decltype(nullptr)) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + { + } + + Queue::Queue(Plugin::InternalUse, int32_t handle) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + Queue::Queue(const Queue& other) + : Queue(Plugin::InternalUse::Only, other.Handle) + { + } + + Queue::Queue(Queue&& other) + : Queue(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Queue::~Queue() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Queue& Queue::operator=(const Queue& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Queue& Queue::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Queue& Queue::operator=(Queue&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Queue::operator==(const Queue& other) const + { + return Handle == other.Handle; + } + + bool Queue::operator!=(const Queue& other) const + { + return Handle != other.Handle; + } + + System::Int32 Queue::GetCount() + { + auto returnValue = Plugin::SystemCollectionsQueuePropertyGetCount(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } + } +} + +namespace System +{ + namespace Collections + { + BaseQueue::BaseQueue() + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsBaseQueueConstructor(cppHandle, &handle->Value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + BaseQueue::BaseQueue(decltype(nullptr)) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); + } + + BaseQueue::BaseQueue(const BaseQueue& other) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) + { + Handle = other.Handle; + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseQueue::BaseQueue(BaseQueue&& other) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) + { + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + BaseQueue::BaseQueue(Plugin::InternalUse, int32_t handle) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) + { + Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseQueue::~BaseQueue() + { + Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsBaseQueue(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + BaseQueue& BaseQueue::operator=(const BaseQueue& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + BaseQueue& BaseQueue::operator=(decltype(nullptr)) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsBaseQueue(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + BaseQueue& BaseQueue::operator=(BaseQueue&& other) + { + Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsBaseQueue(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool BaseQueue::operator==(const BaseQueue& other) const + { + return Handle == other.Handle; + } + + bool BaseQueue::operator!=(const BaseQueue& other) const + { + return Handle != other.Handle; + } + + System::Int32 BaseQueue::GetCount() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsQueueGetCount(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsBaseQueue(cppHandle)->GetCount(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::Queue"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + IComponentChangeService::IComponentChangeService(decltype(nullptr)) + { + } + + IComponentChangeService::IComponentChangeService(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComponentChangeService::IComponentChangeService(const IComponentChangeService& other) + : IComponentChangeService(Plugin::InternalUse::Only, other.Handle) + { + } + + IComponentChangeService::IComponentChangeService(IComponentChangeService&& other) + : IComponentChangeService(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComponentChangeService::~IComponentChangeService() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComponentChangeService& IComponentChangeService::operator=(const IComponentChangeService& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComponentChangeService& IComponentChangeService::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComponentChangeService& IComponentChangeService::operator=(IComponentChangeService&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComponentChangeService::operator==(const IComponentChangeService& other) const + { + return Handle == other.Handle; + } + + bool IComponentChangeService::operator!=(const IComponentChangeService& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + BaseIComponentChangeService::BaseIComponentChangeService() + : System::ComponentModel::Design::IComponentChangeService(nullptr) + { + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemComponentModelDesignBaseIComponentChangeServiceConstructor(cppHandle, &handle->Value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr)) + : System::ComponentModel::Design::IComponentChangeService(nullptr) + { + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); + } + + BaseIComponentChangeService::BaseIComponentChangeService(const BaseIComponentChangeService& other) + : System::ComponentModel::Design::IComponentChangeService(nullptr) + { + Handle = other.Handle; + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseIComponentChangeService::BaseIComponentChangeService(BaseIComponentChangeService&& other) + : System::ComponentModel::Design::IComponentChangeService(nullptr) + { + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + BaseIComponentChangeService::BaseIComponentChangeService(Plugin::InternalUse, int32_t handle) + : System::ComponentModel::Design::IComponentChangeService(nullptr) + { + Handle = handle; + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + BaseIComponentChangeService::~BaseIComponentChangeService() + { + Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + BaseIComponentChangeService& BaseIComponentChangeService::operator=(const BaseIComponentChangeService& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + BaseIComponentChangeService& BaseIComponentChangeService::operator=(decltype(nullptr)) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + BaseIComponentChangeService& BaseIComponentChangeService::operator=(BaseIComponentChangeService&& other) + { + Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool BaseIComponentChangeService::operator==(const BaseIComponentChangeService& other) const + { + return Handle == other.Handle; + } + + bool BaseIComponentChangeService::operator!=(const BaseIComponentChangeService& other) const + { + return Handle != other.Handle; + } + + void BaseIComponentChangeService::OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanged(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle, int32_t oldValueHandle, int32_t newValueHandle) + { + try + { + auto component = System::Object(Plugin::InternalUse::Only, componentHandle); + auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); + auto oldValue = System::Object(Plugin::InternalUse::Only, oldValueHandle); + auto newValue = System::Object(Plugin::InternalUse::Only, newValueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanged(component, member, oldValue, newValue); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanging(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle) + { + try + { + auto component = System::Object(Plugin::InternalUse::Only, componentHandle); + auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanging(component, member); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdded(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdded(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdded(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdding(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdding(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdding(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanged(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanged(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanged(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanging(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanging(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanging(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoved(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoved(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoving(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoving(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRename(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRename(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void BaseIComponentChangeService::RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRename(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + } + } +} + +namespace System +{ + namespace IO { - if (Handle) + FileStream::FileStream(decltype(nullptr)) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - } - - Screen& Screen::operator=(const Screen& other) - { - if (this->Handle) + + FileStream::FileStream(Plugin::InternalUse, int32_t handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) { - Plugin::DereferenceManagedClass(this->Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - this->Handle = other.Handle; - if (this->Handle) + + FileStream::FileStream(const FileStream& other) + : FileStream(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); } - return *this; - } - - Screen& Screen::operator=(decltype(nullptr)) - { - if (Handle) + + FileStream::FileStream(FileStream&& other) + : FileStream(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + other.Handle = 0; } - return *this; - } - - Screen& Screen::operator=(Screen&& other) - { - if (Handle) + + FileStream::~FileStream() { - Plugin::DereferenceManagedClass(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - 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) + + FileStream& FileStream::operator=(const FileStream& other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - return System::Array1(Plugin::InternalUse::Only, returnValue); - } -} - -namespace UnityEngine -{ - Ray::Ray(decltype(nullptr)) - : System::ValueType(nullptr) - { - } - - Ray::Ray(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) - { - Handle = handle; - if (handle) + + FileStream& FileStream::operator=(decltype(nullptr)) { - Plugin::ReferenceManagedUnityEngineRay(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - } - - Ray::Ray(const Ray& other) - : Ray(Plugin::InternalUse::Only, other.Handle) - { - } - - Ray::Ray(Ray&& other) - : Ray(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Ray::~Ray() - { - if (Handle) + + FileStream& FileStream::operator=(FileStream&& other) { - Plugin::DereferenceManagedUnityEngineRay(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - } - - Ray& Ray::operator=(const Ray& other) - { - if (this->Handle) + + bool FileStream::operator==(const FileStream& other) const { - Plugin::DereferenceManagedUnityEngineRay(Handle); + return Handle == other.Handle; } - this->Handle = other.Handle; - if (this->Handle) + + bool FileStream::operator!=(const FileStream& other) const { - Plugin::ReferenceManagedUnityEngineRay(Handle); + return Handle != other.Handle; } - return *this; - } - - Ray& Ray::operator=(decltype(nullptr)) - { - if (Handle) + + FileStream::FileStream(System::String& path, System::IO::FileMode mode) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) { - Plugin::DereferenceManagedUnityEngineRay(Handle); - Handle = 0; + auto returnValue = Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode(path.Handle, mode); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + } } - return *this; - } - - Ray& Ray::operator=(Ray&& other) - { - if (Handle) + + void FileStream::WriteByte(System::Byte value) { - Plugin::DereferenceManagedUnityEngineRay(Handle); + Plugin::SystemIOFileStreamMethodWriteByteSystemByte(Handle, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Ray::operator==(const Ray& other) const - { - return Handle == other.Handle; - } - - bool Ray::operator!=(const Ray& other) const - { - return Handle != other.Handle; } - - Ray::Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction) - : System::ValueType(nullptr) +} + +namespace System +{ + namespace IO { - auto returnValue = Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(origin, direction); - if (Plugin::unhandledCsharpException) + BaseFileStream::BaseFileStream(System::String& path, System::IO::FileMode mode) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) + { + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(cppHandle, &handle->Value, path.Handle, mode); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemIOBaseFileStream(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + BaseFileStream::BaseFileStream(decltype(nullptr)) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); } - Handle = returnValue; - if (returnValue) + + BaseFileStream::BaseFileStream(const BaseFileStream& other) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { - Plugin::ReferenceManagedUnityEngineRay(Handle); + Handle = other.Handle; + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } -} - -namespace System -{ - Object::Object(UnityEngine::Ray& val) - { - int32_t handle = Plugin::BoxRay(val.Handle); - if (Plugin::unhandledCsharpException) + + BaseFileStream::BaseFileStream(BaseFileStream&& other) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; } - if (handle) + + BaseFileStream::BaseFileStream(Plugin::InternalUse, int32_t handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { - Plugin::ReferenceManagedClass(handle); Handle = handle; + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - Object::operator UnityEngine::Ray() - { - UnityEngine::Ray returnVal(Plugin::InternalUse::Only, Plugin::UnboxRay(Handle)); - if (Plugin::unhandledCsharpException) + + BaseFileStream::~BaseFileStream() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::RemoveSystemIOBaseFileStream(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemIOBaseFileStream(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } } - return returnVal; - } -} - -namespace UnityEngine -{ - Physics::Physics(decltype(nullptr)) - { - } - - Physics::Physics(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) + + BaseFileStream& BaseFileStream::operator=(const BaseFileStream& other) { - Plugin::ReferenceManagedClass(handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - } - - 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) + + BaseFileStream& BaseFileStream::operator=(decltype(nullptr)) { - Plugin::DereferenceManagedClass(Handle); + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemIOBaseFileStream(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } Handle = 0; + return *this; } - } - - Physics& Physics::operator=(const Physics& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + + BaseFileStream& BaseFileStream::operator=(BaseFileStream&& other) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::RemoveSystemIOBaseFileStream(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemIOBaseFileStream(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - return *this; - } - - Physics& Physics::operator=(decltype(nullptr)) - { - if (Handle) + + bool BaseFileStream::operator==(const BaseFileStream& other) const { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + return Handle == other.Handle; } - return *this; - } - - Physics& Physics::operator=(Physics&& other) - { - if (Handle) + + bool BaseFileStream::operator!=(const BaseFileStream& other) const { - Plugin::DereferenceManagedClass(Handle); + return Handle != other.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_UnityEngineRaycastHitArray1(ray.Handle, results.Handle); - if (Plugin::unhandledCsharpException) + + void BaseFileStream::WriteByte(System::Byte value) { - 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.Handle); - if (Plugin::unhandledCsharpException) + + DLLEXPORT void SystemIOFileStreamWriteByte(int32_t cppHandle, uint8_t value) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + try + { + Plugin::GetSystemIOBaseFileStream(cppHandle)->WriteByte(value); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::IO::FileStream"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } } - return System::Array1(Plugin::InternalUse::Only, returnValue); } } namespace UnityEngine { - Gradient::Gradient(decltype(nullptr)) - { - } - - Gradient::Gradient(Plugin::InternalUse iu, int32_t handle) + namespace Playables { - Handle = handle; - if (handle) + PlayableHandle::PlayableHandle(decltype(nullptr)) { - 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) + + PlayableHandle::PlayableHandle(Plugin::InternalUse, int32_t handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } } - } - - Gradient& Gradient::operator=(const Gradient& other) - { - if (this->Handle) + + PlayableHandle::PlayableHandle(const PlayableHandle& other) + : PlayableHandle(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + PlayableHandle::PlayableHandle(PlayableHandle&& other) + : PlayableHandle(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); + other.Handle = 0; } - return *this; - } - - Gradient& Gradient::operator=(decltype(nullptr)) - { - if (Handle) + + PlayableHandle::~PlayableHandle() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + Handle = 0; + } } - return *this; - } - - Gradient& Gradient::operator=(Gradient&& other) - { - if (Handle) + + PlayableHandle& PlayableHandle::operator=(const PlayableHandle& other) { - Plugin::DereferenceManagedClass(Handle); + if (this->Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } + return *this; } - 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() - { - auto returnValue = Plugin::UnityEngineGradientConstructor(); - if (Plugin::unhandledCsharpException) + + PlayableHandle& PlayableHandle::operator=(decltype(nullptr)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + Handle = 0; + } + return *this; } - Handle = returnValue; - if (returnValue) + + PlayableHandle& PlayableHandle::operator=(PlayableHandle&& other) { - Plugin::ReferenceManagedClass(returnValue); + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool PlayableHandle::operator==(const PlayableHandle& other) const + { + return Handle == other.Handle; + } + + bool PlayableHandle::operator!=(const PlayableHandle& other) const + { + return Handle != other.Handle; + } + + PlayableHandle::operator System::ValueType() + { + int32_t handle = Plugin::BoxPlayableHandle(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + PlayableHandle::operator System::Object() + { + int32_t handle = Plugin::BoxPlayableHandle(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } } - - System::Array1 Gradient::GetColorKeys() +} + +namespace System +{ + Object::operator UnityEngine::Playables::PlayableHandle() { - auto returnValue = Plugin::UnityEngineGradientPropertyGetColorKeys(Handle); + UnityEngine::Playables::PlayableHandle returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableHandle(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9714,356 +11311,635 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return System::Array1(Plugin::InternalUse::Only, returnValue); + return returnVal; } - - void Gradient::SetColorKeys(System::Array1& value) +} + +namespace UnityEngine +{ + namespace Experimental { - Plugin::UnityEngineGradientPropertySetColorKeys(Handle, value.Handle); - if (Plugin::unhandledCsharpException) + namespace UIElements { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + ITransform::ITransform(decltype(nullptr)) + { + } + + ITransform::ITransform(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + ITransform::ITransform(const ITransform& other) + : ITransform(Plugin::InternalUse::Only, other.Handle) + { + } + + ITransform::ITransform(ITransform&& other) + : ITransform(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ITransform::~ITransform() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + ITransform& ITransform::operator=(const ITransform& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ITransform& ITransform::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ITransform& ITransform::operator=(ITransform&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ITransform::operator==(const ITransform& other) const + { + return Handle == other.Handle; + } + + bool ITransform::operator!=(const ITransform& other) const + { + return Handle != other.Handle; + } } } } -namespace System +namespace UnityEngine { - AppDomainSetup::AppDomainSetup(decltype(nullptr)) - : System::IAppDomainSetup(nullptr) - { - } - - AppDomainSetup::AppDomainSetup(Plugin::InternalUse iu, int32_t handle) - : System::IAppDomainSetup(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr)) + namespace Experimental { - if (Handle) + namespace UIElements { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + IUIElementDataWatch::IUIElementDataWatch(decltype(nullptr)) + { + } + + IUIElementDataWatch::IUIElementDataWatch(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IUIElementDataWatch::IUIElementDataWatch(const IUIElementDataWatch& other) + : IUIElementDataWatch(Plugin::InternalUse::Only, other.Handle) + { + } + + IUIElementDataWatch::IUIElementDataWatch(IUIElementDataWatch&& other) + : IUIElementDataWatch(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IUIElementDataWatch::~IUIElementDataWatch() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IUIElementDataWatch& IUIElementDataWatch::operator=(const IUIElementDataWatch& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IUIElementDataWatch& IUIElementDataWatch::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IUIElementDataWatch& IUIElementDataWatch::operator=(IUIElementDataWatch&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IUIElementDataWatch::operator==(const IUIElementDataWatch& other) const + { + return Handle == other.Handle; + } + + bool IUIElementDataWatch::operator!=(const IUIElementDataWatch& other) const + { + return Handle != other.Handle; + } } - return *this; } - - AppDomainSetup& AppDomainSetup::operator=(AppDomainSetup&& other) +} + +namespace UnityEngine +{ + namespace Experimental { - if (Handle) + namespace UIElements { - Plugin::DereferenceManagedClass(Handle); + IVisualElementScheduler::IVisualElementScheduler(decltype(nullptr)) + { + } + + IVisualElementScheduler::IVisualElementScheduler(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IVisualElementScheduler::IVisualElementScheduler(const IVisualElementScheduler& other) + : IVisualElementScheduler(Plugin::InternalUse::Only, other.Handle) + { + } + + IVisualElementScheduler::IVisualElementScheduler(IVisualElementScheduler&& other) + : IVisualElementScheduler(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IVisualElementScheduler::~IVisualElementScheduler() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IVisualElementScheduler& IVisualElementScheduler::operator=(const IVisualElementScheduler& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IVisualElementScheduler& IVisualElementScheduler::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IVisualElementScheduler& IVisualElementScheduler::operator=(IVisualElementScheduler&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IVisualElementScheduler::operator==(const IVisualElementScheduler& other) const + { + return Handle == other.Handle; + } + + bool IVisualElementScheduler::operator!=(const IVisualElementScheduler& other) const + { + return Handle != other.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::IAppDomainSetup(nullptr) +} + +namespace System +{ + namespace Collections { - auto returnValue = Plugin::SystemAppDomainSetupConstructor(); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) + namespace Generic { - Plugin::ReferenceManagedClass(returnValue); + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) + { + } + + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerator::~IEnumerator() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerator& IEnumerator::operator=(const IEnumerator& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerator& IEnumerator::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerator& IEnumerator::operator=(IEnumerator&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerator::operator==(const IEnumerator& other) const + { + return Handle == other.Handle; + } + + bool IEnumerator::operator!=(const IEnumerator& other) const + { + return Handle != other.Handle; + } + + UnityEngine::Experimental::UIElements::VisualElement IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); + } } } - - System::AppDomainInitializer AppDomainSetup::GetAppDomainInitializer() +} + +namespace System +{ + namespace Collections { - auto returnValue = Plugin::SystemAppDomainSetupPropertyGetAppDomainInitializer(Handle); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + { + } + + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerable::~IEnumerable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerable& IEnumerable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerable::operator==(const IEnumerable& other) const + { + return Handle == other.Handle; + } + + bool IEnumerable::operator!=(const IEnumerable& other) const + { + return Handle != other.Handle; + } + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); + } } - return System::AppDomainInitializer(Plugin::InternalUse::Only, returnValue); } - - void AppDomainSetup::SetAppDomainInitializer(System::AppDomainInitializer& value) +} + +namespace UnityEngine +{ + namespace Experimental { - Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer(Handle, value.Handle); - if (Plugin::unhandledCsharpException) + namespace UIElements { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + VisualElement::VisualElement(decltype(nullptr)) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::Focusable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , UnityEngine::Experimental::UIElements::IStyle(nullptr) + , UnityEngine::Experimental::UIElements::ITransform(nullptr) + , UnityEngine::Experimental::UIElements::IUIElementDataWatch(nullptr) + , UnityEngine::Experimental::UIElements::IVisualElementScheduler(nullptr) + { + } + + VisualElement::VisualElement(Plugin::InternalUse, int32_t handle) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::Focusable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , UnityEngine::Experimental::UIElements::IStyle(nullptr) + , UnityEngine::Experimental::UIElements::ITransform(nullptr) + , UnityEngine::Experimental::UIElements::IUIElementDataWatch(nullptr) + , UnityEngine::Experimental::UIElements::IVisualElementScheduler(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + VisualElement::VisualElement(const VisualElement& other) + : VisualElement(Plugin::InternalUse::Only, other.Handle) + { + } + + VisualElement::VisualElement(VisualElement&& other) + : VisualElement(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + VisualElement::~VisualElement() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + VisualElement& VisualElement::operator=(const VisualElement& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + VisualElement& VisualElement::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + VisualElement& VisualElement::operator=(VisualElement&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool VisualElement::operator==(const VisualElement& other) const + { + return Handle == other.Handle; + } + + bool VisualElement::operator!=(const VisualElement& other) const + { + return Handle != other.Handle; + } } } } -namespace UnityEngine +namespace Plugin { - Application::Application(decltype(nullptr)) - { - } - - Application::Application(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Application::Application(const Application& other) - : Application(Plugin::InternalUse::Only, other.Handle) - { - } - - Application::Application(Application&& other) - : Application(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Application::~Application() + UnityEngineExperimentalUIElementsVisualElementIterator::UnityEngineExperimentalUIElementsVisualElementIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } } - Application& Application::operator=(const Application& other) + UnityEngineExperimentalUIElementsVisualElementIterator::UnityEngineExperimentalUIElementsVisualElementIterator(UnityEngine::Experimental::UIElements::VisualElement& enumerable) + : enumerator(enumerable.GetEnumerator()) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + hasMore = enumerator.MoveNext(); } - Application& Application::operator=(decltype(nullptr)) + UnityEngineExperimentalUIElementsVisualElementIterator::~UnityEngineExperimentalUIElementsVisualElementIterator() { - if (Handle) + if (enumerator != nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + enumerator.Dispose(); } - return *this; } - Application& Application::operator=(Application&& other) + UnityEngineExperimentalUIElementsVisualElementIterator& UnityEngineExperimentalUIElementsVisualElementIterator::operator++() { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; + hasMore = enumerator.MoveNext(); return *this; } - bool Application::operator==(const Application& other) const - { - return Handle == other.Handle; - } - - bool Application::operator!=(const Application& other) const - { - return Handle != other.Handle; - } - - void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction& del) + bool UnityEngineExperimentalUIElementsVisualElementIterator::operator!=(const UnityEngineExperimentalUIElementsVisualElementIterator& other) { - Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return hasMore; } - void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del) + UnityEngine::Experimental::UIElements::VisualElement UnityEngineExperimentalUIElementsVisualElementIterator::operator*() { - Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return enumerator.GetCurrent(); } } namespace UnityEngine { - namespace SceneManagement + namespace Experimental { - SceneManager::SceneManager(decltype(nullptr)) - { - } - - SceneManager::SceneManager(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - SceneManager::SceneManager(const SceneManager& other) - : SceneManager(Plugin::InternalUse::Only, other.Handle) - { - } - - SceneManager::SceneManager(SceneManager&& other) - : SceneManager(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - SceneManager::~SceneManager() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - SceneManager& SceneManager::operator=(const SceneManager& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - SceneManager& SceneManager::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - SceneManager& SceneManager::operator=(SceneManager&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool SceneManager::operator==(const SceneManager& other) const - { - return Handle == other.Handle; - } - - bool SceneManager::operator!=(const SceneManager& other) const - { - return Handle != other.Handle; - } - - void SceneManager::AddSceneLoaded(UnityEngine::Events::UnityAction2& del) + namespace UIElements { - Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(del.Handle); - if (Plugin::unhandledCsharpException) + Plugin::UnityEngineExperimentalUIElementsVisualElementIterator begin(UnityEngine::Experimental::UIElements::VisualElement& enumerable) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Plugin::UnityEngineExperimentalUIElementsVisualElementIterator(enumerable); } - } - - void SceneManager::RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del) - { - Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(del.Handle); - if (Plugin::unhandledCsharpException) + + Plugin::UnityEngineExperimentalUIElementsVisualElementIterator end(UnityEngine::Experimental::UIElements::VisualElement& enumerable) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Plugin::UnityEngineExperimentalUIElementsVisualElementIterator(nullptr); } } } @@ -10071,112 +11947,188 @@ namespace UnityEngine namespace UnityEngine { - namespace SceneManagement + namespace Experimental { - Scene::Scene(decltype(nullptr)) - : System::ValueType(nullptr) - { - } - - Scene::Scene(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); - } - } - - Scene::Scene(const Scene& other) - : Scene(Plugin::InternalUse::Only, other.Handle) - { - } - - Scene::Scene(Scene&& other) - : Scene(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Scene::~Scene() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - Handle = 0; - } - } - - Scene& Scene::operator=(const Scene& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); - } - return *this; - } - - Scene& Scene::operator=(decltype(nullptr)) + namespace UIElements { - if (Handle) + UnityEngine::Experimental::UIElements::VisualElement UQueryExtensions::Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::Array1& classes) { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - Handle = 0; - } - return *this; - } - - Scene& Scene::operator=(Scene&& other) - { - if (Handle) + auto returnValue = Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(e.Handle, name.Handle, classes.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); + } + + UnityEngine::Experimental::UIElements::VisualElement UQueryExtensions::Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::String& className) { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); + auto returnValue = Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString(e.Handle, name.Handle, className.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Scene::operator==(const Scene& other) const - { - return Handle == other.Handle; - } - - bool Scene::operator!=(const Scene& other) const - { - return Handle != other.Handle; } } } -namespace System +namespace UnityEngine { - Object::Object(UnityEngine::SceneManagement::Scene& val) + namespace XR { - int32_t handle = Plugin::BoxScene(val.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + namespace WSA { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + namespace Input + { + InteractionSourcePositionAccuracy::InteractionSourcePositionAccuracy(int32_t value) + : Value(value) + { + } + + UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::operator int32_t() const + { + return Value; + } + + bool UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::operator==(InteractionSourcePositionAccuracy other) + { + return Value == other.Value; + } + + bool UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::operator!=(InteractionSourcePositionAccuracy other) + { + return Value != other.Value; + } + + InteractionSourcePositionAccuracy::operator System::Enum() + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Enum(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourcePositionAccuracy::operator System::ValueType() + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourcePositionAccuracy::operator System::Object() + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourcePositionAccuracy::operator System::IFormattable() + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourcePositionAccuracy::operator System::IConvertible() + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourcePositionAccuracy::operator System::IComparable() + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + } } } - - Object::operator UnityEngine::SceneManagement::Scene() +} +const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::None(0); +const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::Approximate(1); +const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::High(2); + +namespace System +{ + Object::operator UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy() { - UnityEngine::SceneManagement::Scene returnVal(Plugin::InternalUse::Only, Plugin::UnboxScene(Handle)); + UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy returnVal(Plugin::UnboxInteractionSourcePositionAccuracy(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -10188,28 +12140,154 @@ namespace System } } -namespace System +namespace UnityEngine { - Object::Object(UnityEngine::SceneManagement::LoadSceneMode val) + namespace XR { - int32_t handle = Plugin::BoxLoadSceneMode(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + namespace WSA { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + namespace Input + { + InteractionSourceNode::InteractionSourceNode(int32_t value) + : Value(value) + { + } + + UnityEngine::XR::WSA::Input::InteractionSourceNode::operator int32_t() const + { + return Value; + } + + bool UnityEngine::XR::WSA::Input::InteractionSourceNode::operator==(InteractionSourceNode other) + { + return Value == other.Value; + } + + bool UnityEngine::XR::WSA::Input::InteractionSourceNode::operator!=(InteractionSourceNode other) + { + return Value != other.Value; + } + + InteractionSourceNode::operator System::Enum() + { + int32_t handle = Plugin::BoxInteractionSourceNode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Enum(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourceNode::operator System::ValueType() + { + int32_t handle = Plugin::BoxInteractionSourceNode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourceNode::operator System::Object() + { + int32_t handle = Plugin::BoxInteractionSourceNode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourceNode::operator System::IFormattable() + { + int32_t handle = Plugin::BoxInteractionSourceNode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourceNode::operator System::IConvertible() + { + int32_t handle = Plugin::BoxInteractionSourceNode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourceNode::operator System::IComparable() + { + int32_t handle = Plugin::BoxInteractionSourceNode(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + } } } - - Object::operator UnityEngine::SceneManagement::LoadSceneMode() +} +const UnityEngine::XR::WSA::Input::InteractionSourceNode UnityEngine::XR::WSA::Input::InteractionSourceNode::Grip(0); +const UnityEngine::XR::WSA::Input::InteractionSourceNode UnityEngine::XR::WSA::Input::InteractionSourceNode::Pointer(1); + +namespace System +{ + Object::operator UnityEngine::XR::WSA::Input::InteractionSourceNode() { - UnityEngine::SceneManagement::LoadSceneMode returnVal(Plugin::UnboxLoadSceneMode(Handle)); + UnityEngine::XR::WSA::Input::InteractionSourceNode returnVal(Plugin::UnboxInteractionSourceNode(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -10221,100 +12299,384 @@ namespace System } } -namespace System +namespace UnityEngine { - EventArgs::EventArgs(decltype(nullptr)) - { - } - - EventArgs::EventArgs(Plugin::InternalUse iu, int32_t handle) + namespace XR { - Handle = handle; - if (handle) + namespace WSA { - Plugin::ReferenceManagedClass(handle); - } - } - - EventArgs::EventArgs(const EventArgs& other) - : EventArgs(Plugin::InternalUse::Only, other.Handle) - { - } - - EventArgs::EventArgs(EventArgs&& other) - : EventArgs(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } + namespace Input + { + InteractionSourcePose::InteractionSourcePose(decltype(nullptr)) + { + } + + InteractionSourcePose::InteractionSourcePose(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); + } + } + + InteractionSourcePose::InteractionSourcePose(const InteractionSourcePose& other) + : InteractionSourcePose(Plugin::InternalUse::Only, other.Handle) + { + } + + InteractionSourcePose::InteractionSourcePose(InteractionSourcePose&& other) + : InteractionSourcePose(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + InteractionSourcePose::~InteractionSourcePose() + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); + Handle = 0; + } + } + + InteractionSourcePose& InteractionSourcePose::operator=(const InteractionSourcePose& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); + } + return *this; + } + + InteractionSourcePose& InteractionSourcePose::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); + Handle = 0; + } + return *this; + } + + InteractionSourcePose& InteractionSourcePose::operator=(InteractionSourcePose&& other) + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool InteractionSourcePose::operator==(const InteractionSourcePose& other) const + { + return Handle == other.Handle; + } + + bool InteractionSourcePose::operator!=(const InteractionSourcePose& other) const + { + return Handle != other.Handle; + } + + System::Boolean InteractionSourcePose::TryGetRotation(UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node) + { + auto returnValue = Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode(Handle, rotation, node); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } - EventArgs::~EventArgs() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + InteractionSourcePose::operator System::ValueType() + { + int32_t handle = Plugin::BoxInteractionSourcePose(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + InteractionSourcePose::operator System::Object() + { + int32_t handle = Plugin::BoxInteractionSourcePose(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + } } } - - EventArgs& EventArgs::operator=(const EventArgs& other) +} + +namespace System +{ + Object::operator UnityEngine::XR::WSA::Input::InteractionSourcePose() { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + UnityEngine::XR::WSA::Input::InteractionSourcePose returnVal(Plugin::InternalUse::Only, Plugin::UnboxInteractionSourcePose(Handle)); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; + return returnVal; } - - EventArgs& EventArgs::operator=(decltype(nullptr)) +} + +namespace System +{ + namespace Collections { - if (Handle) + namespace Generic { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) + { + } + + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerator::~IEnumerator() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerator& IEnumerator::operator=(const IEnumerator& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerator& IEnumerator::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerator& IEnumerator::operator=(IEnumerator&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerator::operator==(const IEnumerator& other) const + { + return Handle == other.Handle; + } + + bool IEnumerator::operator!=(const IEnumerator& other) const + { + return Handle != other.Handle; + } + + System::String IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::String(Plugin::InternalUse::Only, returnValue); + } } - return *this; } - - EventArgs& EventArgs::operator=(EventArgs&& other) +} + +namespace System +{ + namespace Collections { - if (Handle) + namespace Generic { - Plugin::DereferenceManagedClass(Handle); + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) + { + } + + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerator::~IEnumerator() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerator& IEnumerator::operator=(const IEnumerator& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerator& IEnumerator::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerator& IEnumerator::operator=(IEnumerator&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerator::operator==(const IEnumerator& other) const + { + return Handle == other.Handle; + } + + bool IEnumerator::operator!=(const IEnumerator& other) const + { + return Handle != other.Handle; + } + + System::Int32 IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool EventArgs::operator==(const EventArgs& other) const - { - return Handle == other.Handle; - } - - bool EventArgs::operator!=(const EventArgs& other) const - { - return Handle != other.Handle; } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - ComponentEventArgs::ComponentEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - ComponentEventArgs::ComponentEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -10323,18 +12685,18 @@ namespace System } } - ComponentEventArgs::ComponentEventArgs(const ComponentEventArgs& other) - : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - ComponentEventArgs::ComponentEventArgs(ComponentEventArgs&& other) - : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ComponentEventArgs::~ComponentEventArgs() + IEnumerator::~IEnumerator() { if (Handle) { @@ -10343,7 +12705,7 @@ namespace System } } - ComponentEventArgs& ComponentEventArgs::operator=(const ComponentEventArgs& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -10357,7 +12719,7 @@ namespace System return *this; } - ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr)) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -10367,7 +12729,7 @@ namespace System return *this; } - ComponentEventArgs& ComponentEventArgs::operator=(ComponentEventArgs&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -10378,32 +12740,47 @@ namespace System return *this; } - bool ComponentEventArgs::operator==(const ComponentEventArgs& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool ComponentEventArgs::operator!=(const ComponentEventArgs& other) const + bool IEnumerator::operator!=(const IEnumerator& other) const { return Handle != other.Handle; } + + System::Single IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - ComponentChangingEventArgs::ComponentChangingEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -10412,18 +12789,18 @@ namespace System } } - ComponentChangingEventArgs::ComponentChangingEventArgs(const ComponentChangingEventArgs& other) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - ComponentChangingEventArgs::ComponentChangingEventArgs(ComponentChangingEventArgs&& other) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ComponentChangingEventArgs::~ComponentChangingEventArgs() + IEnumerator::~IEnumerator() { if (Handle) { @@ -10432,7 +12809,7 @@ namespace System } } - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(const ComponentChangingEventArgs& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -10446,7 +12823,7 @@ namespace System return *this; } - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr)) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -10456,7 +12833,7 @@ namespace System return *this; } - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(ComponentChangingEventArgs&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -10467,32 +12844,47 @@ namespace System return *this; } - bool ComponentChangingEventArgs::operator==(const ComponentChangingEventArgs& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool ComponentChangingEventArgs::operator!=(const ComponentChangingEventArgs& other) const + bool IEnumerator::operator!=(const IEnumerator& other) const { return Handle != other.Handle; } + + UnityEngine::RaycastHit IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); + } } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - ComponentChangedEventArgs::ComponentChangedEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -10501,18 +12893,18 @@ namespace System } } - ComponentChangedEventArgs::ComponentChangedEventArgs(const ComponentChangedEventArgs& other) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - ComponentChangedEventArgs::ComponentChangedEventArgs(ComponentChangedEventArgs&& other) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ComponentChangedEventArgs::~ComponentChangedEventArgs() + IEnumerator::~IEnumerator() { if (Handle) { @@ -10521,7 +12913,7 @@ namespace System } } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(const ComponentChangedEventArgs& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -10535,7 +12927,7 @@ namespace System return *this; } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr)) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -10545,7 +12937,7 @@ namespace System return *this; } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(ComponentChangedEventArgs&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -10556,32 +12948,47 @@ namespace System return *this; } - bool ComponentChangedEventArgs::operator==(const ComponentChangedEventArgs& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool ComponentChangedEventArgs::operator!=(const ComponentChangedEventArgs& other) const + bool IEnumerator::operator!=(const IEnumerator& other) const { return Handle != other.Handle; } + + UnityEngine::GradientColorKey IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - ComponentRenameEventArgs::ComponentRenameEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -10590,18 +12997,18 @@ namespace System } } - ComponentRenameEventArgs::ComponentRenameEventArgs(const ComponentRenameEventArgs& other) - : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - ComponentRenameEventArgs::ComponentRenameEventArgs(ComponentRenameEventArgs&& other) - : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ComponentRenameEventArgs::~ComponentRenameEventArgs() + IEnumerator::~IEnumerator() { if (Handle) { @@ -10610,7 +13017,7 @@ namespace System } } - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(const ComponentRenameEventArgs& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -10624,7 +13031,7 @@ namespace System return *this; } - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr)) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -10634,7 +13041,7 @@ namespace System return *this; } - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(ComponentRenameEventArgs&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -10645,428 +13052,538 @@ namespace System return *this; } - bool ComponentRenameEventArgs::operator==(const ComponentRenameEventArgs& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool ComponentRenameEventArgs::operator!=(const ComponentRenameEventArgs& other) const + bool IEnumerator::operator!=(const IEnumerator& other) const { return Handle != other.Handle; } + + UnityEngine::Resolution IEnumerator::GetCurrent() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::Resolution(Plugin::InternalUse::Only, returnValue); + } } } } namespace System { - namespace ComponentModel + namespace Collections { - MemberDescriptor::MemberDescriptor(decltype(nullptr)) - { - } - - MemberDescriptor::MemberDescriptor(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - MemberDescriptor::MemberDescriptor(const MemberDescriptor& other) - : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) - { - } - - MemberDescriptor::MemberDescriptor(MemberDescriptor&& other) - : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - MemberDescriptor::~MemberDescriptor() + namespace Generic { - if (Handle) + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - } - - MemberDescriptor& MemberDescriptor::operator=(const MemberDescriptor& other) - { - if (this->Handle) + + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) { - Plugin::DereferenceManagedClass(this->Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - this->Handle = other.Handle; - if (this->Handle) + + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); } - return *this; - } - - MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr)) - { - if (Handle) + + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + other.Handle = 0; } - return *this; - } - - MemberDescriptor& MemberDescriptor::operator=(MemberDescriptor&& other) - { - if (Handle) + + IEnumerable::~IEnumerable() { - Plugin::DereferenceManagedClass(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerable& IEnumerable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerable::operator==(const IEnumerable& other) const + { + return Handle == other.Handle; + } + + bool IEnumerable::operator!=(const IEnumerable& other) const + { + return Handle != other.Handle; + } + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool MemberDescriptor::operator==(const MemberDescriptor& other) const - { - return Handle == other.Handle; - } - - bool MemberDescriptor::operator!=(const MemberDescriptor& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System -{ - Object::Object(UnityEngine::PrimitiveType val) - { - int32_t handle = Plugin::BoxPrimitiveType(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator UnityEngine::PrimitiveType() - { - UnityEngine::PrimitiveType returnVal(Plugin::UnboxPrimitiveType(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - Time::Time(decltype(nullptr)) - { - } - - Time::Time(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Time::Time(const Time& other) - : Time(Plugin::InternalUse::Only, other.Handle) - { - } - - Time::Time(Time&& other) - : Time(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Time::~Time() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Time& Time::operator=(const Time& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Time& Time::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Time& Time::operator=(Time&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Time::operator==(const Time& other) const - { - return Handle == other.Handle; - } - - bool Time::operator!=(const Time& other) const - { - return Handle != other.Handle; - } - - float Time::GetDeltaTime() - { - auto returnValue = Plugin::UnityEngineTimePropertyGetDeltaTime(); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - return returnValue; } } namespace System { - Object::Object(System::IO::FileMode val) - { - int32_t handle = Plugin::BoxFileMode(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator System::IO::FileMode() + namespace Collections { - System::IO::FileMode returnVal(Plugin::UnboxFileMode(Handle)); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + { + } + + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerable::~IEnumerable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerable& IEnumerable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerable::operator==(const IEnumerable& other) const + { + return Handle == other.Handle; + } + + bool IEnumerable::operator!=(const IEnumerable& other) const + { + return Handle != other.Handle; + } + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); + } } - return returnVal; } } namespace System { - MarshalByRefObject::MarshalByRefObject(decltype(nullptr)) - { - } - - MarshalByRefObject::MarshalByRefObject(Plugin::InternalUse iu, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - MarshalByRefObject::MarshalByRefObject(const MarshalByRefObject& other) - : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) - { - } - - MarshalByRefObject::MarshalByRefObject(MarshalByRefObject&& other) - : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - MarshalByRefObject::~MarshalByRefObject() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - MarshalByRefObject& MarshalByRefObject::operator=(const MarshalByRefObject& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr)) + namespace Collections { - if (Handle) + namespace Generic { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + { + } + + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerable::~IEnumerable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerable& IEnumerable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerable::operator==(const IEnumerable& other) const + { + return Handle == other.Handle; + } + + bool IEnumerable::operator!=(const IEnumerable& other) const + { + return Handle != other.Handle; + } + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); + } } - return *this; } - - MarshalByRefObject& MarshalByRefObject::operator=(MarshalByRefObject&& other) +} + +namespace System +{ + namespace Collections { - if (Handle) + namespace Generic { - Plugin::DereferenceManagedClass(Handle); + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + { + } + + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + } + + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerable::~IEnumerable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerable& IEnumerable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerable::operator==(const IEnumerable& other) const + { + return Handle == other.Handle; + } + + bool IEnumerable::operator!=(const IEnumerable& other) const + { + return Handle != other.Handle; + } + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); + } } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool MarshalByRefObject::operator==(const MarshalByRefObject& other) const - { - return Handle == other.Handle; - } - - bool MarshalByRefObject::operator!=(const MarshalByRefObject& other) const - { - return Handle != other.Handle; } } namespace System { - namespace IO + namespace Collections { - Stream::Stream(decltype(nullptr)) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - { - } - - Stream::Stream(Plugin::InternalUse iu, int32_t handle) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) + namespace Generic { - Handle = handle; - if (handle) + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) { - Plugin::ReferenceManagedClass(handle); } - } - - Stream::Stream(const Stream& other) - : Stream(Plugin::InternalUse::Only, other.Handle) - { - } - - Stream::Stream(Stream&& other) - : Stream(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Stream::~Stream() - { - if (Handle) + + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - } - - Stream& Stream::operator=(const Stream& other) - { - if (this->Handle) + + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEnumerable::~IEnumerable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEnumerable& IEnumerable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEnumerable::operator==(const IEnumerable& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle == other.Handle; } - return *this; - } - - Stream& Stream::operator=(decltype(nullptr)) - { - if (Handle) + + bool IEnumerable::operator!=(const IEnumerable& other) const { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + return Handle != other.Handle; } - return *this; - } - - Stream& Stream::operator=(Stream&& other) - { - if (Handle) + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() { - Plugin::DereferenceManagedClass(Handle); + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Stream::operator==(const Stream& other) const - { - return Handle == other.Handle; - } - - bool Stream::operator!=(const Stream& other) const - { - return Handle != other.Handle; } } } @@ -11077,11 +13594,13 @@ namespace System { namespace Generic { - IComparer::IComparer(decltype(nullptr)) + IEnumerable::IEnumerable(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) { } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -11090,18 +13609,18 @@ namespace System } } - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IComparer::~IComparer() + IEnumerable::~IEnumerable() { if (Handle) { @@ -11110,7 +13629,7 @@ namespace System } } - IComparer& IComparer::operator=(const IComparer& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -11124,7 +13643,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr)) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -11134,7 +13653,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(IComparer&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -11145,15 +13664,28 @@ namespace System return *this; } - bool IComparer::operator==(const IComparer& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool IEnumerable::operator!=(const IEnumerable& other) const { return Handle != other.Handle; } + + System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() + { + auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); + } } } } @@ -11164,11 +13696,15 @@ namespace System { namespace Generic { - IComparer::IComparer(decltype(nullptr)) + ICollection::ICollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + ICollection::ICollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -11177,18 +13713,18 @@ namespace System } } - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { } - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IComparer::~IComparer() + ICollection::~ICollection() { if (Handle) { @@ -11197,7 +13733,7 @@ namespace System } } - IComparer& IComparer::operator=(const IComparer& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -11211,7 +13747,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr)) + ICollection& ICollection::operator=(decltype(nullptr)) { if (Handle) { @@ -11221,7 +13757,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(IComparer&& other) + ICollection& ICollection::operator=(ICollection&& other) { if (Handle) { @@ -11232,12 +13768,12 @@ namespace System return *this; } - bool IComparer::operator==(const IComparer& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } @@ -11245,104 +13781,108 @@ namespace System } } +namespace Plugin +{ + SystemCollectionsGenericICollectionSystemStringIterator::SystemCollectionsGenericICollectionSystemStringIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericICollectionSystemStringIterator::SystemCollectionsGenericICollectionSystemStringIterator(System::Collections::Generic::ICollection& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericICollectionSystemStringIterator::~SystemCollectionsGenericICollectionSystemStringIterator() + { + if (enumerator != nullptr) + { + enumerator.Dispose(); + } + } + + SystemCollectionsGenericICollectionSystemStringIterator& SystemCollectionsGenericICollectionSystemStringIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericICollectionSystemStringIterator::operator!=(const SystemCollectionsGenericICollectionSystemStringIterator& other) + { + return hasMore; + } + + System::String SystemCollectionsGenericICollectionSystemStringIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + namespace System { namespace Collections { namespace Generic { - BaseIComparer::BaseIComparer() - : System::Collections::Generic::IComparer(nullptr) + Plugin::SystemCollectionsGenericICollectionSystemStringIterator begin(System::Collections::Generic::ICollection& enumerable) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Plugin::SystemCollectionsGenericICollectionSystemStringIterator(enumerable); } - BaseIComparer::BaseIComparer(decltype(nullptr)) - : System::Collections::Generic::IComparer(nullptr) + Plugin::SystemCollectionsGenericICollectionSystemStringIterator end(System::Collections::Generic::ICollection& enumerable) + { + return Plugin::SystemCollectionsGenericICollectionSystemStringIterator(nullptr); + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + ICollection::ICollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); } - BaseIComparer::BaseIComparer(const BaseIComparer& other) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - if (Handle) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - BaseIComparer::BaseIComparer(BaseIComparer&& other) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Handle = handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - BaseIComparer::~BaseIComparer() + ICollection::~ICollection() { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } } - BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -11356,86 +13896,93 @@ namespace System return *this; } - BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) + ICollection& ICollection::operator=(decltype(nullptr)) { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ICollection& ICollection::operator=(ICollection&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool BaseIComparer::operator==(const BaseIComparer& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool BaseIComparer::operator!=(const BaseIComparer& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } - - int32_t BaseIComparer::Compare(int32_t x, int32_t y) + } + } +} + +namespace Plugin +{ + SystemCollectionsGenericICollectionSystemInt32Iterator::SystemCollectionsGenericICollectionSystemInt32Iterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericICollectionSystemInt32Iterator::SystemCollectionsGenericICollectionSystemInt32Iterator(System::Collections::Generic::ICollection& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericICollectionSystemInt32Iterator::~SystemCollectionsGenericICollectionSystemInt32Iterator() + { + if (enumerator != nullptr) + { + enumerator.Dispose(); + } + } + + SystemCollectionsGenericICollectionSystemInt32Iterator& SystemCollectionsGenericICollectionSystemInt32Iterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericICollectionSystemInt32Iterator::operator!=(const SystemCollectionsGenericICollectionSystemInt32Iterator& other) + { + return hasMore; + } + + System::Int32 SystemCollectionsGenericICollectionSystemInt32Iterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable) { - return {}; + return Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator(enumerable); } - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) + Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable) { - try - { - return Plugin::GetSystemCollectionsGenericBaseIComparerSystemInt32(cppHandle)->Compare(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + return Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator(nullptr); } } } @@ -11447,98 +13994,44 @@ namespace System { namespace Generic { - BaseIComparer::BaseIComparer() - : System::Collections::Generic::IComparer(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseIComparer::BaseIComparer(decltype(nullptr)) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); } - BaseIComparer::BaseIComparer(const BaseIComparer& other) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - if (Handle) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - BaseIComparer::BaseIComparer(BaseIComparer&& other) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) - : System::Collections::Generic::IComparer(nullptr) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Handle = handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - BaseIComparer::~BaseIComparer() + ICollection::~ICollection() { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } } - BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -11552,443 +14045,243 @@ namespace System return *this; } - BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) + ICollection& ICollection::operator=(decltype(nullptr)) { if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } - Handle = 0; return *this; } - BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) + ICollection& ICollection::operator=(ICollection&& other) { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - - bool BaseIComparer::operator==(const BaseIComparer& other) const - { - return Handle == other.Handle; - } - - bool BaseIComparer::operator!=(const BaseIComparer& other) const - { - return Handle != other.Handle; - } - - int32_t BaseIComparer::Compare(System::String& x, System::String& y) - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) - { - try - { - auto x = System::String(Plugin::InternalUse::Only, xHandle); - auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemCollectionsGenericBaseIComparerSystemString(cppHandle)->Compare(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - } - } -} - -namespace System -{ - StringComparer::StringComparer(decltype(nullptr)) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - { - } - - StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - StringComparer::StringComparer(const StringComparer& other) - : StringComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - StringComparer::StringComparer(StringComparer&& other) - : StringComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; + + bool ICollection::operator==(const ICollection& other) const + { + return Handle == other.Handle; + } + + bool ICollection::operator!=(const ICollection& other) const + { + return Handle != other.Handle; + } + } } - - StringComparer::~StringComparer() +} + +namespace Plugin +{ + SystemCollectionsGenericICollectionSystemSingleIterator::SystemCollectionsGenericICollectionSystemSingleIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } } - StringComparer& StringComparer::operator=(const StringComparer& other) + SystemCollectionsGenericICollectionSystemSingleIterator::SystemCollectionsGenericICollectionSystemSingleIterator(System::Collections::Generic::ICollection& enumerable) + : enumerator(enumerable.GetEnumerator()) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + hasMore = enumerator.MoveNext(); } - StringComparer& StringComparer::operator=(decltype(nullptr)) + SystemCollectionsGenericICollectionSystemSingleIterator::~SystemCollectionsGenericICollectionSystemSingleIterator() { - if (Handle) + if (enumerator != nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + enumerator.Dispose(); } - return *this; } - StringComparer& StringComparer::operator=(StringComparer&& other) + SystemCollectionsGenericICollectionSystemSingleIterator& SystemCollectionsGenericICollectionSystemSingleIterator::operator++() { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; + hasMore = enumerator.MoveNext(); return *this; } - bool StringComparer::operator==(const StringComparer& other) const + bool SystemCollectionsGenericICollectionSystemSingleIterator::operator!=(const SystemCollectionsGenericICollectionSystemSingleIterator& other) { - return Handle == other.Handle; + return hasMore; } - bool StringComparer::operator!=(const StringComparer& other) const + System::Single SystemCollectionsGenericICollectionSystemSingleIterator::operator*() { - return Handle != other.Handle; + return enumerator.GetCurrent(); } } namespace System { - BaseStringComparer::BaseStringComparer() - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemBaseStringComparerConstructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseStringComparer::BaseStringComparer(decltype(nullptr)) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - } - - BaseStringComparer::BaseStringComparer(const BaseStringComparer& other) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseStringComparer::BaseStringComparer(BaseStringComparer&& other) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseStringComparer::BaseStringComparer(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) + namespace Collections { - Handle = handle; - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - if (Handle) + namespace Generic { - Plugin::ReferenceManagedClass(Handle); + Plugin::SystemCollectionsGenericICollectionSystemSingleIterator begin(System::Collections::Generic::ICollection& enumerable) + { + return Plugin::SystemCollectionsGenericICollectionSystemSingleIterator(enumerable); + } + + Plugin::SystemCollectionsGenericICollectionSystemSingleIterator end(System::Collections::Generic::ICollection& enumerable) + { + return Plugin::SystemCollectionsGenericICollectionSystemSingleIterator(nullptr); + } } } - - BaseStringComparer::~BaseStringComparer() +} + +namespace System +{ + namespace Collections { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; - if (Handle) + namespace Generic { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + ICollection::ICollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - Plugin::ReleaseSystemBaseStringComparer(handle); - if (Plugin::unhandledCsharpException) + } + + ICollection::ICollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + { + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } } - } - } - - BaseStringComparer& BaseStringComparer::operator=(const BaseStringComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReleaseSystemBaseStringComparer(handle); - if (Plugin::unhandledCsharpException) + } + + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ICollection::~ICollection() + { + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - } - Handle = 0; - return *this; - } - - BaseStringComparer& BaseStringComparer::operator=(BaseStringComparer&& other) - { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + + ICollection& ICollection::operator=(const ICollection& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ICollection& ICollection::operator=(decltype(nullptr)) { - Plugin::ReleaseSystemBaseStringComparer(handle); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ICollection& ICollection::operator=(ICollection&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ICollection::operator==(const ICollection& other) const + { + return Handle == other.Handle; + } + + bool ICollection::operator!=(const ICollection& other) const + { + return Handle != other.Handle; } } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseStringComparer::operator==(const BaseStringComparer& other) const - { - return Handle == other.Handle; } - - bool BaseStringComparer::operator!=(const BaseStringComparer& other) const +} + +namespace Plugin +{ + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - return Handle != other.Handle; } - int32_t BaseStringComparer::Compare(System::String& x, System::String& y) + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(System::Collections::Generic::ICollection& enumerable) + : enumerator(enumerable.GetEnumerator()) { - return {}; + hasMore = enumerator.MoveNext(); } - DLLEXPORT int32_t SystemStringComparerCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::~SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator() { - try - { - auto x = System::String(Plugin::InternalUse::Only, xHandle); - auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemBaseStringComparer(cppHandle)->Compare(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) + if (enumerator != nullptr) { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + enumerator.Dispose(); } } - System::Boolean BaseStringComparer::Equals(System::String& x, System::String& y) + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator++() { - return {}; + hasMore = enumerator.MoveNext(); + return *this; } - DLLEXPORT int32_t SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + bool SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& other) { - try - { - auto x = System::String(Plugin::InternalUse::Only, xHandle); - auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemBaseStringComparer(cppHandle)->Equals(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + return hasMore; } - int32_t BaseStringComparer::GetHashCode(System::String& obj) + UnityEngine::RaycastHit SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator*() { - return {}; + return enumerator.GetCurrent(); } - - DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) +} + +namespace System +{ + namespace Collections { - try - { - auto obj = System::String(Plugin::InternalUse::Only, objHandle); - return Plugin::GetSystemBaseStringComparer(cppHandle)->GetHashCode(obj); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) + namespace Generic { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator begin(System::Collections::Generic::ICollection& enumerable) + { + return Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(enumerable); + } + + Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator end(System::Collections::Generic::ICollection& enumerable) + { + return Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(nullptr); + } } } } @@ -11997,308 +14290,295 @@ namespace System { namespace Collections { - Queue::Queue(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - { - } - - Queue::Queue(Plugin::InternalUse iu, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) + namespace Generic { - Handle = handle; - if (handle) + ICollection::ICollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - Plugin::ReferenceManagedClass(handle); } - } - - Queue::Queue(const Queue& other) - : Queue(Plugin::InternalUse::Only, other.Handle) - { - } - - Queue::Queue(Queue&& other) - : Queue(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Queue::~Queue() - { - if (Handle) + + ICollection::ICollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - } - - Queue& Queue::operator=(const Queue& other) - { - if (this->Handle) + + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); + other.Handle = 0; } - return *this; - } - - Queue& Queue::operator=(decltype(nullptr)) - { - if (Handle) + + ICollection::~ICollection() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - return *this; - } - - Queue& Queue::operator=(Queue&& other) - { - if (Handle) + + ICollection& ICollection::operator=(const ICollection& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ICollection& ICollection::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ICollection& ICollection::operator=(ICollection&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ICollection::operator==(const ICollection& other) const + { + return Handle == other.Handle; + } + + bool ICollection::operator!=(const ICollection& other) const { - Plugin::DereferenceManagedClass(Handle); + return Handle != other.Handle; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Queue::operator==(const Queue& other) const - { - return Handle == other.Handle; - } - - bool Queue::operator!=(const Queue& other) const - { - return Handle != other.Handle; } - - int32_t Queue::GetCount() + } +} + +namespace Plugin +{ + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(System::Collections::Generic::ICollection& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::~SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator() + { + if (enumerator != nullptr) { - auto returnValue = Plugin::SystemCollectionsQueuePropertyGetCount(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + enumerator.Dispose(); } } + + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& other) + { + return hasMore; + } + + UnityEngine::GradientColorKey SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator*() + { + return enumerator.GetCurrent(); + } } namespace System { namespace Collections { - BaseQueue::BaseQueue() - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) + namespace Generic { - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsBaseQueueConstructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) + Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::ICollection& enumerable) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(enumerable); } - if (Handle) + + Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator end(System::Collections::Generic::ICollection& enumerable) { - Plugin::ReferenceManagedClass(Handle); + return Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(nullptr); } - else + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + ICollection::ICollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); - CppHandle = 0; } - if (Plugin::unhandledCsharpException) + + ICollection::ICollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - } - - BaseQueue::BaseQueue(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - } - - BaseQueue::BaseQueue(const BaseQueue& other) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - if (Handle) + + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); } - } - - BaseQueue::BaseQueue(BaseQueue&& other) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseQueue::BaseQueue(Plugin::InternalUse iu, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - if (Handle) + + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); + other.Handle = 0; } - } - - BaseQueue::~BaseQueue() - { - Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); - CppHandle = 0; - if (Handle) + + ICollection::~ICollection() { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseSystemCollectionsBaseQueue(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - } - - BaseQueue& BaseQueue::operator=(const BaseQueue& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + + ICollection& ICollection::operator=(const ICollection& other) { - Plugin::ReferenceManagedClass(this->Handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - return *this; - } - - BaseQueue& BaseQueue::operator=(decltype(nullptr)) - { - if (Handle) + + ICollection& ICollection::operator=(decltype(nullptr)) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseSystemCollectionsBaseQueue(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } + return *this; } - Handle = 0; - return *this; - } - - BaseQueue& BaseQueue::operator=(BaseQueue&& other) - { - Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); - CppHandle = 0; - if (Handle) + + ICollection& ICollection::operator=(ICollection&& other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseSystemCollectionsBaseQueue(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ICollection::operator==(const ICollection& other) const + { + return Handle == other.Handle; + } + + bool ICollection::operator!=(const ICollection& other) const + { + return Handle != other.Handle; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseQueue::operator==(const BaseQueue& other) const - { - return Handle == other.Handle; - } - - bool BaseQueue::operator!=(const BaseQueue& other) const - { - return Handle != other.Handle; } - - int32_t BaseQueue::GetCount() + } +} + +namespace Plugin +{ + SystemCollectionsGenericICollectionUnityEngineResolutionIterator::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericICollectionUnityEngineResolutionIterator::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(System::Collections::Generic::ICollection& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericICollectionUnityEngineResolutionIterator::~SystemCollectionsGenericICollectionUnityEngineResolutionIterator() + { + if (enumerator != nullptr) { - return {}; + enumerator.Dispose(); } - - DLLEXPORT int32_t SystemCollectionsQueueGetCount(int32_t cppHandle) + } + + SystemCollectionsGenericICollectionUnityEngineResolutionIterator& SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineResolutionIterator& other) + { + return hasMore; + } + + UnityEngine::Resolution SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic { - try - { - return Plugin::GetSystemCollectionsBaseQueue(cppHandle)->GetCount(); - } - catch (System::Exception ex) + Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator begin(System::Collections::Generic::ICollection& enumerable) { - Plugin::SetException(ex.Handle); - return {}; + return Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(enumerable); } - catch (...) + + Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator end(System::Collections::Generic::ICollection& enumerable) { - System::String msg = "Unhandled exception invoking System::Collections::Queue"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + return Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(nullptr); } } } @@ -12306,15 +14586,21 @@ namespace System namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - IComponentChangeService::IComponentChangeService(decltype(nullptr)) + IList::IList(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - IComponentChangeService::IComponentChangeService(Plugin::InternalUse iu, int32_t handle) + IList::IList(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { Handle = handle; if (handle) @@ -12323,18 +14609,18 @@ namespace System } } - IComponentChangeService::IComponentChangeService(const IComponentChangeService& other) - : IComponentChangeService(Plugin::InternalUse::Only, other.Handle) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - IComponentChangeService::IComponentChangeService(IComponentChangeService&& other) - : IComponentChangeService(Plugin::InternalUse::Only, other.Handle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IComponentChangeService::~IComponentChangeService() + IList::~IList() { if (Handle) { @@ -12343,7 +14629,7 @@ namespace System } } - IComponentChangeService& IComponentChangeService::operator=(const IComponentChangeService& other) + IList& IList::operator=(const IList& other) { if (this->Handle) { @@ -12357,7 +14643,7 @@ namespace System return *this; } - IComponentChangeService& IComponentChangeService::operator=(decltype(nullptr)) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { @@ -12367,7 +14653,7 @@ namespace System return *this; } - IComponentChangeService& IComponentChangeService::operator=(IComponentChangeService&& other) + IList& IList::operator=(IList&& other) { if (Handle) { @@ -12378,12 +14664,12 @@ namespace System return *this; } - bool IComponentChangeService::operator==(const IComponentChangeService& other) const + bool IList::operator==(const IList& other) const { return Handle == other.Handle; } - bool IComponentChangeService::operator!=(const IComponentChangeService& other) const + bool IList::operator!=(const IList& other) const { return Handle != other.Handle; } @@ -12391,104 +14677,110 @@ namespace System } } +namespace Plugin +{ + SystemCollectionsGenericIListSystemStringIterator::SystemCollectionsGenericIListSystemStringIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericIListSystemStringIterator::SystemCollectionsGenericIListSystemStringIterator(System::Collections::Generic::IList& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericIListSystemStringIterator::~SystemCollectionsGenericIListSystemStringIterator() + { + if (enumerator != nullptr) + { + enumerator.Dispose(); + } + } + + SystemCollectionsGenericIListSystemStringIterator& SystemCollectionsGenericIListSystemStringIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericIListSystemStringIterator::operator!=(const SystemCollectionsGenericIListSystemStringIterator& other) + { + return hasMore; + } + + System::String SystemCollectionsGenericIListSystemStringIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - BaseIComponentChangeService::BaseIComponentChangeService() - : System::ComponentModel::Design::IComponentChangeService(nullptr) + Plugin::SystemCollectionsGenericIListSystemStringIterator begin(System::Collections::Generic::IList& enumerable) { - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceConstructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Plugin::SystemCollectionsGenericIListSystemStringIterator(enumerable); } - BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr)) - : System::ComponentModel::Design::IComponentChangeService(nullptr) + Plugin::SystemCollectionsGenericIListSystemStringIterator end(System::Collections::Generic::IList& enumerable) + { + return Plugin::SystemCollectionsGenericIListSystemStringIterator(nullptr); + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IList::IList(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); } - BaseIComponentChangeService::BaseIComponentChangeService(const BaseIComponentChangeService& other) - : System::ComponentModel::Design::IComponentChangeService(nullptr) + IList::IList(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - if (Handle) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - BaseIComponentChangeService::BaseIComponentChangeService(BaseIComponentChangeService&& other) - : System::ComponentModel::Design::IComponentChangeService(nullptr) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - BaseIComponentChangeService::BaseIComponentChangeService(Plugin::InternalUse iu, int32_t handle) - : System::ComponentModel::Design::IComponentChangeService(nullptr) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - Handle = handle; - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - BaseIComponentChangeService::~BaseIComponentChangeService() + IList::~IList() { - Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - BaseIComponentChangeService& BaseIComponentChangeService::operator=(const BaseIComponentChangeService& other) + IList& IList::operator=(const IList& other) { if (this->Handle) { @@ -12502,897 +14794,954 @@ namespace System return *this; } - BaseIComponentChangeService& BaseIComponentChangeService::operator=(decltype(nullptr)) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } - Handle = 0; return *this; } - BaseIComponentChangeService& BaseIComponentChangeService::operator=(BaseIComponentChangeService&& other) + IList& IList::operator=(IList&& other) { - Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool BaseIComponentChangeService::operator==(const BaseIComponentChangeService& other) const + bool IList::operator==(const IList& other) const { return Handle == other.Handle; } - bool BaseIComponentChangeService::operator!=(const BaseIComponentChangeService& other) const + bool IList::operator!=(const IList& other) const { return Handle != other.Handle; } - - void BaseIComponentChangeService::OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue) + } + } +} + +namespace Plugin +{ + SystemCollectionsGenericIListSystemInt32Iterator::SystemCollectionsGenericIListSystemInt32Iterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericIListSystemInt32Iterator::SystemCollectionsGenericIListSystemInt32Iterator(System::Collections::Generic::IList& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericIListSystemInt32Iterator::~SystemCollectionsGenericIListSystemInt32Iterator() + { + if (enumerator != nullptr) + { + enumerator.Dispose(); + } + } + + SystemCollectionsGenericIListSystemInt32Iterator& SystemCollectionsGenericIListSystemInt32Iterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericIListSystemInt32Iterator::operator!=(const SystemCollectionsGenericIListSystemInt32Iterator& other) + { + return hasMore; + } + + System::Int32 SystemCollectionsGenericIListSystemInt32Iterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericIListSystemInt32Iterator begin(System::Collections::Generic::IList& enumerable) { + return Plugin::SystemCollectionsGenericIListSystemInt32Iterator(enumerable); } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanged(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle, int32_t oldValueHandle, int32_t newValueHandle) + Plugin::SystemCollectionsGenericIListSystemInt32Iterator end(System::Collections::Generic::IList& enumerable) { - try - { - auto component = System::Object(Plugin::InternalUse::Only, componentHandle); - auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - auto oldValue = System::Object(Plugin::InternalUse::Only, oldValueHandle); - auto newValue = System::Object(Plugin::InternalUse::Only, newValueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanged(component, member, oldValue, newValue); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + return Plugin::SystemCollectionsGenericIListSystemInt32Iterator(nullptr); } - - void BaseIComponentChangeService::OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member) + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IList::IList(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanging(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle) + IList::IList(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - try - { - auto component = System::Object(Plugin::InternalUse::Only, componentHandle); - auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanging(component, member); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + Handle = handle; + if (handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReferenceManagedClass(handle); } } - void BaseIComponentChangeService::AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdded(int32_t cppHandle, int32_t valueHandle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - try + other.Handle = 0; + } + + IList::~IList() + { + if (Handle) { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdded(value); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - catch (System::Exception ex) + } + + IList& IList::operator=(const IList& other) + { + if (this->Handle) { - Plugin::SetException(ex.Handle); + Plugin::DereferenceManagedClass(this->Handle); } - catch (...) + this->Handle = other.Handle; + if (this->Handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - void BaseIComponentChangeService::RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + IList& IList::operator=(decltype(nullptr)) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded(int32_t cppHandle, int32_t valueHandle) + IList& IList::operator=(IList&& other) { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdded(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + if (Handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - void BaseIComponentChangeService::AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + bool IList::operator==(const IList& other) const { + return Handle == other.Handle; } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdding(int32_t cppHandle, int32_t valueHandle) + bool IList::operator!=(const IList& other) const { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdding(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + return Handle != other.Handle; } - - void BaseIComponentChangeService::RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + } + } +} + +namespace Plugin +{ + SystemCollectionsGenericIListSystemSingleIterator::SystemCollectionsGenericIListSystemSingleIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericIListSystemSingleIterator::SystemCollectionsGenericIListSystemSingleIterator(System::Collections::Generic::IList& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericIListSystemSingleIterator::~SystemCollectionsGenericIListSystemSingleIterator() + { + if (enumerator != nullptr) + { + enumerator.Dispose(); + } + } + + SystemCollectionsGenericIListSystemSingleIterator& SystemCollectionsGenericIListSystemSingleIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericIListSystemSingleIterator::operator!=(const SystemCollectionsGenericIListSystemSingleIterator& other) + { + return hasMore; + } + + System::Single SystemCollectionsGenericIListSystemSingleIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable) { + return Plugin::SystemCollectionsGenericIListSystemSingleIterator(enumerable); } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding(int32_t cppHandle, int32_t valueHandle) + Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable) { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdding(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + return Plugin::SystemCollectionsGenericIListSystemSingleIterator(nullptr); } - - void BaseIComponentChangeService::AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IList::IList(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanged(int32_t cppHandle, int32_t valueHandle) + IList::IList(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - try - { - auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanged(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + Handle = handle; + if (handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReferenceManagedClass(handle); } } - void BaseIComponentChangeService::RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged(int32_t cppHandle, int32_t valueHandle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - try - { - auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanged(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + other.Handle = 0; } - void BaseIComponentChangeService::AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + IList::~IList() { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanging(int32_t cppHandle, int32_t valueHandle) + IList& IList::operator=(const IList& other) { - try - { - auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanging(value); - } - catch (System::Exception ex) + if (this->Handle) { - Plugin::SetException(ex.Handle); + Plugin::DereferenceManagedClass(this->Handle); } - catch (...) + this->Handle = other.Handle; + if (this->Handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - void BaseIComponentChangeService::RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + IList& IList::operator=(decltype(nullptr)) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging(int32_t cppHandle, int32_t valueHandle) + IList& IList::operator=(IList&& other) { - try - { - auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanging(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + if (Handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - void BaseIComponentChangeService::AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + bool IList::operator==(const IList& other) const { + return Handle == other.Handle; } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved(int32_t cppHandle, int32_t valueHandle) + bool IList::operator!=(const IList& other) const { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoved(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + return Handle != other.Handle; } - - void BaseIComponentChangeService::RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + } + } +} + +namespace Plugin +{ + SystemCollectionsGenericIListUnityEngineRaycastHitIterator::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericIListUnityEngineRaycastHitIterator::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(System::Collections::Generic::IList& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericIListUnityEngineRaycastHitIterator::~SystemCollectionsGenericIListUnityEngineRaycastHitIterator() + { + if (enumerator != nullptr) + { + enumerator.Dispose(); + } + } + + SystemCollectionsGenericIListUnityEngineRaycastHitIterator& SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator!=(const SystemCollectionsGenericIListUnityEngineRaycastHitIterator& other) + { + return hasMore; + } + + UnityEngine::RaycastHit SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator begin(System::Collections::Generic::IList& enumerable) { + return Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(enumerable); } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved(int32_t cppHandle, int32_t valueHandle) + Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator end(System::Collections::Generic::IList& enumerable) { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoved(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + return Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(nullptr); } - - void BaseIComponentChangeService::AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IList::IList(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoving(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + IList::IList(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + { + Handle = handle; + if (handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReferenceManagedClass(handle); } } - void BaseIComponentChangeService::RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving(int32_t cppHandle, int32_t valueHandle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - try + other.Handle = 0; + } + + IList::~IList() + { + if (Handle) { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoving(value); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - catch (System::Exception ex) + } + + IList& IList::operator=(const IList& other) + { + if (this->Handle) { - Plugin::SetException(ex.Handle); + Plugin::DereferenceManagedClass(this->Handle); } - catch (...) + this->Handle = other.Handle; + if (this->Handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - void BaseIComponentChangeService::AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + IList& IList::operator=(decltype(nullptr)) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRename(int32_t cppHandle, int32_t valueHandle) + IList& IList::operator=(IList&& other) { - try - { - auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRename(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + if (Handle) { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - void BaseIComponentChangeService::RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + bool IList::operator==(const IList& other) const { + return Handle == other.Handle; } - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename(int32_t cppHandle, int32_t valueHandle) + bool IList::operator!=(const IList& other) const { - try - { - auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRename(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + return Handle != other.Handle; } } } } -namespace System +namespace Plugin { - namespace IO + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - FileStream::FileStream(decltype(nullptr)) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) + } + + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(System::Collections::Generic::IList& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::~SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator() + { + if (enumerator != nullptr) { + enumerator.Dispose(); } - - FileStream::FileStream(Plugin::InternalUse iu, int32_t handle) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) + } + + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator!=(const SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& other) + { + return hasMore; + } + + UnityEngine::GradientColorKey SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic { - Handle = handle; - if (handle) + Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::IList& enumerable) { - Plugin::ReferenceManagedClass(handle); + return Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(enumerable); } - } - - FileStream::FileStream(const FileStream& other) - : FileStream(Plugin::InternalUse::Only, other.Handle) - { - } - - FileStream::FileStream(FileStream&& other) - : FileStream(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - FileStream::~FileStream() - { - if (Handle) + + Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator end(System::Collections::Generic::IList& enumerable) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + return Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(nullptr); } } - - FileStream& FileStream::operator=(const FileStream& other) + } +} + +namespace System +{ + namespace Collections + { + namespace Generic { - if (this->Handle) + IList::IList(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + IList::IList(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - Plugin::ReferenceManagedClass(this->Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - return *this; - } - - FileStream& FileStream::operator=(decltype(nullptr)) - { - if (Handle) + + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - return *this; - } - - FileStream& FileStream::operator=(FileStream&& other) - { - if (Handle) + + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); + other.Handle = 0; + } + + IList::~IList() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IList& IList::operator=(const IList& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IList& IList::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IList& IList::operator=(IList&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool FileStream::operator==(const FileStream& other) const - { - return Handle == other.Handle; - } - - bool FileStream::operator!=(const FileStream& other) const - { - return Handle != other.Handle; - } - - FileStream::FileStream(System::String& path, System::IO::FileMode mode) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - { - auto returnValue = Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode(path.Handle, mode); - if (Plugin::unhandledCsharpException) + + bool IList::operator==(const IList& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; } - Handle = returnValue; - if (returnValue) + + bool IList::operator!=(const IList& other) const { - Plugin::ReferenceManagedClass(returnValue); + return Handle != other.Handle; } } - - void FileStream::WriteByte(uint8_t value) + } +} + +namespace Plugin +{ + SystemCollectionsGenericIListUnityEngineResolutionIterator::SystemCollectionsGenericIListUnityEngineResolutionIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) + { + } + + SystemCollectionsGenericIListUnityEngineResolutionIterator::SystemCollectionsGenericIListUnityEngineResolutionIterator(System::Collections::Generic::IList& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericIListUnityEngineResolutionIterator::~SystemCollectionsGenericIListUnityEngineResolutionIterator() + { + if (enumerator != nullptr) { - Plugin::SystemIOFileStreamMethodWriteByteSystemByte(Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + enumerator.Dispose(); } } + + SystemCollectionsGenericIListUnityEngineResolutionIterator& SystemCollectionsGenericIListUnityEngineResolutionIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericIListUnityEngineResolutionIterator::operator!=(const SystemCollectionsGenericIListUnityEngineResolutionIterator& other) + { + return hasMore; + } + + UnityEngine::Resolution SystemCollectionsGenericIListUnityEngineResolutionIterator::operator*() + { + return enumerator.GetCurrent(); + } } namespace System { - namespace IO + namespace Collections { - BaseFileStream::BaseFileStream(System::String& path, System::IO::FileMode mode) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) + namespace Generic { - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(cppHandle, handle, path.Handle, mode); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemIOBaseFileStream(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) + Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator begin(System::Collections::Generic::IList& enumerable) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator(enumerable); } - } - - BaseFileStream::BaseFileStream(decltype(nullptr)) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - } - - BaseFileStream::BaseFileStream(const BaseFileStream& other) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - if (Handle) + + Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator end(System::Collections::Generic::IList& enumerable) { - Plugin::ReferenceManagedClass(Handle); + return Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator(nullptr); } } - - BaseFileStream::BaseFileStream(BaseFileStream&& other) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseFileStream::BaseFileStream(Plugin::InternalUse iu, int32_t handle) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) + } +} + +namespace System +{ + namespace Collections + { + namespace Generic { - Handle = handle; - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - if (Handle) + List::List(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { - Plugin::ReferenceManagedClass(Handle); } - } - - BaseFileStream::~BaseFileStream() - { - Plugin::RemoveSystemIOBaseFileStream(CppHandle); - CppHandle = 0; - if (Handle) + + List::List(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Handle = handle; + if (handle) { - Plugin::ReleaseSystemIOBaseFileStream(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::ReferenceManagedClass(handle); } } - } - - BaseFileStream& BaseFileStream::operator=(const BaseFileStream& other) - { - if (this->Handle) + + List::List(const List& other) + : List(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + List::List(List&& other) + : List(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); + other.Handle = 0; } - return *this; - } - - BaseFileStream& BaseFileStream::operator=(decltype(nullptr)) - { - if (Handle) + + List::~List() { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemIOBaseFileStream(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseFileStream& BaseFileStream::operator=(BaseFileStream&& other) - { - Plugin::RemoveSystemIOBaseFileStream(CppHandle); - CppHandle = 0; - if (Handle) + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + List& List::operator=(const List& other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (this->Handle) { - Plugin::ReleaseSystemIOBaseFileStream(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseFileStream::operator==(const BaseFileStream& other) const - { - return Handle == other.Handle; - } - - bool BaseFileStream::operator!=(const BaseFileStream& other) const - { - return Handle != other.Handle; - } - - void BaseFileStream::WriteByte(uint8_t value) - { - } - - DLLEXPORT void SystemIOFileStreamWriteByte(int32_t cppHandle, uint8_t value) - { - try + + List& List::operator=(decltype(nullptr)) { - Plugin::GetSystemIOBaseFileStream(cppHandle)->WriteByte(value); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - catch (System::Exception ex) + + List& List::operator=(List&& other) { - Plugin::SetException(ex.Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - catch (...) + + bool List::operator==(const List& other) const { - System::String msg = "Unhandled exception invoking System::IO::FileStream"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + return Handle == other.Handle; } - } - } -} - -namespace UnityEngine -{ - namespace Playables - { - PlayableHandle::PlayableHandle(decltype(nullptr)) - : System::ValueType(nullptr) - { - } - - PlayableHandle::PlayableHandle(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) - { - Handle = handle; - if (handle) + + bool List::operator!=(const List& other) const { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + return Handle != other.Handle; } - } - - PlayableHandle::PlayableHandle(const PlayableHandle& other) - : PlayableHandle(Plugin::InternalUse::Only, other.Handle) - { - } - - PlayableHandle::PlayableHandle(PlayableHandle&& other) - : PlayableHandle(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - PlayableHandle::~PlayableHandle() - { - if (Handle) + + List::List() + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - Handle = 0; + 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); + } } - } - - PlayableHandle& PlayableHandle::operator=(const PlayableHandle& other) - { - if (this->Handle) + + System::String List::GetItem(System::Int32 index) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + 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); } - this->Handle = other.Handle; - if (this->Handle) + + void List::SetItem(System::Int32 index, System::String& value) { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + Plugin::SystemCollectionsGenericListSystemStringPropertySetItem(Handle, index, value.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - return *this; - } - - PlayableHandle& PlayableHandle::operator=(decltype(nullptr)) - { - if (Handle) + + void List::Add(System::String& item) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - Handle = 0; + Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString(Handle, item.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - return *this; - } - - PlayableHandle& PlayableHandle::operator=(PlayableHandle&& other) - { - if (Handle) + + void List::Sort(System::Collections::Generic::IComparer& comparer) { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool PlayableHandle::operator==(const PlayableHandle& other) const - { - return Handle == other.Handle; - } - - bool PlayableHandle::operator!=(const PlayableHandle& other) const - { - return Handle != other.Handle; } } } -namespace System +namespace Plugin { - Object::Object(UnityEngine::Playables::PlayableHandle& val) + SystemCollectionsGenericListSystemStringIterator::SystemCollectionsGenericListSystemStringIterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - int32_t handle = Plugin::BoxPlayableHandle(val.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + } + + SystemCollectionsGenericListSystemStringIterator::SystemCollectionsGenericListSystemStringIterator(System::Collections::Generic::List& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericListSystemStringIterator::~SystemCollectionsGenericListSystemStringIterator() + { + if (enumerator != nullptr) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + enumerator.Dispose(); } } - Object::operator UnityEngine::Playables::PlayableHandle() + SystemCollectionsGenericListSystemStringIterator& SystemCollectionsGenericListSystemStringIterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericListSystemStringIterator::operator!=(const SystemCollectionsGenericListSystemStringIterator& other) + { + return hasMore; + } + + System::String SystemCollectionsGenericListSystemStringIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections { - UnityEngine::Playables::PlayableHandle returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableHandle(Handle)); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::SystemCollectionsGenericListSystemStringIterator begin(System::Collections::Generic::List& enumerable) + { + return Plugin::SystemCollectionsGenericListSystemStringIterator(enumerable); + } + + Plugin::SystemCollectionsGenericListSystemStringIterator end(System::Collections::Generic::List& enumerable) + { + return Plugin::SystemCollectionsGenericListSystemStringIterator(nullptr); + } } - return returnVal; } } -namespace UnityEngine +namespace System { - namespace Experimental + namespace Collections { - namespace UIElements + namespace Generic { - CallbackEventHandler::CallbackEventHandler(decltype(nullptr)) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + List::List(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { } - CallbackEventHandler::CallbackEventHandler(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + List::List(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { Handle = handle; if (handle) @@ -13401,18 +15750,18 @@ namespace UnityEngine } } - CallbackEventHandler::CallbackEventHandler(const CallbackEventHandler& other) - : CallbackEventHandler(Plugin::InternalUse::Only, other.Handle) + List::List(const List& other) + : List(Plugin::InternalUse::Only, other.Handle) { } - CallbackEventHandler::CallbackEventHandler(CallbackEventHandler&& other) - : CallbackEventHandler(Plugin::InternalUse::Only, other.Handle) + List::List(List&& other) + : List(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - CallbackEventHandler::~CallbackEventHandler() + List::~List() { if (Handle) { @@ -13421,7 +15770,7 @@ namespace UnityEngine } } - CallbackEventHandler& CallbackEventHandler::operator=(const CallbackEventHandler& other) + List& List::operator=(const List& other) { if (this->Handle) { @@ -13435,7 +15784,7 @@ namespace UnityEngine return *this; } - CallbackEventHandler& CallbackEventHandler::operator=(decltype(nullptr)) + List& List::operator=(decltype(nullptr)) { if (Handle) { @@ -13445,7 +15794,7 @@ namespace UnityEngine return *this; } - CallbackEventHandler& CallbackEventHandler::operator=(CallbackEventHandler&& other) + List& List::operator=(List&& other) { if (Handle) { @@ -13456,36 +15805,172 @@ namespace UnityEngine return *this; } - bool CallbackEventHandler::operator==(const CallbackEventHandler& other) const + bool List::operator==(const List& other) const { return Handle == other.Handle; } - bool CallbackEventHandler::operator!=(const CallbackEventHandler& other) const + bool List::operator!=(const List& other) const { return Handle != other.Handle; } + + List::List() + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) + { + auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32Constructor(); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + } + } + + System::Int32 List::GetItem(System::Int32 index) + { + auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32PropertyGetItem(Handle, index); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } + + void List::SetItem(System::Int32 index, System::Int32 value) + { + Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + void List::Add(System::Int32 item) + { + Plugin::SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(Handle, item); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + void List::Sort(System::Collections::Generic::IComparer& comparer) + { + Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } } } -namespace UnityEngine +namespace Plugin { - namespace Experimental + SystemCollectionsGenericListSystemInt32Iterator::SystemCollectionsGenericListSystemInt32Iterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - namespace UIElements + } + + SystemCollectionsGenericListSystemInt32Iterator::SystemCollectionsGenericListSystemInt32Iterator(System::Collections::Generic::List& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); + } + + SystemCollectionsGenericListSystemInt32Iterator::~SystemCollectionsGenericListSystemInt32Iterator() + { + if (enumerator != nullptr) { - VisualElement::VisualElement(decltype(nullptr)) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::IStyle(nullptr) + enumerator.Dispose(); + } + } + + SystemCollectionsGenericListSystemInt32Iterator& SystemCollectionsGenericListSystemInt32Iterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsGenericListSystemInt32Iterator::operator!=(const SystemCollectionsGenericListSystemInt32Iterator& other) + { + return hasMore; + } + + System::Int32 SystemCollectionsGenericListSystemInt32Iterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable) { + return Plugin::SystemCollectionsGenericListSystemInt32Iterator(enumerable); } - VisualElement::VisualElement(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::IStyle(nullptr) + Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable) + { + return Plugin::SystemCollectionsGenericListSystemInt32Iterator(nullptr); + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace ObjectModel + { + Collection::Collection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) + { + } + + Collection::Collection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { Handle = handle; if (handle) @@ -13494,18 +15979,18 @@ namespace UnityEngine } } - VisualElement::VisualElement(const VisualElement& other) - : VisualElement(Plugin::InternalUse::Only, other.Handle) + Collection::Collection(const Collection& other) + : Collection(Plugin::InternalUse::Only, other.Handle) { } - VisualElement::VisualElement(VisualElement&& other) - : VisualElement(Plugin::InternalUse::Only, other.Handle) + Collection::Collection(Collection&& other) + : Collection(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - VisualElement::~VisualElement() + Collection::~Collection() { if (Handle) { @@ -13514,7 +15999,7 @@ namespace UnityEngine } } - VisualElement& VisualElement::operator=(const VisualElement& other) + Collection& Collection::operator=(const Collection& other) { if (this->Handle) { @@ -13528,7 +16013,7 @@ namespace UnityEngine return *this; } - VisualElement& VisualElement::operator=(decltype(nullptr)) + Collection& Collection::operator=(decltype(nullptr)) { if (Handle) { @@ -13538,7 +16023,7 @@ namespace UnityEngine return *this; } - VisualElement& VisualElement::operator=(VisualElement&& other) + Collection& Collection::operator=(Collection&& other) { if (Handle) { @@ -13549,12 +16034,12 @@ namespace UnityEngine return *this; } - bool VisualElement::operator==(const VisualElement& other) const + bool Collection::operator==(const Collection& other) const { return Handle == other.Handle; } - bool VisualElement::operator!=(const VisualElement& other) const + bool Collection::operator!=(const Collection& other) const { return Handle != other.Handle; } @@ -13562,300 +16047,228 @@ namespace UnityEngine } } -namespace UnityEngine +namespace Plugin { - namespace Experimental + SystemCollectionsObjectModelCollectionSystemInt32Iterator::SystemCollectionsObjectModelCollectionSystemInt32Iterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - namespace UIElements - { - UnityEngine::Experimental::UIElements::VisualElement UQueryExtensions::Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::Array1& classes) - { - auto returnValue = Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(e.Handle, name.Handle, classes.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); - } + } - UnityEngine::Experimental::UIElements::VisualElement UQueryExtensions::Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::String& className) - { - auto returnValue = Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString(e.Handle, name.Handle, className.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); - } - } + SystemCollectionsObjectModelCollectionSystemInt32Iterator::SystemCollectionsObjectModelCollectionSystemInt32Iterator(System::Collections::ObjectModel::Collection& enumerable) + : enumerator(enumerable.GetEnumerator()) + { + hasMore = enumerator.MoveNext(); } -} - -namespace System -{ - Object::Object(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val) + + SystemCollectionsObjectModelCollectionSystemInt32Iterator::~SystemCollectionsObjectModelCollectionSystemInt32Iterator() { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + if (enumerator != nullptr) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + enumerator.Dispose(); } } - Object::operator UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy() + SystemCollectionsObjectModelCollectionSystemInt32Iterator& SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator++() + { + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator!=(const SystemCollectionsObjectModelCollectionSystemInt32Iterator& other) + { + return hasMore; + } + + System::Int32 SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator*() { - UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy returnVal(Plugin::UnboxInteractionSourcePositionAccuracy(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + return enumerator.GetCurrent(); } } namespace System { - Object::Object(UnityEngine::XR::WSA::Input::InteractionSourceNode val) - { - int32_t handle = Plugin::BoxInteractionSourceNode(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator UnityEngine::XR::WSA::Input::InteractionSourceNode() + namespace Collections { - UnityEngine::XR::WSA::Input::InteractionSourceNode returnVal(Plugin::UnboxInteractionSourceNode(Handle)); - if (Plugin::unhandledCsharpException) + namespace ObjectModel { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable) + { + return Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator(enumerable); + } + + Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable) + { + return Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator(nullptr); + } } - return returnVal; } } -namespace UnityEngine +namespace System { - namespace XR + namespace Collections { - namespace WSA + namespace ObjectModel { - namespace Input + KeyedCollection::KeyedCollection(decltype(nullptr)) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) + , System::Collections::ObjectModel::Collection(nullptr) { - InteractionSourcePose::InteractionSourcePose(decltype(nullptr)) - : System::ValueType(nullptr) - { - } - - InteractionSourcePose::InteractionSourcePose(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - } - - InteractionSourcePose::InteractionSourcePose(const InteractionSourcePose& other) - : InteractionSourcePose(Plugin::InternalUse::Only, other.Handle) - { - } - - InteractionSourcePose::InteractionSourcePose(InteractionSourcePose&& other) - : InteractionSourcePose(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - InteractionSourcePose::~InteractionSourcePose() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - Handle = 0; - } - } - - InteractionSourcePose& InteractionSourcePose::operator=(const InteractionSourcePose& other) + } + + KeyedCollection::KeyedCollection(Plugin::InternalUse, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) + , System::Collections::ObjectModel::Collection(nullptr) + { + Handle = handle; + if (handle) { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - return *this; + Plugin::ReferenceManagedClass(handle); } - - InteractionSourcePose& InteractionSourcePose::operator=(decltype(nullptr)) + } + + 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) { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - Handle = 0; - } - return *this; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - InteractionSourcePose& InteractionSourcePose::operator=(InteractionSourcePose&& other) + } + + KeyedCollection& KeyedCollection::operator=(const KeyedCollection& other) + { + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + Plugin::DereferenceManagedClass(this->Handle); } - - bool InteractionSourcePose::operator==(const InteractionSourcePose& other) const + this->Handle = other.Handle; + if (this->Handle) { - return Handle == other.Handle; + Plugin::ReferenceManagedClass(this->Handle); } - - bool InteractionSourcePose::operator!=(const InteractionSourcePose& other) const + return *this; + } + + KeyedCollection& KeyedCollection::operator=(decltype(nullptr)) + { + if (Handle) { - return Handle != other.Handle; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - System::Boolean InteractionSourcePose::TryGetRotation(UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node) + return *this; + } + + KeyedCollection& KeyedCollection::operator=(KeyedCollection&& other) + { + if (Handle) { - auto returnValue = Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode(Handle, rotation, node); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + 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 +namespace Plugin { - Object::Object(UnityEngine::XR::WSA::Input::InteractionSourcePose& val) + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(decltype(nullptr)) + : enumerator(nullptr) + , hasMore(false) { - int32_t handle = Plugin::BoxInteractionSourcePose(val.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } } - Object::operator UnityEngine::XR::WSA::Input::InteractionSourcePose() + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(System::Collections::ObjectModel::KeyedCollection& enumerable) + : enumerator(enumerable.GetEnumerator()) { - UnityEngine::XR::WSA::Input::InteractionSourcePose returnVal(Plugin::InternalUse::Only, Plugin::UnboxInteractionSourcePose(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + hasMore = enumerator.MoveNext(); } -} - -namespace System -{ - Object::Object(System::Boolean val) + + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::~SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator() { - int32_t handle = Plugin::BoxBoolean(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + if (enumerator != nullptr) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + enumerator.Dispose(); } } - Object::operator System::Boolean() + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator++() { - System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + hasMore = enumerator.MoveNext(); + return *this; + } + + bool SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator!=(const SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& other) + { + return hasMore; + } + + System::Int32 SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator*() + { + return enumerator.GetCurrent(); } } namespace System { - Object::Object(int8_t val) + namespace Collections { - int32_t handle = Plugin::BoxSByte(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + namespace ObjectModel { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable) + { + return Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(enumerable); + } + + Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable) + { + return Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(nullptr); + } } } - - Object::operator int8_t() +} + +namespace System +{ + Object::operator System::Boolean() { - int8_t returnVal(Plugin::UnboxSByte(Handle)); + System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -13869,26 +16282,9 @@ namespace System namespace System { - Object::Object(uint8_t val) - { - int32_t handle = Plugin::BoxByte(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator uint8_t() + Object::operator System::SByte() { - uint8_t returnVal(Plugin::UnboxByte(Handle)); + System::SByte returnVal(Plugin::UnboxSByte(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -13902,26 +16298,9 @@ namespace System namespace System { - Object::Object(int16_t val) - { - int32_t handle = Plugin::BoxInt16(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator int16_t() + Object::operator System::Byte() { - int16_t returnVal(Plugin::UnboxInt16(Handle)); + System::Byte returnVal(Plugin::UnboxByte(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -13935,26 +16314,9 @@ namespace System namespace System { - Object::Object(uint16_t val) - { - int32_t handle = Plugin::BoxUInt16(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator uint16_t() + Object::operator System::Int16() { - uint16_t returnVal(Plugin::UnboxUInt16(Handle)); + System::Int16 returnVal(Plugin::UnboxInt16(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -13968,26 +16330,9 @@ namespace System namespace System { - Object::Object(int32_t val) - { - int32_t handle = Plugin::BoxInt32(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator int32_t() + Object::operator System::UInt16() { - int32_t returnVal(Plugin::UnboxInt32(Handle)); + System::UInt16 returnVal(Plugin::UnboxUInt16(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14001,26 +16346,9 @@ namespace System namespace System { - Object::Object(uint32_t val) - { - int32_t handle = Plugin::BoxUInt32(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator uint32_t() + Object::operator System::Int32() { - uint32_t returnVal(Plugin::UnboxUInt32(Handle)); + System::Int32 returnVal(Plugin::UnboxInt32(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14034,26 +16362,9 @@ namespace System namespace System { - Object::Object(int64_t val) - { - int32_t handle = Plugin::BoxInt64(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator int64_t() + Object::operator System::UInt32() { - int64_t returnVal(Plugin::UnboxInt64(Handle)); + System::UInt32 returnVal(Plugin::UnboxUInt32(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14067,26 +16378,9 @@ namespace System namespace System { - Object::Object(uint64_t val) - { - int32_t handle = Plugin::BoxUInt64(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator uint64_t() + Object::operator System::Int64() { - uint64_t returnVal(Plugin::UnboxUInt64(Handle)); + System::Int64 returnVal(Plugin::UnboxInt64(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14100,9 +16394,9 @@ namespace System namespace System { - Object::Object(System::Char val) + Object::operator System::UInt64() { - int32_t handle = Plugin::BoxChar(val); + System::UInt64 returnVal(Plugin::UnboxUInt64(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14110,13 +16404,12 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } + return returnVal; } - +} + +namespace System +{ Object::operator System::Char() { System::Char returnVal(Plugin::UnboxChar(Handle)); @@ -14133,26 +16426,9 @@ namespace System namespace System { - Object::Object(float val) + Object::operator System::Single() { - int32_t handle = Plugin::BoxSingle(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator float() - { - float returnVal(Plugin::UnboxSingle(Handle)); + System::Single returnVal(Plugin::UnboxSingle(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14166,26 +16442,9 @@ namespace System namespace System { - Object::Object(double val) - { - int32_t handle = Plugin::BoxDouble(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator double() + Object::operator System::Double() { - double returnVal(Plugin::UnboxDouble(Handle)); + System::Double returnVal(Plugin::UnboxDouble(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -14209,7 +16468,7 @@ namespace MyGame { } - TestScript::TestScript(Plugin::InternalUse iu, int32_t handle) + TestScript::TestScript(Plugin::InternalUse, int32_t handle) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -14301,7 +16560,7 @@ namespace MyGame { } - AnotherScript::AnotherScript(Plugin::InternalUse iu, int32_t handle) + AnotherScript::AnotherScript(Plugin::InternalUse, int32_t handle) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -14383,13 +16642,13 @@ namespace MyGame namespace Plugin { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; } - void ArrayElementProxy1_1::operator=(int32_t item) + void ArrayElementProxy1_1::operator=(System::Int32 item) { Plugin::SystemInt32Array1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) @@ -14401,7 +16660,7 @@ namespace Plugin } } - ArrayElementProxy1_1::operator int32_t() + ArrayElementProxy1_1::operator System::Int32() { auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) @@ -14417,28 +16676,28 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr)) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { Handle = handle; if (handle) @@ -14448,13 +16707,13 @@ namespace System this->InternalLength = 0; } - Array1::Array1(const Array1& other) + Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; } - Array1::Array1(Array1&& other) + Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; @@ -14462,7 +16721,7 @@ namespace System other.InternalLength = 0; } - Array1::~Array1() + Array1::~Array1() { if (Handle) { @@ -14471,7 +16730,7 @@ namespace System } } - Array1& Array1::operator=(const Array1& other) + Array1& Array1::operator=(const Array1& other) { if (this->Handle) { @@ -14486,7 +16745,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr)) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -14496,7 +16755,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -14509,25 +16768,25 @@ namespace System return *this; } - bool Array1::operator==(const Array1& other) const + bool Array1::operator==(const Array1& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Array1::operator!=(const Array1& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array1::Array1(System::Int32 length0) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { auto returnValue = Plugin::SystemSystemInt32Array1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -14545,7 +16804,7 @@ namespace System } } - int32_t Array1::GetLength() + System::Int32 Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -14556,20 +16815,20 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + System::Int32 Array1::GetRank() { return 1; } - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); } } namespace Plugin { - SystemInt32Array1Iterator::SystemInt32Array1Iterator(System::Array1& array, int32_t index) + SystemInt32Array1Iterator::SystemInt32Array1Iterator(System::Array1& array, int32_t index) : array(array) , index(index) { @@ -14586,7 +16845,7 @@ namespace Plugin return index != other.index; } - int32_t SystemInt32Array1Iterator::operator*() + System::Int32 SystemInt32Array1Iterator::operator*() { return array[index]; } @@ -14594,12 +16853,12 @@ namespace Plugin namespace System { - Plugin::SystemInt32Array1Iterator begin(System::Array1& array) + Plugin::SystemInt32Array1Iterator begin(System::Array1& array) { return Plugin::SystemInt32Array1Iterator(array, 0); } - Plugin::SystemInt32Array1Iterator end(System::Array1& array) + Plugin::SystemInt32Array1Iterator end(System::Array1& array) { return Plugin::SystemInt32Array1Iterator(array, array.GetLength() - 1); } @@ -14607,13 +16866,13 @@ namespace System namespace Plugin { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; } - void ArrayElementProxy1_1::operator=(float item) + void ArrayElementProxy1_1::operator=(System::Single item) { Plugin::SystemSingleArray1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) @@ -14625,7 +16884,7 @@ namespace Plugin } } - ArrayElementProxy1_1::operator float() + ArrayElementProxy1_1::operator System::Single() { auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) @@ -14641,28 +16900,28 @@ namespace Plugin namespace Plugin { - ArrayElementProxy1_2::ArrayElementProxy1_2(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_2::ArrayElementProxy1_2(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; } - Plugin::ArrayElementProxy2_2 Plugin::ArrayElementProxy1_2::operator[](int32_t index) + Plugin::ArrayElementProxy2_2 Plugin::ArrayElementProxy1_2::operator[](int32_t index) { - return Plugin::ArrayElementProxy2_2(Plugin::InternalUse::Only, Handle, Index0, index); + return Plugin::ArrayElementProxy2_2(Plugin::InternalUse::Only, Handle, Index0, index); } } namespace Plugin { - ArrayElementProxy2_2::ArrayElementProxy2_2(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1) + ArrayElementProxy2_2::ArrayElementProxy2_2(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1) { Handle = handle; Index0 = index0; Index1 = index1; } - void ArrayElementProxy2_2::operator=(float item) + void ArrayElementProxy2_2::operator=(System::Single item) { Plugin::SystemSingleArray2SetItem2(Handle, Index0, Index1, item); if (Plugin::unhandledCsharpException) @@ -14674,7 +16933,7 @@ namespace Plugin } } - ArrayElementProxy2_2::operator float() + ArrayElementProxy2_2::operator System::Single() { auto returnValue = Plugin::SystemSingleArray2GetItem2(Handle, Index0, Index1); if (Plugin::unhandledCsharpException) @@ -14690,36 +16949,36 @@ namespace Plugin namespace Plugin { - ArrayElementProxy1_3::ArrayElementProxy1_3(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_3::ArrayElementProxy1_3(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; } - Plugin::ArrayElementProxy2_3 Plugin::ArrayElementProxy1_3::operator[](int32_t index) + Plugin::ArrayElementProxy2_3 Plugin::ArrayElementProxy1_3::operator[](int32_t index) { - return Plugin::ArrayElementProxy2_3(Plugin::InternalUse::Only, Handle, Index0, index); + return Plugin::ArrayElementProxy2_3(Plugin::InternalUse::Only, Handle, Index0, index); } } namespace Plugin { - ArrayElementProxy2_3::ArrayElementProxy2_3(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1) + ArrayElementProxy2_3::ArrayElementProxy2_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1) { Handle = handle; Index0 = index0; Index1 = index1; } - Plugin::ArrayElementProxy3_3 Plugin::ArrayElementProxy2_3::operator[](int32_t index) + Plugin::ArrayElementProxy3_3 Plugin::ArrayElementProxy2_3::operator[](int32_t index) { - return Plugin::ArrayElementProxy3_3(Plugin::InternalUse::Only, Handle, Index0, Index1, index); + return Plugin::ArrayElementProxy3_3(Plugin::InternalUse::Only, Handle, Index0, Index1, index); } } namespace Plugin { - ArrayElementProxy3_3::ArrayElementProxy3_3(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1, int32_t index2) + ArrayElementProxy3_3::ArrayElementProxy3_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1, int32_t index2) { Handle = handle; Index0 = index0; @@ -14727,7 +16986,7 @@ namespace Plugin Index2 = index2; } - void ArrayElementProxy3_3::operator=(float item) + void ArrayElementProxy3_3::operator=(System::Single item) { Plugin::SystemSingleArray3SetItem3(Handle, Index0, Index1, Index2, item); if (Plugin::unhandledCsharpException) @@ -14739,7 +16998,7 @@ namespace Plugin } } - ArrayElementProxy3_3::operator float() + ArrayElementProxy3_3::operator System::Single() { auto returnValue = Plugin::SystemSingleArray3GetItem3(Handle, Index0, Index1, Index2); if (Plugin::unhandledCsharpException) @@ -14755,28 +17014,28 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr)) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { Handle = handle; if (handle) @@ -14786,13 +17045,13 @@ namespace System this->InternalLength = 0; } - Array1::Array1(const Array1& other) + Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; } - Array1::Array1(Array1&& other) + Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; @@ -14800,7 +17059,7 @@ namespace System other.InternalLength = 0; } - Array1::~Array1() + Array1::~Array1() { if (Handle) { @@ -14809,7 +17068,7 @@ namespace System } } - Array1& Array1::operator=(const Array1& other) + Array1& Array1::operator=(const Array1& other) { if (this->Handle) { @@ -14824,7 +17083,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr)) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -14834,7 +17093,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -14847,25 +17106,25 @@ namespace System return *this; } - bool Array1::operator==(const Array1& other) const + bool Array1::operator==(const Array1& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Array1::operator!=(const Array1& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array1::Array1(System::Int32 length0) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + , System::Collections::Generic::IList(nullptr) { auto returnValue = Plugin::SystemSystemSingleArray1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -14883,7 +17142,7 @@ namespace System } } - int32_t Array1::GetLength() + System::Int32 Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -14894,20 +17153,20 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + System::Int32 Array1::GetRank() { return 1; } - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); } } namespace Plugin { - SystemSingleArray1Iterator::SystemSingleArray1Iterator(System::Array1& array, int32_t index) + SystemSingleArray1Iterator::SystemSingleArray1Iterator(System::Array1& array, int32_t index) : array(array) , index(index) { @@ -14924,7 +17183,7 @@ namespace Plugin return index != other.index; } - float SystemSingleArray1Iterator::operator*() + System::Single SystemSingleArray1Iterator::operator*() { return array[index]; } @@ -14932,12 +17191,12 @@ namespace Plugin namespace System { - Plugin::SystemSingleArray1Iterator begin(System::Array1& array) + Plugin::SystemSingleArray1Iterator begin(System::Array1& array) { return Plugin::SystemSingleArray1Iterator(array, 0); } - Plugin::SystemSingleArray1Iterator end(System::Array1& array) + Plugin::SystemSingleArray1Iterator end(System::Array1& array) { return Plugin::SystemSingleArray1Iterator(array, array.GetLength() - 1); } @@ -14945,7 +17204,7 @@ namespace System namespace System { - Array2::Array2(decltype(nullptr)) + Array2::Array2(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -14957,7 +17216,7 @@ namespace System this->InternalLengths[1] = 0; } - Array2::Array2(Plugin::InternalUse iu, int32_t handle) + Array2::Array2(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -14974,7 +17233,7 @@ namespace System this->InternalLengths[1] = 0; } - Array2::Array2(const Array2& other) + Array2::Array2(const Array2& other) : Array2(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; @@ -14982,7 +17241,7 @@ namespace System InternalLengths[1] = other.InternalLengths[1]; } - Array2::Array2(Array2&& other) + Array2::Array2(Array2&& other) : Array2(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; @@ -14994,7 +17253,7 @@ namespace System other.InternalLengths[1] = 0; } - Array2::~Array2() + Array2::~Array2() { if (Handle) { @@ -15003,7 +17262,7 @@ namespace System } } - Array2& Array2::operator=(const Array2& other) + Array2& Array2::operator=(const Array2& other) { if (this->Handle) { @@ -15020,7 +17279,7 @@ namespace System return *this; } - Array2& Array2::operator=(decltype(nullptr)) + Array2& Array2::operator=(decltype(nullptr)) { if (Handle) { @@ -15030,7 +17289,7 @@ namespace System return *this; } - Array2& Array2::operator=(Array2&& other) + Array2& Array2::operator=(Array2&& other) { if (Handle) { @@ -15047,17 +17306,17 @@ namespace System return *this; } - bool Array2::operator==(const Array2& other) const + bool Array2::operator==(const Array2& other) const { return Handle == other.Handle; } - bool Array2::operator!=(const Array2& other) const + bool Array2::operator!=(const Array2& other) const { return Handle != other.Handle; } - Array2::Array2(int32_t length0, int32_t length1) + Array2::Array2(System::Int32 length0, System::Int32 length1) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15082,7 +17341,7 @@ namespace System } } - int32_t Array2::GetLength() + System::Int32 Array2::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -15093,7 +17352,7 @@ namespace System return returnVal; } - int32_t Array2::GetLength(int32_t dimension) + System::Int32 Array2::GetLength(System::Int32 dimension) { assert(dimension >= 0 && dimension < 2); int32_t length = InternalLengths[dimension]; @@ -15113,20 +17372,20 @@ namespace System return returnValue; } - int32_t Array2::GetRank() + System::Int32 Array2::GetRank() { return 2; } - Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) + Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) { - return Plugin::ArrayElementProxy1_2(Plugin::InternalUse::Only, Handle, index); + return Plugin::ArrayElementProxy1_2(Plugin::InternalUse::Only, Handle, index); } } namespace System { - Array3::Array3(decltype(nullptr)) + Array3::Array3(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15139,7 +17398,7 @@ namespace System this->InternalLengths[2] = 0; } - Array3::Array3(Plugin::InternalUse iu, int32_t handle) + Array3::Array3(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15157,7 +17416,7 @@ namespace System this->InternalLengths[2] = 0; } - Array3::Array3(const Array3& other) + Array3::Array3(const Array3& other) : Array3(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; @@ -15166,7 +17425,7 @@ namespace System InternalLengths[2] = other.InternalLengths[2]; } - Array3::Array3(Array3&& other) + Array3::Array3(Array3&& other) : Array3(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; @@ -15180,7 +17439,7 @@ namespace System other.InternalLengths[2] = 0; } - Array3::~Array3() + Array3::~Array3() { if (Handle) { @@ -15189,7 +17448,7 @@ namespace System } } - Array3& Array3::operator=(const Array3& other) + Array3& Array3::operator=(const Array3& other) { if (this->Handle) { @@ -15207,7 +17466,7 @@ namespace System return *this; } - Array3& Array3::operator=(decltype(nullptr)) + Array3& Array3::operator=(decltype(nullptr)) { if (Handle) { @@ -15217,7 +17476,7 @@ namespace System return *this; } - Array3& Array3::operator=(Array3&& other) + Array3& Array3::operator=(Array3&& other) { if (Handle) { @@ -15236,17 +17495,17 @@ namespace System return *this; } - bool Array3::operator==(const Array3& other) const + bool Array3::operator==(const Array3& other) const { return Handle == other.Handle; } - bool Array3::operator!=(const Array3& other) const + bool Array3::operator!=(const Array3& other) const { return Handle != other.Handle; } - Array3::Array3(int32_t length0, int32_t length1, int32_t length2) + Array3::Array3(System::Int32 length0, System::Int32 length1, System::Int32 length2) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15272,7 +17531,7 @@ namespace System } } - int32_t Array3::GetLength() + System::Int32 Array3::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -15283,7 +17542,7 @@ namespace System return returnVal; } - int32_t Array3::GetLength(int32_t dimension) + System::Int32 Array3::GetLength(System::Int32 dimension) { assert(dimension >= 0 && dimension < 3); int32_t length = InternalLengths[dimension]; @@ -15303,20 +17562,20 @@ namespace System return returnValue; } - int32_t Array3::GetRank() + System::Int32 Array3::GetRank() { return 3; } - Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) + Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) { - return Plugin::ArrayElementProxy1_3(Plugin::InternalUse::Only, Handle, index); + return Plugin::ArrayElementProxy1_3(Plugin::InternalUse::Only, Handle, index); } } namespace Plugin { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; @@ -15363,7 +17622,7 @@ namespace System this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15452,7 +17711,7 @@ namespace System return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array1::Array1(System::Int32 length0) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15478,7 +17737,7 @@ namespace System } } - int32_t Array1::GetLength() + System::Int32 Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -15489,7 +17748,7 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + System::Int32 Array1::GetRank() { return 1; } @@ -15540,7 +17799,7 @@ namespace System namespace Plugin { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; @@ -15587,7 +17846,7 @@ namespace System this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15676,7 +17935,7 @@ namespace System return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array1::Array1(System::Int32 length0) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15702,7 +17961,7 @@ namespace System } } - int32_t Array1::GetLength() + System::Int32 Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -15713,7 +17972,7 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + System::Int32 Array1::GetRank() { return 1; } @@ -15764,7 +18023,7 @@ namespace System namespace Plugin { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; @@ -15811,7 +18070,7 @@ namespace System this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15900,7 +18159,7 @@ namespace System return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array1::Array1(System::Int32 length0) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -15926,7 +18185,7 @@ namespace System } } - int32_t Array1::GetLength() + System::Int32 Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -15937,7 +18196,7 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + System::Int32 Array1::GetRank() { return 1; } @@ -15988,7 +18247,7 @@ namespace System namespace Plugin { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; @@ -16035,7 +18294,7 @@ namespace System this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse, int32_t handle) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -16124,7 +18383,7 @@ namespace System return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array1::Array1(System::Int32 length0) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -16150,7 +18409,7 @@ namespace System } } - int32_t Array1::GetLength() + System::Int32 Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -16161,7 +18420,7 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + System::Int32 Array1::GetRank() { return 1; } @@ -16215,10 +18474,10 @@ namespace System Action::Action() { CppHandle = Plugin::StoreSystemAction(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemActionConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemActionConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -16272,7 +18531,7 @@ namespace System other.ClassHandle = 0; } - Action::Action(Plugin::InternalUse iu, int32_t handle) + Action::Action(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemAction(this); @@ -16447,13 +18706,13 @@ namespace System namespace System { - Action1::Action1() + Action1::Action1() { CppHandle = Plugin::StoreSystemActionSystemSingle(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemActionSystemSingleConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemActionSystemSingleConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -16480,13 +18739,13 @@ namespace System } } - Action1::Action1(decltype(nullptr)) + Action1::Action1(decltype(nullptr)) { CppHandle = Plugin::StoreSystemActionSystemSingle(this); ClassHandle = 0; } - Action1::Action1(const Action1& other) + Action1::Action1(const Action1& other) { Handle = other.Handle; CppHandle = Plugin::StoreSystemActionSystemSingle(this); @@ -16497,7 +18756,7 @@ namespace System ClassHandle = other.ClassHandle; } - Action1::Action1(Action1&& other) + Action1::Action1(Action1&& other) { Handle = other.Handle; CppHandle = other.CppHandle; @@ -16507,7 +18766,7 @@ namespace System other.ClassHandle = 0; } - Action1::Action1(Plugin::InternalUse iu, int32_t handle) + Action1::Action1(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemActionSystemSingle(this); @@ -16518,7 +18777,7 @@ namespace System ClassHandle = 0; } - Action1::~Action1() + Action1::~Action1() { Plugin::RemoveSystemActionSystemSingle(CppHandle); CppHandle = 0; @@ -16542,7 +18801,7 @@ namespace System } } - Action1& Action1::operator=(const Action1& other) + Action1& Action1::operator=(const Action1& other) { if (this->Handle) { @@ -16557,7 +18816,7 @@ namespace System return *this; } - Action1& Action1::operator=(decltype(nullptr)) + Action1& Action1::operator=(decltype(nullptr)) { if (Handle) { @@ -16582,7 +18841,7 @@ namespace System return *this; } - Action1& Action1::operator=(Action1&& other) + Action1& Action1::operator=(Action1&& other) { Plugin::RemoveSystemActionSystemSingle(CppHandle); CppHandle = 0; @@ -16611,17 +18870,17 @@ namespace System return *this; } - bool Action1::operator==(const Action1& other) const + bool Action1::operator==(const Action1& other) const { return Handle == other.Handle; } - bool Action1::operator!=(const Action1& other) const + bool Action1::operator!=(const Action1& other) const { return Handle != other.Handle; } - void Action1::operator+=(System::Action1& del) + void Action1::operator+=(System::Action1& del) { Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -16633,7 +18892,7 @@ namespace System } } - void Action1::operator-=(System::Action1& del) + void Action1::operator-=(System::Action1& del) { Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -16645,7 +18904,7 @@ namespace System } } - void Action1::operator()(float obj) + void Action1::operator()(System::Single obj) { } @@ -16661,13 +18920,13 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Action1"; + System::String msg = "Unhandled exception invoking System::Action1"; System::Exception ex(msg); Plugin::SetException(ex.Handle); } } - void Action1::Invoke(float obj) + void Action1::Invoke(System::Single obj) { Plugin::SystemActionSystemSingleInvoke(Handle, obj); if (Plugin::unhandledCsharpException) @@ -16682,13 +18941,13 @@ namespace System namespace System { - Action2::Action2() + Action2::Action2() { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemActionSystemSingle_SystemSingleConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemActionSystemSingle_SystemSingleConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -16715,13 +18974,13 @@ namespace System } } - Action2::Action2(decltype(nullptr)) + Action2::Action2(decltype(nullptr)) { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); ClassHandle = 0; } - Action2::Action2(const Action2& other) + Action2::Action2(const Action2& other) { Handle = other.Handle; CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); @@ -16732,7 +18991,7 @@ namespace System ClassHandle = other.ClassHandle; } - Action2::Action2(Action2&& other) + Action2::Action2(Action2&& other) { Handle = other.Handle; CppHandle = other.CppHandle; @@ -16742,7 +19001,7 @@ namespace System other.ClassHandle = 0; } - Action2::Action2(Plugin::InternalUse iu, int32_t handle) + Action2::Action2(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); @@ -16753,7 +19012,7 @@ namespace System ClassHandle = 0; } - Action2::~Action2() + Action2::~Action2() { Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); CppHandle = 0; @@ -16777,7 +19036,7 @@ namespace System } } - Action2& Action2::operator=(const Action2& other) + Action2& Action2::operator=(const Action2& other) { if (this->Handle) { @@ -16792,7 +19051,7 @@ namespace System return *this; } - Action2& Action2::operator=(decltype(nullptr)) + Action2& Action2::operator=(decltype(nullptr)) { if (Handle) { @@ -16817,7 +19076,7 @@ namespace System return *this; } - Action2& Action2::operator=(Action2&& other) + Action2& Action2::operator=(Action2&& other) { Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); CppHandle = 0; @@ -16846,17 +19105,17 @@ namespace System return *this; } - bool Action2::operator==(const Action2& other) const + bool Action2::operator==(const Action2& other) const { return Handle == other.Handle; } - bool Action2::operator!=(const Action2& other) const + bool Action2::operator!=(const Action2& other) const { return Handle != other.Handle; } - void Action2::operator+=(System::Action2& del) + void Action2::operator+=(System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -16868,7 +19127,7 @@ namespace System } } - void Action2::operator-=(System::Action2& del) + void Action2::operator-=(System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -16880,7 +19139,7 @@ namespace System } } - void Action2::operator()(float arg1, float arg2) + void Action2::operator()(System::Single arg1, System::Single arg2) { } @@ -16896,13 +19155,13 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Action2"; + System::String msg = "Unhandled exception invoking System::Action2"; System::Exception ex(msg); Plugin::SetException(ex.Handle); } } - void Action2::Invoke(float arg1, float arg2) + void Action2::Invoke(System::Single arg1, System::Single arg2) { Plugin::SystemActionSystemSingle_SystemSingleInvoke(Handle, arg1, arg2); if (Plugin::unhandledCsharpException) @@ -16917,13 +19176,13 @@ namespace System namespace System { - Func3::Func3() + Func3::Func3() { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -16950,13 +19209,13 @@ namespace System } } - Func3::Func3(decltype(nullptr)) + Func3::Func3(decltype(nullptr)) { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); ClassHandle = 0; } - Func3::Func3(const Func3& other) + Func3::Func3(const Func3& other) { Handle = other.Handle; CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); @@ -16967,7 +19226,7 @@ namespace System ClassHandle = other.ClassHandle; } - Func3::Func3(Func3&& other) + Func3::Func3(Func3&& other) { Handle = other.Handle; CppHandle = other.CppHandle; @@ -16977,7 +19236,7 @@ namespace System other.ClassHandle = 0; } - Func3::Func3(Plugin::InternalUse iu, int32_t handle) + Func3::Func3(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); @@ -16988,7 +19247,7 @@ namespace System ClassHandle = 0; } - Func3::~Func3() + Func3::~Func3() { Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); CppHandle = 0; @@ -17012,7 +19271,7 @@ namespace System } } - Func3& Func3::operator=(const Func3& other) + Func3& Func3::operator=(const Func3& other) { if (this->Handle) { @@ -17027,7 +19286,7 @@ namespace System return *this; } - Func3& Func3::operator=(decltype(nullptr)) + Func3& Func3::operator=(decltype(nullptr)) { if (Handle) { @@ -17052,7 +19311,7 @@ namespace System return *this; } - Func3& Func3::operator=(Func3&& other) + Func3& Func3::operator=(Func3&& other) { Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); CppHandle = 0; @@ -17081,17 +19340,17 @@ namespace System return *this; } - bool Func3::operator==(const Func3& other) const + bool Func3::operator==(const Func3& other) const { return Handle == other.Handle; } - bool Func3::operator!=(const Func3& other) const + bool Func3::operator!=(const Func3& other) const { return Handle != other.Handle; } - void Func3::operator+=(System::Func3& del) + void Func3::operator+=(System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -17103,7 +19362,7 @@ namespace System } } - void Func3::operator-=(System::Func3& del) + void Func3::operator-=(System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -17115,7 +19374,7 @@ namespace System } } - double Func3::operator()(int32_t arg1, float arg2) + System::Double Func3::operator()(System::Int32 arg1, System::Single arg2) { return {}; } @@ -17133,14 +19392,14 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Func3"; + System::String msg = "Unhandled exception invoking System::Func3"; System::Exception ex(msg); Plugin::SetException(ex.Handle); return {}; } } - double Func3::Invoke(int32_t arg1, float arg2) + System::Double Func3::Invoke(System::Int32 arg1, System::Single arg2) { auto returnValue = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(Handle, arg1, arg2); if (Plugin::unhandledCsharpException) @@ -17156,13 +19415,13 @@ namespace System namespace System { - Func3::Func3() + Func3::Func3() { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -17189,13 +19448,13 @@ namespace System } } - Func3::Func3(decltype(nullptr)) + Func3::Func3(decltype(nullptr)) { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); ClassHandle = 0; } - Func3::Func3(const Func3& other) + Func3::Func3(const Func3& other) { Handle = other.Handle; CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); @@ -17206,7 +19465,7 @@ namespace System ClassHandle = other.ClassHandle; } - Func3::Func3(Func3&& other) + Func3::Func3(Func3&& other) { Handle = other.Handle; CppHandle = other.CppHandle; @@ -17216,7 +19475,7 @@ namespace System other.ClassHandle = 0; } - Func3::Func3(Plugin::InternalUse iu, int32_t handle) + Func3::Func3(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); @@ -17227,7 +19486,7 @@ namespace System ClassHandle = 0; } - Func3::~Func3() + Func3::~Func3() { Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); CppHandle = 0; @@ -17251,7 +19510,7 @@ namespace System } } - Func3& Func3::operator=(const Func3& other) + Func3& Func3::operator=(const Func3& other) { if (this->Handle) { @@ -17266,7 +19525,7 @@ namespace System return *this; } - Func3& Func3::operator=(decltype(nullptr)) + Func3& Func3::operator=(decltype(nullptr)) { if (Handle) { @@ -17291,7 +19550,7 @@ namespace System return *this; } - Func3& Func3::operator=(Func3&& other) + Func3& Func3::operator=(Func3&& other) { Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); CppHandle = 0; @@ -17320,17 +19579,17 @@ namespace System return *this; } - bool Func3::operator==(const Func3& other) const + bool Func3::operator==(const Func3& other) const { return Handle == other.Handle; } - bool Func3::operator!=(const Func3& other) const + bool Func3::operator!=(const Func3& other) const { return Handle != other.Handle; } - void Func3::operator+=(System::Func3& del) + void Func3::operator+=(System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -17342,7 +19601,7 @@ namespace System } } - void Func3::operator-=(System::Func3& del) + void Func3::operator-=(System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -17354,7 +19613,7 @@ namespace System } } - System::String Func3::operator()(int16_t arg1, int32_t arg2) + System::String Func3::operator()(System::Int16 arg1, System::Int32 arg2) { return nullptr; } @@ -17372,14 +19631,14 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Func3"; + System::String msg = "Unhandled exception invoking System::Func3"; System::Exception ex(msg); Plugin::SetException(ex.Handle); return {}; } } - System::String Func3::Invoke(int16_t arg1, int32_t arg2) + System::String Func3::Invoke(System::Int16 arg1, System::Int32 arg2) { auto returnValue = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(Handle, arg1, arg2); if (Plugin::unhandledCsharpException) @@ -17398,10 +19657,10 @@ namespace System AppDomainInitializer::AppDomainInitializer() { CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemAppDomainInitializerConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemAppDomainInitializerConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -17455,7 +19714,7 @@ namespace System other.ClassHandle = 0; } - AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse iu, int32_t handle) + AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemAppDomainInitializer(this); @@ -17636,10 +19895,10 @@ namespace UnityEngine UnityAction::UnityAction() { CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::UnityEngineEventsUnityActionConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::UnityEngineEventsUnityActionConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -17693,7 +19952,7 @@ namespace UnityEngine other.ClassHandle = 0; } - UnityAction::UnityAction(Plugin::InternalUse iu, int32_t handle) + UnityAction::UnityAction(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); @@ -17874,10 +20133,10 @@ namespace UnityEngine UnityAction2::UnityAction2() { CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -17931,7 +20190,7 @@ namespace UnityEngine other.ClassHandle = 0; } - UnityAction2::UnityAction2(Plugin::InternalUse iu, int32_t handle) + UnityAction2::UnityAction2(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); @@ -18115,10 +20374,10 @@ namespace System ComponentEventHandler::ComponentEventHandler() { CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemComponentModelDesignComponentEventHandlerConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemComponentModelDesignComponentEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -18172,7 +20431,7 @@ namespace System other.ClassHandle = 0; } - ComponentEventHandler::ComponentEventHandler(Plugin::InternalUse iu, int32_t handle) + ComponentEventHandler::ComponentEventHandler(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); @@ -18358,10 +20617,10 @@ namespace System ComponentChangingEventHandler::ComponentChangingEventHandler() { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -18415,7 +20674,7 @@ namespace System other.ClassHandle = 0; } - ComponentChangingEventHandler::ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle) + ComponentChangingEventHandler::ComponentChangingEventHandler(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); @@ -18601,10 +20860,10 @@ namespace System ComponentChangedEventHandler::ComponentChangedEventHandler() { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -18658,7 +20917,7 @@ namespace System other.ClassHandle = 0; } - ComponentChangedEventHandler::ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle) + ComponentChangedEventHandler::ComponentChangedEventHandler(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); @@ -18844,10 +21103,10 @@ namespace System ComponentRenameEventHandler::ComponentRenameEventHandler() { CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); - int32_t* handle = &Handle; + System::Int32* handle = (System::Int32*)&Handle; int32_t cppHandle = CppHandle; - int32_t* classHandle = &ClassHandle; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor(cppHandle, handle, classHandle); + System::Int32* classHandle = (System::Int32*)&ClassHandle; + Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -18901,7 +21160,7 @@ namespace System other.ClassHandle = 0; } - ComponentRenameEventHandler::ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle) + ComponentRenameEventHandler::ComponentRenameEventHandler(Plugin::InternalUse, int32_t handle) { Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); @@ -19137,9 +21396,10 @@ DLLEXPORT void Init( int32_t (*enumerableGetEnumerator)(int32_t handle), /*BEGIN INIT PARAMS*/ int32_t maxManagedObjects, + System::Int32 (*systemIComparableMethodCompareToSystemObject)(int32_t thisHandle, int32_t objHandle), void (*systemIDisposableMethodDispose)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), - float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), + System::Single (*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), @@ -19158,11 +21418,12 @@ DLLEXPORT void Init( int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), UnityEngine::GradientColorKey (*unboxGradientColorKey)(int32_t valHandle), void (*releaseUnityEngineResolution)(int32_t handle), - int32_t (*unityEngineResolutionPropertyGetWidth)(int32_t thisHandle), + int32_t (*unityEngineResolutionConstructor)(), + System::Int32 (*unityEngineResolutionPropertyGetWidth)(int32_t thisHandle), void (*unityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value), - int32_t (*unityEngineResolutionPropertyGetHeight)(int32_t thisHandle), + System::Int32 (*unityEngineResolutionPropertyGetHeight)(int32_t thisHandle), void (*unityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value), - int32_t (*unityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle), + System::Int32 (*unityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle), void (*unityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value), int32_t (*boxResolution)(int32_t valHandle), int32_t (*unboxResolution)(int32_t valHandle), @@ -19174,27 +21435,15 @@ DLLEXPORT void Init( int32_t (*unboxRaycastHit)(int32_t valHandle), int32_t (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), int32_t (*systemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)(int32_t thisHandle), - float (*systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)(int32_t thisHandle), - UnityEngine::GradientColorKey (*systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)(int32_t thisHandle), void (*releaseUnityEnginePlayablesPlayableGraph)(int32_t handle), int32_t (*boxPlayableGraph)(int32_t valHandle), int32_t (*unboxPlayableGraph)(int32_t valHandle), void (*releaseUnityEngineAnimationsAnimationMixerPlayable)(int32_t handle), - int32_t (*unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)(int32_t graphHandle, int32_t inputCount, System::Boolean normalizeWeights), + int32_t (*unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)(int32_t graphHandle, int32_t inputCount, uint32_t normalizeWeights), int32_t (*boxAnimationMixerPlayable)(int32_t valHandle), int32_t (*unboxAnimationMixerPlayable)(int32_t valHandle), int32_t (*systemDiagnosticsStopwatchConstructor)(), - int64_t (*systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle), + System::Int64 (*systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle), void (*systemDiagnosticsStopwatchMethodStart)(int32_t thisHandle), void (*systemDiagnosticsStopwatchMethodReset)(int32_t thisHandle), int32_t (*unityEngineGameObjectConstructor)(), @@ -19205,7 +21454,7 @@ DLLEXPORT void Init( int32_t (*unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type), void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), int32_t (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), - void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value), + void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(uint32_t value), void (*unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle), void (*unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle), int32_t (*unityEngineMonoBehaviourPropertyGetTransform)(int32_t thisHandle), @@ -19214,7 +21463,7 @@ DLLEXPORT void Init( void (*unityEngineNetworkingNetworkTransportMethodInit)(), int32_t (*boxQuaternion)(UnityEngine::Quaternion& val), UnityEngine::Quaternion (*unboxQuaternion)(int32_t valHandle), - float (*unityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column), + System::Single (*unityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column), void (*unityEngineMatrix4x4PropertySetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column, float value), int32_t (*boxMatrix4x4)(UnityEngine::Matrix4x4& val), UnityEngine::Matrix4x4 (*unboxMatrix4x4)(int32_t valHandle), @@ -19223,19 +21472,9 @@ DLLEXPORT void Init( 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), + System::Double (*systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)(int32_t thisHandle), int32_t (*boxKeyValuePairSystemString_SystemDouble)(int32_t valHandle), int32_t (*unboxKeyValuePairSystemString_SystemDouble)(int32_t valHandle), - 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), - void (*systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle), - int32_t (*systemCollectionsGenericListSystemInt32Constructor)(), - int32_t (*systemCollectionsGenericListSystemInt32PropertyGetItem)(int32_t thisHandle, int32_t index), - void (*systemCollectionsGenericListSystemInt32PropertySetItem)(int32_t thisHandle, int32_t index, int32_t value), - void (*systemCollectionsGenericListSystemInt32MethodAddSystemInt32)(int32_t thisHandle, int32_t item), - void (*systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle), int32_t (*systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString)(int32_t valueHandle), int32_t (*systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue)(int32_t thisHandle), void (*systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue)(int32_t thisHandle, int32_t valueHandle), @@ -19248,7 +21487,7 @@ DLLEXPORT void Init( int32_t (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), int32_t (*boxRay)(int32_t valHandle), int32_t (*unboxRay)(int32_t valHandle), - int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle), + System::Int32 (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle), int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle), int32_t (*unityEngineGradientConstructor)(), int32_t (*unityEngineGradientPropertyGetColorKeys)(int32_t thisHandle), @@ -19267,7 +21506,7 @@ DLLEXPORT void Init( UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), int32_t (*boxPrimitiveType)(UnityEngine::PrimitiveType val), UnityEngine::PrimitiveType (*unboxPrimitiveType)(int32_t valHandle), - float (*unityEngineTimePropertyGetDeltaTime)(), + System::Single (*unityEngineTimePropertyGetDeltaTime)(), int32_t (*boxFileMode)(System::IO::FileMode val), System::IO::FileMode (*unboxFileMode)(int32_t valHandle), void (*releaseSystemCollectionsGenericBaseIComparerSystemInt32)(int32_t handle), @@ -19276,7 +21515,7 @@ DLLEXPORT void Init( void (*systemCollectionsGenericBaseIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemBaseStringComparer)(int32_t handle), void (*systemBaseStringComparerConstructor)(int32_t cppHandle, int32_t* handle), - int32_t (*systemCollectionsQueuePropertyGetCount)(int32_t thisHandle), + System::Int32 (*systemCollectionsQueuePropertyGetCount)(int32_t thisHandle), void (*releaseSystemCollectionsBaseQueue)(int32_t handle), void (*systemCollectionsBaseQueueConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemComponentModelDesignBaseIComponentChangeService)(int32_t handle), @@ -19288,6 +21527,8 @@ DLLEXPORT void Init( void (*releaseUnityEnginePlayablesPlayableHandle)(int32_t handle), int32_t (*boxPlayableHandle)(int32_t valHandle), int32_t (*unboxPlayableHandle)(int32_t valHandle), + int32_t (*systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator)(int32_t thisHandle), int32_t (*unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)(int32_t eHandle, int32_t nameHandle, int32_t classesHandle), int32_t (*unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)(int32_t eHandle, int32_t nameHandle, int32_t classNameHandle), int32_t (*boxInteractionSourcePositionAccuracy)(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val), @@ -19298,43 +21539,65 @@ DLLEXPORT void Init( int32_t (*unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)(int32_t thisHandle, UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node), int32_t (*boxInteractionSourcePose)(int32_t valHandle), int32_t (*unboxInteractionSourcePose)(int32_t valHandle), - int32_t (*boxBoolean)(System::Boolean val), + int32_t (*systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)(int32_t thisHandle), + System::Int32 (*systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)(int32_t thisHandle), + System::Single (*systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)(int32_t thisHandle), + UnityEngine::GradientColorKey (*systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)(int32_t thisHandle), + int32_t (*systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)(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), + void (*systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle), + int32_t (*systemCollectionsGenericListSystemInt32Constructor)(), + System::Int32 (*systemCollectionsGenericListSystemInt32PropertyGetItem)(int32_t thisHandle, int32_t index), + void (*systemCollectionsGenericListSystemInt32PropertySetItem)(int32_t thisHandle, int32_t index, int32_t value), + void (*systemCollectionsGenericListSystemInt32MethodAddSystemInt32)(int32_t thisHandle, int32_t item), + void (*systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle), + int32_t (*boxBoolean)(uint32_t val), int32_t (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), - int8_t (*unboxSByte)(int32_t valHandle), + System::SByte (*unboxSByte)(int32_t valHandle), int32_t (*boxByte)(uint8_t val), - uint8_t (*unboxByte)(int32_t valHandle), + System::Byte (*unboxByte)(int32_t valHandle), int32_t (*boxInt16)(int16_t val), - int16_t (*unboxInt16)(int32_t valHandle), + System::Int16 (*unboxInt16)(int32_t valHandle), int32_t (*boxUInt16)(uint16_t val), - uint16_t (*unboxUInt16)(int32_t valHandle), + System::UInt16 (*unboxUInt16)(int32_t valHandle), int32_t (*boxInt32)(int32_t val), - int32_t (*unboxInt32)(int32_t valHandle), + System::Int32 (*unboxInt32)(int32_t valHandle), int32_t (*boxUInt32)(uint32_t val), - uint32_t (*unboxUInt32)(int32_t valHandle), + System::UInt32 (*unboxUInt32)(int32_t valHandle), int32_t (*boxInt64)(int64_t val), - int64_t (*unboxInt64)(int32_t valHandle), + System::Int64 (*unboxInt64)(int32_t valHandle), int32_t (*boxUInt64)(uint64_t val), - uint64_t (*unboxUInt64)(int32_t valHandle), - int32_t (*boxChar)(System::Char val), + System::UInt64 (*unboxUInt64)(int32_t valHandle), + int32_t (*boxChar)(uint16_t val), int16_t (*unboxChar)(int32_t valHandle), int32_t (*boxSingle)(float val), - float (*unboxSingle)(int32_t valHandle), + System::Single (*unboxSingle)(int32_t valHandle), int32_t (*boxDouble)(double val), - double (*unboxDouble)(int32_t valHandle), + System::Double (*unboxDouble)(int32_t valHandle), int32_t (*systemSystemInt32Array1Constructor1)(int32_t length0), - int32_t (*systemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0), + System::Int32 (*systemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*systemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item), int32_t (*systemSystemSingleArray1Constructor1)(int32_t length0), - float (*systemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0), + System::Single (*systemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*systemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item), int32_t (*systemSystemSingleArray2Constructor2)(int32_t length0, int32_t length1), int32_t (*systemSystemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension), - float (*systemSingleArray2GetItem2)(int32_t thisHandle, int32_t index0, int32_t index1), + System::Single (*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 (*systemSystemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2), int32_t (*systemSystemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension), - float (*systemSingleArray3GetItem3)(int32_t thisHandle, int32_t index0, int32_t index1, int32_t index2), + System::Single (*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 (*systemSystemStringArray1Constructor1)(int32_t length0), int32_t (*systemStringArray1GetItem1)(int32_t thisHandle, int32_t index0), @@ -19367,7 +21630,7 @@ DLLEXPORT void Init( void (*systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), void (*systemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle), void (*systemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle), - double (*systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2), + System::Double (*systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2), void (*releaseSystemFuncSystemInt16_SystemInt32_SystemString)(int32_t handle, int32_t classHandle), void (*systemFuncSystemInt16_SystemInt32_SystemStringConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), void (*systemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle), @@ -19424,6 +21687,7 @@ DLLEXPORT void Init( Plugin::ArrayGetLength = arrayGetLength; Plugin::EnumerableGetEnumerator = enumerableGetEnumerator; /*BEGIN INIT BODY*/ + Plugin::SystemIComparableMethodCompareToSystemObject = systemIComparableMethodCompareToSystemObject; Plugin::SystemIDisposableMethodDispose = systemIDisposableMethodDispose; Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle = unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle; Plugin::UnityEngineVector3PropertyGetMagnitude = unityEngineVector3PropertyGetMagnitude; @@ -19448,6 +21712,7 @@ DLLEXPORT void Init( Plugin::RefCountsUnityEngineResolution = (int32_t*)curMemory; curMemory += 1000 * sizeof(int32_t); Plugin::RefCountsLenUnityEngineResolution = 1000; + Plugin::UnityEngineResolutionConstructor = unityEngineResolutionConstructor; Plugin::UnityEngineResolutionPropertyGetWidth = unityEngineResolutionPropertyGetWidth; Plugin::UnityEngineResolutionPropertySetWidth = unityEngineResolutionPropertySetWidth; Plugin::UnityEngineResolutionPropertyGetHeight = unityEngineResolutionPropertyGetHeight; @@ -19467,18 +21732,6 @@ DLLEXPORT void Init( Plugin::UnboxRaycastHit = unboxRaycastHit; Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = systemCollectionsIEnumeratorPropertyGetCurrent; Plugin::SystemCollectionsIEnumeratorMethodMoveNext = systemCollectionsIEnumeratorMethodMoveNext; - Plugin::SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator = systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator = systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator = systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator; Plugin::ReleaseUnityEnginePlayablesPlayableGraph = releaseUnityEnginePlayablesPlayableGraph; Plugin::RefCountsUnityEnginePlayablesPlayableGraph = (int32_t*)curMemory; curMemory += 1000 * sizeof(int32_t); @@ -19528,16 +21781,6 @@ DLLEXPORT void Init( Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue = systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue; Plugin::BoxKeyValuePairSystemString_SystemDouble = boxKeyValuePairSystemString_SystemDouble; Plugin::UnboxKeyValuePairSystemString_SystemDouble = unboxKeyValuePairSystemString_SystemDouble; - Plugin::SystemCollectionsGenericListSystemStringConstructor = systemCollectionsGenericListSystemStringConstructor; - Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem = systemCollectionsGenericListSystemStringPropertyGetItem; - Plugin::SystemCollectionsGenericListSystemStringPropertySetItem = systemCollectionsGenericListSystemStringPropertySetItem; - Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString = systemCollectionsGenericListSystemStringMethodAddSystemString; - Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer = systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer; - Plugin::SystemCollectionsGenericListSystemInt32Constructor = systemCollectionsGenericListSystemInt32Constructor; - Plugin::SystemCollectionsGenericListSystemInt32PropertyGetItem = systemCollectionsGenericListSystemInt32PropertyGetItem; - Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem = systemCollectionsGenericListSystemInt32PropertySetItem; - Plugin::SystemCollectionsGenericListSystemInt32MethodAddSystemInt32 = systemCollectionsGenericListSystemInt32MethodAddSystemInt32; - Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer = systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer; Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString = systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString; Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue = systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue; Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue = systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue; @@ -19579,8 +21822,8 @@ DLLEXPORT void Init( Plugin::BoxFileMode = boxFileMode; Plugin::UnboxFileMode = unboxFileMode; Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize = 1000; - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList = (System::Collections::Generic::BaseIComparer**)curMemory; - curMemory += 1000 * sizeof(System::Collections::Generic::BaseIComparer*); + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList = (System::Collections::Generic::BaseIComparer**)curMemory; + curMemory += 1000 * sizeof(System::Collections::Generic::BaseIComparer*); Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32 = releaseSystemCollectionsGenericBaseIComparerSystemInt32; Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor = systemCollectionsGenericBaseIComparerSystemInt32Constructor; @@ -19623,6 +21866,8 @@ DLLEXPORT void Init( Plugin::RefCountsLenUnityEnginePlayablesPlayableHandle = 1000; Plugin::BoxPlayableHandle = boxPlayableHandle; Plugin::UnboxPlayableHandle = unboxPlayableHandle; + Plugin::SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator; Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1 = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1; Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString; Plugin::BoxInteractionSourcePositionAccuracy = boxInteractionSourcePositionAccuracy; @@ -19636,6 +21881,28 @@ DLLEXPORT void Init( Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode = unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode; Plugin::BoxInteractionSourcePose = boxInteractionSourcePose; Plugin::UnboxInteractionSourcePose = unboxInteractionSourcePose; + Plugin::SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent; + Plugin::SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator = systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator; + Plugin::SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator = systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator; + Plugin::SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator = systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator; + Plugin::SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator; + Plugin::SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator; + Plugin::SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator; + Plugin::SystemCollectionsGenericListSystemStringConstructor = systemCollectionsGenericListSystemStringConstructor; + Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem = systemCollectionsGenericListSystemStringPropertyGetItem; + Plugin::SystemCollectionsGenericListSystemStringPropertySetItem = systemCollectionsGenericListSystemStringPropertySetItem; + Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString = systemCollectionsGenericListSystemStringMethodAddSystemString; + Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer = systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer; + Plugin::SystemCollectionsGenericListSystemInt32Constructor = systemCollectionsGenericListSystemInt32Constructor; + Plugin::SystemCollectionsGenericListSystemInt32PropertyGetItem = systemCollectionsGenericListSystemInt32PropertyGetItem; + Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem = systemCollectionsGenericListSystemInt32PropertySetItem; + Plugin::SystemCollectionsGenericListSystemInt32MethodAddSystemInt32 = systemCollectionsGenericListSystemInt32MethodAddSystemInt32; + Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer = systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; @@ -19696,8 +21963,8 @@ DLLEXPORT void Init( Plugin::SystemActionRemove = systemActionRemove; Plugin::SystemActionInvoke = systemActionInvoke; Plugin::SystemActionSystemSingleFreeListSize = 1000; - Plugin::SystemActionSystemSingleFreeList = (System::Action1**)curMemory; - curMemory += 1000 * sizeof(System::Action1*); + Plugin::SystemActionSystemSingleFreeList = (System::Action1**)curMemory; + curMemory += 1000 * sizeof(System::Action1*); Plugin::ReleaseSystemActionSystemSingle = releaseSystemActionSystemSingle; Plugin::SystemActionSystemSingleConstructor = systemActionSystemSingleConstructor; @@ -19705,8 +21972,8 @@ DLLEXPORT void Init( Plugin::SystemActionSystemSingleRemove = systemActionSystemSingleRemove; Plugin::SystemActionSystemSingleInvoke = systemActionSystemSingleInvoke; Plugin::SystemActionSystemSingle_SystemSingleFreeListSize = 100; - Plugin::SystemActionSystemSingle_SystemSingleFreeList = (System::Action2**)curMemory; - curMemory += 100 * sizeof(System::Action2*); + Plugin::SystemActionSystemSingle_SystemSingleFreeList = (System::Action2**)curMemory; + curMemory += 100 * sizeof(System::Action2*); Plugin::ReleaseSystemActionSystemSingle_SystemSingle = releaseSystemActionSystemSingle_SystemSingle; Plugin::SystemActionSystemSingle_SystemSingleConstructor = systemActionSystemSingle_SystemSingleConstructor; @@ -19714,8 +21981,8 @@ DLLEXPORT void Init( Plugin::SystemActionSystemSingle_SystemSingleRemove = systemActionSystemSingle_SystemSingleRemove; Plugin::SystemActionSystemSingle_SystemSingleInvoke = systemActionSystemSingle_SystemSingleInvoke; Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize = 50; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList = (System::Func3**)curMemory; - curMemory += 50 * sizeof(System::Func3*); + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList = (System::Func3**)curMemory; + curMemory += 50 * sizeof(System::Func3*); Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble = releaseSystemFuncSystemInt32_SystemSingle_SystemDouble; Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor = systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor; @@ -19723,8 +21990,8 @@ DLLEXPORT void Init( Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove = systemFuncSystemInt32_SystemSingle_SystemDoubleRemove; Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke = systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke; Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize = 25; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList = (System::Func3**)curMemory; - curMemory += 25 * sizeof(System::Func3*); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList = (System::Func3**)curMemory; + curMemory += 25 * sizeof(System::Func3*); Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString = releaseSystemFuncSystemInt16_SystemInt32_SystemString; Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor = systemFuncSystemInt16_SystemInt32_SystemStringConstructor; @@ -19797,7 +22064,7 @@ DLLEXPORT void Init( /*END INIT BODY*/ // Make sure there was enough memory - int32_t usedMemory = curMemory - (uint8_t*)memory; + int32_t usedMemory = (int32_t)(curMemory - (uint8_t*)memory); if (usedMemory > memorySize) { System::String msg = "Plugin memory size is too low"; @@ -19813,7 +22080,7 @@ DLLEXPORT void Init( /*BEGIN INIT BODY FIRST BOOT*/ for (int32_t i = 0, end = Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1; i < end; ++i) { - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList[i] = (System::Collections::Generic::BaseIComparer*)(Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList + i + 1); + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList[i] = (System::Collections::Generic::BaseIComparer*)(Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList + i + 1); } Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList[Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1] = nullptr; Plugin::NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList + 1; @@ -19862,28 +22129,28 @@ DLLEXPORT void Init( for (int32_t i = 0, end = Plugin::SystemActionSystemSingleFreeListSize - 1; i < end; ++i) { - Plugin::SystemActionSystemSingleFreeList[i] = (System::Action1*)(Plugin::SystemActionSystemSingleFreeList + i + 1); + Plugin::SystemActionSystemSingleFreeList[i] = (System::Action1*)(Plugin::SystemActionSystemSingleFreeList + i + 1); } Plugin::SystemActionSystemSingleFreeList[Plugin::SystemActionSystemSingleFreeListSize - 1] = nullptr; Plugin::NextFreeSystemActionSystemSingle = Plugin::SystemActionSystemSingleFreeList + 1; for (int32_t i = 0, end = Plugin::SystemActionSystemSingle_SystemSingleFreeListSize - 1; i < end; ++i) { - Plugin::SystemActionSystemSingle_SystemSingleFreeList[i] = (System::Action2*)(Plugin::SystemActionSystemSingle_SystemSingleFreeList + i + 1); + Plugin::SystemActionSystemSingle_SystemSingleFreeList[i] = (System::Action2*)(Plugin::SystemActionSystemSingle_SystemSingleFreeList + i + 1); } Plugin::SystemActionSystemSingle_SystemSingleFreeList[Plugin::SystemActionSystemSingle_SystemSingleFreeListSize - 1] = nullptr; Plugin::NextFreeSystemActionSystemSingle_SystemSingle = Plugin::SystemActionSystemSingle_SystemSingleFreeList + 1; for (int32_t i = 0, end = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1; i < end; ++i) { - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[i] = (System::Func3*)(Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + i + 1); + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[i] = (System::Func3*)(Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + i + 1); } Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1] = nullptr; Plugin::NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + 1; for (int32_t i = 0, end = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1; i < end; ++i) { - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[i] = (System::Func3*)(Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + i + 1); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[i] = (System::Func3*)(Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + i + 1); } Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1] = nullptr; Plugin::NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + 1; @@ -19943,7 +22210,7 @@ DLLEXPORT void Init( { PluginMain( curMemory, - memorySize - usedMemory, + (int32_t)(memorySize - usedMemory), initMode == InitMode::FirstBoot); } catch (System::Exception ex) @@ -19987,7 +22254,7 @@ DLLEXPORT void MyGameMonoBehavioursTestScriptAwake(int32_t thisHandle) } -DLLEXPORT void MyGameMonoBehavioursTestScriptOnAnimatorIK(int32_t thisHandle, int32_t param0) +DLLEXPORT void MyGameMonoBehavioursTestScriptOnAnimatorIK(int32_t thisHandle, System::Int32 param0) { MyGame::MonoBehaviours::TestScript thiz(Plugin::InternalUse::Only, thisHandle); try diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index d2fdae9..4ce8ff7 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -14,16 +14,31 @@ #include //////////////////////////////////////////////////////////////// -// Plugin internals +// Plugin internals. Do not name these in game code as they may +// change without warning. For example: +// // Good. Uses behavior, not names. +// int x = myArray[5]; +// // Bad. Directly uses names. +// ArrayElementProxy1_1 proxy = myArray[5]; +// int x = proxy; //////////////////////////////////////////////////////////////// namespace Plugin { - enum class InternalUse + enum struct InternalUse { Only }; + struct ManagedType + { + int32_t Handle; + + ManagedType(); + ManagedType(decltype(nullptr)); + ManagedType(InternalUse, int32_t handle); + }; + template struct ArrayElementProxy1_1; template struct ArrayElementProxy1_2; @@ -46,179 +61,227 @@ namespace Plugin } //////////////////////////////////////////////////////////////// -// C# struct types +// C# basic types //////////////////////////////////////////////////////////////// namespace System { + struct Object; + struct ValueType; + struct Enum; + struct String; + struct Array; + template struct Array1; + template struct Array2; + template struct Array3; + template struct Array4; + template struct Array5; + struct IComparable; + struct IFormattable; + struct IConvertible; + // .NET booleans are four bytes long - // This struct makes them feel like C++'s bool type + // This struct makes them feel like C++'s bool, int32_t, and uint32_t types struct Boolean { int32_t Value; - Boolean() - : Value(0) - { - } - - Boolean(const Boolean& other) - : Value(other.Value) - { - } - - Boolean(const Boolean&& other) - : Value(other.Value) - { - } - - Boolean(bool value) - : Value((int32_t)value) - { - } - - Boolean(int32_t value) - : Value(value) - { - } - - operator bool() const - { - return (bool)Value; - } - - operator int32_t() const - { - return Value; - } - - bool operator==(const Boolean other) const - { - return Value == other.Value; - } - - bool operator!=(const Boolean other) const - { - return Value != other.Value; - } - - bool operator==(const bool other) const - { - return Value == other; - } - - bool operator!=(const bool other) const - { - return Value != other; - } + Boolean(); + Boolean(bool value); + Boolean(int32_t value); + Boolean(uint32_t value); + operator bool() const; + operator int32_t() const; + operator uint32_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; }; // .NET chars are two bytes long - // This struct helps them interoperate with C++'s char type + // This struct helps them interoperate with C++'s char and int16_t types struct Char { int16_t Value; - Char() - : Value(0) - { - } + Char(); + Char(char value); + Char(int16_t value); + operator int16_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct SByte + { + int8_t Value; - Char(const Char& other) - : Value(other.Value) - { - } + SByte(); + SByte(int8_t value); + operator int8_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct Byte + { + uint8_t Value; - Char(const Char&& other) - : Value(other.Value) - { - } + Byte(); + Byte(uint8_t value); + operator uint8_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct Int16 + { + int16_t Value; - Char(char value) - : Value(value) - { - } + Int16(); + Int16(int16_t value); + operator int16_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct UInt16 + { + uint16_t Value; - Char(int16_t value) - : Value(value) - { - } + UInt16(); + UInt16(uint16_t value); + operator uint16_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct Int32 + { + int32_t Value; - operator bool() const - { - return (bool)Value; - } + Int32(); + Int32(int32_t value); + operator int32_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct UInt32 + { + uint32_t Value; - operator int16_t() const - { - return Value; - } + UInt32(); + UInt32(uint32_t value); + operator uint32_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct Int64 + { + int64_t Value; - bool operator==(const Char other) const - { - return Value == other.Value; - } + Int64(); + Int64(int64_t value); + operator int64_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct UInt64 + { + uint64_t Value; - bool operator!=(const Char other) const - { - return Value != other.Value; - } + UInt64(); + UInt64(uint64_t value); + operator uint64_t() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct Single + { + float Value; - bool operator==(const char other) const - { - return Value == other; - } + Single(); + Single(float value); + operator float() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; + }; + + struct Double + { + double Value; - bool operator!=(const char other) const - { - return Value != other; - } + Double(); + Double(double value); + operator double() const; + explicit operator Object() const; + explicit operator ValueType() const; + explicit operator IComparable() const; + explicit operator IFormattable() const; + explicit operator IConvertible() const; }; } -//////////////////////////////////////////////////////////////// -// C# type declarations -//////////////////////////////////////////////////////////////// - +/*BEGIN TEMPLATE DECLARATIONS*/ namespace System { - struct Object; - struct ValueType; - struct String; - struct Array; - template struct Array1; - template struct Array2; - template struct Array3; - template struct Array4; - template struct Array5; + namespace Collections + { + namespace Generic + { + template struct IEqualityComparer; + } + } } -//////////////////////////////////////////////////////////////// -// C# type aliases -//////////////////////////////////////////////////////////////// - namespace System { - using SByte = int8_t; - using Byte = uint8_t; - using Int16 = int16_t; - using UInt16 = uint16_t; - using Int32 = int32_t; - using UInt32 = uint32_t; - using Int64 = int64_t; - using UInt64 = uint64_t; - using Single = float; - using Double = double; + template struct IEquatable; } -/*BEGIN TEMPLATE DECLARATIONS*/ namespace System { namespace Collections { namespace Generic { - template struct IEnumerator; + template struct KeyValuePair; } } } @@ -229,18 +292,18 @@ namespace System { namespace Generic { - template struct IEnumerable; + template struct LinkedListNode; } } } namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace CompilerServices { - template struct ICollection; + template struct StrongBox; } } } @@ -251,7 +314,7 @@ namespace System { namespace Generic { - template struct IList; + template struct IComparer; } } } @@ -262,14 +325,20 @@ namespace System { namespace Generic { - template struct IEqualityComparer; + template struct BaseIComparer; } } } namespace System { - template struct IEquatable; + namespace Collections + { + namespace Generic + { + template struct BaseIComparer; + } + } } namespace System @@ -278,7 +347,7 @@ namespace System { namespace Generic { - template struct KeyValuePair; + template struct IEnumerator; } } } @@ -289,7 +358,7 @@ namespace System { namespace Generic { - template struct List; + template struct IEnumerable; } } } @@ -300,18 +369,18 @@ namespace System { namespace Generic { - template struct LinkedListNode; + template struct IEnumerator; } } } namespace System { - namespace Runtime + namespace Collections { - namespace CompilerServices + namespace Generic { - template struct StrongBox; + template struct IEnumerable; } } } @@ -320,9 +389,9 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template struct Collection; + template struct ICollection; } } } @@ -331,9 +400,9 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template struct KeyedCollection; + template struct IList; } } } @@ -344,7 +413,7 @@ namespace System { namespace Generic { - template struct IComparer; + template struct List; } } } @@ -353,9 +422,9 @@ namespace System { namespace Collections { - namespace Generic + namespace ObjectModel { - template struct BaseIComparer; + template struct Collection; } } } @@ -364,9 +433,9 @@ namespace System { namespace Collections { - namespace Generic + namespace ObjectModel { - template struct BaseIComparer; + template struct KeyedCollection; } } } @@ -401,6 +470,21 @@ namespace UnityEngine /*END TEMPLATE DECLARATIONS*/ /*BEGIN TYPE DECLARATIONS*/ +namespace System +{ + struct IFormattable; +} + +namespace System +{ + struct IConvertible; +} + +namespace System +{ + struct IComparable; +} + namespace System { struct IDisposable; @@ -543,6 +627,28 @@ namespace UnityEngine } } +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct CallbackEventHandler; + } + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct Focusable; + } + } +} + namespace UnityEngine { namespace Experimental @@ -622,12 +728,7 @@ namespace UnityEngine namespace UnityEngine { - enum struct QueryTriggerInteraction : int32_t - { - UseGlobal = 0, - Ignore = 1, - Collide = 2 - }; + struct QueryTriggerInteraction; } namespace System @@ -695,11 +796,7 @@ namespace UnityEngine { namespace SceneManagement { - enum struct LoadSceneMode : int32_t - { - Single = 0, - Additive = 1 - }; + struct LoadSceneMode; } } @@ -762,15 +859,7 @@ namespace System namespace UnityEngine { - enum struct PrimitiveType : int32_t - { - Sphere = 0, - Capsule = 1, - Cylinder = 2, - Cube = 3, - Plane = 4, - Quad = 5 - }; + struct PrimitiveType; } namespace UnityEngine @@ -782,15 +871,7 @@ namespace System { namespace IO { - enum struct FileMode : int32_t - { - CreateNew = 1, - Create = 2, - Open = 3, - OpenOrCreate = 4, - Truncate = 5, - Append = 6 - }; + struct FileMode; } } @@ -885,7 +966,29 @@ namespace UnityEngine { namespace UIElements { - struct CallbackEventHandler; + struct ITransform; + } + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct IUIElementDataWatch; + } + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct IVisualElementScheduler; } } } @@ -922,12 +1025,7 @@ namespace UnityEngine { namespace Input { - enum struct InteractionSourcePositionAccuracy : int32_t - { - None = 0, - Approximate = 1, - High = 2 - }; + struct InteractionSourcePositionAccuracy; } } } @@ -941,11 +1039,7 @@ namespace UnityEngine { namespace Input { - enum struct InteractionSourceNode : int32_t - { - Grip = 0, - Pointer = 1 - }; + struct InteractionSourceNode; } } } @@ -1051,7 +1145,7 @@ namespace System { namespace Generic { - template<> struct IEnumerator; + template<> struct IEqualityComparer; } } } @@ -1062,20 +1156,14 @@ namespace System { namespace Generic { - template<> struct IEnumerator; + template<> struct IEqualityComparer; } } } namespace System { - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } + template<> struct IEquatable; } namespace System @@ -1084,7 +1172,7 @@ namespace System { namespace Generic { - template<> struct IEnumerator; + template<> struct KeyValuePair; } } } @@ -1095,7 +1183,18 @@ namespace System { namespace Generic { - template<> struct IEnumerator; + template<> struct LinkedListNode; + } + } +} + +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + template<> struct StrongBox; } } } @@ -1106,7 +1205,7 @@ namespace System { namespace Generic { - template<> struct IEnumerator; + template<> struct IComparer; } } } @@ -1117,7 +1216,7 @@ namespace System { namespace Generic { - template<> struct IEnumerable; + template<> struct IComparer; } } } @@ -1128,7 +1227,7 @@ namespace System { namespace Generic { - template<> struct IEnumerable; + template<> struct BaseIComparer; } } } @@ -1139,7 +1238,7 @@ namespace System { namespace Generic { - template<> struct IEnumerable; + template<> struct BaseIComparer; } } } @@ -1150,7 +1249,7 @@ namespace System { namespace Generic { - template<> struct IEnumerable; + template<> struct IEnumerator; } } } @@ -1161,7 +1260,7 @@ namespace System { namespace Generic { - template<> struct IEnumerable; + template<> struct IEnumerable; } } } @@ -1172,7 +1271,7 @@ namespace System { namespace Generic { - template<> struct IEnumerable; + template<> struct IEnumerator; } } } @@ -1183,7 +1282,7 @@ namespace System { namespace Generic { - template<> struct ICollection; + template<> struct IEnumerator; } } } @@ -1194,7 +1293,7 @@ namespace System { namespace Generic { - template<> struct ICollection; + template<> struct IEnumerator; } } } @@ -1205,7 +1304,7 @@ namespace System { namespace Generic { - template<> struct ICollection; + template<> struct IEnumerator; } } } @@ -1216,7 +1315,7 @@ namespace System { namespace Generic { - template<> struct ICollection; + template<> struct IEnumerator; } } } @@ -1227,7 +1326,7 @@ namespace System { namespace Generic { - template<> struct ICollection; + template<> struct IEnumerator; } } } @@ -1238,7 +1337,7 @@ namespace System { namespace Generic { - template<> struct ICollection; + template<> struct IEnumerable; } } } @@ -1249,7 +1348,7 @@ namespace System { namespace Generic { - template<> struct IList; + template<> struct IEnumerable; } } } @@ -1260,7 +1359,7 @@ namespace System { namespace Generic { - template<> struct IList; + template<> struct IEnumerable; } } } @@ -1271,7 +1370,7 @@ namespace System { namespace Generic { - template<> struct IList; + template<> struct IEnumerable; } } } @@ -1282,7 +1381,7 @@ namespace System { namespace Generic { - template<> struct IList; + template<> struct IEnumerable; } } } @@ -1293,7 +1392,7 @@ namespace System { namespace Generic { - template<> struct IList; + template<> struct IEnumerable; } } } @@ -1304,7 +1403,7 @@ namespace System { namespace Generic { - template<> struct IList; + template<> struct ICollection; } } } @@ -1315,7 +1414,7 @@ namespace System { namespace Generic { - template<> struct IEqualityComparer; + template<> struct ICollection; } } } @@ -1326,14 +1425,20 @@ namespace System { namespace Generic { - template<> struct IEqualityComparer; + template<> struct ICollection; } } } namespace System { - template<> struct IEquatable; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } namespace System @@ -1342,7 +1447,7 @@ namespace System { namespace Generic { - template<> struct KeyValuePair; + template<> struct ICollection; } } } @@ -1353,7 +1458,7 @@ namespace System { namespace Generic { - template<> struct List; + template<> struct ICollection; } } } @@ -1364,7 +1469,7 @@ namespace System { namespace Generic { - template<> struct List; + template<> struct IList; } } } @@ -1375,18 +1480,18 @@ namespace System { namespace Generic { - template<> struct LinkedListNode; + template<> struct IList; } } } namespace System { - namespace Runtime + namespace Collections { - namespace CompilerServices + namespace Generic { - template<> struct StrongBox; + template<> struct IList; } } } @@ -1395,9 +1500,9 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template<> struct Collection; + template<> struct IList; } } } @@ -1406,9 +1511,9 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template<> struct KeyedCollection; + template<> struct IList; } } } @@ -1419,7 +1524,7 @@ namespace System { namespace Generic { - template<> struct IComparer; + template<> struct IList; } } } @@ -1430,7 +1535,7 @@ namespace System { namespace Generic { - template<> struct IComparer; + template<> struct List; } } } @@ -1441,7 +1546,7 @@ namespace System { namespace Generic { - template<> struct BaseIComparer; + template<> struct List; } } } @@ -1450,66 +1555,77 @@ namespace System { namespace Collections { - namespace Generic + namespace ObjectModel { - template<> struct BaseIComparer; + template<> struct Collection; + } + } +} + +namespace System +{ + namespace Collections + { + namespace ObjectModel + { + template<> struct KeyedCollection; } } } namespace Plugin { - template<> struct ArrayElementProxy1_1; + template<> struct ArrayElementProxy1_1; } namespace System { - template<> struct Array1; + template<> struct Array1; } namespace Plugin { - template<> struct ArrayElementProxy1_1; + template<> struct ArrayElementProxy1_1; } namespace Plugin { - template<> struct ArrayElementProxy1_2; + template<> struct ArrayElementProxy1_2; } namespace Plugin { - template<> struct ArrayElementProxy2_2; + template<> struct ArrayElementProxy2_2; } namespace Plugin { - template<> struct ArrayElementProxy1_3; + template<> struct ArrayElementProxy1_3; } namespace Plugin { - template<> struct ArrayElementProxy2_3; + template<> struct ArrayElementProxy2_3; } namespace Plugin { - template<> struct ArrayElementProxy3_3; + template<> struct ArrayElementProxy3_3; } namespace System { - template<> struct Array1; + template<> struct Array1; } namespace System { - template<> struct Array2; + template<> struct Array2; } namespace System { - template<> struct Array3; + template<> struct Array3; } namespace Plugin @@ -1554,22 +1670,22 @@ namespace System namespace System { - template<> struct Action1; + template<> struct Action1; } namespace System { - template<> struct Action2; + template<> struct Action2; } namespace System { - template<> struct Func3; + template<> struct Func3; } namespace System { - template<> struct Func3; + template<> struct Func3; } namespace UnityEngine @@ -1587,9 +1703,8 @@ namespace UnityEngine namespace System { - struct Object + struct Object : Plugin::ManagedType { - int32_t Handle; Object(); Object(Plugin::InternalUse iu, int32_t handle); Object(decltype(nullptr)); @@ -1598,72 +1713,40 @@ namespace System bool operator!=(decltype(nullptr)) const; virtual void ThrowReferenceToThis(); - /*BEGIN BOXING METHOD DECLARATIONS*/ - Object(UnityEngine::Vector3& val); + /*BEGIN UNBOXING METHOD DECLARATIONS*/ explicit operator UnityEngine::Vector3(); - Object(UnityEngine::Color& val); explicit operator UnityEngine::Color(); - Object(UnityEngine::GradientColorKey& val); explicit operator UnityEngine::GradientColorKey(); - Object(UnityEngine::Resolution& val); explicit operator UnityEngine::Resolution(); - Object(UnityEngine::RaycastHit& val); explicit operator UnityEngine::RaycastHit(); - Object(UnityEngine::Playables::PlayableGraph& val); explicit operator UnityEngine::Playables::PlayableGraph(); - Object(UnityEngine::Animations::AnimationMixerPlayable& val); explicit operator UnityEngine::Animations::AnimationMixerPlayable(); - Object(UnityEngine::Quaternion& val); explicit operator UnityEngine::Quaternion(); - Object(UnityEngine::Matrix4x4& val); explicit operator UnityEngine::Matrix4x4(); - Object(UnityEngine::QueryTriggerInteraction val); explicit operator UnityEngine::QueryTriggerInteraction(); - Object(System::Collections::Generic::KeyValuePair& val); - explicit operator System::Collections::Generic::KeyValuePair(); - Object(UnityEngine::Ray& val); + explicit operator System::Collections::Generic::KeyValuePair(); explicit operator UnityEngine::Ray(); - Object(UnityEngine::SceneManagement::Scene& val); explicit operator UnityEngine::SceneManagement::Scene(); - Object(UnityEngine::SceneManagement::LoadSceneMode val); explicit operator UnityEngine::SceneManagement::LoadSceneMode(); - Object(UnityEngine::PrimitiveType val); explicit operator UnityEngine::PrimitiveType(); - Object(System::IO::FileMode val); explicit operator System::IO::FileMode(); - Object(UnityEngine::Playables::PlayableHandle& val); explicit operator UnityEngine::Playables::PlayableHandle(); - Object(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val); explicit operator UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy(); - Object(UnityEngine::XR::WSA::Input::InteractionSourceNode val); explicit operator UnityEngine::XR::WSA::Input::InteractionSourceNode(); - Object(UnityEngine::XR::WSA::Input::InteractionSourcePose& val); explicit operator UnityEngine::XR::WSA::Input::InteractionSourcePose(); - Object(System::Boolean val); explicit operator System::Boolean(); - Object(int8_t val); - explicit operator int8_t(); - Object(uint8_t val); - explicit operator uint8_t(); - Object(int16_t val); - explicit operator int16_t(); - Object(uint16_t val); - explicit operator uint16_t(); - Object(int32_t val); - explicit operator int32_t(); - Object(uint32_t val); - explicit operator uint32_t(); - Object(int64_t val); - explicit operator int64_t(); - Object(uint64_t val); - explicit operator uint64_t(); - Object(System::Char val); + explicit operator System::SByte(); + explicit operator System::Byte(); + explicit operator System::Int16(); + explicit operator System::UInt16(); + explicit operator System::Int32(); + explicit operator System::UInt32(); + explicit operator System::Int64(); + explicit operator System::UInt64(); explicit operator System::Char(); - Object(float val); - explicit operator float(); - Object(double val); - explicit operator double(); - /*END BOXING METHOD DECLARATIONS*/ + explicit operator System::Single(); + explicit operator System::Double(); + /*END UNBOXING METHOD DECLARATIONS*/ }; struct ValueType : virtual Object @@ -1672,6 +1755,12 @@ namespace System ValueType(decltype(nullptr)); }; + struct Enum : virtual ValueType + { + Enum(Plugin::InternalUse iu, int32_t handle); + Enum(decltype(nullptr)); + }; + struct String : virtual Object { String(Plugin::InternalUse iu, int32_t handle); @@ -1732,12 +1821,64 @@ namespace Plugin } /*BEGIN TYPE DEFINITIONS*/ +namespace System +{ + struct IFormattable : virtual System::Object + { + IFormattable(decltype(nullptr)); + IFormattable(Plugin::InternalUse, int32_t handle); + IFormattable(const IFormattable& other); + IFormattable(IFormattable&& other); + virtual ~IFormattable(); + IFormattable& operator=(const IFormattable& other); + IFormattable& operator=(decltype(nullptr)); + IFormattable& operator=(IFormattable&& other); + bool operator==(const IFormattable& other) const; + bool operator!=(const IFormattable& other) const; + }; +} + +namespace System +{ + struct IConvertible : virtual System::Object + { + IConvertible(decltype(nullptr)); + IConvertible(Plugin::InternalUse, int32_t handle); + IConvertible(const IConvertible& other); + IConvertible(IConvertible&& other); + virtual ~IConvertible(); + IConvertible& operator=(const IConvertible& other); + IConvertible& operator=(decltype(nullptr)); + IConvertible& operator=(IConvertible&& other); + bool operator==(const IConvertible& other) const; + bool operator!=(const IConvertible& other) const; + }; +} + +namespace System +{ + struct IComparable : virtual System::Object + { + IComparable(decltype(nullptr)); + IComparable(Plugin::InternalUse, int32_t handle); + IComparable(const IComparable& other); + IComparable(IComparable&& other); + virtual ~IComparable(); + IComparable& operator=(const IComparable& other); + IComparable& operator=(decltype(nullptr)); + IComparable& operator=(IComparable&& other); + bool operator==(const IComparable& other) const; + bool operator!=(const IComparable& other) const; + System::Int32 CompareTo(System::Object& obj); + }; +} + namespace System { struct IDisposable : virtual System::Object { IDisposable(decltype(nullptr)); - IDisposable(Plugin::InternalUse iu, int32_t handle); + IDisposable(Plugin::InternalUse, int32_t handle); IDisposable(const IDisposable& other); IDisposable(IDisposable&& other); virtual ~IDisposable(); @@ -1755,14 +1896,16 @@ namespace UnityEngine struct Vector3 { Vector3(); - Vector3(float x, float y, float z); - float GetMagnitude(); - float x; - float y; - float z; - void Set(float newX, float newY, float newZ); + Vector3(System::Single x, System::Single y, System::Single z); + System::Single GetMagnitude(); + System::Single x; + System::Single y; + System::Single z; + void Set(System::Single newX, System::Single newY, System::Single newZ); UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); UnityEngine::Vector3 operator-(); + explicit operator System::ValueType(); + explicit operator System::Object(); }; } @@ -1771,7 +1914,7 @@ namespace UnityEngine struct Object : virtual System::Object { Object(decltype(nullptr)); - Object(Plugin::InternalUse iu, int32_t handle); + Object(Plugin::InternalUse, int32_t handle); Object(const Object& other); Object(Object&& other); virtual ~Object(); @@ -1792,7 +1935,7 @@ namespace UnityEngine struct Component : virtual UnityEngine::Object { Component(decltype(nullptr)); - Component(Plugin::InternalUse iu, int32_t handle); + Component(Plugin::InternalUse, int32_t handle); Component(const Component& other); Component(Component&& other); virtual ~Component(); @@ -1810,7 +1953,7 @@ namespace UnityEngine struct Transform : virtual UnityEngine::Component, virtual System::Collections::IEnumerable { Transform(decltype(nullptr)); - Transform(Plugin::InternalUse iu, int32_t handle); + Transform(Plugin::InternalUse, int32_t handle); Transform(const Transform& other); Transform(Transform&& other); virtual ~Transform(); @@ -1830,10 +1973,12 @@ namespace UnityEngine struct Color { Color(); - float r; - float g; - float b; - float a; + System::Single r; + System::Single g; + System::Single b; + System::Single a; + explicit operator System::ValueType(); + explicit operator System::Object(); }; } @@ -1843,16 +1988,18 @@ namespace UnityEngine { GradientColorKey(); UnityEngine::Color color; - float time; + System::Single time; + explicit operator System::ValueType(); + explicit operator System::Object(); }; } namespace UnityEngine { - struct Resolution : virtual System::ValueType + struct Resolution : Plugin::ManagedType { Resolution(decltype(nullptr)); - Resolution(Plugin::InternalUse iu, int32_t handle); + Resolution(Plugin::InternalUse, int32_t handle); Resolution(const Resolution& other); Resolution(Resolution&& other); virtual ~Resolution(); @@ -1861,21 +2008,24 @@ namespace UnityEngine Resolution& operator=(Resolution&& other); bool operator==(const Resolution& other) const; bool operator!=(const Resolution& other) const; - int32_t GetWidth(); - void SetWidth(int32_t value); - int32_t GetHeight(); - void SetHeight(int32_t value); - int32_t GetRefreshRate(); - void SetRefreshRate(int32_t value); + Resolution(); + System::Int32 GetWidth(); + void SetWidth(System::Int32 value); + System::Int32 GetHeight(); + void SetHeight(System::Int32 value); + System::Int32 GetRefreshRate(); + void SetRefreshRate(System::Int32 value); + explicit operator System::ValueType(); + explicit operator System::Object(); }; } namespace UnityEngine { - struct RaycastHit : virtual System::ValueType + struct RaycastHit : Plugin::ManagedType { RaycastHit(decltype(nullptr)); - RaycastHit(Plugin::InternalUse iu, int32_t handle); + RaycastHit(Plugin::InternalUse, int32_t handle); RaycastHit(const RaycastHit& other); RaycastHit(RaycastHit&& other); virtual ~RaycastHit(); @@ -1887,6 +2037,8 @@ namespace UnityEngine UnityEngine::Vector3 GetPoint(); void SetPoint(UnityEngine::Vector3& value); UnityEngine::Transform GetTransform(); + explicit operator System::ValueType(); + explicit operator System::Object(); }; } @@ -1897,7 +2049,7 @@ namespace System struct IEnumerator : virtual System::Object { IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); + IEnumerator(Plugin::InternalUse, int32_t handle); IEnumerator(const IEnumerator& other); IEnumerator(IEnumerator&& other); virtual ~IEnumerator(); @@ -1914,23 +2066,22 @@ namespace System namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace Serialization { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator + struct ISerializable : virtual System::Object { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - System::String GetCurrent(); + ISerializable(decltype(nullptr)); + ISerializable(Plugin::InternalUse, int32_t handle); + ISerializable(const ISerializable& other); + ISerializable(ISerializable&& other); + virtual ~ISerializable(); + ISerializable& operator=(const ISerializable& other); + ISerializable& operator=(decltype(nullptr)); + ISerializable& operator=(ISerializable&& other); + bool operator==(const ISerializable& other) const; + bool operator!=(const ISerializable& other) const; }; } } @@ -1938,23 +2089,22 @@ namespace System namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace InteropServices { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator + struct _Exception : virtual System::Object { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - int32_t GetCurrent(); + _Exception(decltype(nullptr)); + _Exception(Plugin::InternalUse, int32_t handle); + _Exception(const _Exception& other); + _Exception(_Exception&& other); + virtual ~_Exception(); + _Exception& operator=(const _Exception& other); + _Exception& operator=(decltype(nullptr)); + _Exception& operator=(_Exception&& other); + bool operator==(const _Exception& other) const; + bool operator!=(const _Exception& other) const; }; } } @@ -1962,49 +2112,38 @@ namespace System namespace System { - namespace Collections + struct IAppDomainSetup : virtual System::Object { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - float GetCurrent(); - }; - } - } + IAppDomainSetup(decltype(nullptr)); + IAppDomainSetup(Plugin::InternalUse, int32_t handle); + IAppDomainSetup(const IAppDomainSetup& other); + IAppDomainSetup(IAppDomainSetup&& other); + virtual ~IAppDomainSetup(); + IAppDomainSetup& operator=(const IAppDomainSetup& other); + IAppDomainSetup& operator=(decltype(nullptr)); + IAppDomainSetup& operator=(IAppDomainSetup&& other); + bool operator==(const IAppDomainSetup& other) const; + bool operator!=(const IAppDomainSetup& other) const; + }; } namespace System { namespace Collections { - namespace Generic + struct IComparer : virtual System::Object { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::RaycastHit GetCurrent(); - }; - } + IComparer(decltype(nullptr)); + IComparer(Plugin::InternalUse, int32_t handle); + IComparer(const IComparer& other); + IComparer(IComparer&& other); + virtual ~IComparer(); + IComparer& operator=(const IComparer& other); + IComparer& operator=(decltype(nullptr)); + IComparer& operator=(IComparer&& other); + bool operator==(const IComparer& other) const; + bool operator!=(const IComparer& other) const; + }; } } @@ -2012,23 +2151,19 @@ namespace System { namespace Collections { - namespace Generic + struct IEqualityComparer : virtual System::Object { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::GradientColorKey GetCurrent(); - }; - } + IEqualityComparer(decltype(nullptr)); + IEqualityComparer(Plugin::InternalUse, int32_t handle); + IEqualityComparer(const IEqualityComparer& other); + IEqualityComparer(IEqualityComparer&& other); + virtual ~IEqualityComparer(); + IEqualityComparer& operator=(const IEqualityComparer& other); + IEqualityComparer& operator=(decltype(nullptr)); + IEqualityComparer& operator=(IEqualityComparer&& other); + bool operator==(const IEqualityComparer& other) const; + bool operator!=(const IEqualityComparer& other) const; + }; } } @@ -2038,19 +2173,18 @@ namespace System { namespace Generic { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator + template<> struct IEqualityComparer : virtual System::Object { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse iu, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::Resolution GetCurrent(); + IEqualityComparer(decltype(nullptr)); + IEqualityComparer(Plugin::InternalUse, int32_t handle); + IEqualityComparer(const IEqualityComparer& other); + IEqualityComparer(IEqualityComparer&& other); + virtual ~IEqualityComparer(); + IEqualityComparer& operator=(const IEqualityComparer& other); + IEqualityComparer& operator=(decltype(nullptr)); + IEqualityComparer& operator=(IEqualityComparer&& other); + bool operator==(const IEqualityComparer& other) const; + bool operator!=(const IEqualityComparer& other) const; }; } } @@ -2062,442 +2196,452 @@ namespace System { namespace Generic { - template<> struct IEnumerable : virtual System::Collections::IEnumerable + template<> struct IEqualityComparer : virtual System::Object { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); + IEqualityComparer(decltype(nullptr)); + IEqualityComparer(Plugin::InternalUse, int32_t handle); + IEqualityComparer(const IEqualityComparer& other); + IEqualityComparer(IEqualityComparer&& other); + virtual ~IEqualityComparer(); + IEqualityComparer& operator=(const IEqualityComparer& other); + IEqualityComparer& operator=(decltype(nullptr)); + IEqualityComparer& operator=(IEqualityComparer&& other); + bool operator==(const IEqualityComparer& other) const; + bool operator!=(const IEqualityComparer& other) const; }; } } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Playables { - namespace Generic + struct PlayableGraph : Plugin::ManagedType { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } + PlayableGraph(decltype(nullptr)); + PlayableGraph(Plugin::InternalUse, int32_t handle); + PlayableGraph(const PlayableGraph& other); + PlayableGraph(PlayableGraph&& other); + virtual ~PlayableGraph(); + PlayableGraph& operator=(const PlayableGraph& other); + PlayableGraph& operator=(decltype(nullptr)); + PlayableGraph& operator=(PlayableGraph&& other); + bool operator==(const PlayableGraph& other) const; + bool operator!=(const PlayableGraph& other) const; + explicit operator System::ValueType(); + explicit operator System::Object(); + }; } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Playables { - namespace Generic + struct IPlayable : virtual System::Object { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } + IPlayable(decltype(nullptr)); + IPlayable(Plugin::InternalUse, int32_t handle); + IPlayable(const IPlayable& other); + IPlayable(IPlayable&& other); + virtual ~IPlayable(); + IPlayable& operator=(const IPlayable& other); + IPlayable& operator=(decltype(nullptr)); + IPlayable& operator=(IPlayable&& other); + bool operator==(const IPlayable& other) const; + bool operator!=(const IPlayable& other) const; + }; } } namespace System { - namespace Collections + template<> struct IEquatable : virtual System::Object { - namespace Generic + IEquatable(decltype(nullptr)); + IEquatable(Plugin::InternalUse, int32_t handle); + IEquatable(const IEquatable& other); + IEquatable(IEquatable&& other); + virtual ~IEquatable(); + IEquatable& operator=(const IEquatable& other); + IEquatable& operator=(decltype(nullptr)); + IEquatable& operator=(IEquatable&& other); + bool operator==(const IEquatable& other) const; + bool operator!=(const IEquatable& other) const; + }; +} + +namespace UnityEngine +{ + namespace Animations + { + struct AnimationMixerPlayable : Plugin::ManagedType { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } + AnimationMixerPlayable(decltype(nullptr)); + AnimationMixerPlayable(Plugin::InternalUse, int32_t handle); + AnimationMixerPlayable(const AnimationMixerPlayable& other); + AnimationMixerPlayable(AnimationMixerPlayable&& other); + virtual ~AnimationMixerPlayable(); + AnimationMixerPlayable& operator=(const AnimationMixerPlayable& other); + AnimationMixerPlayable& operator=(decltype(nullptr)); + AnimationMixerPlayable& operator=(AnimationMixerPlayable&& other); + bool operator==(const AnimationMixerPlayable& other) const; + bool operator!=(const AnimationMixerPlayable& other) const; + static UnityEngine::Animations::AnimationMixerPlayable Create(UnityEngine::Playables::PlayableGraph& graph, System::Int32 inputCount = 0, System::Boolean normalizeWeights = false); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator UnityEngine::Playables::IPlayable(); + explicit operator System::IEquatable(); + }; } } namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace CompilerServices { - template<> struct IEnumerable : virtual System::Collections::IEnumerable + struct IStrongBox : virtual System::Object { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); + IStrongBox(decltype(nullptr)); + IStrongBox(Plugin::InternalUse, int32_t handle); + IStrongBox(const IStrongBox& other); + IStrongBox(IStrongBox&& other); + virtual ~IStrongBox(); + IStrongBox& operator=(const IStrongBox& other); + IStrongBox& operator=(decltype(nullptr)); + IStrongBox& operator=(IStrongBox&& other); + bool operator==(const IStrongBox& other) const; + bool operator!=(const IStrongBox& other) const; }; } } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + struct IEventHandler : virtual System::Object { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; + IEventHandler(decltype(nullptr)); + IEventHandler(Plugin::InternalUse, int32_t handle); + IEventHandler(const IEventHandler& other); + IEventHandler(IEventHandler&& other); + virtual ~IEventHandler(); + IEventHandler& operator=(const IEventHandler& other); + IEventHandler& operator=(decltype(nullptr)); + IEventHandler& operator=(IEventHandler&& other); + bool operator==(const IEventHandler& other) const; + bool operator!=(const IEventHandler& other) const; }; } } } -namespace Plugin -{ - struct SystemCollectionsGenericICollectionSystemStringIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionSystemStringIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionSystemStringIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionSystemStringIterator(); - SystemCollectionsGenericICollectionSystemStringIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionSystemStringIterator& other); - System::String operator*(); - }; -} - -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - Plugin::SystemCollectionsGenericICollectionSystemStringIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionSystemStringIterator end(System::Collections::Generic::ICollection& enumerable); + struct CallbackEventHandler : virtual UnityEngine::Experimental::UIElements::IEventHandler + { + CallbackEventHandler(decltype(nullptr)); + CallbackEventHandler(Plugin::InternalUse, int32_t handle); + CallbackEventHandler(const CallbackEventHandler& other); + CallbackEventHandler(CallbackEventHandler&& other); + virtual ~CallbackEventHandler(); + CallbackEventHandler& operator=(const CallbackEventHandler& other); + CallbackEventHandler& operator=(decltype(nullptr)); + CallbackEventHandler& operator=(CallbackEventHandler&& other); + bool operator==(const CallbackEventHandler& other) const; + bool operator!=(const CallbackEventHandler& other) const; + }; } } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + struct Focusable : virtual UnityEngine::Experimental::UIElements::CallbackEventHandler, virtual UnityEngine::Experimental::UIElements::IEventHandler { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; + Focusable(decltype(nullptr)); + Focusable(Plugin::InternalUse, int32_t handle); + Focusable(const Focusable& other); + Focusable(Focusable&& other); + virtual ~Focusable(); + Focusable& operator=(const Focusable& other); + Focusable& operator=(decltype(nullptr)); + Focusable& operator=(Focusable&& other); + bool operator==(const Focusable& other) const; + bool operator!=(const Focusable& other) const; }; } } } -namespace Plugin -{ - struct SystemCollectionsGenericICollectionSystemInt32Iterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsGenericICollectionSystemInt32Iterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionSystemInt32Iterator(); - SystemCollectionsGenericICollectionSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionSystemInt32Iterator& other); - int32_t operator*(); - }; -} - -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable); + struct IStyle : virtual System::Object + { + IStyle(decltype(nullptr)); + IStyle(Plugin::InternalUse, int32_t handle); + IStyle(const IStyle& other); + IStyle(IStyle&& other); + virtual ~IStyle(); + IStyle& operator=(const IStyle& other); + IStyle& operator=(decltype(nullptr)); + IStyle& operator=(IStyle&& other); + bool operator==(const IStyle& other) const; + bool operator!=(const IStyle& other) const; + }; } } } namespace System { - namespace Collections + namespace Diagnostics { - namespace Generic + struct Stopwatch : virtual System::Object { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } + Stopwatch(decltype(nullptr)); + Stopwatch(Plugin::InternalUse, int32_t handle); + Stopwatch(const Stopwatch& other); + Stopwatch(Stopwatch&& other); + virtual ~Stopwatch(); + Stopwatch& operator=(const Stopwatch& other); + Stopwatch& operator=(decltype(nullptr)); + Stopwatch& operator=(Stopwatch&& other); + bool operator==(const Stopwatch& other) const; + bool operator!=(const Stopwatch& other) const; + Stopwatch(); + System::Int64 GetElapsedMilliseconds(); + void Start(); + void Reset(); + }; } } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericICollectionSystemSingleIterator + struct GameObject : virtual UnityEngine::Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionSystemSingleIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionSystemSingleIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionSystemSingleIterator(); - SystemCollectionsGenericICollectionSystemSingleIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionSystemSingleIterator& other); - float operator*(); + GameObject(decltype(nullptr)); + GameObject(Plugin::InternalUse, int32_t handle); + GameObject(const GameObject& other); + GameObject(GameObject&& other); + virtual ~GameObject(); + GameObject& operator=(const GameObject& other); + GameObject& operator=(decltype(nullptr)); + GameObject& operator=(GameObject&& other); + bool operator==(const GameObject& other) const; + bool operator!=(const GameObject& other) const; + GameObject(); + GameObject(System::String& name); + UnityEngine::Transform GetTransform(); + template MT0 AddComponent(); + static UnityEngine::GameObject CreatePrimitive(UnityEngine::PrimitiveType type); }; } -namespace System +namespace UnityEngine { - namespace Collections + struct Debug : virtual System::Object { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator end(System::Collections::Generic::ICollection& enumerable); - } - } + Debug(decltype(nullptr)); + Debug(Plugin::InternalUse, int32_t handle); + Debug(const Debug& other); + Debug(Debug&& other); + virtual ~Debug(); + Debug& operator=(const Debug& other); + Debug& operator=(decltype(nullptr)); + Debug& operator=(Debug&& other); + bool operator==(const Debug& other) const; + bool operator!=(const Debug& other) const; + static void Log(System::Object& message); + }; } -namespace System +namespace UnityEngine { - namespace Collections + namespace Assertions { - namespace Generic + namespace Assert { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; + System::Boolean GetRaiseExceptions(); + void SetRaiseExceptions(System::Boolean value); + template void AreEqual(MT0& expected, MT0& actual); } } } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator + struct Collision : virtual System::Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(); - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& other); - UnityEngine::RaycastHit operator*(); + Collision(decltype(nullptr)); + Collision(Plugin::InternalUse, int32_t handle); + Collision(const Collision& other); + Collision(Collision&& other); + virtual ~Collision(); + Collision& operator=(const Collision& other); + Collision& operator=(decltype(nullptr)); + Collision& operator=(Collision&& other); + bool operator==(const Collision& other) const; + bool operator!=(const Collision& other) const; }; } -namespace System +namespace UnityEngine { - namespace Collections + struct Behaviour : virtual UnityEngine::Component { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator end(System::Collections::Generic::ICollection& enumerable); - } - } + Behaviour(decltype(nullptr)); + Behaviour(Plugin::InternalUse, int32_t handle); + Behaviour(const Behaviour& other); + Behaviour(Behaviour&& other); + virtual ~Behaviour(); + Behaviour& operator=(const Behaviour& other); + Behaviour& operator=(decltype(nullptr)); + Behaviour& operator=(Behaviour&& other); + bool operator==(const Behaviour& other) const; + bool operator!=(const Behaviour& other) const; + }; } -namespace System +namespace UnityEngine { - namespace Collections + struct MonoBehaviour : virtual UnityEngine::Behaviour { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } + MonoBehaviour(decltype(nullptr)); + MonoBehaviour(Plugin::InternalUse, int32_t handle); + MonoBehaviour(const MonoBehaviour& other); + MonoBehaviour(MonoBehaviour&& other); + virtual ~MonoBehaviour(); + MonoBehaviour& operator=(const MonoBehaviour& other); + MonoBehaviour& operator=(decltype(nullptr)); + MonoBehaviour& operator=(MonoBehaviour&& other); + bool operator==(const MonoBehaviour& other) const; + bool operator!=(const MonoBehaviour& other) const; + UnityEngine::Transform GetTransform(); + }; } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator + struct AudioSettings : virtual System::Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(); - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& other); - UnityEngine::GradientColorKey operator*(); + AudioSettings(decltype(nullptr)); + AudioSettings(Plugin::InternalUse, int32_t handle); + AudioSettings(const AudioSettings& other); + AudioSettings(AudioSettings&& other); + virtual ~AudioSettings(); + AudioSettings& operator=(const AudioSettings& other); + AudioSettings& operator=(decltype(nullptr)); + AudioSettings& operator=(AudioSettings&& other); + bool operator==(const AudioSettings& other) const; + bool operator!=(const AudioSettings& other) const; + static void GetDSPBufferSize(System::Int32* bufferLength, System::Int32* numBuffers); }; } -namespace System +namespace UnityEngine { - namespace Collections + namespace Networking { - namespace Generic + struct NetworkTransport : virtual System::Object { - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator end(System::Collections::Generic::ICollection& enumerable); - } + NetworkTransport(decltype(nullptr)); + NetworkTransport(Plugin::InternalUse, int32_t handle); + NetworkTransport(const NetworkTransport& other); + NetworkTransport(NetworkTransport&& other); + virtual ~NetworkTransport(); + NetworkTransport& operator=(const NetworkTransport& other); + NetworkTransport& operator=(decltype(nullptr)); + NetworkTransport& operator=(NetworkTransport&& other); + bool operator==(const NetworkTransport& other) const; + bool operator!=(const NetworkTransport& other) const; + static void GetBroadcastConnectionInfo(System::Int32 hostId, System::String* address, System::Int32* port, System::Byte* error); + static void Init(); + }; } } -namespace System +namespace UnityEngine { - namespace Collections + struct Quaternion { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } + Quaternion(); + System::Single x; + System::Single y; + System::Single z; + System::Single w; + explicit operator System::ValueType(); + explicit operator System::Object(); + }; } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericICollectionUnityEngineResolutionIterator + struct Matrix4x4 { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionUnityEngineResolutionIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionUnityEngineResolutionIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionUnityEngineResolutionIterator(); - SystemCollectionsGenericICollectionUnityEngineResolutionIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionUnityEngineResolutionIterator& other); - UnityEngine::Resolution operator*(); + Matrix4x4(); + System::Single GetItem(System::Int32 row, System::Int32 column); + void SetItem(System::Int32 row, System::Int32 column, System::Single value); + System::Single m00; + System::Single m10; + System::Single m20; + System::Single m30; + System::Single m01; + System::Single m11; + System::Single m21; + System::Single m31; + System::Single m02; + System::Single m12; + System::Single m22; + System::Single m32; + System::Single m03; + System::Single m13; + System::Single m23; + System::Single m33; + explicit operator System::ValueType(); + explicit operator System::Object(); }; } -namespace System +namespace UnityEngine { - namespace Collections + struct QueryTriggerInteraction { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator end(System::Collections::Generic::ICollection& enumerable); - } - } + int32_t Value; + static const UnityEngine::QueryTriggerInteraction UseGlobal; + static const UnityEngine::QueryTriggerInteraction Ignore; + static const UnityEngine::QueryTriggerInteraction Collide; + explicit QueryTriggerInteraction(int32_t value); + explicit operator int32_t() const; + bool operator==(QueryTriggerInteraction other); + bool operator!=(QueryTriggerInteraction other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + }; } namespace System @@ -2506,318 +2650,396 @@ namespace System { namespace Generic { - template<> struct IList : virtual System::Collections::Generic::ICollection + template<> struct KeyValuePair : Plugin::ManagedType { - IList(decltype(nullptr)); - IList(Plugin::InternalUse iu, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; + KeyValuePair(decltype(nullptr)); + KeyValuePair(Plugin::InternalUse, int32_t handle); + KeyValuePair(const KeyValuePair& other); + KeyValuePair(KeyValuePair&& other); + virtual ~KeyValuePair(); + KeyValuePair& operator=(const KeyValuePair& other); + KeyValuePair& operator=(decltype(nullptr)); + KeyValuePair& operator=(KeyValuePair&& other); + bool operator==(const KeyValuePair& other) const; + bool operator!=(const KeyValuePair& other) const; + KeyValuePair(System::String& key, System::Double value); + System::String GetKey(); + System::Double GetValue(); + explicit operator System::ValueType(); + explicit operator System::Object(); }; } } } -namespace Plugin -{ - struct SystemCollectionsGenericIListSystemStringIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListSystemStringIterator(decltype(nullptr)); - SystemCollectionsGenericIListSystemStringIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListSystemStringIterator(); - SystemCollectionsGenericIListSystemStringIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListSystemStringIterator& other); - System::String operator*(); - }; -} - namespace System { namespace Collections { namespace Generic { - Plugin::SystemCollectionsGenericIListSystemStringIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListSystemStringIterator end(System::Collections::Generic::IList& enumerable); + template<> struct LinkedListNode : virtual System::Object + { + LinkedListNode(decltype(nullptr)); + LinkedListNode(Plugin::InternalUse, int32_t handle); + LinkedListNode(const LinkedListNode& other); + LinkedListNode(LinkedListNode&& other); + virtual ~LinkedListNode(); + LinkedListNode& operator=(const LinkedListNode& other); + LinkedListNode& operator=(decltype(nullptr)); + LinkedListNode& operator=(LinkedListNode&& other); + bool operator==(const LinkedListNode& other) const; + bool operator!=(const LinkedListNode& other) const; + LinkedListNode(System::String& value); + System::String GetValue(); + void SetValue(System::String& value); + }; } } } namespace System { - namespace Collections + namespace Runtime { - namespace Generic + namespace CompilerServices { - template<> struct IList : virtual System::Collections::Generic::ICollection + template<> struct StrongBox : virtual System::Runtime::CompilerServices::IStrongBox { - IList(decltype(nullptr)); - IList(Plugin::InternalUse iu, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; + StrongBox(decltype(nullptr)); + StrongBox(Plugin::InternalUse, int32_t handle); + StrongBox(const StrongBox& other); + StrongBox(StrongBox&& other); + virtual ~StrongBox(); + StrongBox& operator=(const StrongBox& other); + StrongBox& operator=(decltype(nullptr)); + StrongBox& operator=(StrongBox&& other); + bool operator==(const StrongBox& other) const; + bool operator!=(const StrongBox& other) const; + StrongBox(System::String& value); + System::String GetValue(); + void SetValue(System::String& value); }; } } } -namespace Plugin +namespace System { - struct SystemCollectionsGenericIListSystemInt32Iterator + struct Exception : virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsGenericIListSystemInt32Iterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListSystemInt32Iterator(); - SystemCollectionsGenericIListSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListSystemInt32Iterator& other); - int32_t operator*(); + Exception(decltype(nullptr)); + Exception(Plugin::InternalUse, int32_t handle); + Exception(const Exception& other); + Exception(Exception&& other); + virtual ~Exception(); + Exception& operator=(const Exception& other); + Exception& operator=(decltype(nullptr)); + Exception& operator=(Exception&& other); + bool operator==(const Exception& other) const; + bool operator!=(const Exception& other) const; + Exception(System::String& message); }; } namespace System { - namespace Collections + struct SystemException : virtual System::Exception, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemInt32Iterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListSystemInt32Iterator end(System::Collections::Generic::IList& enumerable); - } - } + SystemException(decltype(nullptr)); + SystemException(Plugin::InternalUse, int32_t handle); + SystemException(const SystemException& other); + SystemException(SystemException&& other); + virtual ~SystemException(); + SystemException& operator=(const SystemException& other); + SystemException& operator=(decltype(nullptr)); + SystemException& operator=(SystemException&& other); + bool operator==(const SystemException& other) const; + bool operator!=(const SystemException& other) const; + }; } namespace System { - namespace Collections + struct NullReferenceException : virtual System::SystemException, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse iu, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } + NullReferenceException(decltype(nullptr)); + NullReferenceException(Plugin::InternalUse, int32_t handle); + NullReferenceException(const NullReferenceException& other); + NullReferenceException(NullReferenceException&& other); + virtual ~NullReferenceException(); + NullReferenceException& operator=(const NullReferenceException& other); + NullReferenceException& operator=(decltype(nullptr)); + NullReferenceException& operator=(NullReferenceException&& other); + bool operator==(const NullReferenceException& other) const; + bool operator!=(const NullReferenceException& other) const; + }; } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericIListSystemSingleIterator + struct Screen : virtual System::Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListSystemSingleIterator(decltype(nullptr)); - SystemCollectionsGenericIListSystemSingleIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListSystemSingleIterator(); - SystemCollectionsGenericIListSystemSingleIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListSystemSingleIterator& other); - float operator*(); + Screen(decltype(nullptr)); + Screen(Plugin::InternalUse, int32_t handle); + Screen(const Screen& other); + Screen(Screen&& other); + virtual ~Screen(); + Screen& operator=(const Screen& other); + Screen& operator=(decltype(nullptr)); + Screen& operator=(Screen&& other); + bool operator==(const Screen& other) const; + bool operator!=(const Screen& other) const; + static System::Array1 GetResolutions(); }; } -namespace System +namespace UnityEngine { - namespace Collections + struct Ray : Plugin::ManagedType { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable); - } - } + Ray(decltype(nullptr)); + Ray(Plugin::InternalUse, int32_t handle); + Ray(const Ray& other); + Ray(Ray&& other); + virtual ~Ray(); + Ray& operator=(const Ray& other); + Ray& operator=(decltype(nullptr)); + Ray& operator=(Ray&& other); + bool operator==(const Ray& other) const; + bool operator!=(const Ray& other) const; + Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); + explicit operator System::ValueType(); + explicit operator System::Object(); + }; } -namespace System +namespace UnityEngine { - namespace Collections + struct Physics : virtual System::Object { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse iu, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } + Physics(decltype(nullptr)); + Physics(Plugin::InternalUse, int32_t handle); + Physics(const Physics& other); + Physics(Physics&& other); + virtual ~Physics(); + Physics& operator=(const Physics& other); + Physics& operator=(decltype(nullptr)); + Physics& operator=(Physics&& other); + bool operator==(const Physics& other) const; + bool operator!=(const Physics& other) const; + static System::Int32 RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results); + static System::Array1 RaycastAll(UnityEngine::Ray& ray); + }; } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericIListUnityEngineRaycastHitIterator + struct Gradient : virtual System::Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListUnityEngineRaycastHitIterator(decltype(nullptr)); - SystemCollectionsGenericIListUnityEngineRaycastHitIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListUnityEngineRaycastHitIterator(); - SystemCollectionsGenericIListUnityEngineRaycastHitIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListUnityEngineRaycastHitIterator& other); - UnityEngine::RaycastHit operator*(); + Gradient(decltype(nullptr)); + Gradient(Plugin::InternalUse, int32_t handle); + Gradient(const Gradient& other); + Gradient(Gradient&& other); + virtual ~Gradient(); + Gradient& operator=(const Gradient& other); + Gradient& operator=(decltype(nullptr)); + Gradient& operator=(Gradient&& other); + bool operator==(const Gradient& other) const; + bool operator!=(const Gradient& other) const; + Gradient(); + System::Array1 GetColorKeys(); + void SetColorKeys(System::Array1& value); }; } namespace System { - namespace Collections + struct AppDomainSetup : virtual System::IAppDomainSetup { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator end(System::Collections::Generic::IList& enumerable); - } - } + AppDomainSetup(decltype(nullptr)); + AppDomainSetup(Plugin::InternalUse, int32_t handle); + AppDomainSetup(const AppDomainSetup& other); + AppDomainSetup(AppDomainSetup&& other); + virtual ~AppDomainSetup(); + AppDomainSetup& operator=(const AppDomainSetup& other); + AppDomainSetup& operator=(decltype(nullptr)); + AppDomainSetup& operator=(AppDomainSetup&& other); + bool operator==(const AppDomainSetup& other) const; + bool operator!=(const AppDomainSetup& other) const; + AppDomainSetup(); + System::AppDomainInitializer GetAppDomainInitializer(); + void SetAppDomainInitializer(System::AppDomainInitializer& value); + }; } -namespace System +namespace UnityEngine { - namespace Collections + struct Application : virtual System::Object { - namespace Generic + Application(decltype(nullptr)); + Application(Plugin::InternalUse, int32_t handle); + Application(const Application& other); + Application(Application&& other); + virtual ~Application(); + Application& operator=(const Application& other); + Application& operator=(decltype(nullptr)); + Application& operator=(Application&& other); + bool operator==(const Application& other) const; + bool operator!=(const Application& other) const; + static void AddOnBeforeRender(UnityEngine::Events::UnityAction& del); + static void RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del); + }; +} + +namespace UnityEngine +{ + namespace SceneManagement + { + struct SceneManager : virtual System::Object { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse iu, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } + SceneManager(decltype(nullptr)); + SceneManager(Plugin::InternalUse, int32_t handle); + SceneManager(const SceneManager& other); + SceneManager(SceneManager&& other); + virtual ~SceneManager(); + SceneManager& operator=(const SceneManager& other); + SceneManager& operator=(decltype(nullptr)); + SceneManager& operator=(SceneManager&& other); + bool operator==(const SceneManager& other) const; + bool operator!=(const SceneManager& other) const; + static void AddSceneLoaded(UnityEngine::Events::UnityAction2& del); + static void RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del); + }; } } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator + namespace SceneManagement { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(decltype(nullptr)); - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(); - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& other); - UnityEngine::GradientColorKey operator*(); - }; + struct Scene : Plugin::ManagedType + { + Scene(decltype(nullptr)); + Scene(Plugin::InternalUse, int32_t handle); + Scene(const Scene& other); + Scene(Scene&& other); + virtual ~Scene(); + Scene& operator=(const Scene& other); + Scene& operator=(decltype(nullptr)); + Scene& operator=(Scene&& other); + bool operator==(const Scene& other) const; + bool operator!=(const Scene& other) const; + explicit operator System::ValueType(); + explicit operator System::Object(); + }; + } } -namespace System +namespace UnityEngine { - namespace Collections + namespace SceneManagement { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator end(System::Collections::Generic::IList& enumerable); - } + struct LoadSceneMode + { + int32_t Value; + static const UnityEngine::SceneManagement::LoadSceneMode Single; + static const UnityEngine::SceneManagement::LoadSceneMode Additive; + explicit LoadSceneMode(int32_t value); + explicit operator int32_t() const; + bool operator==(LoadSceneMode other); + bool operator!=(LoadSceneMode other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + }; } } namespace System { - namespace Collections + struct EventArgs : virtual System::Object { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse iu, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } + EventArgs(decltype(nullptr)); + EventArgs(Plugin::InternalUse, int32_t handle); + EventArgs(const EventArgs& other); + EventArgs(EventArgs&& other); + virtual ~EventArgs(); + EventArgs& operator=(const EventArgs& other); + EventArgs& operator=(decltype(nullptr)); + EventArgs& operator=(EventArgs&& other); + bool operator==(const EventArgs& other) const; + bool operator!=(const EventArgs& other) const; + }; } -namespace Plugin +namespace System { - struct SystemCollectionsGenericIListUnityEngineResolutionIterator + namespace ComponentModel { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListUnityEngineResolutionIterator(decltype(nullptr)); - SystemCollectionsGenericIListUnityEngineResolutionIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListUnityEngineResolutionIterator(); - SystemCollectionsGenericIListUnityEngineResolutionIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListUnityEngineResolutionIterator& other); - UnityEngine::Resolution operator*(); - }; + namespace Design + { + struct ComponentEventArgs : virtual System::EventArgs + { + ComponentEventArgs(decltype(nullptr)); + ComponentEventArgs(Plugin::InternalUse, int32_t handle); + ComponentEventArgs(const ComponentEventArgs& other); + ComponentEventArgs(ComponentEventArgs&& other); + virtual ~ComponentEventArgs(); + ComponentEventArgs& operator=(const ComponentEventArgs& other); + ComponentEventArgs& operator=(decltype(nullptr)); + ComponentEventArgs& operator=(ComponentEventArgs&& other); + bool operator==(const ComponentEventArgs& other) const; + bool operator!=(const ComponentEventArgs& other) const; + }; + } + } } namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator end(System::Collections::Generic::IList& enumerable); + struct ComponentChangingEventArgs : virtual System::EventArgs + { + ComponentChangingEventArgs(decltype(nullptr)); + ComponentChangingEventArgs(Plugin::InternalUse, int32_t handle); + ComponentChangingEventArgs(const ComponentChangingEventArgs& other); + ComponentChangingEventArgs(ComponentChangingEventArgs&& other); + virtual ~ComponentChangingEventArgs(); + ComponentChangingEventArgs& operator=(const ComponentChangingEventArgs& other); + ComponentChangingEventArgs& operator=(decltype(nullptr)); + ComponentChangingEventArgs& operator=(ComponentChangingEventArgs&& other); + bool operator==(const ComponentChangingEventArgs& other) const; + bool operator!=(const ComponentChangingEventArgs& other) const; + }; } } } namespace System { - namespace Runtime + namespace ComponentModel { - namespace Serialization + namespace Design { - struct ISerializable : virtual System::Object + struct ComponentChangedEventArgs : virtual System::EventArgs { - ISerializable(decltype(nullptr)); - ISerializable(Plugin::InternalUse iu, int32_t handle); - ISerializable(const ISerializable& other); - ISerializable(ISerializable&& other); - virtual ~ISerializable(); - ISerializable& operator=(const ISerializable& other); - ISerializable& operator=(decltype(nullptr)); - ISerializable& operator=(ISerializable&& other); - bool operator==(const ISerializable& other) const; - bool operator!=(const ISerializable& other) const; + ComponentChangedEventArgs(decltype(nullptr)); + ComponentChangedEventArgs(Plugin::InternalUse, int32_t handle); + ComponentChangedEventArgs(const ComponentChangedEventArgs& other); + ComponentChangedEventArgs(ComponentChangedEventArgs&& other); + virtual ~ComponentChangedEventArgs(); + ComponentChangedEventArgs& operator=(const ComponentChangedEventArgs& other); + ComponentChangedEventArgs& operator=(decltype(nullptr)); + ComponentChangedEventArgs& operator=(ComponentChangedEventArgs&& other); + bool operator==(const ComponentChangedEventArgs& other) const; + bool operator!=(const ComponentChangedEventArgs& other) const; }; } } @@ -2825,22 +3047,22 @@ namespace System namespace System { - namespace Runtime + namespace ComponentModel { - namespace InteropServices + namespace Design { - struct _Exception : virtual System::Object + struct ComponentRenameEventArgs : virtual System::EventArgs { - _Exception(decltype(nullptr)); - _Exception(Plugin::InternalUse iu, int32_t handle); - _Exception(const _Exception& other); - _Exception(_Exception&& other); - virtual ~_Exception(); - _Exception& operator=(const _Exception& other); - _Exception& operator=(decltype(nullptr)); - _Exception& operator=(_Exception&& other); - bool operator==(const _Exception& other) const; - bool operator!=(const _Exception& other) const; + ComponentRenameEventArgs(decltype(nullptr)); + ComponentRenameEventArgs(Plugin::InternalUse, int32_t handle); + ComponentRenameEventArgs(const ComponentRenameEventArgs& other); + ComponentRenameEventArgs(ComponentRenameEventArgs&& other); + virtual ~ComponentRenameEventArgs(); + ComponentRenameEventArgs& operator=(const ComponentRenameEventArgs& other); + ComponentRenameEventArgs& operator=(decltype(nullptr)); + ComponentRenameEventArgs& operator=(ComponentRenameEventArgs&& other); + bool operator==(const ComponentRenameEventArgs& other) const; + bool operator!=(const ComponentRenameEventArgs& other) const; }; } } @@ -2848,57 +3070,126 @@ namespace System namespace System { - struct IAppDomainSetup : virtual System::Object + namespace ComponentModel { - IAppDomainSetup(decltype(nullptr)); - IAppDomainSetup(Plugin::InternalUse iu, int32_t handle); - IAppDomainSetup(const IAppDomainSetup& other); - IAppDomainSetup(IAppDomainSetup&& other); - virtual ~IAppDomainSetup(); - IAppDomainSetup& operator=(const IAppDomainSetup& other); - IAppDomainSetup& operator=(decltype(nullptr)); - IAppDomainSetup& operator=(IAppDomainSetup&& other); - bool operator==(const IAppDomainSetup& other) const; - bool operator!=(const IAppDomainSetup& other) const; + struct MemberDescriptor : virtual System::Object + { + MemberDescriptor(decltype(nullptr)); + MemberDescriptor(Plugin::InternalUse, int32_t handle); + MemberDescriptor(const MemberDescriptor& other); + MemberDescriptor(MemberDescriptor&& other); + virtual ~MemberDescriptor(); + MemberDescriptor& operator=(const MemberDescriptor& other); + MemberDescriptor& operator=(decltype(nullptr)); + MemberDescriptor& operator=(MemberDescriptor&& other); + bool operator==(const MemberDescriptor& other) const; + bool operator!=(const MemberDescriptor& other) const; + }; + } +} + +namespace UnityEngine +{ + struct PrimitiveType + { + int32_t Value; + static const UnityEngine::PrimitiveType Sphere; + static const UnityEngine::PrimitiveType Capsule; + static const UnityEngine::PrimitiveType Cylinder; + static const UnityEngine::PrimitiveType Cube; + static const UnityEngine::PrimitiveType Plane; + static const UnityEngine::PrimitiveType Quad; + explicit PrimitiveType(int32_t value); + explicit operator int32_t() const; + bool operator==(PrimitiveType other); + bool operator!=(PrimitiveType other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + }; +} + +namespace UnityEngine +{ + struct Time : virtual System::Object + { + Time(decltype(nullptr)); + Time(Plugin::InternalUse, int32_t handle); + Time(const Time& other); + Time(Time&& other); + virtual ~Time(); + Time& operator=(const Time& other); + Time& operator=(decltype(nullptr)); + Time& operator=(Time&& other); + bool operator==(const Time& other) const; + bool operator!=(const Time& other) const; + static System::Single GetDeltaTime(); }; } namespace System { - namespace Collections + namespace IO { - struct IComparer : virtual System::Object - { - IComparer(decltype(nullptr)); - IComparer(Plugin::InternalUse iu, int32_t handle); - IComparer(const IComparer& other); - IComparer(IComparer&& other); - virtual ~IComparer(); - IComparer& operator=(const IComparer& other); - IComparer& operator=(decltype(nullptr)); - IComparer& operator=(IComparer&& other); - bool operator==(const IComparer& other) const; - bool operator!=(const IComparer& other) const; + struct FileMode + { + int32_t Value; + static const System::IO::FileMode CreateNew; + static const System::IO::FileMode Create; + static const System::IO::FileMode Open; + static const System::IO::FileMode OpenOrCreate; + static const System::IO::FileMode Truncate; + static const System::IO::FileMode Append; + explicit FileMode(int32_t value); + explicit operator int32_t() const; + bool operator==(FileMode other); + bool operator!=(FileMode other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); }; } } namespace System { - namespace Collections + struct MarshalByRefObject : virtual System::Object { - struct IEqualityComparer : virtual System::Object + MarshalByRefObject(decltype(nullptr)); + MarshalByRefObject(Plugin::InternalUse, int32_t handle); + MarshalByRefObject(const MarshalByRefObject& other); + MarshalByRefObject(MarshalByRefObject&& other); + virtual ~MarshalByRefObject(); + MarshalByRefObject& operator=(const MarshalByRefObject& other); + MarshalByRefObject& operator=(decltype(nullptr)); + MarshalByRefObject& operator=(MarshalByRefObject&& other); + bool operator==(const MarshalByRefObject& other) const; + bool operator!=(const MarshalByRefObject& other) const; + }; +} + +namespace System +{ + namespace IO + { + struct Stream : virtual System::MarshalByRefObject, virtual System::IDisposable { - IEqualityComparer(decltype(nullptr)); - IEqualityComparer(Plugin::InternalUse iu, int32_t handle); - IEqualityComparer(const IEqualityComparer& other); - IEqualityComparer(IEqualityComparer&& other); - virtual ~IEqualityComparer(); - IEqualityComparer& operator=(const IEqualityComparer& other); - IEqualityComparer& operator=(decltype(nullptr)); - IEqualityComparer& operator=(IEqualityComparer&& other); - bool operator==(const IEqualityComparer& other) const; - bool operator!=(const IEqualityComparer& other) const; + Stream(decltype(nullptr)); + Stream(Plugin::InternalUse, int32_t handle); + Stream(const Stream& other); + Stream(Stream&& other); + virtual ~Stream(); + Stream& operator=(const Stream& other); + Stream& operator=(decltype(nullptr)); + Stream& operator=(Stream&& other); + bool operator==(const Stream& other) const; + bool operator!=(const Stream& other) const; }; } } @@ -2909,18 +3200,18 @@ namespace System { namespace Generic { - template<> struct IEqualityComparer : virtual System::Object + template<> struct IComparer : virtual System::Object { - IEqualityComparer(decltype(nullptr)); - IEqualityComparer(Plugin::InternalUse iu, int32_t handle); - IEqualityComparer(const IEqualityComparer& other); - IEqualityComparer(IEqualityComparer&& other); - virtual ~IEqualityComparer(); - IEqualityComparer& operator=(const IEqualityComparer& other); - IEqualityComparer& operator=(decltype(nullptr)); - IEqualityComparer& operator=(IEqualityComparer&& other); - bool operator==(const IEqualityComparer& other) const; - bool operator!=(const IEqualityComparer& other) const; + IComparer(decltype(nullptr)); + IComparer(Plugin::InternalUse, int32_t handle); + IComparer(const IComparer& other); + IComparer(IComparer&& other); + virtual ~IComparer(); + IComparer& operator=(const IComparer& other); + IComparer& operator=(decltype(nullptr)); + IComparer& operator=(IComparer&& other); + bool operator==(const IComparer& other) const; + bool operator!=(const IComparer& other) const; }; } } @@ -2932,165 +3223,217 @@ namespace System { namespace Generic { - template<> struct IEqualityComparer : virtual System::Object + template<> struct IComparer : virtual System::Object { - IEqualityComparer(decltype(nullptr)); - IEqualityComparer(Plugin::InternalUse iu, int32_t handle); - IEqualityComparer(const IEqualityComparer& other); - IEqualityComparer(IEqualityComparer&& other); - virtual ~IEqualityComparer(); - IEqualityComparer& operator=(const IEqualityComparer& other); - IEqualityComparer& operator=(decltype(nullptr)); - IEqualityComparer& operator=(IEqualityComparer&& other); - bool operator==(const IEqualityComparer& other) const; - bool operator!=(const IEqualityComparer& other) const; + IComparer(decltype(nullptr)); + IComparer(Plugin::InternalUse, int32_t handle); + IComparer(const IComparer& other); + IComparer(IComparer&& other); + virtual ~IComparer(); + IComparer& operator=(const IComparer& other); + IComparer& operator=(decltype(nullptr)); + IComparer& operator=(IComparer&& other); + bool operator==(const IComparer& other) const; + bool operator!=(const IComparer& other) const; }; } } } -namespace UnityEngine +namespace System { - namespace Playables + namespace Collections { - struct PlayableGraph : virtual System::ValueType + namespace Generic { - PlayableGraph(decltype(nullptr)); - PlayableGraph(Plugin::InternalUse iu, int32_t handle); - PlayableGraph(const PlayableGraph& other); - PlayableGraph(PlayableGraph&& other); - virtual ~PlayableGraph(); - PlayableGraph& operator=(const PlayableGraph& other); - PlayableGraph& operator=(decltype(nullptr)); - PlayableGraph& operator=(PlayableGraph&& other); - bool operator==(const PlayableGraph& other) const; - bool operator!=(const PlayableGraph& other) const; - }; + template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer + { + BaseIComparer(decltype(nullptr)); + BaseIComparer(Plugin::InternalUse, int32_t handle); + BaseIComparer(const BaseIComparer& other); + BaseIComparer(BaseIComparer&& other); + virtual ~BaseIComparer(); + BaseIComparer& operator=(const BaseIComparer& other); + BaseIComparer& operator=(decltype(nullptr)); + BaseIComparer& operator=(BaseIComparer&& other); + bool operator==(const BaseIComparer& other) const; + bool operator!=(const BaseIComparer& other) const; + int32_t CppHandle; + BaseIComparer(); + virtual System::Int32 Compare(System::Int32 x, System::Int32 y); + }; + } } } -namespace UnityEngine +namespace System { - namespace Playables + namespace Collections { - struct IPlayable : virtual System::Object + namespace Generic { - IPlayable(decltype(nullptr)); - IPlayable(Plugin::InternalUse iu, int32_t handle); - IPlayable(const IPlayable& other); - IPlayable(IPlayable&& other); - virtual ~IPlayable(); - IPlayable& operator=(const IPlayable& other); - IPlayable& operator=(decltype(nullptr)); - IPlayable& operator=(IPlayable&& other); - bool operator==(const IPlayable& other) const; - bool operator!=(const IPlayable& other) const; - }; + template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer + { + BaseIComparer(decltype(nullptr)); + BaseIComparer(Plugin::InternalUse, int32_t handle); + BaseIComparer(const BaseIComparer& other); + BaseIComparer(BaseIComparer&& other); + virtual ~BaseIComparer(); + BaseIComparer& operator=(const BaseIComparer& other); + BaseIComparer& operator=(decltype(nullptr)); + BaseIComparer& operator=(BaseIComparer&& other); + bool operator==(const BaseIComparer& other) const; + bool operator!=(const BaseIComparer& other) const; + int32_t CppHandle; + BaseIComparer(); + virtual System::Int32 Compare(System::String& x, System::String& y); + }; + } } } namespace System { - template<> struct IEquatable : virtual System::Object + struct StringComparer : virtual System::Collections::IComparer, virtual System::Collections::Generic::IComparer, virtual System::Collections::IEqualityComparer, virtual System::Collections::Generic::IEqualityComparer { - IEquatable(decltype(nullptr)); - IEquatable(Plugin::InternalUse iu, int32_t handle); - IEquatable(const IEquatable& other); - IEquatable(IEquatable&& other); - virtual ~IEquatable(); - IEquatable& operator=(const IEquatable& other); - IEquatable& operator=(decltype(nullptr)); - IEquatable& operator=(IEquatable&& other); - bool operator==(const IEquatable& other) const; - bool operator!=(const IEquatable& other) const; + StringComparer(decltype(nullptr)); + StringComparer(Plugin::InternalUse, int32_t handle); + StringComparer(const StringComparer& other); + StringComparer(StringComparer&& other); + virtual ~StringComparer(); + StringComparer& operator=(const StringComparer& other); + StringComparer& operator=(decltype(nullptr)); + StringComparer& operator=(StringComparer&& other); + bool operator==(const StringComparer& other) const; + bool operator!=(const StringComparer& other) const; }; } -namespace UnityEngine +namespace System { - namespace Animations + struct BaseStringComparer : virtual System::StringComparer + { + BaseStringComparer(decltype(nullptr)); + BaseStringComparer(Plugin::InternalUse, int32_t handle); + BaseStringComparer(const BaseStringComparer& other); + BaseStringComparer(BaseStringComparer&& other); + virtual ~BaseStringComparer(); + BaseStringComparer& operator=(const BaseStringComparer& other); + BaseStringComparer& operator=(decltype(nullptr)); + BaseStringComparer& operator=(BaseStringComparer&& other); + bool operator==(const BaseStringComparer& other) const; + bool operator!=(const BaseStringComparer& other) const; + int32_t CppHandle; + BaseStringComparer(); + virtual System::Int32 Compare(System::String& x, System::String& y); + virtual System::Boolean Equals(System::String& x, System::String& y); + virtual System::Int32 GetHashCode(System::String& obj); + }; +} + +namespace System +{ + namespace Collections { - struct AnimationMixerPlayable : virtual System::ValueType, virtual System::IEquatable, virtual UnityEngine::Playables::IPlayable + struct Queue : virtual System::ICloneable, virtual System::Collections::ICollection { - AnimationMixerPlayable(decltype(nullptr)); - AnimationMixerPlayable(Plugin::InternalUse iu, int32_t handle); - AnimationMixerPlayable(const AnimationMixerPlayable& other); - AnimationMixerPlayable(AnimationMixerPlayable&& other); - virtual ~AnimationMixerPlayable(); - AnimationMixerPlayable& operator=(const AnimationMixerPlayable& other); - AnimationMixerPlayable& operator=(decltype(nullptr)); - AnimationMixerPlayable& operator=(AnimationMixerPlayable&& other); - bool operator==(const AnimationMixerPlayable& other) const; - bool operator!=(const AnimationMixerPlayable& other) const; - static UnityEngine::Animations::AnimationMixerPlayable Create(UnityEngine::Playables::PlayableGraph& graph, int32_t inputCount = 0, System::Boolean normalizeWeights = false); + Queue(decltype(nullptr)); + Queue(Plugin::InternalUse, int32_t handle); + Queue(const Queue& other); + Queue(Queue&& other); + virtual ~Queue(); + Queue& operator=(const Queue& other); + Queue& operator=(decltype(nullptr)); + Queue& operator=(Queue&& other); + bool operator==(const Queue& other) const; + bool operator!=(const Queue& other) const; + System::Int32 GetCount(); }; } } namespace System { - namespace Runtime + namespace Collections { - namespace CompilerServices + struct BaseQueue : virtual System::Collections::Queue { - struct IStrongBox : virtual System::Object - { - IStrongBox(decltype(nullptr)); - IStrongBox(Plugin::InternalUse iu, int32_t handle); - IStrongBox(const IStrongBox& other); - IStrongBox(IStrongBox&& other); - virtual ~IStrongBox(); - IStrongBox& operator=(const IStrongBox& other); - IStrongBox& operator=(decltype(nullptr)); - IStrongBox& operator=(IStrongBox&& other); - bool operator==(const IStrongBox& other) const; - bool operator!=(const IStrongBox& other) const; - }; - } + BaseQueue(decltype(nullptr)); + BaseQueue(Plugin::InternalUse, int32_t handle); + BaseQueue(const BaseQueue& other); + BaseQueue(BaseQueue&& other); + virtual ~BaseQueue(); + BaseQueue& operator=(const BaseQueue& other); + BaseQueue& operator=(decltype(nullptr)); + BaseQueue& operator=(BaseQueue&& other); + bool operator==(const BaseQueue& other) const; + bool operator!=(const BaseQueue& other) const; + int32_t CppHandle; + BaseQueue(); + virtual System::Int32 GetCount(); + }; } } -namespace UnityEngine +namespace System { - namespace Experimental + namespace ComponentModel { - namespace UIElements + namespace Design { - struct IEventHandler : virtual System::Object + struct IComponentChangeService : virtual System::Object { - IEventHandler(decltype(nullptr)); - IEventHandler(Plugin::InternalUse iu, int32_t handle); - IEventHandler(const IEventHandler& other); - IEventHandler(IEventHandler&& other); - virtual ~IEventHandler(); - IEventHandler& operator=(const IEventHandler& other); - IEventHandler& operator=(decltype(nullptr)); - IEventHandler& operator=(IEventHandler&& other); - bool operator==(const IEventHandler& other) const; - bool operator!=(const IEventHandler& other) const; + IComponentChangeService(decltype(nullptr)); + IComponentChangeService(Plugin::InternalUse, int32_t handle); + IComponentChangeService(const IComponentChangeService& other); + IComponentChangeService(IComponentChangeService&& other); + virtual ~IComponentChangeService(); + IComponentChangeService& operator=(const IComponentChangeService& other); + IComponentChangeService& operator=(decltype(nullptr)); + IComponentChangeService& operator=(IComponentChangeService&& other); + bool operator==(const IComponentChangeService& other) const; + bool operator!=(const IComponentChangeService& other) const; }; } } } -namespace UnityEngine +namespace System { - namespace Experimental + namespace ComponentModel { - namespace UIElements + namespace Design { - struct IStyle : virtual System::Object + struct BaseIComponentChangeService : virtual System::ComponentModel::Design::IComponentChangeService { - IStyle(decltype(nullptr)); - IStyle(Plugin::InternalUse iu, int32_t handle); - IStyle(const IStyle& other); - IStyle(IStyle&& other); - virtual ~IStyle(); - IStyle& operator=(const IStyle& other); - IStyle& operator=(decltype(nullptr)); - IStyle& operator=(IStyle&& other); - bool operator==(const IStyle& other) const; - bool operator!=(const IStyle& other) const; + BaseIComponentChangeService(decltype(nullptr)); + BaseIComponentChangeService(Plugin::InternalUse, int32_t handle); + BaseIComponentChangeService(const BaseIComponentChangeService& other); + BaseIComponentChangeService(BaseIComponentChangeService&& other); + virtual ~BaseIComponentChangeService(); + BaseIComponentChangeService& operator=(const BaseIComponentChangeService& other); + BaseIComponentChangeService& operator=(decltype(nullptr)); + BaseIComponentChangeService& operator=(BaseIComponentChangeService&& other); + bool operator==(const BaseIComponentChangeService& other) const; + bool operator!=(const BaseIComponentChangeService& other) const; + int32_t CppHandle; + BaseIComponentChangeService(); + virtual void OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue); + virtual void OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member); + virtual void AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value); + virtual void RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value); + virtual void AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value); + virtual void RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value); + virtual void AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value); + virtual void AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value); + virtual void RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value); }; } } @@ -3098,288 +3441,337 @@ namespace UnityEngine namespace System { - namespace Diagnostics + namespace IO { - struct Stopwatch : virtual System::Object + struct FileStream : virtual System::IO::Stream, virtual System::IDisposable { - Stopwatch(decltype(nullptr)); - Stopwatch(Plugin::InternalUse iu, int32_t handle); - Stopwatch(const Stopwatch& other); - Stopwatch(Stopwatch&& other); - virtual ~Stopwatch(); - Stopwatch& operator=(const Stopwatch& other); - Stopwatch& operator=(decltype(nullptr)); - Stopwatch& operator=(Stopwatch&& other); - bool operator==(const Stopwatch& other) const; - bool operator!=(const Stopwatch& other) const; - Stopwatch(); - int64_t GetElapsedMilliseconds(); - void Start(); - void Reset(); + FileStream(decltype(nullptr)); + FileStream(Plugin::InternalUse, int32_t handle); + FileStream(const FileStream& other); + FileStream(FileStream&& other); + virtual ~FileStream(); + FileStream& operator=(const FileStream& other); + FileStream& operator=(decltype(nullptr)); + FileStream& operator=(FileStream&& other); + bool operator==(const FileStream& other) const; + bool operator!=(const FileStream& other) const; + FileStream(System::String& path, System::IO::FileMode mode); + void WriteByte(System::Byte value); }; } } -namespace UnityEngine +namespace System { - struct GameObject : virtual UnityEngine::Object + namespace IO { - GameObject(decltype(nullptr)); - GameObject(Plugin::InternalUse iu, int32_t handle); - GameObject(const GameObject& other); - GameObject(GameObject&& other); - virtual ~GameObject(); - GameObject& operator=(const GameObject& other); - GameObject& operator=(decltype(nullptr)); - GameObject& operator=(GameObject&& other); - bool operator==(const GameObject& other) const; - bool operator!=(const GameObject& other) const; - GameObject(); - GameObject(System::String& name); - UnityEngine::Transform GetTransform(); - template MT0 AddComponent(); - static UnityEngine::GameObject CreatePrimitive(UnityEngine::PrimitiveType type); - }; + struct BaseFileStream : virtual System::IO::FileStream + { + BaseFileStream(decltype(nullptr)); + BaseFileStream(Plugin::InternalUse, int32_t handle); + BaseFileStream(const BaseFileStream& other); + BaseFileStream(BaseFileStream&& other); + virtual ~BaseFileStream(); + BaseFileStream& operator=(const BaseFileStream& other); + BaseFileStream& operator=(decltype(nullptr)); + BaseFileStream& operator=(BaseFileStream&& other); + bool operator==(const BaseFileStream& other) const; + bool operator!=(const BaseFileStream& other) const; + int32_t CppHandle; + BaseFileStream(System::String& path, System::IO::FileMode mode); + virtual void WriteByte(System::Byte value); + }; + } } namespace UnityEngine { - struct Debug : virtual System::Object + namespace Playables { - Debug(decltype(nullptr)); - Debug(Plugin::InternalUse iu, int32_t handle); - Debug(const Debug& other); - Debug(Debug&& other); - virtual ~Debug(); - Debug& operator=(const Debug& other); - Debug& operator=(decltype(nullptr)); - Debug& operator=(Debug&& other); - bool operator==(const Debug& other) const; - bool operator!=(const Debug& other) const; - static void Log(System::Object& message); - }; + struct PlayableHandle : Plugin::ManagedType + { + PlayableHandle(decltype(nullptr)); + PlayableHandle(Plugin::InternalUse, int32_t handle); + PlayableHandle(const PlayableHandle& other); + PlayableHandle(PlayableHandle&& other); + virtual ~PlayableHandle(); + PlayableHandle& operator=(const PlayableHandle& other); + PlayableHandle& operator=(decltype(nullptr)); + PlayableHandle& operator=(PlayableHandle&& other); + bool operator==(const PlayableHandle& other) const; + bool operator!=(const PlayableHandle& other) const; + explicit operator System::ValueType(); + explicit operator System::Object(); + }; + } } namespace UnityEngine { - namespace Assertions + namespace Experimental { - namespace Assert + namespace UIElements { - System::Boolean GetRaiseExceptions(); - void SetRaiseExceptions(System::Boolean value); - template void AreEqual(MT0& expected, MT0& actual); + struct ITransform : virtual System::Object + { + ITransform(decltype(nullptr)); + ITransform(Plugin::InternalUse, int32_t handle); + ITransform(const ITransform& other); + ITransform(ITransform&& other); + virtual ~ITransform(); + ITransform& operator=(const ITransform& other); + ITransform& operator=(decltype(nullptr)); + ITransform& operator=(ITransform&& other); + bool operator==(const ITransform& other) const; + bool operator!=(const ITransform& other) const; + }; } } } namespace UnityEngine { - struct Collision : virtual System::Object + namespace Experimental { - Collision(decltype(nullptr)); - Collision(Plugin::InternalUse iu, int32_t handle); - Collision(const Collision& other); - Collision(Collision&& other); - virtual ~Collision(); - Collision& operator=(const Collision& other); - Collision& operator=(decltype(nullptr)); - Collision& operator=(Collision&& other); - bool operator==(const Collision& other) const; - bool operator!=(const Collision& other) const; - }; + namespace UIElements + { + struct IUIElementDataWatch : virtual System::Object + { + IUIElementDataWatch(decltype(nullptr)); + IUIElementDataWatch(Plugin::InternalUse, int32_t handle); + IUIElementDataWatch(const IUIElementDataWatch& other); + IUIElementDataWatch(IUIElementDataWatch&& other); + virtual ~IUIElementDataWatch(); + IUIElementDataWatch& operator=(const IUIElementDataWatch& other); + IUIElementDataWatch& operator=(decltype(nullptr)); + IUIElementDataWatch& operator=(IUIElementDataWatch&& other); + bool operator==(const IUIElementDataWatch& other) const; + bool operator!=(const IUIElementDataWatch& other) const; + }; + } + } } namespace UnityEngine { - struct Behaviour : virtual UnityEngine::Component + namespace Experimental { - Behaviour(decltype(nullptr)); - Behaviour(Plugin::InternalUse iu, int32_t handle); - Behaviour(const Behaviour& other); - Behaviour(Behaviour&& other); - virtual ~Behaviour(); - Behaviour& operator=(const Behaviour& other); - Behaviour& operator=(decltype(nullptr)); - Behaviour& operator=(Behaviour&& other); - bool operator==(const Behaviour& other) const; - bool operator!=(const Behaviour& other) const; - }; + namespace UIElements + { + struct IVisualElementScheduler : virtual System::Object + { + IVisualElementScheduler(decltype(nullptr)); + IVisualElementScheduler(Plugin::InternalUse, int32_t handle); + IVisualElementScheduler(const IVisualElementScheduler& other); + IVisualElementScheduler(IVisualElementScheduler&& other); + virtual ~IVisualElementScheduler(); + IVisualElementScheduler& operator=(const IVisualElementScheduler& other); + IVisualElementScheduler& operator=(decltype(nullptr)); + IVisualElementScheduler& operator=(IVisualElementScheduler&& other); + bool operator==(const IVisualElementScheduler& other) const; + bool operator!=(const IVisualElementScheduler& other) const; + }; + } + } } -namespace UnityEngine +namespace System { - struct MonoBehaviour : virtual UnityEngine::Behaviour + namespace Collections { - MonoBehaviour(decltype(nullptr)); - MonoBehaviour(Plugin::InternalUse iu, int32_t handle); - MonoBehaviour(const MonoBehaviour& other); - MonoBehaviour(MonoBehaviour&& other); - virtual ~MonoBehaviour(); - MonoBehaviour& operator=(const MonoBehaviour& other); - MonoBehaviour& operator=(decltype(nullptr)); - MonoBehaviour& operator=(MonoBehaviour&& other); - bool operator==(const MonoBehaviour& other) const; - bool operator!=(const MonoBehaviour& other) const; - UnityEngine::Transform GetTransform(); - }; + namespace Generic + { + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator + { + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + UnityEngine::Experimental::UIElements::VisualElement GetCurrent(); + }; + } + } } -namespace UnityEngine +namespace System { - struct AudioSettings : virtual System::Object + namespace Collections { - AudioSettings(decltype(nullptr)); - AudioSettings(Plugin::InternalUse iu, int32_t handle); - AudioSettings(const AudioSettings& other); - AudioSettings(AudioSettings&& other); - virtual ~AudioSettings(); - AudioSettings& operator=(const AudioSettings& other); - AudioSettings& operator=(decltype(nullptr)); - AudioSettings& operator=(AudioSettings&& other); - bool operator==(const AudioSettings& other) const; - bool operator!=(const AudioSettings& other) const; - static void GetDSPBufferSize(int32_t* bufferLength, int32_t* numBuffers); - }; + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); + }; + } + } } namespace UnityEngine { - namespace Networking + namespace Experimental { - struct NetworkTransport : virtual System::Object + namespace UIElements { - NetworkTransport(decltype(nullptr)); - NetworkTransport(Plugin::InternalUse iu, int32_t handle); - NetworkTransport(const NetworkTransport& other); - NetworkTransport(NetworkTransport&& other); - virtual ~NetworkTransport(); - NetworkTransport& operator=(const NetworkTransport& other); - NetworkTransport& operator=(decltype(nullptr)); - NetworkTransport& operator=(NetworkTransport&& other); - bool operator==(const NetworkTransport& other) const; - bool operator!=(const NetworkTransport& other) const; - static void GetBroadcastConnectionInfo(int32_t hostId, System::String* address, int32_t* port, uint8_t* error); - static void Init(); - }; + struct VisualElement : virtual UnityEngine::Experimental::UIElements::Focusable, virtual System::Collections::Generic::IEnumerable, virtual UnityEngine::Experimental::UIElements::IEventHandler, virtual UnityEngine::Experimental::UIElements::IStyle, virtual UnityEngine::Experimental::UIElements::ITransform, virtual UnityEngine::Experimental::UIElements::IUIElementDataWatch, virtual UnityEngine::Experimental::UIElements::IVisualElementScheduler + { + VisualElement(decltype(nullptr)); + VisualElement(Plugin::InternalUse, int32_t handle); + VisualElement(const VisualElement& other); + VisualElement(VisualElement&& other); + virtual ~VisualElement(); + VisualElement& operator=(const VisualElement& other); + VisualElement& operator=(decltype(nullptr)); + VisualElement& operator=(VisualElement&& other); + bool operator==(const VisualElement& other) const; + bool operator!=(const VisualElement& other) const; + }; + } } } -namespace UnityEngine +namespace Plugin { - struct Quaternion + struct UnityEngineExperimentalUIElementsVisualElementIterator { - Quaternion(); - float x; - float y; - float z; - float w; + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + UnityEngineExperimentalUIElementsVisualElementIterator(decltype(nullptr)); + UnityEngineExperimentalUIElementsVisualElementIterator(UnityEngine::Experimental::UIElements::VisualElement& enumerable); + ~UnityEngineExperimentalUIElementsVisualElementIterator(); + UnityEngineExperimentalUIElementsVisualElementIterator& operator++(); + bool operator!=(const UnityEngineExperimentalUIElementsVisualElementIterator& other); + UnityEngine::Experimental::UIElements::VisualElement operator*(); }; } namespace UnityEngine { - struct Matrix4x4 + namespace Experimental { - Matrix4x4(); - float GetItem(int32_t row, int32_t column); - void SetItem(int32_t row, int32_t column, float value); - float m00; - float m10; - float m20; - float m30; - float m01; - float m11; - float m21; - float m31; - float m02; - float m12; - float m22; - float m32; - float m03; - float m13; - float m23; - float m33; - }; + namespace UIElements + { + Plugin::UnityEngineExperimentalUIElementsVisualElementIterator begin(UnityEngine::Experimental::UIElements::VisualElement& enumerable); + Plugin::UnityEngineExperimentalUIElementsVisualElementIterator end(UnityEngine::Experimental::UIElements::VisualElement& enumerable); + } + } } -namespace System +namespace UnityEngine { - namespace Collections + namespace Experimental { - namespace Generic + namespace UIElements { - template<> struct KeyValuePair : virtual System::ValueType + namespace UQueryExtensions { - KeyValuePair(decltype(nullptr)); - KeyValuePair(Plugin::InternalUse iu, int32_t handle); - KeyValuePair(const KeyValuePair& other); - KeyValuePair(KeyValuePair&& other); - virtual ~KeyValuePair(); - KeyValuePair& operator=(const KeyValuePair& other); - KeyValuePair& operator=(decltype(nullptr)); - KeyValuePair& operator=(KeyValuePair&& other); - bool operator==(const KeyValuePair& other) const; - bool operator!=(const KeyValuePair& other) const; - KeyValuePair(System::String& key, double value); - System::String GetKey(); - double GetValue(); - }; + UnityEngine::Experimental::UIElements::VisualElement Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::Array1& classes); + UnityEngine::Experimental::UIElements::VisualElement Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name = Plugin::NullString, System::String& className = Plugin::NullString); + } } } } -namespace System +namespace UnityEngine { - namespace Collections + namespace XR { - namespace Generic + namespace WSA { - template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList + namespace Input { - List(decltype(nullptr)); - List(Plugin::InternalUse iu, int32_t handle); - List(const List& other); - List(List&& other); - virtual ~List(); - List& operator=(const List& other); - List& operator=(decltype(nullptr)); - List& operator=(List&& other); - bool operator==(const List& other) const; - bool operator!=(const List& other) const; - List(); - System::String GetItem(int32_t index); - void SetItem(int32_t index, System::String& value); - void Add(System::String& item); - void Sort(System::Collections::Generic::IComparer& comparer); - }; + struct InteractionSourcePositionAccuracy + { + int32_t Value; + static const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy None; + static const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy Approximate; + static const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy High; + explicit InteractionSourcePositionAccuracy(int32_t value); + explicit operator int32_t() const; + bool operator==(InteractionSourcePositionAccuracy other); + bool operator!=(InteractionSourcePositionAccuracy other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + }; + } } } } -namespace Plugin +namespace UnityEngine { - struct SystemCollectionsGenericListSystemStringIterator + namespace XR { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericListSystemStringIterator(decltype(nullptr)); - SystemCollectionsGenericListSystemStringIterator(System::Collections::Generic::List& enumerable); - ~SystemCollectionsGenericListSystemStringIterator(); - SystemCollectionsGenericListSystemStringIterator& operator++(); - bool operator!=(const SystemCollectionsGenericListSystemStringIterator& other); - System::String operator*(); - }; + namespace WSA + { + namespace Input + { + struct InteractionSourceNode + { + int32_t Value; + static const UnityEngine::XR::WSA::Input::InteractionSourceNode Grip; + static const UnityEngine::XR::WSA::Input::InteractionSourceNode Pointer; + explicit InteractionSourceNode(int32_t value); + explicit operator int32_t() const; + bool operator==(InteractionSourceNode other); + bool operator!=(InteractionSourceNode other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + }; + } + } + } } -namespace System +namespace UnityEngine { - namespace Collections + namespace XR { - namespace Generic + namespace WSA { - Plugin::SystemCollectionsGenericListSystemStringIterator begin(System::Collections::Generic::List& enumerable); - Plugin::SystemCollectionsGenericListSystemStringIterator end(System::Collections::Generic::List& enumerable); + namespace Input + { + struct InteractionSourcePose : Plugin::ManagedType + { + InteractionSourcePose(decltype(nullptr)); + InteractionSourcePose(Plugin::InternalUse, int32_t handle); + InteractionSourcePose(const InteractionSourcePose& other); + InteractionSourcePose(InteractionSourcePose&& other); + virtual ~InteractionSourcePose(); + InteractionSourcePose& operator=(const InteractionSourcePose& other); + InteractionSourcePose& operator=(decltype(nullptr)); + InteractionSourcePose& operator=(InteractionSourcePose&& other); + bool operator==(const InteractionSourcePose& other) const; + bool operator!=(const InteractionSourcePose& other) const; + System::Boolean TryGetRotation(UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node = UnityEngine::XR::WSA::Input::InteractionSourceNode::Grip); + explicit operator System::ValueType(); + explicit operator System::Object(); + }; + } } } } @@ -3390,41 +3782,46 @@ namespace System { namespace Generic { - template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator { - List(decltype(nullptr)); - List(Plugin::InternalUse iu, int32_t handle); - List(const List& other); - List(List&& other); - virtual ~List(); - List& operator=(const List& other); - List& operator=(decltype(nullptr)); - List& operator=(List&& other); - bool operator==(const List& other) const; - bool operator!=(const List& other) const; - List(); - int32_t GetItem(int32_t index); - void SetItem(int32_t index, int32_t value); - void Add(int32_t item); - void Sort(System::Collections::Generic::IComparer& comparer); + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + System::String GetCurrent(); }; } } } -namespace Plugin +namespace System { - struct SystemCollectionsGenericListSystemInt32Iterator + namespace Collections { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericListSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsGenericListSystemInt32Iterator(System::Collections::Generic::List& enumerable); - ~SystemCollectionsGenericListSystemInt32Iterator(); - SystemCollectionsGenericListSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsGenericListSystemInt32Iterator& other); - int32_t operator*(); - }; + namespace Generic + { + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator + { + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + System::Int32 GetCurrent(); + }; + } + } } namespace System @@ -3433,8 +3830,20 @@ namespace System { namespace Generic { - Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable); - Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable); + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator + { + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + System::Single GetCurrent(); + }; } } } @@ -3445,21 +3854,19 @@ namespace System { namespace Generic { - template<> struct LinkedListNode : virtual System::Object + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator { - LinkedListNode(decltype(nullptr)); - LinkedListNode(Plugin::InternalUse iu, int32_t handle); - LinkedListNode(const LinkedListNode& other); - LinkedListNode(LinkedListNode&& other); - virtual ~LinkedListNode(); - LinkedListNode& operator=(const LinkedListNode& other); - LinkedListNode& operator=(decltype(nullptr)); - LinkedListNode& operator=(LinkedListNode&& other); - bool operator==(const LinkedListNode& other) const; - bool operator!=(const LinkedListNode& other) const; - LinkedListNode(System::String& value); - System::String GetValue(); - void SetValue(System::String& value); + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + UnityEngine::RaycastHit GetCurrent(); }; } } @@ -3467,25 +3874,23 @@ namespace System namespace System { - namespace Runtime + namespace Collections { - namespace CompilerServices + namespace Generic { - template<> struct StrongBox : virtual System::Runtime::CompilerServices::IStrongBox + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator { - StrongBox(decltype(nullptr)); - StrongBox(Plugin::InternalUse iu, int32_t handle); - StrongBox(const StrongBox& other); - StrongBox(StrongBox&& other); - virtual ~StrongBox(); - StrongBox& operator=(const StrongBox& other); - StrongBox& operator=(decltype(nullptr)); - StrongBox& operator=(StrongBox&& other); - bool operator==(const StrongBox& other) const; - bool operator!=(const StrongBox& other) const; - StrongBox(System::String& value); - System::String GetValue(); - void SetValue(System::String& value); + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + UnityEngine::GradientColorKey GetCurrent(); }; } } @@ -3495,48 +3900,70 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template<> struct Collection : virtual System::Collections::IList, virtual System::Collections::Generic::IList + template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator { - Collection(decltype(nullptr)); - Collection(Plugin::InternalUse iu, int32_t handle); - Collection(const Collection& other); - Collection(Collection&& other); - virtual ~Collection(); - Collection& operator=(const Collection& other); - Collection& operator=(decltype(nullptr)); - Collection& operator=(Collection&& other); - bool operator==(const Collection& other) const; - bool operator!=(const Collection& other) const; + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + UnityEngine::Resolution GetCurrent(); }; } } } -namespace Plugin +namespace System { - struct SystemCollectionsObjectModelCollectionSystemInt32Iterator + namespace Collections { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsObjectModelCollectionSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsObjectModelCollectionSystemInt32Iterator(System::Collections::ObjectModel::Collection& enumerable); - ~SystemCollectionsObjectModelCollectionSystemInt32Iterator(); - SystemCollectionsObjectModelCollectionSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsObjectModelCollectionSystemInt32Iterator& other); - int32_t operator*(); - }; + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); + }; + } + } } namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable); - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable); + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); + }; } } } @@ -3545,441 +3972,545 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template<> struct KeyedCollection : virtual System::Collections::ObjectModel::Collection, virtual System::Collections::IList, virtual System::Collections::Generic::IList + template<> struct IEnumerable : virtual System::Collections::IEnumerable { - KeyedCollection(decltype(nullptr)); - KeyedCollection(Plugin::InternalUse iu, int32_t handle); - KeyedCollection(const KeyedCollection& other); - KeyedCollection(KeyedCollection&& other); - virtual ~KeyedCollection(); - KeyedCollection& operator=(const KeyedCollection& other); - KeyedCollection& operator=(decltype(nullptr)); - KeyedCollection& operator=(KeyedCollection&& other); - bool operator==(const KeyedCollection& other) const; - bool operator!=(const KeyedCollection& other) const; + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); }; } } } -namespace Plugin +namespace System { - struct SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator + namespace Collections { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(decltype(nullptr)); - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(System::Collections::ObjectModel::KeyedCollection& enumerable); - ~SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(); - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& other); - int32_t operator*(); - }; + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); + }; + } + } } namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable); - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable); + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); + }; } } } namespace System { - struct Exception : virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable + namespace Collections { - Exception(decltype(nullptr)); - Exception(Plugin::InternalUse iu, int32_t handle); - Exception(const Exception& other); - Exception(Exception&& other); - virtual ~Exception(); - Exception& operator=(const Exception& other); - Exception& operator=(decltype(nullptr)); - Exception& operator=(Exception&& other); - bool operator==(const Exception& other) const; - bool operator!=(const Exception& other) const; - Exception(System::String& message); - }; + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr)); + IEnumerable(Plugin::InternalUse, int32_t handle); + IEnumerable(const IEnumerable& other); + IEnumerable(IEnumerable&& other); + virtual ~IEnumerable(); + IEnumerable& operator=(const IEnumerable& other); + IEnumerable& operator=(decltype(nullptr)); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + System::Collections::Generic::IEnumerator GetEnumerator(); + }; + } + } } namespace System { - struct SystemException : virtual System::Exception, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable + namespace Collections { - SystemException(decltype(nullptr)); - SystemException(Plugin::InternalUse iu, int32_t handle); - SystemException(const SystemException& other); - SystemException(SystemException&& other); - virtual ~SystemException(); - SystemException& operator=(const SystemException& other); - SystemException& operator=(decltype(nullptr)); - SystemException& operator=(SystemException&& other); - bool operator==(const SystemException& other) const; - bool operator!=(const SystemException& other) const; + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr)); + ICollection(Plugin::InternalUse, int32_t handle); + ICollection(const ICollection& other); + ICollection(ICollection&& other); + virtual ~ICollection(); + ICollection& operator=(const ICollection& other); + ICollection& operator=(decltype(nullptr)); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace Plugin +{ + struct SystemCollectionsGenericICollectionSystemStringIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericICollectionSystemStringIterator(decltype(nullptr)); + SystemCollectionsGenericICollectionSystemStringIterator(System::Collections::Generic::ICollection& enumerable); + ~SystemCollectionsGenericICollectionSystemStringIterator(); + SystemCollectionsGenericICollectionSystemStringIterator& operator++(); + bool operator!=(const SystemCollectionsGenericICollectionSystemStringIterator& other); + System::String operator*(); }; } namespace System { - struct NullReferenceException : virtual System::SystemException, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable + namespace Collections { - NullReferenceException(decltype(nullptr)); - NullReferenceException(Plugin::InternalUse iu, int32_t handle); - NullReferenceException(const NullReferenceException& other); - NullReferenceException(NullReferenceException&& other); - virtual ~NullReferenceException(); - NullReferenceException& operator=(const NullReferenceException& other); - NullReferenceException& operator=(decltype(nullptr)); - NullReferenceException& operator=(NullReferenceException&& other); - bool operator==(const NullReferenceException& other) const; - bool operator!=(const NullReferenceException& other) const; - }; + namespace Generic + { + Plugin::SystemCollectionsGenericICollectionSystemStringIterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionSystemStringIterator end(System::Collections::Generic::ICollection& enumerable); + } + } } -namespace UnityEngine +namespace System { - struct Screen : virtual System::Object + namespace Collections { - Screen(decltype(nullptr)); - Screen(Plugin::InternalUse iu, int32_t handle); - Screen(const Screen& other); - Screen(Screen&& other); - virtual ~Screen(); - Screen& operator=(const Screen& other); - Screen& operator=(decltype(nullptr)); - Screen& operator=(Screen&& other); - bool operator==(const Screen& other) const; - bool operator!=(const Screen& other) const; - static System::Array1 GetResolutions(); - }; + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr)); + ICollection(Plugin::InternalUse, int32_t handle); + ICollection(const ICollection& other); + ICollection(ICollection&& other); + virtual ~ICollection(); + ICollection& operator=(const ICollection& other); + ICollection& operator=(decltype(nullptr)); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } } -namespace UnityEngine +namespace Plugin { - struct Ray : virtual System::ValueType + struct SystemCollectionsGenericICollectionSystemInt32Iterator { - Ray(decltype(nullptr)); - Ray(Plugin::InternalUse iu, int32_t handle); - Ray(const Ray& other); - Ray(Ray&& other); - virtual ~Ray(); - Ray& operator=(const Ray& other); - Ray& operator=(decltype(nullptr)); - Ray& operator=(Ray&& other); - bool operator==(const Ray& other) const; - bool operator!=(const Ray& other) const; - Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericICollectionSystemInt32Iterator(decltype(nullptr)); + SystemCollectionsGenericICollectionSystemInt32Iterator(System::Collections::Generic::ICollection& enumerable); + ~SystemCollectionsGenericICollectionSystemInt32Iterator(); + SystemCollectionsGenericICollectionSystemInt32Iterator& operator++(); + bool operator!=(const SystemCollectionsGenericICollectionSystemInt32Iterator& other); + System::Int32 operator*(); }; } -namespace UnityEngine +namespace System { - struct Physics : virtual System::Object + namespace Collections { - Physics(decltype(nullptr)); - Physics(Plugin::InternalUse iu, int32_t handle); - Physics(const Physics& other); - Physics(Physics&& other); - virtual ~Physics(); - Physics& operator=(const Physics& other); - Physics& operator=(decltype(nullptr)); - Physics& operator=(Physics&& other); - bool operator==(const Physics& other) const; - bool operator!=(const Physics& other) const; - static int32_t RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results); - static System::Array1 RaycastAll(UnityEngine::Ray& ray); - }; + namespace Generic + { + Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable); + } + } } -namespace UnityEngine +namespace System { - struct Gradient : virtual System::Object + namespace Collections { - Gradient(decltype(nullptr)); - Gradient(Plugin::InternalUse iu, int32_t handle); - Gradient(const Gradient& other); - Gradient(Gradient&& other); - virtual ~Gradient(); - Gradient& operator=(const Gradient& other); - Gradient& operator=(decltype(nullptr)); - Gradient& operator=(Gradient&& other); - bool operator==(const Gradient& other) const; - bool operator!=(const Gradient& other) const; - Gradient(); - System::Array1 GetColorKeys(); - void SetColorKeys(System::Array1& value); + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr)); + ICollection(Plugin::InternalUse, int32_t handle); + ICollection(const ICollection& other); + ICollection(ICollection&& other); + virtual ~ICollection(); + ICollection& operator=(const ICollection& other); + ICollection& operator=(decltype(nullptr)); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace Plugin +{ + struct SystemCollectionsGenericICollectionSystemSingleIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericICollectionSystemSingleIterator(decltype(nullptr)); + SystemCollectionsGenericICollectionSystemSingleIterator(System::Collections::Generic::ICollection& enumerable); + ~SystemCollectionsGenericICollectionSystemSingleIterator(); + SystemCollectionsGenericICollectionSystemSingleIterator& operator++(); + bool operator!=(const SystemCollectionsGenericICollectionSystemSingleIterator& other); + System::Single operator*(); }; } namespace System { - struct AppDomainSetup : virtual System::IAppDomainSetup + namespace Collections { - AppDomainSetup(decltype(nullptr)); - AppDomainSetup(Plugin::InternalUse iu, int32_t handle); - AppDomainSetup(const AppDomainSetup& other); - AppDomainSetup(AppDomainSetup&& other); - virtual ~AppDomainSetup(); - AppDomainSetup& operator=(const AppDomainSetup& other); - AppDomainSetup& operator=(decltype(nullptr)); - AppDomainSetup& operator=(AppDomainSetup&& other); - bool operator==(const AppDomainSetup& other) const; - bool operator!=(const AppDomainSetup& other) const; - AppDomainSetup(); - System::AppDomainInitializer GetAppDomainInitializer(); - void SetAppDomainInitializer(System::AppDomainInitializer& value); - }; + namespace Generic + { + Plugin::SystemCollectionsGenericICollectionSystemSingleIterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionSystemSingleIterator end(System::Collections::Generic::ICollection& enumerable); + } + } } -namespace UnityEngine +namespace System { - struct Application : virtual System::Object + namespace Collections { - Application(decltype(nullptr)); - Application(Plugin::InternalUse iu, int32_t handle); - Application(const Application& other); - Application(Application&& other); - virtual ~Application(); - Application& operator=(const Application& other); - Application& operator=(decltype(nullptr)); - Application& operator=(Application&& other); - bool operator==(const Application& other) const; - bool operator!=(const Application& other) const; - static void AddOnBeforeRender(UnityEngine::Events::UnityAction& del); - static void RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del); + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr)); + ICollection(Plugin::InternalUse, int32_t handle); + ICollection(const ICollection& other); + ICollection(ICollection&& other); + virtual ~ICollection(); + ICollection& operator=(const ICollection& other); + ICollection& operator=(decltype(nullptr)); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace Plugin +{ + struct SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(decltype(nullptr)); + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(System::Collections::Generic::ICollection& enumerable); + ~SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(); + SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& operator++(); + bool operator!=(const SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& other); + UnityEngine::RaycastHit operator*(); }; } -namespace UnityEngine +namespace System { - namespace SceneManagement + namespace Collections { - struct SceneManager : virtual System::Object + namespace Generic { - SceneManager(decltype(nullptr)); - SceneManager(Plugin::InternalUse iu, int32_t handle); - SceneManager(const SceneManager& other); - SceneManager(SceneManager&& other); - virtual ~SceneManager(); - SceneManager& operator=(const SceneManager& other); - SceneManager& operator=(decltype(nullptr)); - SceneManager& operator=(SceneManager&& other); - bool operator==(const SceneManager& other) const; - bool operator!=(const SceneManager& other) const; - static void AddSceneLoaded(UnityEngine::Events::UnityAction2& del); - static void RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del); - }; + Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator end(System::Collections::Generic::ICollection& enumerable); + } } } -namespace UnityEngine +namespace System { - namespace SceneManagement + namespace Collections { - struct Scene : virtual System::ValueType + namespace Generic { - Scene(decltype(nullptr)); - Scene(Plugin::InternalUse iu, int32_t handle); - Scene(const Scene& other); - Scene(Scene&& other); - virtual ~Scene(); - Scene& operator=(const Scene& other); - Scene& operator=(decltype(nullptr)); - Scene& operator=(Scene&& other); - bool operator==(const Scene& other) const; - bool operator!=(const Scene& other) const; - }; + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr)); + ICollection(Plugin::InternalUse, int32_t handle); + ICollection(const ICollection& other); + ICollection(ICollection&& other); + virtual ~ICollection(); + ICollection& operator=(const ICollection& other); + ICollection& operator=(decltype(nullptr)); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } } } -namespace System +namespace Plugin { - struct EventArgs : virtual System::Object + struct SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator { - EventArgs(decltype(nullptr)); - EventArgs(Plugin::InternalUse iu, int32_t handle); - EventArgs(const EventArgs& other); - EventArgs(EventArgs&& other); - virtual ~EventArgs(); - EventArgs& operator=(const EventArgs& other); - EventArgs& operator=(decltype(nullptr)); - EventArgs& operator=(EventArgs&& other); - bool operator==(const EventArgs& other) const; - bool operator!=(const EventArgs& other) const; + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(decltype(nullptr)); + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(System::Collections::Generic::ICollection& enumerable); + ~SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(); + SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& operator++(); + bool operator!=(const SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& other); + UnityEngine::GradientColorKey operator*(); }; } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - struct ComponentEventArgs : virtual System::EventArgs + Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator end(System::Collections::Generic::ICollection& enumerable); + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ComponentEventArgs(decltype(nullptr)); - ComponentEventArgs(Plugin::InternalUse iu, int32_t handle); - ComponentEventArgs(const ComponentEventArgs& other); - ComponentEventArgs(ComponentEventArgs&& other); - virtual ~ComponentEventArgs(); - ComponentEventArgs& operator=(const ComponentEventArgs& other); - ComponentEventArgs& operator=(decltype(nullptr)); - ComponentEventArgs& operator=(ComponentEventArgs&& other); - bool operator==(const ComponentEventArgs& other) const; - bool operator!=(const ComponentEventArgs& other) const; + ICollection(decltype(nullptr)); + ICollection(Plugin::InternalUse, int32_t handle); + ICollection(const ICollection& other); + ICollection(ICollection&& other); + virtual ~ICollection(); + ICollection& operator=(const ICollection& other); + ICollection& operator=(decltype(nullptr)); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; }; } } } +namespace Plugin +{ + struct SystemCollectionsGenericICollectionUnityEngineResolutionIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericICollectionUnityEngineResolutionIterator(decltype(nullptr)); + SystemCollectionsGenericICollectionUnityEngineResolutionIterator(System::Collections::Generic::ICollection& enumerable); + ~SystemCollectionsGenericICollectionUnityEngineResolutionIterator(); + SystemCollectionsGenericICollectionUnityEngineResolutionIterator& operator++(); + bool operator!=(const SystemCollectionsGenericICollectionUnityEngineResolutionIterator& other); + UnityEngine::Resolution operator*(); + }; +} + namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - struct ComponentChangingEventArgs : virtual System::EventArgs + Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator end(System::Collections::Generic::ICollection& enumerable); + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection { - ComponentChangingEventArgs(decltype(nullptr)); - ComponentChangingEventArgs(Plugin::InternalUse iu, int32_t handle); - ComponentChangingEventArgs(const ComponentChangingEventArgs& other); - ComponentChangingEventArgs(ComponentChangingEventArgs&& other); - virtual ~ComponentChangingEventArgs(); - ComponentChangingEventArgs& operator=(const ComponentChangingEventArgs& other); - ComponentChangingEventArgs& operator=(decltype(nullptr)); - ComponentChangingEventArgs& operator=(ComponentChangingEventArgs&& other); - bool operator==(const ComponentChangingEventArgs& other) const; - bool operator!=(const ComponentChangingEventArgs& other) const; + IList(decltype(nullptr)); + IList(Plugin::InternalUse, int32_t handle); + IList(const IList& other); + IList(IList&& other); + virtual ~IList(); + IList& operator=(const IList& other); + IList& operator=(decltype(nullptr)); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; }; } } } +namespace Plugin +{ + struct SystemCollectionsGenericIListSystemStringIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericIListSystemStringIterator(decltype(nullptr)); + SystemCollectionsGenericIListSystemStringIterator(System::Collections::Generic::IList& enumerable); + ~SystemCollectionsGenericIListSystemStringIterator(); + SystemCollectionsGenericIListSystemStringIterator& operator++(); + bool operator!=(const SystemCollectionsGenericIListSystemStringIterator& other); + System::String operator*(); + }; +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericIListSystemStringIterator begin(System::Collections::Generic::IList& enumerable); + Plugin::SystemCollectionsGenericIListSystemStringIterator end(System::Collections::Generic::IList& enumerable); + } + } +} + namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - struct ComponentChangedEventArgs : virtual System::EventArgs + template<> struct IList : virtual System::Collections::Generic::ICollection { - ComponentChangedEventArgs(decltype(nullptr)); - ComponentChangedEventArgs(Plugin::InternalUse iu, int32_t handle); - ComponentChangedEventArgs(const ComponentChangedEventArgs& other); - ComponentChangedEventArgs(ComponentChangedEventArgs&& other); - virtual ~ComponentChangedEventArgs(); - ComponentChangedEventArgs& operator=(const ComponentChangedEventArgs& other); - ComponentChangedEventArgs& operator=(decltype(nullptr)); - ComponentChangedEventArgs& operator=(ComponentChangedEventArgs&& other); - bool operator==(const ComponentChangedEventArgs& other) const; - bool operator!=(const ComponentChangedEventArgs& other) const; + IList(decltype(nullptr)); + IList(Plugin::InternalUse, int32_t handle); + IList(const IList& other); + IList(IList&& other); + virtual ~IList(); + IList& operator=(const IList& other); + IList& operator=(decltype(nullptr)); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; }; } } } -namespace System +namespace Plugin { - namespace ComponentModel + struct SystemCollectionsGenericIListSystemInt32Iterator { - namespace Design - { - struct ComponentRenameEventArgs : virtual System::EventArgs - { - ComponentRenameEventArgs(decltype(nullptr)); - ComponentRenameEventArgs(Plugin::InternalUse iu, int32_t handle); - ComponentRenameEventArgs(const ComponentRenameEventArgs& other); - ComponentRenameEventArgs(ComponentRenameEventArgs&& other); - virtual ~ComponentRenameEventArgs(); - ComponentRenameEventArgs& operator=(const ComponentRenameEventArgs& other); - ComponentRenameEventArgs& operator=(decltype(nullptr)); - ComponentRenameEventArgs& operator=(ComponentRenameEventArgs&& other); - bool operator==(const ComponentRenameEventArgs& other) const; - bool operator!=(const ComponentRenameEventArgs& other) const; - }; - } - } + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericIListSystemInt32Iterator(decltype(nullptr)); + SystemCollectionsGenericIListSystemInt32Iterator(System::Collections::Generic::IList& enumerable); + ~SystemCollectionsGenericIListSystemInt32Iterator(); + SystemCollectionsGenericIListSystemInt32Iterator& operator++(); + bool operator!=(const SystemCollectionsGenericIListSystemInt32Iterator& other); + System::Int32 operator*(); + }; } namespace System { - namespace ComponentModel + namespace Collections { - struct MemberDescriptor : virtual System::Object + namespace Generic { - MemberDescriptor(decltype(nullptr)); - MemberDescriptor(Plugin::InternalUse iu, int32_t handle); - MemberDescriptor(const MemberDescriptor& other); - MemberDescriptor(MemberDescriptor&& other); - virtual ~MemberDescriptor(); - MemberDescriptor& operator=(const MemberDescriptor& other); - MemberDescriptor& operator=(decltype(nullptr)); - MemberDescriptor& operator=(MemberDescriptor&& other); - bool operator==(const MemberDescriptor& other) const; - bool operator!=(const MemberDescriptor& other) const; - }; + Plugin::SystemCollectionsGenericIListSystemInt32Iterator begin(System::Collections::Generic::IList& enumerable); + Plugin::SystemCollectionsGenericIListSystemInt32Iterator end(System::Collections::Generic::IList& enumerable); + } } } -namespace UnityEngine +namespace System { - struct Time : virtual System::Object + namespace Collections { - Time(decltype(nullptr)); - Time(Plugin::InternalUse iu, int32_t handle); - Time(const Time& other); - Time(Time&& other); - virtual ~Time(); - Time& operator=(const Time& other); - Time& operator=(decltype(nullptr)); - Time& operator=(Time&& other); - bool operator==(const Time& other) const; - bool operator!=(const Time& other) const; - static float GetDeltaTime(); - }; + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr)); + IList(Plugin::InternalUse, int32_t handle); + IList(const IList& other); + IList(IList&& other); + virtual ~IList(); + IList& operator=(const IList& other); + IList& operator=(decltype(nullptr)); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } } -namespace System +namespace Plugin { - struct MarshalByRefObject : virtual System::Object + struct SystemCollectionsGenericIListSystemSingleIterator { - MarshalByRefObject(decltype(nullptr)); - MarshalByRefObject(Plugin::InternalUse iu, int32_t handle); - MarshalByRefObject(const MarshalByRefObject& other); - MarshalByRefObject(MarshalByRefObject&& other); - virtual ~MarshalByRefObject(); - MarshalByRefObject& operator=(const MarshalByRefObject& other); - MarshalByRefObject& operator=(decltype(nullptr)); - MarshalByRefObject& operator=(MarshalByRefObject&& other); - bool operator==(const MarshalByRefObject& other) const; - bool operator!=(const MarshalByRefObject& other) const; + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericIListSystemSingleIterator(decltype(nullptr)); + SystemCollectionsGenericIListSystemSingleIterator(System::Collections::Generic::IList& enumerable); + ~SystemCollectionsGenericIListSystemSingleIterator(); + SystemCollectionsGenericIListSystemSingleIterator& operator++(); + bool operator!=(const SystemCollectionsGenericIListSystemSingleIterator& other); + System::Single operator*(); }; } namespace System { - namespace IO + namespace Collections { - struct Stream : virtual System::MarshalByRefObject, virtual System::IDisposable + namespace Generic { - Stream(decltype(nullptr)); - Stream(Plugin::InternalUse iu, int32_t handle); - Stream(const Stream& other); - Stream(Stream&& other); - virtual ~Stream(); - Stream& operator=(const Stream& other); - Stream& operator=(decltype(nullptr)); - Stream& operator=(Stream&& other); - bool operator==(const Stream& other) const; - bool operator!=(const Stream& other) const; - }; + Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable); + Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable); + } } } @@ -3989,42 +4520,46 @@ namespace System { namespace Generic { - template<> struct IComparer : virtual System::Object + template<> struct IList : virtual System::Collections::Generic::ICollection { - IComparer(decltype(nullptr)); - IComparer(Plugin::InternalUse iu, int32_t handle); - IComparer(const IComparer& other); - IComparer(IComparer&& other); - virtual ~IComparer(); - IComparer& operator=(const IComparer& other); - IComparer& operator=(decltype(nullptr)); - IComparer& operator=(IComparer&& other); - bool operator==(const IComparer& other) const; - bool operator!=(const IComparer& other) const; + IList(decltype(nullptr)); + IList(Plugin::InternalUse, int32_t handle); + IList(const IList& other); + IList(IList&& other); + virtual ~IList(); + IList& operator=(const IList& other); + IList& operator=(decltype(nullptr)); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; }; } } } +namespace Plugin +{ + struct SystemCollectionsGenericIListUnityEngineRaycastHitIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericIListUnityEngineRaycastHitIterator(decltype(nullptr)); + SystemCollectionsGenericIListUnityEngineRaycastHitIterator(System::Collections::Generic::IList& enumerable); + ~SystemCollectionsGenericIListUnityEngineRaycastHitIterator(); + SystemCollectionsGenericIListUnityEngineRaycastHitIterator& operator++(); + bool operator!=(const SystemCollectionsGenericIListUnityEngineRaycastHitIterator& other); + UnityEngine::RaycastHit operator*(); + }; +} + namespace System { namespace Collections { namespace Generic { - template<> struct IComparer : virtual System::Object - { - IComparer(decltype(nullptr)); - IComparer(Plugin::InternalUse iu, int32_t handle); - IComparer(const IComparer& other); - IComparer(IComparer&& other); - virtual ~IComparer(); - IComparer& operator=(const IComparer& other); - IComparer& operator=(decltype(nullptr)); - IComparer& operator=(IComparer&& other); - bool operator==(const IComparer& other) const; - bool operator!=(const IComparer& other) const; - }; + Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator begin(System::Collections::Generic::IList& enumerable); + Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator end(System::Collections::Generic::IList& enumerable); } } } @@ -4035,88 +4570,85 @@ namespace System { namespace Generic { - template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer + template<> struct IList : virtual System::Collections::Generic::ICollection { - BaseIComparer(decltype(nullptr)); - BaseIComparer(Plugin::InternalUse iu, int32_t handle); - BaseIComparer(const BaseIComparer& other); - BaseIComparer(BaseIComparer&& other); - virtual ~BaseIComparer(); - BaseIComparer& operator=(const BaseIComparer& other); - BaseIComparer& operator=(decltype(nullptr)); - BaseIComparer& operator=(BaseIComparer&& other); - bool operator==(const BaseIComparer& other) const; - bool operator!=(const BaseIComparer& other) const; - int32_t CppHandle; - BaseIComparer(); - virtual int32_t Compare(int32_t x, int32_t y); + IList(decltype(nullptr)); + IList(Plugin::InternalUse, int32_t handle); + IList(const IList& other); + IList(IList&& other); + virtual ~IList(); + IList& operator=(const IList& other); + IList& operator=(decltype(nullptr)); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; }; } } } +namespace Plugin +{ + struct SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(decltype(nullptr)); + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(System::Collections::Generic::IList& enumerable); + ~SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(); + SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& operator++(); + bool operator!=(const SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& other); + UnityEngine::GradientColorKey operator*(); + }; +} + namespace System { namespace Collections { namespace Generic { - template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer - { - BaseIComparer(decltype(nullptr)); - BaseIComparer(Plugin::InternalUse iu, int32_t handle); - BaseIComparer(const BaseIComparer& other); - BaseIComparer(BaseIComparer&& other); - virtual ~BaseIComparer(); - BaseIComparer& operator=(const BaseIComparer& other); - BaseIComparer& operator=(decltype(nullptr)); - BaseIComparer& operator=(BaseIComparer&& other); - bool operator==(const BaseIComparer& other) const; - bool operator!=(const BaseIComparer& other) const; - int32_t CppHandle; - BaseIComparer(); - virtual int32_t Compare(System::String& x, System::String& y); - }; + Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::IList& enumerable); + Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator end(System::Collections::Generic::IList& enumerable); } } } namespace System { - struct StringComparer : virtual System::Collections::IComparer, virtual System::Collections::Generic::IComparer, virtual System::Collections::IEqualityComparer, virtual System::Collections::Generic::IEqualityComparer + namespace Collections { - StringComparer(decltype(nullptr)); - StringComparer(Plugin::InternalUse iu, int32_t handle); - StringComparer(const StringComparer& other); - StringComparer(StringComparer&& other); - virtual ~StringComparer(); - StringComparer& operator=(const StringComparer& other); - StringComparer& operator=(decltype(nullptr)); - StringComparer& operator=(StringComparer&& other); - bool operator==(const StringComparer& other) const; - bool operator!=(const StringComparer& other) const; - }; + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr)); + IList(Plugin::InternalUse, int32_t handle); + IList(const IList& other); + IList(IList&& other); + virtual ~IList(); + IList& operator=(const IList& other); + IList& operator=(decltype(nullptr)); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } } -namespace System +namespace Plugin { - struct BaseStringComparer : virtual System::StringComparer + struct SystemCollectionsGenericIListUnityEngineResolutionIterator { - BaseStringComparer(decltype(nullptr)); - BaseStringComparer(Plugin::InternalUse iu, int32_t handle); - BaseStringComparer(const BaseStringComparer& other); - BaseStringComparer(BaseStringComparer&& other); - virtual ~BaseStringComparer(); - BaseStringComparer& operator=(const BaseStringComparer& other); - BaseStringComparer& operator=(decltype(nullptr)); - BaseStringComparer& operator=(BaseStringComparer&& other); - bool operator==(const BaseStringComparer& other) const; - bool operator!=(const BaseStringComparer& other) const; - int32_t CppHandle; - BaseStringComparer(); - virtual int32_t Compare(System::String& x, System::String& y); - virtual System::Boolean Equals(System::String& x, System::String& y); - virtual int32_t GetHashCode(System::String& obj); + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericIListUnityEngineResolutionIterator(decltype(nullptr)); + SystemCollectionsGenericIListUnityEngineResolutionIterator(System::Collections::Generic::IList& enumerable); + ~SystemCollectionsGenericIListUnityEngineResolutionIterator(); + SystemCollectionsGenericIListUnityEngineResolutionIterator& operator++(); + bool operator!=(const SystemCollectionsGenericIListUnityEngineResolutionIterator& other); + UnityEngine::Resolution operator*(); }; } @@ -4124,20 +4656,11 @@ namespace System { namespace Collections { - struct Queue : virtual System::ICloneable, virtual System::Collections::ICollection + namespace Generic { - Queue(decltype(nullptr)); - Queue(Plugin::InternalUse iu, int32_t handle); - Queue(const Queue& other); - Queue(Queue&& other); - virtual ~Queue(); - Queue& operator=(const Queue& other); - Queue& operator=(decltype(nullptr)); - Queue& operator=(Queue&& other); - bool operator==(const Queue& other) const; - bool operator!=(const Queue& other) const; - int32_t GetCount(); - }; + Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator begin(System::Collections::Generic::IList& enumerable); + Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator end(System::Collections::Generic::IList& enumerable); + } } } @@ -4145,238 +4668,208 @@ namespace System { namespace Collections { - struct BaseQueue : virtual System::Collections::Queue + namespace Generic { - BaseQueue(decltype(nullptr)); - BaseQueue(Plugin::InternalUse iu, int32_t handle); - BaseQueue(const BaseQueue& other); - BaseQueue(BaseQueue&& other); - virtual ~BaseQueue(); - BaseQueue& operator=(const BaseQueue& other); - BaseQueue& operator=(decltype(nullptr)); - BaseQueue& operator=(BaseQueue&& other); - bool operator==(const BaseQueue& other) const; - bool operator!=(const BaseQueue& other) const; - int32_t CppHandle; - BaseQueue(); - virtual int32_t GetCount(); - }; + template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList + { + List(decltype(nullptr)); + List(Plugin::InternalUse, int32_t handle); + List(const List& other); + List(List&& other); + virtual ~List(); + List& operator=(const List& other); + List& operator=(decltype(nullptr)); + List& operator=(List&& other); + bool operator==(const List& other) const; + bool operator!=(const List& other) const; + List(); + System::String GetItem(System::Int32 index); + void SetItem(System::Int32 index, System::String& value); + void Add(System::String& item); + void Sort(System::Collections::Generic::IComparer& comparer); + }; + } } } +namespace Plugin +{ + struct SystemCollectionsGenericListSystemStringIterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericListSystemStringIterator(decltype(nullptr)); + SystemCollectionsGenericListSystemStringIterator(System::Collections::Generic::List& enumerable); + ~SystemCollectionsGenericListSystemStringIterator(); + SystemCollectionsGenericListSystemStringIterator& operator++(); + bool operator!=(const SystemCollectionsGenericListSystemStringIterator& other); + System::String operator*(); + }; +} + namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - struct IComponentChangeService : virtual System::Object - { - IComponentChangeService(decltype(nullptr)); - IComponentChangeService(Plugin::InternalUse iu, int32_t handle); - IComponentChangeService(const IComponentChangeService& other); - IComponentChangeService(IComponentChangeService&& other); - virtual ~IComponentChangeService(); - IComponentChangeService& operator=(const IComponentChangeService& other); - IComponentChangeService& operator=(decltype(nullptr)); - IComponentChangeService& operator=(IComponentChangeService&& other); - bool operator==(const IComponentChangeService& other) const; - bool operator!=(const IComponentChangeService& other) const; - }; + Plugin::SystemCollectionsGenericListSystemStringIterator begin(System::Collections::Generic::List& enumerable); + Plugin::SystemCollectionsGenericListSystemStringIterator end(System::Collections::Generic::List& enumerable); } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - struct BaseIComponentChangeService : virtual System::ComponentModel::Design::IComponentChangeService + template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList { - BaseIComponentChangeService(decltype(nullptr)); - BaseIComponentChangeService(Plugin::InternalUse iu, int32_t handle); - BaseIComponentChangeService(const BaseIComponentChangeService& other); - BaseIComponentChangeService(BaseIComponentChangeService&& other); - virtual ~BaseIComponentChangeService(); - BaseIComponentChangeService& operator=(const BaseIComponentChangeService& other); - BaseIComponentChangeService& operator=(decltype(nullptr)); - BaseIComponentChangeService& operator=(BaseIComponentChangeService&& other); - bool operator==(const BaseIComponentChangeService& other) const; - bool operator!=(const BaseIComponentChangeService& other) const; - int32_t CppHandle; - BaseIComponentChangeService(); - virtual void OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue); - virtual void OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member); - virtual void AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value); - virtual void RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value); - virtual void AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value); - virtual void RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value); - virtual void AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value); - virtual void RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value); + List(decltype(nullptr)); + List(Plugin::InternalUse, int32_t handle); + List(const List& other); + List(List&& other); + virtual ~List(); + List& operator=(const List& other); + List& operator=(decltype(nullptr)); + List& operator=(List&& other); + bool operator==(const List& other) const; + bool operator!=(const List& other) const; + List(); + System::Int32 GetItem(System::Int32 index); + void SetItem(System::Int32 index, System::Int32 value); + void Add(System::Int32 item); + void Sort(System::Collections::Generic::IComparer& comparer); }; } } } +namespace Plugin +{ + struct SystemCollectionsGenericListSystemInt32Iterator + { + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsGenericListSystemInt32Iterator(decltype(nullptr)); + SystemCollectionsGenericListSystemInt32Iterator(System::Collections::Generic::List& enumerable); + ~SystemCollectionsGenericListSystemInt32Iterator(); + SystemCollectionsGenericListSystemInt32Iterator& operator++(); + bool operator!=(const SystemCollectionsGenericListSystemInt32Iterator& other); + System::Int32 operator*(); + }; +} + namespace System { - namespace IO + namespace Collections { - struct FileStream : virtual System::IO::Stream, virtual System::IDisposable + namespace Generic { - FileStream(decltype(nullptr)); - FileStream(Plugin::InternalUse iu, int32_t handle); - FileStream(const FileStream& other); - FileStream(FileStream&& other); - virtual ~FileStream(); - FileStream& operator=(const FileStream& other); - FileStream& operator=(decltype(nullptr)); - FileStream& operator=(FileStream&& other); - bool operator==(const FileStream& other) const; - bool operator!=(const FileStream& other) const; - FileStream(System::String& path, System::IO::FileMode mode); - void WriteByte(uint8_t value); - }; + Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable); + Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable); + } } } namespace System { - namespace IO + namespace Collections { - struct BaseFileStream : virtual System::IO::FileStream + namespace ObjectModel { - BaseFileStream(decltype(nullptr)); - BaseFileStream(Plugin::InternalUse iu, int32_t handle); - BaseFileStream(const BaseFileStream& other); - BaseFileStream(BaseFileStream&& other); - virtual ~BaseFileStream(); - BaseFileStream& operator=(const BaseFileStream& other); - BaseFileStream& operator=(decltype(nullptr)); - BaseFileStream& operator=(BaseFileStream&& other); - bool operator==(const BaseFileStream& other) const; - bool operator!=(const BaseFileStream& other) const; - int32_t CppHandle; - BaseFileStream(System::String& path, System::IO::FileMode mode); - virtual void WriteByte(uint8_t value); - }; + template<> struct Collection : virtual System::Collections::IList, virtual System::Collections::Generic::IList + { + Collection(decltype(nullptr)); + Collection(Plugin::InternalUse, int32_t handle); + Collection(const Collection& other); + Collection(Collection&& other); + virtual ~Collection(); + Collection& operator=(const Collection& other); + Collection& operator=(decltype(nullptr)); + Collection& operator=(Collection&& other); + bool operator==(const Collection& other) const; + bool operator!=(const Collection& other) const; + }; + } } } -namespace UnityEngine +namespace Plugin { - namespace Playables + struct SystemCollectionsObjectModelCollectionSystemInt32Iterator { - struct PlayableHandle : virtual System::ValueType - { - PlayableHandle(decltype(nullptr)); - PlayableHandle(Plugin::InternalUse iu, int32_t handle); - PlayableHandle(const PlayableHandle& other); - PlayableHandle(PlayableHandle&& other); - virtual ~PlayableHandle(); - PlayableHandle& operator=(const PlayableHandle& other); - PlayableHandle& operator=(decltype(nullptr)); - PlayableHandle& operator=(PlayableHandle&& other); - bool operator==(const PlayableHandle& other) const; - bool operator!=(const PlayableHandle& other) const; - }; - } + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsObjectModelCollectionSystemInt32Iterator(decltype(nullptr)); + SystemCollectionsObjectModelCollectionSystemInt32Iterator(System::Collections::ObjectModel::Collection& enumerable); + ~SystemCollectionsObjectModelCollectionSystemInt32Iterator(); + SystemCollectionsObjectModelCollectionSystemInt32Iterator& operator++(); + bool operator!=(const SystemCollectionsObjectModelCollectionSystemInt32Iterator& other); + System::Int32 operator*(); + }; } -namespace UnityEngine +namespace System { - namespace Experimental + namespace Collections { - namespace UIElements + namespace ObjectModel { - struct CallbackEventHandler : virtual UnityEngine::Experimental::UIElements::IEventHandler - { - CallbackEventHandler(decltype(nullptr)); - CallbackEventHandler(Plugin::InternalUse iu, int32_t handle); - CallbackEventHandler(const CallbackEventHandler& other); - CallbackEventHandler(CallbackEventHandler&& other); - virtual ~CallbackEventHandler(); - CallbackEventHandler& operator=(const CallbackEventHandler& other); - CallbackEventHandler& operator=(decltype(nullptr)); - CallbackEventHandler& operator=(CallbackEventHandler&& other); - bool operator==(const CallbackEventHandler& other) const; - bool operator!=(const CallbackEventHandler& other) const; - }; + Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable); + Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable); } } } -namespace UnityEngine +namespace System { - namespace Experimental + namespace Collections { - namespace UIElements + namespace ObjectModel { - struct VisualElement : virtual UnityEngine::Experimental::UIElements::CallbackEventHandler, virtual UnityEngine::Experimental::UIElements::IEventHandler, virtual UnityEngine::Experimental::UIElements::IStyle + template<> struct KeyedCollection : virtual System::Collections::ObjectModel::Collection, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - VisualElement(decltype(nullptr)); - VisualElement(Plugin::InternalUse iu, int32_t handle); - VisualElement(const VisualElement& other); - VisualElement(VisualElement&& other); - virtual ~VisualElement(); - VisualElement& operator=(const VisualElement& other); - VisualElement& operator=(decltype(nullptr)); - VisualElement& operator=(VisualElement&& other); - bool operator==(const VisualElement& other) const; - bool operator!=(const VisualElement& other) const; + KeyedCollection(decltype(nullptr)); + KeyedCollection(Plugin::InternalUse, int32_t handle); + KeyedCollection(const KeyedCollection& other); + KeyedCollection(KeyedCollection&& other); + virtual ~KeyedCollection(); + KeyedCollection& operator=(const KeyedCollection& other); + KeyedCollection& operator=(decltype(nullptr)); + KeyedCollection& operator=(KeyedCollection&& other); + bool operator==(const KeyedCollection& other) const; + bool operator!=(const KeyedCollection& other) const; }; } } } -namespace UnityEngine +namespace Plugin { - namespace Experimental + struct SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator { - namespace UIElements - { - namespace UQueryExtensions - { - UnityEngine::Experimental::UIElements::VisualElement Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::Array1& classes); - UnityEngine::Experimental::UIElements::VisualElement Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name = Plugin::NullString, System::String& className = Plugin::NullString); - } - } - } + System::Collections::Generic::IEnumerator enumerator; + bool hasMore; + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(decltype(nullptr)); + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(System::Collections::ObjectModel::KeyedCollection& enumerable); + ~SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(); + SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& operator++(); + bool operator!=(const SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& other); + System::Int32 operator*(); + }; } -namespace UnityEngine +namespace System { - namespace XR + namespace Collections { - namespace WSA + namespace ObjectModel { - namespace Input - { - struct InteractionSourcePose : virtual System::ValueType - { - InteractionSourcePose(decltype(nullptr)); - InteractionSourcePose(Plugin::InternalUse iu, int32_t handle); - InteractionSourcePose(const InteractionSourcePose& other); - InteractionSourcePose(InteractionSourcePose&& other); - virtual ~InteractionSourcePose(); - InteractionSourcePose& operator=(const InteractionSourcePose& other); - InteractionSourcePose& operator=(decltype(nullptr)); - InteractionSourcePose& operator=(InteractionSourcePose&& other); - bool operator==(const InteractionSourcePose& other) const; - bool operator!=(const InteractionSourcePose& other) const; - System::Boolean TryGetRotation(UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node = UnityEngine::XR::WSA::Input::InteractionSourceNode::Grip); - }; - } + Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable); + Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable); } } } @@ -4388,7 +4881,7 @@ namespace MyGame struct TestScript : virtual UnityEngine::MonoBehaviour { TestScript(decltype(nullptr)); - TestScript(Plugin::InternalUse iu, int32_t handle); + TestScript(Plugin::InternalUse, int32_t handle); TestScript(const TestScript& other); TestScript(TestScript&& other); virtual ~TestScript(); @@ -4398,7 +4891,7 @@ namespace MyGame bool operator==(const TestScript& other) const; bool operator!=(const TestScript& other) const; void Awake(); - void OnAnimatorIK(int32_t param0); + void OnAnimatorIK(System::Int32 param0); void OnCollisionEnter(UnityEngine::Collision& param0); void Update(); }; @@ -4412,7 +4905,7 @@ namespace MyGame struct AnotherScript : virtual UnityEngine::MonoBehaviour { AnotherScript(decltype(nullptr)); - AnotherScript(Plugin::InternalUse iu, int32_t handle); + AnotherScript(Plugin::InternalUse, int32_t handle); AnotherScript(const AnotherScript& other); AnotherScript(AnotherScript&& other); virtual ~AnotherScript(); @@ -4429,35 +4922,35 @@ namespace MyGame namespace Plugin { - template<> struct ArrayElementProxy1_1 + template<> struct ArrayElementProxy1_1 { int32_t Handle; int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); - void operator=(int32_t item); - operator int32_t(); + ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); + void operator=(System::Int32 item); + operator System::Int32(); }; } namespace System { - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse iu, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; + Array1(decltype(nullptr)); + Array1(Plugin::InternalUse, int32_t handle); + Array1(const Array1& other); + Array1(Array1&& other); + virtual ~Array1(); + Array1& operator=(const Array1& other); + Array1& operator=(decltype(nullptr)); + Array1& operator=(Array1&& other); + bool operator==(const Array1& other) const; + bool operator!=(const Array1& other) const; int32_t InternalLength; - Array1(int32_t length0); - int32_t GetLength(); - int32_t GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); + Array1(System::Int32 length0); + System::Int32 GetLength(); + System::Int32 GetRank(); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -4465,113 +4958,113 @@ namespace Plugin { struct SystemInt32Array1Iterator { - System::Array1& array; + System::Array1& array; int index; - SystemInt32Array1Iterator(System::Array1& array, int32_t index); + SystemInt32Array1Iterator(System::Array1& array, int32_t index); SystemInt32Array1Iterator& operator++(); bool operator!=(const SystemInt32Array1Iterator& other); - int32_t operator*(); + System::Int32 operator*(); }; } namespace System { - Plugin::SystemInt32Array1Iterator begin(System::Array1& array); - Plugin::SystemInt32Array1Iterator end(System::Array1& array); + Plugin::SystemInt32Array1Iterator begin(System::Array1& array); + Plugin::SystemInt32Array1Iterator end(System::Array1& array); } namespace Plugin { - template<> struct ArrayElementProxy1_1 + template<> struct ArrayElementProxy1_1 { int32_t Handle; int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); - void operator=(float item); - operator float(); + ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); + void operator=(System::Single item); + operator System::Single(); }; } namespace Plugin { - template<> struct ArrayElementProxy1_2 + template<> struct ArrayElementProxy1_2 { int32_t Handle; int32_t Index0; - ArrayElementProxy1_2(Plugin::InternalUse iu, int32_t handle, int32_t index0); - Plugin::ArrayElementProxy2_2 operator[](int32_t index); + ArrayElementProxy1_2(Plugin::InternalUse, int32_t handle, int32_t index0); + Plugin::ArrayElementProxy2_2 operator[](int32_t index); }; } namespace Plugin { - template<> struct ArrayElementProxy2_2 + template<> struct ArrayElementProxy2_2 { int32_t Handle; int32_t Index0; int32_t Index1; - ArrayElementProxy2_2(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1); - void operator=(float item); - operator float(); + ArrayElementProxy2_2(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1); + void operator=(System::Single item); + operator System::Single(); }; } namespace Plugin { - template<> struct ArrayElementProxy1_3 + template<> struct ArrayElementProxy1_3 { int32_t Handle; int32_t Index0; - ArrayElementProxy1_3(Plugin::InternalUse iu, int32_t handle, int32_t index0); - Plugin::ArrayElementProxy2_3 operator[](int32_t index); + ArrayElementProxy1_3(Plugin::InternalUse, int32_t handle, int32_t index0); + Plugin::ArrayElementProxy2_3 operator[](int32_t index); }; } namespace Plugin { - template<> struct ArrayElementProxy2_3 + template<> struct ArrayElementProxy2_3 { int32_t Handle; int32_t Index0; int32_t Index1; - ArrayElementProxy2_3(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1); - Plugin::ArrayElementProxy3_3 operator[](int32_t index); + ArrayElementProxy2_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1); + Plugin::ArrayElementProxy3_3 operator[](int32_t index); }; } namespace Plugin { - template<> struct ArrayElementProxy3_3 + template<> struct ArrayElementProxy3_3 { int32_t Handle; int32_t Index0; int32_t Index1; int32_t Index2; - ArrayElementProxy3_3(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1, int32_t index2); - void operator=(float item); - operator float(); + ArrayElementProxy3_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1, int32_t index2); + void operator=(System::Single item); + operator System::Single(); }; } namespace System { - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse iu, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; + Array1(decltype(nullptr)); + Array1(Plugin::InternalUse, int32_t handle); + Array1(const Array1& other); + Array1(Array1&& other); + virtual ~Array1(); + Array1& operator=(const Array1& other); + Array1& operator=(decltype(nullptr)); + Array1& operator=(Array1&& other); + bool operator==(const Array1& other) const; + bool operator!=(const Array1& other) const; int32_t InternalLength; - Array1(int32_t length0); - int32_t GetLength(); - int32_t GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); + Array1(System::Int32 length0); + System::Int32 GetLength(); + System::Int32 GetRank(); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -4579,66 +5072,66 @@ namespace Plugin { struct SystemSingleArray1Iterator { - System::Array1& array; + System::Array1& array; int index; - SystemSingleArray1Iterator(System::Array1& array, int32_t index); + SystemSingleArray1Iterator(System::Array1& array, int32_t index); SystemSingleArray1Iterator& operator++(); bool operator!=(const SystemSingleArray1Iterator& other); - float operator*(); + System::Single operator*(); }; } namespace System { - Plugin::SystemSingleArray1Iterator begin(System::Array1& array); - Plugin::SystemSingleArray1Iterator end(System::Array1& array); + Plugin::SystemSingleArray1Iterator begin(System::Array1& array); + Plugin::SystemSingleArray1Iterator end(System::Array1& array); } namespace System { - template<> struct Array2 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList + template<> struct Array2 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList { - Array2(decltype(nullptr)); - Array2(Plugin::InternalUse iu, int32_t handle); - Array2(const Array2& other); - Array2(Array2&& other); - virtual ~Array2(); - Array2& operator=(const Array2& other); - Array2& operator=(decltype(nullptr)); - Array2& operator=(Array2&& other); - bool operator==(const Array2& other) const; - bool operator!=(const Array2& other) const; + Array2(decltype(nullptr)); + Array2(Plugin::InternalUse, int32_t handle); + Array2(const Array2& other); + Array2(Array2&& other); + virtual ~Array2(); + Array2& operator=(const Array2& other); + Array2& operator=(decltype(nullptr)); + Array2& operator=(Array2&& other); + bool operator==(const Array2& other) const; + bool operator!=(const Array2& other) const; int32_t InternalLength; int32_t InternalLengths[2]; - Array2(int32_t length0, int32_t length1); - int32_t GetLength(); - int32_t GetLength(int32_t dimension); - int32_t GetRank(); - Plugin::ArrayElementProxy1_2 operator[](int32_t index); + Array2(System::Int32 length0, System::Int32 length1); + System::Int32 GetLength(); + System::Int32 GetLength(System::Int32 dimension); + System::Int32 GetRank(); + Plugin::ArrayElementProxy1_2 operator[](int32_t index); }; } namespace System { - template<> struct Array3 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList + template<> struct Array3 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList { - Array3(decltype(nullptr)); - Array3(Plugin::InternalUse iu, int32_t handle); - Array3(const Array3& other); - Array3(Array3&& other); - virtual ~Array3(); - Array3& operator=(const Array3& other); - Array3& operator=(decltype(nullptr)); - Array3& operator=(Array3&& other); - bool operator==(const Array3& other) const; - bool operator!=(const Array3& other) const; + Array3(decltype(nullptr)); + Array3(Plugin::InternalUse, int32_t handle); + Array3(const Array3& other); + Array3(Array3&& other); + virtual ~Array3(); + Array3& operator=(const Array3& other); + Array3& operator=(decltype(nullptr)); + Array3& operator=(Array3&& other); + bool operator==(const Array3& other) const; + bool operator!=(const Array3& other) const; int32_t InternalLength; int32_t InternalLengths[3]; - Array3(int32_t length0, int32_t length1, int32_t length2); - int32_t GetLength(); - int32_t GetLength(int32_t dimension); - int32_t GetRank(); - Plugin::ArrayElementProxy1_3 operator[](int32_t index); + Array3(System::Int32 length0, System::Int32 length1, System::Int32 length2); + System::Int32 GetLength(); + System::Int32 GetLength(System::Int32 dimension); + System::Int32 GetRank(); + Plugin::ArrayElementProxy1_3 operator[](int32_t index); }; } @@ -4648,7 +5141,7 @@ namespace Plugin { int32_t Handle; int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); void operator=(System::String item); operator System::String(); }; @@ -4659,7 +5152,7 @@ namespace System template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr)); - Array1(Plugin::InternalUse iu, int32_t handle); + Array1(Plugin::InternalUse, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); @@ -4669,9 +5162,9 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - Array1(int32_t length0); - int32_t GetLength(); - int32_t GetRank(); + Array1(System::Int32 length0); + System::Int32 GetLength(); + System::Int32 GetRank(); Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -4701,7 +5194,7 @@ namespace Plugin { int32_t Handle; int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); void operator=(UnityEngine::Resolution item); operator UnityEngine::Resolution(); }; @@ -4712,7 +5205,7 @@ namespace System template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr)); - Array1(Plugin::InternalUse iu, int32_t handle); + Array1(Plugin::InternalUse, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); @@ -4722,9 +5215,9 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - Array1(int32_t length0); - int32_t GetLength(); - int32_t GetRank(); + Array1(System::Int32 length0); + System::Int32 GetLength(); + System::Int32 GetRank(); Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -4754,7 +5247,7 @@ namespace Plugin { int32_t Handle; int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); void operator=(UnityEngine::RaycastHit item); operator UnityEngine::RaycastHit(); }; @@ -4765,7 +5258,7 @@ namespace System template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr)); - Array1(Plugin::InternalUse iu, int32_t handle); + Array1(Plugin::InternalUse, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); @@ -4775,9 +5268,9 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - Array1(int32_t length0); - int32_t GetLength(); - int32_t GetRank(); + Array1(System::Int32 length0); + System::Int32 GetLength(); + System::Int32 GetRank(); Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -4807,7 +5300,7 @@ namespace Plugin { int32_t Handle; int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); void operator=(UnityEngine::GradientColorKey item); operator UnityEngine::GradientColorKey(); }; @@ -4818,7 +5311,7 @@ namespace System template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr)); - Array1(Plugin::InternalUse iu, int32_t handle); + Array1(Plugin::InternalUse, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); @@ -4828,9 +5321,9 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - Array1(int32_t length0); - int32_t GetLength(); - int32_t GetRank(); + Array1(System::Int32 length0); + System::Int32 GetLength(); + System::Int32 GetRank(); Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -4859,7 +5352,7 @@ namespace System struct Action : virtual System::Object { Action(decltype(nullptr)); - Action(Plugin::InternalUse iu, int32_t handle); + Action(Plugin::InternalUse, int32_t handle); Action(const Action& other); Action(Action&& other); virtual ~Action(); @@ -4880,97 +5373,97 @@ namespace System namespace System { - template<> struct Action1 : virtual System::Object + template<> struct Action1 : virtual System::Object { - Action1(decltype(nullptr)); - Action1(Plugin::InternalUse iu, int32_t handle); - Action1(const Action1& other); - Action1(Action1&& other); - virtual ~Action1(); - Action1& operator=(const Action1& other); - Action1& operator=(decltype(nullptr)); - Action1& operator=(Action1&& other); - bool operator==(const Action1& other) const; - bool operator!=(const Action1& other) const; + Action1(decltype(nullptr)); + Action1(Plugin::InternalUse, int32_t handle); + Action1(const Action1& other); + Action1(Action1&& other); + virtual ~Action1(); + Action1& operator=(const Action1& other); + Action1& operator=(decltype(nullptr)); + Action1& operator=(Action1&& other); + bool operator==(const Action1& other) const; + bool operator!=(const Action1& other) const; int32_t CppHandle; int32_t ClassHandle; Action1(); - void operator+=(System::Action1& del); - void operator-=(System::Action1& del); - virtual void operator()(float obj); - void Invoke(float obj); + void operator+=(System::Action1& del); + void operator-=(System::Action1& del); + virtual void operator()(System::Single obj); + void Invoke(System::Single obj); }; } namespace System { - template<> struct Action2 : virtual System::Object + template<> struct Action2 : virtual System::Object { - Action2(decltype(nullptr)); - Action2(Plugin::InternalUse iu, int32_t handle); - Action2(const Action2& other); - Action2(Action2&& other); - virtual ~Action2(); - Action2& operator=(const Action2& other); - Action2& operator=(decltype(nullptr)); - Action2& operator=(Action2&& other); - bool operator==(const Action2& other) const; - bool operator!=(const Action2& other) const; + Action2(decltype(nullptr)); + Action2(Plugin::InternalUse, int32_t handle); + Action2(const Action2& other); + Action2(Action2&& other); + virtual ~Action2(); + Action2& operator=(const Action2& other); + Action2& operator=(decltype(nullptr)); + Action2& operator=(Action2&& other); + bool operator==(const Action2& other) const; + bool operator!=(const Action2& other) const; int32_t CppHandle; int32_t ClassHandle; Action2(); - void operator+=(System::Action2& del); - void operator-=(System::Action2& del); - virtual void operator()(float arg1, float arg2); - void Invoke(float arg1, float arg2); + void operator+=(System::Action2& del); + void operator-=(System::Action2& del); + virtual void operator()(System::Single arg1, System::Single arg2); + void Invoke(System::Single arg1, System::Single arg2); }; } namespace System { - template<> struct Func3 : virtual System::Object + template<> struct Func3 : virtual System::Object { - Func3(decltype(nullptr)); - Func3(Plugin::InternalUse iu, int32_t handle); - Func3(const Func3& other); - Func3(Func3&& other); - virtual ~Func3(); - Func3& operator=(const Func3& other); - Func3& operator=(decltype(nullptr)); - Func3& operator=(Func3&& other); - bool operator==(const Func3& other) const; - bool operator!=(const Func3& other) const; + Func3(decltype(nullptr)); + Func3(Plugin::InternalUse, int32_t handle); + Func3(const Func3& other); + Func3(Func3&& other); + virtual ~Func3(); + Func3& operator=(const Func3& other); + Func3& operator=(decltype(nullptr)); + Func3& operator=(Func3&& other); + bool operator==(const Func3& other) const; + bool operator!=(const Func3& other) const; int32_t CppHandle; int32_t ClassHandle; Func3(); - void operator+=(System::Func3& del); - void operator-=(System::Func3& del); - virtual double operator()(int32_t arg1, float arg2); - double Invoke(int32_t arg1, float arg2); + void operator+=(System::Func3& del); + void operator-=(System::Func3& del); + virtual System::Double operator()(System::Int32 arg1, System::Single arg2); + System::Double Invoke(System::Int32 arg1, System::Single arg2); }; } namespace System { - template<> struct Func3 : virtual System::Object + template<> struct Func3 : virtual System::Object { - Func3(decltype(nullptr)); - Func3(Plugin::InternalUse iu, int32_t handle); - Func3(const Func3& other); - Func3(Func3&& other); - virtual ~Func3(); - Func3& operator=(const Func3& other); - Func3& operator=(decltype(nullptr)); - Func3& operator=(Func3&& other); - bool operator==(const Func3& other) const; - bool operator!=(const Func3& other) const; + Func3(decltype(nullptr)); + Func3(Plugin::InternalUse, int32_t handle); + Func3(const Func3& other); + Func3(Func3&& other); + virtual ~Func3(); + Func3& operator=(const Func3& other); + Func3& operator=(decltype(nullptr)); + Func3& operator=(Func3&& other); + bool operator==(const Func3& other) const; + bool operator!=(const Func3& other) const; int32_t CppHandle; int32_t ClassHandle; Func3(); - void operator+=(System::Func3& del); - void operator-=(System::Func3& del); - virtual System::String operator()(int16_t arg1, int32_t arg2); - System::String Invoke(int16_t arg1, int32_t arg2); + void operator+=(System::Func3& del); + void operator-=(System::Func3& del); + virtual System::String operator()(System::Int16 arg1, System::Int32 arg2); + System::String Invoke(System::Int16 arg1, System::Int32 arg2); }; } @@ -4979,7 +5472,7 @@ namespace System struct AppDomainInitializer : virtual System::Object { AppDomainInitializer(decltype(nullptr)); - AppDomainInitializer(Plugin::InternalUse iu, int32_t handle); + AppDomainInitializer(Plugin::InternalUse, int32_t handle); AppDomainInitializer(const AppDomainInitializer& other); AppDomainInitializer(AppDomainInitializer&& other); virtual ~AppDomainInitializer(); @@ -5005,7 +5498,7 @@ namespace UnityEngine struct UnityAction : virtual System::Object { UnityAction(decltype(nullptr)); - UnityAction(Plugin::InternalUse iu, int32_t handle); + UnityAction(Plugin::InternalUse, int32_t handle); UnityAction(const UnityAction& other); UnityAction(UnityAction&& other); virtual ~UnityAction(); @@ -5032,7 +5525,7 @@ namespace UnityEngine template<> struct UnityAction2 : virtual System::Object { UnityAction2(decltype(nullptr)); - UnityAction2(Plugin::InternalUse iu, int32_t handle); + UnityAction2(Plugin::InternalUse, int32_t handle); UnityAction2(const UnityAction2& other); UnityAction2(UnityAction2&& other); virtual ~UnityAction2(); @@ -5061,7 +5554,7 @@ namespace System struct ComponentEventHandler : virtual System::Object { ComponentEventHandler(decltype(nullptr)); - ComponentEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentEventHandler(Plugin::InternalUse, int32_t handle); ComponentEventHandler(const ComponentEventHandler& other); ComponentEventHandler(ComponentEventHandler&& other); virtual ~ComponentEventHandler(); @@ -5091,7 +5584,7 @@ namespace System struct ComponentChangingEventHandler : virtual System::Object { ComponentChangingEventHandler(decltype(nullptr)); - ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentChangingEventHandler(Plugin::InternalUse, int32_t handle); ComponentChangingEventHandler(const ComponentChangingEventHandler& other); ComponentChangingEventHandler(ComponentChangingEventHandler&& other); virtual ~ComponentChangingEventHandler(); @@ -5121,7 +5614,7 @@ namespace System struct ComponentChangedEventHandler : virtual System::Object { ComponentChangedEventHandler(decltype(nullptr)); - ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentChangedEventHandler(Plugin::InternalUse, int32_t handle); ComponentChangedEventHandler(const ComponentChangedEventHandler& other); ComponentChangedEventHandler(ComponentChangedEventHandler&& other); virtual ~ComponentChangedEventHandler(); @@ -5151,7 +5644,7 @@ namespace System struct ComponentRenameEventHandler : virtual System::Object { ComponentRenameEventHandler(decltype(nullptr)); - ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentRenameEventHandler(Plugin::InternalUse, int32_t handle); ComponentRenameEventHandler(const ComponentRenameEventHandler& other); ComponentRenameEventHandler(ComponentRenameEventHandler&& other); virtual ~ComponentRenameEventHandler(); diff --git a/Unity/ProjectSettings/ProjectVersion.txt b/Unity/ProjectSettings/ProjectVersion.txt index 7a6fffb..e6cd1f9 100644 --- a/Unity/ProjectSettings/ProjectVersion.txt +++ b/Unity/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2017.2.0f3 +m_EditorVersion: 2017.3.0f3 diff --git a/Unity/ProjectSettings/UnityAdsSettings.asset b/Unity/ProjectSettings/UnityAdsSettings.asset deleted file mode 100644 index e6070fc50c853dda6c6a34b0c47dee87c6d20f9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4116 zcmeH~Jx;?w5QS%BApC>?5*=+2T?B~`ZBj%K2?QtvDuj&eAfv=a@uq;vSKtC58hR)= z3MDrI^WNG4Avgirm1cM5+wt@IZDo%GYHk+wqjyzhGleOLFQ;lMl-#oO+{Z+qBohTbp=yu9Yivm=-U6EB}v sTv7S;jW_IS9k32q2do3u0qcNuz&c Date: Fri, 16 Feb 2018 15:51:19 -0800 Subject: [PATCH 02/41] Use a temporary file to enable hot reloading on Windows --- Unity/Assets/NativeScript/Bindings.cs | 19 +++++++++++++++++-- Unity/CppSource/Game/Game.cpp | 10 +++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 86a7bf3..0f221a1 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -292,8 +292,9 @@ public ReusableWaitForSecondsRealtime(float time) const string PLUGIN_PATH = "/Plugins/Editor/libNativeScript.so"; #elif UNITY_EDITOR_WIN const string PLUGIN_PATH = "/Plugins/Editor/NativeScript.dll"; + const string PLUGIN_TEMP_PATH = "/Plugins/Editor/NativeScript_temp.dll"; #endif - + enum InitMode : byte { FirstBoot, @@ -1517,6 +1518,9 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke /*END DELEGATE TYPES*/ private static readonly string pluginPath = Application.dataPath + PLUGIN_PATH; +#if UNITY_EDITOR_WIN + private static readonly string pluginTempPath = Application.dataPath + PLUGIN_TEMP_PATH; +#endif public static Exception UnhandledCppException; public static SetCsharpExceptionDelegate SetCsharpException; private static IntPtr memory; @@ -1602,8 +1606,16 @@ ReusableWaitForSecondsRealtime poll private static void OpenPlugin(InitMode initMode) { #if UNITY_EDITOR + string loadPath; +#if UNITY_EDITOR_WIN + // Copy native library to temporary file + File.Copy(pluginPath, pluginTempPath); + loadPath = pluginTempPath; +#else + loadPath = pluginPath; +#endif // Open native library - libraryHandle = OpenLibrary(pluginPath); + libraryHandle = OpenLibrary(loadPath); InitDelegate Init = GetDelegate( libraryHandle, "Init"); @@ -1967,6 +1979,9 @@ private static void ClosePlugin() #if UNITY_EDITOR CloseLibrary(libraryHandle); libraryHandle = IntPtr.Zero; +#endif +#if UNITY_EDITOR_WIN + File.Delete(pluginTempPath); #endif } diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index 796ae83..d38131c 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -97,7 +97,7 @@ void MyGame::MonoBehaviours::AnotherScript::Update() { Transform transform = GetTransform(); Vector3 pos = transform.GetPosition(); - const float speed = 1.2f; + const float speed = 0.0012f; const float min = -1.5f; const float max = 1.5f; Vector3 offset(Time::GetDeltaTime() * speed * gameState->Dir, 0, 0); @@ -106,11 +106,19 @@ void MyGame::MonoBehaviours::AnotherScript::Update() { gameState->Dir *= -1.0f; newPos.x = max - (newPos.x - max); + if (newPos.x < min) + { + newPos.x = min; + } } else if (newPos.x < min) { gameState->Dir *= -1.0f; newPos.x = min + (min - newPos.x); + if (newPos.x > max) + { + newPos.x = max; + } } transform.SetPosition(newPos); } From f3f0139e45be39cc4d8a2aac01c92f8d354a472a Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 11 Mar 2018 22:25:56 -0700 Subject: [PATCH 03/41] Support generic "factory functions" with derived types Remove obsolete MonoBehaviour functionality Simplify example JSON config and C++ game code --- README.md | 7 +- Unity/Assets/Game.meta | 10 + Unity/Assets/Game/AbstractBaseBallScript.cs | 19 + .../Game/AbstractBaseBallScript.cs.meta | 13 + Unity/Assets/NativeScript/Bindings.cs | 7988 +----- Unity/Assets/NativeScript/BootScript.cs | 2 + .../NativeScript/Editor/GenerateBindings.cs | 2072 +- Unity/Assets/NativeScriptTypes.json | 1036 +- Unity/CppSource/Game/Game.cpp | 129 +- Unity/CppSource/Game/Game.h | 22 + Unity/CppSource/NativeScript/Bindings.cpp | 21859 ++-------------- Unity/CppSource/NativeScript/Bindings.h | 5578 +--- .../ProjectSettings/EditorBuildSettings.asset | 4 +- 13 files changed, 3681 insertions(+), 35058 deletions(-) create mode 100644 Unity/Assets/Game.meta create mode 100644 Unity/Assets/Game/AbstractBaseBallScript.cs create mode 100644 Unity/Assets/Game/AbstractBaseBallScript.cs.meta create mode 100644 Unity/CppSource/Game/Game.h diff --git a/README.md b/README.md index 3ed4061..dd0bb7b 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,6 @@ C++ is the standard language for video games as well as many other fields. By pr * Methods * Fields * Properties (getters and setters) - * `MonoBehaviour` classes with "message" functions like `Update` * `out` and `ref` parameters * Exceptions * Overloaded operators @@ -105,6 +104,7 @@ C++ is the standard language for video games as well as many other fields. By pr * Implementing C# interfaces with C++ classes * Deriving from C# classes with C++ classes * Default parameters + * Generic types and methods # Performance @@ -140,7 +140,7 @@ With C++, the workflow looks like this: 2. Copy everything in `Unity/Assets` directory to your Unity project's `Assets` directory 3. Copy the `Unity/CppSource` directory to your Unity project directory 4. Edit `NativeScriptTypes.json` and specify what parts of the Unity, .NET, and custom DLL APIs you want access to from C++. -5. Edit `Unity/CppSource/Game/Game.cpp` to create your game. Some example code is provided, but feel free to delete it. You can add more C++ source (`.cpp`) and header (`.h`) files here as your game grows. +5. Edit `Unity/CppSource/Game/Game.cpp` and `Unity/CppSource/Game/Game.h` to create your game. Some example code is provided, but feel free to delete it. You can add more C++ source (`.cpp`) and header (`.h`) files here as your game grows. # Building the C++ Plugin @@ -170,7 +170,7 @@ With C++, the workflow looks like this: 2. Create a directory for build files. Anywhere is fine. 3. Open a Command Prompt by clicking the Start button, typing "Command Prompt", then clicking the app 4. Execute `cd /path/to/your/build/directory` -5. Execute `cmake -G "Visual Studio VERSION YEAR Win64" -DEDITOR=TRUE /path/to/your/project/CppSource`. Replace `VERSION` and `YEAR` with the version of Visual Studio you want to use. To see the options, execute `cmake --help` and look at the list at the bottom. For example, use `"`Visual Studio 15 2017 Win64` for Visual Studio 2017. Any version, including Community, works just fine. Remove `-DEDITOR=TRUE` for standalone builds. +5. Execute `cmake -G "Visual Studio VERSION YEAR Win64" -DEDITOR=TRUE /path/to/your/project/CppSource`. Replace `VERSION` and `YEAR` with the version of Visual Studio you want to use. To see the options, execute `cmake --help` and look at the list at the bottom. For example, use `"Visual Studio 15 2017 Win64"` for Visual Studio 2017. Any version, including Community, works just fine. Remove `-DEDITOR=TRUE` for standalone builds. 6. The project files are now generated in your build directory 7. Open `NativeScript.sln` and click `Build > Build Solution`. @@ -202,7 +202,6 @@ To configure the code generator, open `NativeScriptTypes.json` and notice the ex Note that the code generator does not support (yet): -* `MonoBehaviour` contents (e.g. fields) except for "message" functions * `Array`, `string`, and `object` methods (e.g. `GetHashCode`) * Non-null string default parameters and null non-string default parameters * Implicit `params` parameter (a.k.a. "var args") passing diff --git a/Unity/Assets/Game.meta b/Unity/Assets/Game.meta new file mode 100644 index 0000000..42f3c6b --- /dev/null +++ b/Unity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bb19f2d6c4c0e41c18cdd5ead2b97cec +folderAsset: yes +timeCreated: 1519492407 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/Game/AbstractBaseBallScript.cs b/Unity/Assets/Game/AbstractBaseBallScript.cs new file mode 100644 index 0000000..8694d19 --- /dev/null +++ b/Unity/Assets/Game/AbstractBaseBallScript.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace MyGame +{ + /// + /// Base class of a script used in the example code to make a "ball" bounce + /// back and forth on the screen + /// + /// + /// Jackson Dunstan, 2018, http://JacksonDunstan.com + /// + /// + /// MIT + /// + public abstract class AbstractBaseBallScript : MonoBehaviour + { + public abstract void Update(); + } +} diff --git a/Unity/Assets/Game/AbstractBaseBallScript.cs.meta b/Unity/Assets/Game/AbstractBaseBallScript.cs.meta new file mode 100644 index 0000000..0757588 --- /dev/null +++ b/Unity/Assets/Game/AbstractBaseBallScript.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c6c722578a90428dbeacfd4a5aaa3ae +timeCreated: 1520705999 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 0f221a1..0b877fd 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -6,7 +6,6 @@ using System.Runtime.InteropServices; using UnityEngine; -using UnityEngine.Assertions; namespace NativeScript { @@ -281,6 +280,25 @@ public ReusableWaitForSecondsRealtime(float time) WaitTime = time; } } + + public enum DestroyFunction + { + /*BEGIN DESTROY FUNCTION ENUMERATORS*/ + BaseBallScript + /*END DESTROY FUNCTION ENUMERATORS*/ + } + + struct DestroyEntry + { + public DestroyFunction Function; + public int CppHandle; + + public DestroyEntry(DestroyFunction function, int cppHandle) + { + Function = function; + CppHandle = cppHandle; + } + } // Name of the plugin when using [DllImport] const string PLUGIN_NAME = "NativeScript"; @@ -316,171 +334,27 @@ delegate void InitDelegate( IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ int maxManagedObjects, - IntPtr systemIComparableMethodCompareToSystemObject, - IntPtr systemIDisposableMethodDispose, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3PropertyGetMagnitude, - IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, - IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, IntPtr boxVector3, IntPtr unboxVector3, IntPtr unityEngineObjectPropertyGetName, IntPtr unityEngineObjectPropertySetName, - IntPtr unityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject, - IntPtr unityEngineObjectMethodop_ImplicitUnityEngineObject, IntPtr unityEngineComponentPropertyGetTransform, IntPtr unityEngineTransformPropertyGetPosition, IntPtr unityEngineTransformPropertySetPosition, - IntPtr unityEngineTransformMethodSetParentUnityEngineTransform, - IntPtr boxColor, - IntPtr unboxColor, - IntPtr boxGradientColorKey, - IntPtr unboxGradientColorKey, - IntPtr releaseUnityEngineResolution, - IntPtr unityEngineResolutionConstructor, - IntPtr unityEngineResolutionPropertyGetWidth, - IntPtr unityEngineResolutionPropertySetWidth, - IntPtr unityEngineResolutionPropertyGetHeight, - IntPtr unityEngineResolutionPropertySetHeight, - IntPtr unityEngineResolutionPropertyGetRefreshRate, - IntPtr unityEngineResolutionPropertySetRefreshRate, - IntPtr boxResolution, - IntPtr unboxResolution, - IntPtr releaseUnityEngineRaycastHit, - IntPtr unityEngineRaycastHitPropertyGetPoint, - IntPtr unityEngineRaycastHitPropertySetPoint, - IntPtr unityEngineRaycastHitPropertyGetTransform, - IntPtr boxRaycastHit, - IntPtr unboxRaycastHit, IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, IntPtr systemCollectionsIEnumeratorMethodMoveNext, - IntPtr releaseUnityEnginePlayablesPlayableGraph, - IntPtr boxPlayableGraph, - IntPtr unboxPlayableGraph, - IntPtr releaseUnityEngineAnimationsAnimationMixerPlayable, - IntPtr unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean, - IntPtr boxAnimationMixerPlayable, - IntPtr unboxAnimationMixerPlayable, - IntPtr systemDiagnosticsStopwatchConstructor, - IntPtr systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds, - IntPtr systemDiagnosticsStopwatchMethodStart, - IntPtr systemDiagnosticsStopwatchMethodReset, - IntPtr unityEngineGameObjectConstructor, - IntPtr unityEngineGameObjectConstructorSystemString, - IntPtr unityEngineGameObjectPropertyGetTransform, - IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript, - IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript, + IntPtr unityEngineGameObjectMethodAddComponentMyGameBaseBallScript, IntPtr unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, IntPtr unityEngineDebugMethodLogSystemObject, - IntPtr unityEngineAssertionsAssertFieldGetRaiseExceptions, - IntPtr unityEngineAssertionsAssertFieldSetRaiseExceptions, - IntPtr unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString, - IntPtr unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject, IntPtr unityEngineMonoBehaviourPropertyGetTransform, - IntPtr unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32, - IntPtr unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte, - IntPtr unityEngineNetworkingNetworkTransportMethodInit, - IntPtr boxQuaternion, - IntPtr unboxQuaternion, - IntPtr unityEngineMatrix4x4PropertyGetItem, - IntPtr unityEngineMatrix4x4PropertySetItem, - IntPtr boxMatrix4x4, - IntPtr unboxMatrix4x4, - IntPtr boxQueryTriggerInteraction, - IntPtr unboxQueryTriggerInteraction, - IntPtr releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble, - IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble, - IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey, - IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue, - IntPtr boxKeyValuePairSystemString_SystemDouble, - IntPtr unboxKeyValuePairSystemString_SystemDouble, - IntPtr systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString, - IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue, - IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue, - IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString, - IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue, - IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue, IntPtr systemExceptionConstructorSystemString, - IntPtr unityEngineScreenPropertyGetResolutions, - IntPtr releaseUnityEngineRay, - IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, - IntPtr boxRay, - IntPtr unboxRay, - IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1, - IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, - IntPtr unityEngineGradientConstructor, - IntPtr unityEngineGradientPropertyGetColorKeys, - IntPtr unityEngineGradientPropertySetColorKeys, - IntPtr systemAppDomainSetupConstructor, - IntPtr systemAppDomainSetupPropertyGetAppDomainInitializer, - IntPtr systemAppDomainSetupPropertySetAppDomainInitializer, - IntPtr unityEngineApplicationAddEventOnBeforeRender, - IntPtr unityEngineApplicationRemoveEventOnBeforeRender, - IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, - IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, - IntPtr releaseUnityEngineSceneManagementScene, - IntPtr boxScene, - IntPtr unboxScene, - IntPtr boxLoadSceneMode, - IntPtr unboxLoadSceneMode, IntPtr boxPrimitiveType, IntPtr unboxPrimitiveType, IntPtr unityEngineTimePropertyGetDeltaTime, - IntPtr boxFileMode, - IntPtr unboxFileMode, - IntPtr releaseSystemCollectionsGenericBaseIComparerSystemInt32, - IntPtr systemCollectionsGenericBaseIComparerSystemInt32Constructor, - IntPtr releaseSystemCollectionsGenericBaseIComparerSystemString, - IntPtr systemCollectionsGenericBaseIComparerSystemStringConstructor, - IntPtr releaseSystemBaseStringComparer, - IntPtr systemBaseStringComparerConstructor, - IntPtr systemCollectionsQueuePropertyGetCount, - IntPtr releaseSystemCollectionsBaseQueue, - IntPtr systemCollectionsBaseQueueConstructor, - IntPtr releaseSystemComponentModelDesignBaseIComponentChangeService, - IntPtr systemComponentModelDesignBaseIComponentChangeServiceConstructor, - IntPtr systemIOFileStreamConstructorSystemString_SystemIOFileMode, - IntPtr systemIOFileStreamMethodWriteByteSystemByte, - IntPtr releaseSystemIOBaseFileStream, - IntPtr systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode, - IntPtr releaseUnityEnginePlayablesPlayableHandle, - IntPtr boxPlayableHandle, - IntPtr unboxPlayableHandle, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator, - IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1, - IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString, - IntPtr boxInteractionSourcePositionAccuracy, - IntPtr unboxInteractionSourcePositionAccuracy, - IntPtr boxInteractionSourceNode, - IntPtr unboxInteractionSourceNode, - IntPtr releaseUnityEngineXRWSAInputInteractionSourcePose, - IntPtr unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode, - IntPtr boxInteractionSourcePose, - IntPtr unboxInteractionSourcePose, - IntPtr systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator, - IntPtr systemCollectionsGenericListSystemStringConstructor, - IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, - IntPtr systemCollectionsGenericListSystemStringPropertySetItem, - IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, - IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, - IntPtr systemCollectionsGenericListSystemInt32Constructor, - IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, - IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, - IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, - IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, + IntPtr releaseBaseBallScript, + IntPtr baseBallScriptConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -504,224 +378,24 @@ delegate void InitDelegate( IntPtr boxSingle, IntPtr unboxSingle, IntPtr boxDouble, - IntPtr unboxDouble, - IntPtr systemSystemInt32Array1Constructor1, - IntPtr systemInt32Array1GetItem1, - IntPtr systemInt32Array1SetItem1, - IntPtr systemSystemSingleArray1Constructor1, - IntPtr systemSingleArray1GetItem1, - IntPtr systemSingleArray1SetItem1, - IntPtr systemSystemSingleArray2Constructor2, - IntPtr systemSystemSingleArray2GetLength2, - IntPtr systemSingleArray2GetItem2, - IntPtr systemSingleArray2SetItem2, - IntPtr systemSystemSingleArray3Constructor3, - IntPtr systemSystemSingleArray3GetLength3, - IntPtr systemSingleArray3GetItem3, - IntPtr systemSingleArray3SetItem3, - IntPtr systemSystemStringArray1Constructor1, - IntPtr systemStringArray1GetItem1, - IntPtr systemStringArray1SetItem1, - IntPtr unityEngineUnityEngineResolutionArray1Constructor1, - IntPtr unityEngineResolutionArray1GetItem1, - IntPtr unityEngineResolutionArray1SetItem1, - IntPtr unityEngineUnityEngineRaycastHitArray1Constructor1, - IntPtr unityEngineRaycastHitArray1GetItem1, - IntPtr unityEngineRaycastHitArray1SetItem1, - IntPtr unityEngineUnityEngineGradientColorKeyArray1Constructor1, - IntPtr unityEngineGradientColorKeyArray1GetItem1, - IntPtr unityEngineGradientColorKeyArray1SetItem1, - IntPtr releaseSystemAction, - IntPtr systemActionConstructor, - IntPtr systemActionAdd, - IntPtr systemActionRemove, - IntPtr systemActionInvoke, - IntPtr releaseSystemActionSystemSingle, - IntPtr systemActionSystemSingleConstructor, - IntPtr systemActionSystemSingleAdd, - IntPtr systemActionSystemSingleRemove, - IntPtr systemActionSystemSingleInvoke, - IntPtr releaseSystemActionSystemSingle_SystemSingle, - IntPtr systemActionSystemSingle_SystemSingleConstructor, - IntPtr systemActionSystemSingle_SystemSingleAdd, - IntPtr systemActionSystemSingle_SystemSingleRemove, - IntPtr systemActionSystemSingle_SystemSingleInvoke, - IntPtr releaseSystemFuncSystemInt32_SystemSingle_SystemDouble, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleAdd, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleRemove, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke, - IntPtr releaseSystemFuncSystemInt16_SystemInt32_SystemString, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringConstructor, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringAdd, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringRemove, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringInvoke, - IntPtr releaseSystemAppDomainInitializer, - IntPtr systemAppDomainInitializerConstructor, - IntPtr systemAppDomainInitializerAdd, - IntPtr systemAppDomainInitializerRemove, - IntPtr systemAppDomainInitializerInvoke, - IntPtr releaseUnityEngineEventsUnityAction, - IntPtr unityEngineEventsUnityActionConstructor, - IntPtr unityEngineEventsUnityActionAdd, - IntPtr unityEngineEventsUnityActionRemove, - IntPtr unityEngineEventsUnityActionInvoke, - IntPtr releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke, - IntPtr releaseSystemComponentModelDesignComponentEventHandler, - IntPtr systemComponentModelDesignComponentEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentEventHandlerAdd, - IntPtr systemComponentModelDesignComponentEventHandlerRemove, - IntPtr systemComponentModelDesignComponentEventHandlerInvoke, - IntPtr releaseSystemComponentModelDesignComponentChangingEventHandler, - IntPtr systemComponentModelDesignComponentChangingEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentChangingEventHandlerAdd, - IntPtr systemComponentModelDesignComponentChangingEventHandlerRemove, - IntPtr systemComponentModelDesignComponentChangingEventHandlerInvoke, - IntPtr releaseSystemComponentModelDesignComponentChangedEventHandler, - IntPtr systemComponentModelDesignComponentChangedEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentChangedEventHandlerAdd, - IntPtr systemComponentModelDesignComponentChangedEventHandlerRemove, - IntPtr systemComponentModelDesignComponentChangedEventHandlerInvoke, - IntPtr releaseSystemComponentModelDesignComponentRenameEventHandler, - IntPtr systemComponentModelDesignComponentRenameEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentRenameEventHandlerAdd, - IntPtr systemComponentModelDesignComponentRenameEventHandlerRemove, - IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke + IntPtr unboxDouble /*END INIT PARAMS*/); public delegate void SetCsharpExceptionDelegate(int handle); - /*BEGIN MONOBEHAVIOUR DELEGATES*/ - public delegate int SystemCollectionsGenericIComparerSystemInt32CompareDelegate(int thisHandle, int param0, int param1); - public static SystemCollectionsGenericIComparerSystemInt32CompareDelegate SystemCollectionsGenericIComparerSystemInt32Compare; - - public delegate int SystemCollectionsGenericIComparerSystemStringCompareDelegate(int thisHandle, int param0, int param1); - public static SystemCollectionsGenericIComparerSystemStringCompareDelegate SystemCollectionsGenericIComparerSystemStringCompare; - - public delegate int SystemStringComparerCompareDelegate(int thisHandle, int param0, int param1); - public static SystemStringComparerCompareDelegate SystemStringComparerCompare; - - public delegate bool SystemStringComparerEqualsDelegate(int thisHandle, int param0, int param1); - public static SystemStringComparerEqualsDelegate SystemStringComparerEquals; - - public delegate int SystemStringComparerGetHashCodeDelegate(int thisHandle, int param0); - public static SystemStringComparerGetHashCodeDelegate SystemStringComparerGetHashCode; - - public delegate int SystemCollectionsQueueGetCountDelegate(int thisHandle); - public static SystemCollectionsQueueGetCountDelegate SystemCollectionsQueueGetCount; - - public delegate void SystemComponentModelDesignIComponentChangeServiceOnComponentChangedDelegate(int thisHandle, int param0, int param1, int param2, int param3); - public static SystemComponentModelDesignIComponentChangeServiceOnComponentChangedDelegate SystemComponentModelDesignIComponentChangeServiceOnComponentChanged; - - public delegate void SystemComponentModelDesignIComponentChangeServiceOnComponentChangingDelegate(int thisHandle, int param0, int param1); - public static SystemComponentModelDesignIComponentChangeServiceOnComponentChangingDelegate SystemComponentModelDesignIComponentChangeServiceOnComponentChanging; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentAddedDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentAddedDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentAdded; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAddedDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentAddedDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentAddingDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentAddingDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentAdding; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAddingDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentAddingDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentChangedDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentChangedDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentChanged; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChangedDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentChangedDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentChangingDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentChangingDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentChanging; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChangingDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentChangingDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentRemovedDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentRemovedDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemovedDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemovedDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentRemovingDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentRemovingDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemovingDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemovingDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving; - - public delegate void SystemComponentModelDesignIComponentChangeServiceAddComponentRenameDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceAddComponentRenameDelegate SystemComponentModelDesignIComponentChangeServiceAddComponentRename; - - public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRenameDelegate(int thisHandle, int param0); - public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentRenameDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename; + /*BEGIN DELEGATES*/ + public delegate int NewBaseBallScriptDelegate(int param0); + public static NewBaseBallScriptDelegate NewBaseBallScript; - public delegate void SystemIOFileStreamWriteByteDelegate(int thisHandle, byte param0); - public static SystemIOFileStreamWriteByteDelegate SystemIOFileStreamWriteByte; + public delegate void DestroyBaseBallScriptDelegate(int param0); + public static DestroyBaseBallScriptDelegate DestroyBaseBallScript; - public delegate void MyGameMonoBehavioursTestScriptAwakeDelegate(int thisHandle); - public static MyGameMonoBehavioursTestScriptAwakeDelegate MyGameMonoBehavioursTestScriptAwake; - - public delegate void MyGameMonoBehavioursTestScriptOnAnimatorIKDelegate(int thisHandle, int param0); - public static MyGameMonoBehavioursTestScriptOnAnimatorIKDelegate MyGameMonoBehavioursTestScriptOnAnimatorIK; - - public delegate void MyGameMonoBehavioursTestScriptOnCollisionEnterDelegate(int thisHandle, int param0); - public static MyGameMonoBehavioursTestScriptOnCollisionEnterDelegate MyGameMonoBehavioursTestScriptOnCollisionEnter; - - public delegate void MyGameMonoBehavioursTestScriptUpdateDelegate(int thisHandle); - public static MyGameMonoBehavioursTestScriptUpdateDelegate MyGameMonoBehavioursTestScriptUpdate; - - public delegate void MyGameMonoBehavioursAnotherScriptAwakeDelegate(int thisHandle); - public static MyGameMonoBehavioursAnotherScriptAwakeDelegate MyGameMonoBehavioursAnotherScriptAwake; - - public delegate void MyGameMonoBehavioursAnotherScriptUpdateDelegate(int thisHandle); - public static MyGameMonoBehavioursAnotherScriptUpdateDelegate MyGameMonoBehavioursAnotherScriptUpdate; - - public delegate void SystemActionNativeInvokeDelegate(int thisHandle); - public static SystemActionNativeInvokeDelegate SystemActionNativeInvoke; - - public delegate void SystemActionSystemSingleNativeInvokeDelegate(int thisHandle, float param0); - public static SystemActionSystemSingleNativeInvokeDelegate SystemActionSystemSingleNativeInvoke; - - public delegate void SystemActionSystemSingle_SystemSingleNativeInvokeDelegate(int thisHandle, float param0, float param1); - public static SystemActionSystemSingle_SystemSingleNativeInvokeDelegate SystemActionSystemSingle_SystemSingleNativeInvoke; - - public delegate double SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvokeDelegate(int thisHandle, int param0, float param1); - public static SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvokeDelegate SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke; - - public delegate int SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvokeDelegate(int thisHandle, short param0, int param1); - public static SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvokeDelegate SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke; - - public delegate void SystemAppDomainInitializerNativeInvokeDelegate(int thisHandle, int param0); - public static SystemAppDomainInitializerNativeInvokeDelegate SystemAppDomainInitializerNativeInvoke; - - public delegate void UnityEngineEventsUnityActionNativeInvokeDelegate(int thisHandle); - public static UnityEngineEventsUnityActionNativeInvokeDelegate UnityEngineEventsUnityActionNativeInvoke; - - public delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvokeDelegate(int thisHandle, int param0, UnityEngine.SceneManagement.LoadSceneMode param1); - public static UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvokeDelegate UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke; - - public delegate void SystemComponentModelDesignComponentEventHandlerNativeInvokeDelegate(int thisHandle, int param0, int param1); - public static SystemComponentModelDesignComponentEventHandlerNativeInvokeDelegate SystemComponentModelDesignComponentEventHandlerNativeInvoke; - - public delegate void SystemComponentModelDesignComponentChangingEventHandlerNativeInvokeDelegate(int thisHandle, int param0, int param1); - public static SystemComponentModelDesignComponentChangingEventHandlerNativeInvokeDelegate SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke; - - public delegate void SystemComponentModelDesignComponentChangedEventHandlerNativeInvokeDelegate(int thisHandle, int param0, int param1); - public static SystemComponentModelDesignComponentChangedEventHandlerNativeInvokeDelegate SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke; - - public delegate void SystemComponentModelDesignComponentRenameEventHandlerNativeInvokeDelegate(int thisHandle, int param0, int param1); - public static SystemComponentModelDesignComponentRenameEventHandlerNativeInvokeDelegate SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke; + public delegate void MyGameAbstractBaseBallScriptUpdateDelegate(int thisHandle); + public static MyGameAbstractBaseBallScriptUpdateDelegate MyGameAbstractBaseBallScriptUpdate; public delegate void SetCsharpExceptionSystemNullReferenceExceptionDelegate(int param0); public static SetCsharpExceptionSystemNullReferenceExceptionDelegate SetCsharpExceptionSystemNullReferenceException; - /*END MONOBEHAVIOUR DELEGATES*/ + /*END DELEGATES*/ #endif #if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX @@ -824,171 +498,27 @@ static extern void Init( IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ int maxManagedObjects, - IntPtr systemIComparableMethodCompareToSystemObject, - IntPtr systemIDisposableMethodDispose, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3PropertyGetMagnitude, - IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, - IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, IntPtr boxVector3, IntPtr unboxVector3, IntPtr unityEngineObjectPropertyGetName, IntPtr unityEngineObjectPropertySetName, - IntPtr unityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject, - IntPtr unityEngineObjectMethodop_ImplicitUnityEngineObject, IntPtr unityEngineComponentPropertyGetTransform, IntPtr unityEngineTransformPropertyGetPosition, IntPtr unityEngineTransformPropertySetPosition, - IntPtr unityEngineTransformMethodSetParentUnityEngineTransform, - IntPtr boxColor, - IntPtr unboxColor, - IntPtr boxGradientColorKey, - IntPtr unboxGradientColorKey, - IntPtr releaseUnityEngineResolution, - IntPtr unityEngineResolutionConstructor, - IntPtr unityEngineResolutionPropertyGetWidth, - IntPtr unityEngineResolutionPropertySetWidth, - IntPtr unityEngineResolutionPropertyGetHeight, - IntPtr unityEngineResolutionPropertySetHeight, - IntPtr unityEngineResolutionPropertyGetRefreshRate, - IntPtr unityEngineResolutionPropertySetRefreshRate, - IntPtr boxResolution, - IntPtr unboxResolution, - IntPtr releaseUnityEngineRaycastHit, - IntPtr unityEngineRaycastHitPropertyGetPoint, - IntPtr unityEngineRaycastHitPropertySetPoint, - IntPtr unityEngineRaycastHitPropertyGetTransform, - IntPtr boxRaycastHit, - IntPtr unboxRaycastHit, IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, IntPtr systemCollectionsIEnumeratorMethodMoveNext, - IntPtr releaseUnityEnginePlayablesPlayableGraph, - IntPtr boxPlayableGraph, - IntPtr unboxPlayableGraph, - IntPtr releaseUnityEngineAnimationsAnimationMixerPlayable, - IntPtr unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean, - IntPtr boxAnimationMixerPlayable, - IntPtr unboxAnimationMixerPlayable, - IntPtr systemDiagnosticsStopwatchConstructor, - IntPtr systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds, - IntPtr systemDiagnosticsStopwatchMethodStart, - IntPtr systemDiagnosticsStopwatchMethodReset, - IntPtr unityEngineGameObjectConstructor, - IntPtr unityEngineGameObjectConstructorSystemString, - IntPtr unityEngineGameObjectPropertyGetTransform, - IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript, - IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript, + IntPtr unityEngineGameObjectMethodAddComponentMyGameBaseBallScript, IntPtr unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, IntPtr unityEngineDebugMethodLogSystemObject, - IntPtr unityEngineAssertionsAssertFieldGetRaiseExceptions, - IntPtr unityEngineAssertionsAssertFieldSetRaiseExceptions, - IntPtr unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString, - IntPtr unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject, IntPtr unityEngineMonoBehaviourPropertyGetTransform, - IntPtr unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32, - IntPtr unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte, - IntPtr unityEngineNetworkingNetworkTransportMethodInit, - IntPtr boxQuaternion, - IntPtr unboxQuaternion, - IntPtr unityEngineMatrix4x4PropertyGetItem, - IntPtr unityEngineMatrix4x4PropertySetItem, - IntPtr boxMatrix4x4, - IntPtr unboxMatrix4x4, - IntPtr boxQueryTriggerInteraction, - IntPtr unboxQueryTriggerInteraction, - IntPtr releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble, - IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble, - IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey, - IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue, - IntPtr boxKeyValuePairSystemString_SystemDouble, - IntPtr unboxKeyValuePairSystemString_SystemDouble, - IntPtr systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString, - IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue, - IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue, - IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString, - IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue, - IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue, IntPtr systemExceptionConstructorSystemString, - IntPtr unityEngineScreenPropertyGetResolutions, - IntPtr releaseUnityEngineRay, - IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, - IntPtr boxRay, - IntPtr unboxRay, - IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1, - IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, - IntPtr unityEngineGradientConstructor, - IntPtr unityEngineGradientPropertyGetColorKeys, - IntPtr unityEngineGradientPropertySetColorKeys, - IntPtr systemAppDomainSetupConstructor, - IntPtr systemAppDomainSetupPropertyGetAppDomainInitializer, - IntPtr systemAppDomainSetupPropertySetAppDomainInitializer, - IntPtr unityEngineApplicationAddEventOnBeforeRender, - IntPtr unityEngineApplicationRemoveEventOnBeforeRender, - IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, - IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, - IntPtr releaseUnityEngineSceneManagementScene, - IntPtr boxScene, - IntPtr unboxScene, - IntPtr boxLoadSceneMode, - IntPtr unboxLoadSceneMode, IntPtr boxPrimitiveType, IntPtr unboxPrimitiveType, IntPtr unityEngineTimePropertyGetDeltaTime, - IntPtr boxFileMode, - IntPtr unboxFileMode, - IntPtr releaseSystemCollectionsGenericBaseIComparerSystemInt32, - IntPtr systemCollectionsGenericBaseIComparerSystemInt32Constructor, - IntPtr releaseSystemCollectionsGenericBaseIComparerSystemString, - IntPtr systemCollectionsGenericBaseIComparerSystemStringConstructor, - IntPtr releaseSystemBaseStringComparer, - IntPtr systemBaseStringComparerConstructor, - IntPtr systemCollectionsQueuePropertyGetCount, - IntPtr releaseSystemCollectionsBaseQueue, - IntPtr systemCollectionsBaseQueueConstructor, - IntPtr releaseSystemComponentModelDesignBaseIComponentChangeService, - IntPtr systemComponentModelDesignBaseIComponentChangeServiceConstructor, - IntPtr systemIOFileStreamConstructorSystemString_SystemIOFileMode, - IntPtr systemIOFileStreamMethodWriteByteSystemByte, - IntPtr releaseSystemIOBaseFileStream, - IntPtr systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode, - IntPtr releaseUnityEnginePlayablesPlayableHandle, - IntPtr boxPlayableHandle, - IntPtr unboxPlayableHandle, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator, - IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1, - IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString, - IntPtr boxInteractionSourcePositionAccuracy, - IntPtr unboxInteractionSourcePositionAccuracy, - IntPtr boxInteractionSourceNode, - IntPtr unboxInteractionSourceNode, - IntPtr releaseUnityEngineXRWSAInputInteractionSourcePose, - IntPtr unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode, - IntPtr boxInteractionSourcePose, - IntPtr unboxInteractionSourcePose, - IntPtr systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent, - IntPtr systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator, - IntPtr systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator, - IntPtr systemCollectionsGenericListSystemStringConstructor, - IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, - IntPtr systemCollectionsGenericListSystemStringPropertySetItem, - IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, - IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, - IntPtr systemCollectionsGenericListSystemInt32Constructor, - IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, - IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, - IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, - IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, + IntPtr releaseBaseBallScript, + IntPtr baseBallScriptConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -1012,225 +542,25 @@ static extern void Init( IntPtr boxSingle, IntPtr unboxSingle, IntPtr boxDouble, - IntPtr unboxDouble, - IntPtr systemSystemInt32Array1Constructor1, - IntPtr systemInt32Array1GetItem1, - IntPtr systemInt32Array1SetItem1, - IntPtr systemSystemSingleArray1Constructor1, - IntPtr systemSingleArray1GetItem1, - IntPtr systemSingleArray1SetItem1, - IntPtr systemSystemSingleArray2Constructor2, - IntPtr systemSystemSingleArray2GetLength2, - IntPtr systemSingleArray2GetItem2, - IntPtr systemSingleArray2SetItem2, - IntPtr systemSystemSingleArray3Constructor3, - IntPtr systemSystemSingleArray3GetLength3, - IntPtr systemSingleArray3GetItem3, - IntPtr systemSingleArray3SetItem3, - IntPtr systemSystemStringArray1Constructor1, - IntPtr systemStringArray1GetItem1, - IntPtr systemStringArray1SetItem1, - IntPtr unityEngineUnityEngineResolutionArray1Constructor1, - IntPtr unityEngineResolutionArray1GetItem1, - IntPtr unityEngineResolutionArray1SetItem1, - IntPtr unityEngineUnityEngineRaycastHitArray1Constructor1, - IntPtr unityEngineRaycastHitArray1GetItem1, - IntPtr unityEngineRaycastHitArray1SetItem1, - IntPtr unityEngineUnityEngineGradientColorKeyArray1Constructor1, - IntPtr unityEngineGradientColorKeyArray1GetItem1, - IntPtr unityEngineGradientColorKeyArray1SetItem1, - IntPtr releaseSystemAction, - IntPtr systemActionConstructor, - IntPtr systemActionAdd, - IntPtr systemActionRemove, - IntPtr systemActionInvoke, - IntPtr releaseSystemActionSystemSingle, - IntPtr systemActionSystemSingleConstructor, - IntPtr systemActionSystemSingleAdd, - IntPtr systemActionSystemSingleRemove, - IntPtr systemActionSystemSingleInvoke, - IntPtr releaseSystemActionSystemSingle_SystemSingle, - IntPtr systemActionSystemSingle_SystemSingleConstructor, - IntPtr systemActionSystemSingle_SystemSingleAdd, - IntPtr systemActionSystemSingle_SystemSingleRemove, - IntPtr systemActionSystemSingle_SystemSingleInvoke, - IntPtr releaseSystemFuncSystemInt32_SystemSingle_SystemDouble, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleAdd, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleRemove, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke, - IntPtr releaseSystemFuncSystemInt16_SystemInt32_SystemString, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringConstructor, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringAdd, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringRemove, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringInvoke, - IntPtr releaseSystemAppDomainInitializer, - IntPtr systemAppDomainInitializerConstructor, - IntPtr systemAppDomainInitializerAdd, - IntPtr systemAppDomainInitializerRemove, - IntPtr systemAppDomainInitializerInvoke, - IntPtr releaseUnityEngineEventsUnityAction, - IntPtr unityEngineEventsUnityActionConstructor, - IntPtr unityEngineEventsUnityActionAdd, - IntPtr unityEngineEventsUnityActionRemove, - IntPtr unityEngineEventsUnityActionInvoke, - IntPtr releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke, - IntPtr releaseSystemComponentModelDesignComponentEventHandler, - IntPtr systemComponentModelDesignComponentEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentEventHandlerAdd, - IntPtr systemComponentModelDesignComponentEventHandlerRemove, - IntPtr systemComponentModelDesignComponentEventHandlerInvoke, - IntPtr releaseSystemComponentModelDesignComponentChangingEventHandler, - IntPtr systemComponentModelDesignComponentChangingEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentChangingEventHandlerAdd, - IntPtr systemComponentModelDesignComponentChangingEventHandlerRemove, - IntPtr systemComponentModelDesignComponentChangingEventHandlerInvoke, - IntPtr releaseSystemComponentModelDesignComponentChangedEventHandler, - IntPtr systemComponentModelDesignComponentChangedEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentChangedEventHandlerAdd, - IntPtr systemComponentModelDesignComponentChangedEventHandlerRemove, - IntPtr systemComponentModelDesignComponentChangedEventHandlerInvoke, - IntPtr releaseSystemComponentModelDesignComponentRenameEventHandler, - IntPtr systemComponentModelDesignComponentRenameEventHandlerConstructor, - IntPtr systemComponentModelDesignComponentRenameEventHandlerAdd, - IntPtr systemComponentModelDesignComponentRenameEventHandlerRemove, - IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke + IntPtr unboxDouble /*END INIT PARAMS*/); [DllImport(PluginName)] static extern void SetCsharpException(int handle); - /*BEGIN MONOBEHAVIOUR IMPORTS*/ - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsGenericIComparerSystemInt32Compare(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsGenericIComparerSystemStringCompare(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemStringComparerCompare(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemStringComparerEquals(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemStringComparerGetHashCode(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsQueueGetCount(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceOnComponentChanged(int thisHandle, int param0, int param1, int param2, int param3); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceOnComponentChanging(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentAdded(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentAdding(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentChanged(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentChanging(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceAddComponentRename(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemIOFileStreamWriteByte(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void MyGameMonoBehavioursTestScriptAwake(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void MyGameMonoBehavioursTestScriptOnAnimatorIK(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void MyGameMonoBehavioursTestScriptOnCollisionEnter(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void MyGameMonoBehavioursTestScriptUpdate(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void MyGameMonoBehavioursAnotherScriptAwake(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void MyGameMonoBehavioursAnotherScriptUpdate(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemActionNativeInvoke(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemActionSystemSingleNativeInvoke(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemActionSystemSingle_SystemSingleNativeInvoke(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemAppDomainInitializerNativeInvoke(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void UnityEngineEventsUnityActionNativeInvoke(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignComponentEventHandlerNativeInvoke(int thisHandle, int param0, int param1); - + /*BEGIN IMPORTS*/ [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + public static extern void NewBaseBallScript(int thisHandle, int param0); [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + public static extern void DestroyBaseBallScript(int thisHandle, int param0); [DllImport(Constants.PluginName)] - public static extern void SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + public static extern void MyGameAbstractBaseBallScriptUpdate(int thisHandle); [DllImport(Constants.PluginName)] public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle, int param0); - /*END MONOBEHAVIOUR IMPORTS*/ + /*END IMPORTS*/ #endif delegate void ReleaseObjectDelegate(int handle); @@ -1240,171 +570,27 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int EnumerableGetEnumeratorDelegate(int handle); /*BEGIN DELEGATE TYPES*/ - delegate int SystemIComparableMethodCompareToSystemObjectDelegate(int thisHandle, int objHandle); - delegate void SystemIDisposableMethodDisposeDelegate(int thisHandle); delegate UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(float x, float y, float z); - delegate float UnityEngineVector3PropertyGetMagnitudeDelegate(ref UnityEngine.Vector3 thiz); - delegate void UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate(ref UnityEngine.Vector3 thiz, float newX, float newY, float newZ); delegate UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b); - delegate UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate(ref UnityEngine.Vector3 a); delegate int BoxVector3Delegate(ref UnityEngine.Vector3 val); delegate UnityEngine.Vector3 UnboxVector3Delegate(int valHandle); delegate int UnityEngineObjectPropertyGetNameDelegate(int thisHandle); delegate void UnityEngineObjectPropertySetNameDelegate(int thisHandle, int valueHandle); - delegate bool UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObjectDelegate(int xHandle, int yHandle); - delegate bool UnityEngineObjectMethodop_ImplicitUnityEngineObjectDelegate(int existsHandle); delegate int UnityEngineComponentPropertyGetTransformDelegate(int thisHandle); delegate UnityEngine.Vector3 UnityEngineTransformPropertyGetPositionDelegate(int thisHandle); delegate void UnityEngineTransformPropertySetPositionDelegate(int thisHandle, ref UnityEngine.Vector3 value); - delegate void UnityEngineTransformMethodSetParentUnityEngineTransformDelegate(int thisHandle, int parentHandle); - delegate int BoxColorDelegate(ref UnityEngine.Color val); - delegate UnityEngine.Color UnboxColorDelegate(int valHandle); - delegate int BoxGradientColorKeyDelegate(ref UnityEngine.GradientColorKey val); - delegate UnityEngine.GradientColorKey UnboxGradientColorKeyDelegate(int valHandle); - delegate void ReleaseUnityEngineResolutionDelegate(int handle); - delegate int UnityEngineResolutionConstructorDelegate(); - delegate int UnityEngineResolutionPropertyGetWidthDelegate(int thisHandle); - delegate void UnityEngineResolutionPropertySetWidthDelegate(int thisHandle, int value); - delegate int UnityEngineResolutionPropertyGetHeightDelegate(int thisHandle); - delegate void UnityEngineResolutionPropertySetHeightDelegate(int thisHandle, int value); - delegate int UnityEngineResolutionPropertyGetRefreshRateDelegate(int thisHandle); - delegate void UnityEngineResolutionPropertySetRefreshRateDelegate(int thisHandle, int value); - delegate int BoxResolutionDelegate(int valHandle); - delegate int UnboxResolutionDelegate(int valHandle); - delegate void ReleaseUnityEngineRaycastHitDelegate(int handle); - delegate UnityEngine.Vector3 UnityEngineRaycastHitPropertyGetPointDelegate(int thisHandle); - delegate void UnityEngineRaycastHitPropertySetPointDelegate(int thisHandle, ref UnityEngine.Vector3 value); - delegate int UnityEngineRaycastHitPropertyGetTransformDelegate(int thisHandle); - delegate int BoxRaycastHitDelegate(int valHandle); - delegate int UnboxRaycastHitDelegate(int valHandle); delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegate(int thisHandle); - delegate void ReleaseUnityEnginePlayablesPlayableGraphDelegate(int handle); - delegate int BoxPlayableGraphDelegate(int valHandle); - delegate int UnboxPlayableGraphDelegate(int valHandle); - delegate void ReleaseUnityEngineAnimationsAnimationMixerPlayableDelegate(int handle); - delegate int UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBooleanDelegate(int graphHandle, int inputCount, bool normalizeWeights); - delegate int BoxAnimationMixerPlayableDelegate(int valHandle); - delegate int UnboxAnimationMixerPlayableDelegate(int valHandle); - delegate int SystemDiagnosticsStopwatchConstructorDelegate(); - delegate long SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate(int thisHandle); - delegate void SystemDiagnosticsStopwatchMethodStartDelegate(int thisHandle); - delegate void SystemDiagnosticsStopwatchMethodResetDelegate(int thisHandle); - delegate int UnityEngineGameObjectConstructorDelegate(); - delegate int UnityEngineGameObjectConstructorSystemStringDelegate(int nameHandle); - delegate int UnityEngineGameObjectPropertyGetTransformDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate(int thisHandle); + delegate int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate(int thisHandle); delegate int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngine.PrimitiveType type); delegate void UnityEngineDebugMethodLogSystemObjectDelegate(int messageHandle); - delegate bool UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate(); - delegate void UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate(bool value); - delegate void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate(int expectedHandle, int actualHandle); - delegate void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate(int expectedHandle, int actualHandle); delegate int UnityEngineMonoBehaviourPropertyGetTransformDelegate(int thisHandle); - delegate void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate(ref int bufferLength, ref int numBuffers); - delegate void UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByteDelegate(int hostId, ref int addressHandle, ref int port, ref byte error); - delegate void UnityEngineNetworkingNetworkTransportMethodInitDelegate(); - delegate int BoxQuaternionDelegate(ref UnityEngine.Quaternion val); - delegate UnityEngine.Quaternion UnboxQuaternionDelegate(int valHandle); - delegate float UnityEngineMatrix4x4PropertyGetItemDelegate(ref UnityEngine.Matrix4x4 thiz, int row, int column); - delegate void UnityEngineMatrix4x4PropertySetItemDelegate(ref UnityEngine.Matrix4x4 thiz, int row, int column, float value); - delegate int BoxMatrix4x4Delegate(ref UnityEngine.Matrix4x4 val); - delegate UnityEngine.Matrix4x4 UnboxMatrix4x4Delegate(int valHandle); - delegate int BoxQueryTriggerInteractionDelegate(UnityEngine.QueryTriggerInteraction val); - delegate UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteractionDelegate(int valHandle); - delegate void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate(int handle); - delegate int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate(int keyHandle, double value); - delegate int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate(int thisHandle); - delegate double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate(int thisHandle); - delegate int BoxKeyValuePairSystemString_SystemDoubleDelegate(int valHandle); - delegate int UnboxKeyValuePairSystemString_SystemDoubleDelegate(int valHandle); - delegate int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate(int valueHandle); - delegate int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate(int thisHandle); - delegate void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate(int thisHandle, int valueHandle); - delegate int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate(int valueHandle); - delegate int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate(int thisHandle); - delegate void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate(int thisHandle, int valueHandle); delegate int SystemExceptionConstructorSystemStringDelegate(int messageHandle); - delegate int UnityEngineScreenPropertyGetResolutionsDelegate(); - delegate void ReleaseUnityEngineRayDelegate(int handle); - delegate int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction); - delegate int BoxRayDelegate(int valHandle); - delegate int UnboxRayDelegate(int valHandle); - delegate int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate(int rayHandle, int resultsHandle); - delegate int UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(int rayHandle); - delegate int UnityEngineGradientConstructorDelegate(); - delegate int UnityEngineGradientPropertyGetColorKeysDelegate(int thisHandle); - delegate void UnityEngineGradientPropertySetColorKeysDelegate(int thisHandle, int valueHandle); - delegate int SystemAppDomainSetupConstructorDelegate(); - delegate int SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate(int thisHandle); - delegate void SystemAppDomainSetupPropertySetAppDomainInitializerDelegate(int thisHandle, int valueHandle); - delegate void UnityEngineApplicationAddEventOnBeforeRenderDelegate(int delHandle); - delegate void UnityEngineApplicationRemoveEventOnBeforeRenderDelegate(int delHandle); - delegate void UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate(int delHandle); - delegate void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate(int delHandle); - delegate void ReleaseUnityEngineSceneManagementSceneDelegate(int handle); - delegate int BoxSceneDelegate(int valHandle); - delegate int UnboxSceneDelegate(int valHandle); - delegate int BoxLoadSceneModeDelegate(UnityEngine.SceneManagement.LoadSceneMode val); - delegate UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneModeDelegate(int valHandle); delegate int BoxPrimitiveTypeDelegate(UnityEngine.PrimitiveType val); delegate UnityEngine.PrimitiveType UnboxPrimitiveTypeDelegate(int valHandle); delegate float UnityEngineTimePropertyGetDeltaTimeDelegate(); - delegate int BoxFileModeDelegate(System.IO.FileMode val); - delegate System.IO.FileMode UnboxFileModeDelegate(int valHandle); - delegate void SystemCollectionsGenericBaseIComparerSystemInt32ConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsGenericBaseIComparerSystemInt32Delegate(int handle); - delegate void SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate(int handle); - delegate void SystemBaseStringComparerConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemBaseStringComparerDelegate(int handle); - delegate int SystemCollectionsQueuePropertyGetCountDelegate(int thisHandle); - delegate void SystemCollectionsBaseQueueConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsBaseQueueDelegate(int handle); - delegate void SystemComponentModelDesignBaseIComponentChangeServiceConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemComponentModelDesignBaseIComponentChangeServiceDelegate(int handle); - delegate int SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate(int pathHandle, System.IO.FileMode mode); - delegate void SystemIOFileStreamMethodWriteByteSystemByteDelegate(int thisHandle, byte value); - delegate void SystemIOBaseFileStreamConstructorSystemString_SystemIOFileModeDelegate(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode); - delegate void ReleaseSystemIOBaseFileStreamDelegate(int handle); - delegate void ReleaseUnityEnginePlayablesPlayableHandleDelegate(int handle); - delegate int BoxPlayableHandleDelegate(int valHandle); - delegate int UnboxPlayableHandleDelegate(int valHandle); - delegate int SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumeratorDelegate(int thisHandle); - delegate int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate(int eHandle, int nameHandle, int classesHandle); - delegate int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate(int eHandle, int nameHandle, int classNameHandle); - delegate int BoxInteractionSourcePositionAccuracyDelegate(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy val); - delegate UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy UnboxInteractionSourcePositionAccuracyDelegate(int valHandle); - delegate int BoxInteractionSourceNodeDelegate(UnityEngine.XR.WSA.Input.InteractionSourceNode val); - delegate UnityEngine.XR.WSA.Input.InteractionSourceNode UnboxInteractionSourceNodeDelegate(int valHandle); - delegate void ReleaseUnityEngineXRWSAInputInteractionSourcePoseDelegate(int handle); - delegate bool UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate(int thisHandle, out UnityEngine.Quaternion rotation, UnityEngine.XR.WSA.Input.InteractionSourceNode node); - delegate int BoxInteractionSourcePoseDelegate(int valHandle); - delegate int UnboxInteractionSourcePoseDelegate(int valHandle); - delegate int SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate(int thisHandle); - delegate float SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate(int thisHandle); - delegate UnityEngine.GradientColorKey SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate(int thisHandle); - delegate int SystemCollectionsGenericListSystemStringConstructorDelegate(); - delegate int SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(int thisHandle, int index); - delegate void SystemCollectionsGenericListSystemStringPropertySetItemDelegate(int thisHandle, int index, int valueHandle); - delegate void SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate(int thisHandle, int itemHandle); - delegate void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate(int thisHandle, int comparerHandle); - delegate int SystemCollectionsGenericListSystemInt32ConstructorDelegate(); - delegate int SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate(int thisHandle, int index); - delegate void SystemCollectionsGenericListSystemInt32PropertySetItemDelegate(int thisHandle, int index, int value); - delegate void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate(int thisHandle, int item); - delegate void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate(int thisHandle, int comparerHandle); + delegate void BaseBallScriptConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseBaseBallScriptDelegate(int handle); delegate int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1429,92 +615,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate float UnboxSingleDelegate(int valHandle); delegate int BoxDoubleDelegate(double val); delegate double UnboxDoubleDelegate(int valHandle); - delegate int SystemSystemInt32Array1Constructor1Delegate(int length0); - delegate int SystemInt32Array1GetItem1Delegate(int thisHandle, int index0); - delegate void SystemInt32Array1SetItem1Delegate(int thisHandle, int index0, int item); - delegate int SystemSystemSingleArray1Constructor1Delegate(int length0); - delegate float SystemSingleArray1GetItem1Delegate(int thisHandle, int index0); - delegate void SystemSingleArray1SetItem1Delegate(int thisHandle, int index0, float item); - delegate int SystemSystemSingleArray2Constructor2Delegate(int length0, int length1); - delegate int SystemSystemSingleArray2GetLength2Delegate(int thisHandle, int dimension); - delegate float SystemSingleArray2GetItem2Delegate(int thisHandle, int index0, int index1); - delegate void SystemSingleArray2SetItem2Delegate(int thisHandle, int index0, int index1, float item); - delegate int SystemSystemSingleArray3Constructor3Delegate(int length0, int length1, int length2); - delegate int SystemSystemSingleArray3GetLength3Delegate(int thisHandle, int dimension); - delegate float SystemSingleArray3GetItem3Delegate(int thisHandle, int index0, int index1, int index2); - delegate void SystemSingleArray3SetItem3Delegate(int thisHandle, int index0, int index1, int index2, float item); - delegate int SystemSystemStringArray1Constructor1Delegate(int length0); - delegate int SystemStringArray1GetItem1Delegate(int thisHandle, int index0); - delegate void SystemStringArray1SetItem1Delegate(int thisHandle, int index0, int itemHandle); - delegate int UnityEngineUnityEngineResolutionArray1Constructor1Delegate(int length0); - delegate int UnityEngineResolutionArray1GetItem1Delegate(int thisHandle, int index0); - delegate void UnityEngineResolutionArray1SetItem1Delegate(int thisHandle, int index0, int itemHandle); - delegate int UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate(int length0); - delegate int UnityEngineRaycastHitArray1GetItem1Delegate(int thisHandle, int index0); - delegate void UnityEngineRaycastHitArray1SetItem1Delegate(int thisHandle, int index0, int itemHandle); - delegate int UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate(int length0); - delegate UnityEngine.GradientColorKey UnityEngineGradientColorKeyArray1GetItem1Delegate(int thisHandle, int index0); - delegate void UnityEngineGradientColorKeyArray1SetItem1Delegate(int thisHandle, int index0, ref UnityEngine.GradientColorKey item); - delegate void SystemActionInvokeDelegate(int thisHandle); - delegate void SystemActionConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemActionDelegate(int handle, int classHandle); - delegate void SystemActionAddDelegate(int thisHandle, int delHandle); - delegate void SystemActionRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemActionSystemSingleInvokeDelegate(int thisHandle, float obj); - delegate void SystemActionSystemSingleConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemActionSystemSingleDelegate(int handle, int classHandle); - delegate void SystemActionSystemSingleAddDelegate(int thisHandle, int delHandle); - delegate void SystemActionSystemSingleRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemActionSystemSingle_SystemSingleInvokeDelegate(int thisHandle, float arg1, float arg2); - delegate void SystemActionSystemSingle_SystemSingleConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemActionSystemSingle_SystemSingleDelegate(int handle, int classHandle); - delegate void SystemActionSystemSingle_SystemSingleAddDelegate(int thisHandle, int delHandle); - delegate void SystemActionSystemSingle_SystemSingleRemoveDelegate(int thisHandle, int delHandle); - delegate double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate(int thisHandle, int arg1, float arg2); - delegate void SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemFuncSystemInt32_SystemSingle_SystemDoubleDelegate(int handle, int classHandle); - delegate void SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate(int thisHandle, int delHandle); - delegate void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate(int thisHandle, int delHandle); - delegate int SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate(int thisHandle, short arg1, int arg2); - delegate void SystemFuncSystemInt16_SystemInt32_SystemStringConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemFuncSystemInt16_SystemInt32_SystemStringDelegate(int handle, int classHandle); - delegate void SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate(int thisHandle, int delHandle); - delegate void SystemFuncSystemInt16_SystemInt32_SystemStringRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemAppDomainInitializerInvokeDelegate(int thisHandle, int argsHandle); - delegate void SystemAppDomainInitializerConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemAppDomainInitializerDelegate(int handle, int classHandle); - delegate void SystemAppDomainInitializerAddDelegate(int thisHandle, int delHandle); - delegate void SystemAppDomainInitializerRemoveDelegate(int thisHandle, int delHandle); - delegate void UnityEngineEventsUnityActionInvokeDelegate(int thisHandle); - delegate void UnityEngineEventsUnityActionConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseUnityEngineEventsUnityActionDelegate(int handle, int classHandle); - delegate void UnityEngineEventsUnityActionAddDelegate(int thisHandle, int delHandle); - delegate void UnityEngineEventsUnityActionRemoveDelegate(int thisHandle, int delHandle); - delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(int thisHandle, int arg0Handle, UnityEngine.SceneManagement.LoadSceneMode arg1); - delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate(int handle, int classHandle); - delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate(int thisHandle, int delHandle); - delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentEventHandlerInvokeDelegate(int thisHandle, int senderHandle, int eHandle); - delegate void SystemComponentModelDesignComponentEventHandlerConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemComponentModelDesignComponentEventHandlerDelegate(int handle, int classHandle); - delegate void SystemComponentModelDesignComponentEventHandlerAddDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentEventHandlerRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentChangingEventHandlerInvokeDelegate(int thisHandle, int senderHandle, int eHandle); - delegate void SystemComponentModelDesignComponentChangingEventHandlerConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemComponentModelDesignComponentChangingEventHandlerDelegate(int handle, int classHandle); - delegate void SystemComponentModelDesignComponentChangingEventHandlerAddDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentChangingEventHandlerRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentChangedEventHandlerInvokeDelegate(int thisHandle, int senderHandle, int eHandle); - delegate void SystemComponentModelDesignComponentChangedEventHandlerConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemComponentModelDesignComponentChangedEventHandlerDelegate(int handle, int classHandle); - delegate void SystemComponentModelDesignComponentChangedEventHandlerAddDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentChangedEventHandlerRemoveDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentRenameEventHandlerInvokeDelegate(int thisHandle, int senderHandle, int eHandle); - delegate void SystemComponentModelDesignComponentRenameEventHandlerConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); - delegate void ReleaseSystemComponentModelDesignComponentRenameEventHandlerDelegate(int handle, int classHandle); - delegate void SystemComponentModelDesignComponentRenameEventHandlerAddDelegate(int thisHandle, int delHandle); - delegate void SystemComponentModelDesignComponentRenameEventHandlerRemoveDelegate(int thisHandle, int delHandle); /*END DELEGATE TYPES*/ private static readonly string pluginPath = Application.dataPath + PLUGIN_PATH; @@ -1523,8 +623,12 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke #endif public static Exception UnhandledCppException; public static SetCsharpExceptionDelegate SetCsharpException; - private static IntPtr memory; - private static int memorySize; + static IntPtr memory; + static int memorySize; + static DestroyEntry[] destroyQueue; + static int destroyQueueCount; + static int destroyQueueCapacity; + static object destroyQueueLockObj; /// /// Open the C++ plugin and call its PluginMain() @@ -1537,19 +641,17 @@ public static void Open(int memorySize) { /*BEGIN STORE INIT CALLS*/ NativeScript.Bindings.ObjectStore.Init(1000); - NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore>.Init(20); - NativeScript.Bindings.StructStore.Init(10); - NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore.Init(1000); /*END STORE INIT CALLS*/ - + + // Allocate unmanaged memory Bindings.memorySize = memorySize; memory = Marshal.AllocHGlobal(memorySize); + + // Allocate destroy queue + destroyQueueCapacity = 128; + destroyQueue = new DestroyEntry[destroyQueueCapacity]; + destroyQueueLockObj = new object(); + OpenPlugin(InitMode.FirstBoot); } @@ -1562,6 +664,7 @@ public static void Open(int memorySize) /// public static void Reload() { + DestroyAll(); ClosePlugin(); OpenPlugin(InitMode.Reload); } @@ -1622,50 +725,12 @@ private static void OpenPlugin(InitMode initMode) SetCsharpException = GetDelegate( libraryHandle, "SetCsharpException"); - /*BEGIN MONOBEHAVIOUR GETDELEGATE CALLS*/ - SystemCollectionsGenericIComparerSystemInt32Compare = GetDelegate(libraryHandle, "SystemCollectionsGenericIComparerSystemInt32Compare"); - SystemCollectionsGenericIComparerSystemStringCompare = GetDelegate(libraryHandle, "SystemCollectionsGenericIComparerSystemStringCompare"); - SystemStringComparerCompare = GetDelegate(libraryHandle, "SystemStringComparerCompare"); - SystemStringComparerEquals = GetDelegate(libraryHandle, "SystemStringComparerEquals"); - SystemStringComparerGetHashCode = GetDelegate(libraryHandle, "SystemStringComparerGetHashCode"); - SystemCollectionsQueueGetCount = GetDelegate(libraryHandle, "SystemCollectionsQueueGetCount"); - SystemComponentModelDesignIComponentChangeServiceOnComponentChanged = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceOnComponentChanged"); - SystemComponentModelDesignIComponentChangeServiceOnComponentChanging = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceOnComponentChanging"); - SystemComponentModelDesignIComponentChangeServiceAddComponentAdded = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentAdded"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded"); - SystemComponentModelDesignIComponentChangeServiceAddComponentAdding = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentAdding"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding"); - SystemComponentModelDesignIComponentChangeServiceAddComponentChanged = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentChanged"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged"); - SystemComponentModelDesignIComponentChangeServiceAddComponentChanging = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentChanging"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging"); - SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved"); - SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving"); - SystemComponentModelDesignIComponentChangeServiceAddComponentRename = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceAddComponentRename"); - SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename"); - SystemIOFileStreamWriteByte = GetDelegate(libraryHandle, "SystemIOFileStreamWriteByte"); - MyGameMonoBehavioursTestScriptAwake = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptAwake"); - MyGameMonoBehavioursTestScriptOnAnimatorIK = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnAnimatorIK"); - MyGameMonoBehavioursTestScriptOnCollisionEnter = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnCollisionEnter"); - MyGameMonoBehavioursTestScriptUpdate = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptUpdate"); - MyGameMonoBehavioursAnotherScriptAwake = GetDelegate(libraryHandle, "MyGameMonoBehavioursAnotherScriptAwake"); - MyGameMonoBehavioursAnotherScriptUpdate = GetDelegate(libraryHandle, "MyGameMonoBehavioursAnotherScriptUpdate"); - SystemActionNativeInvoke = GetDelegate(libraryHandle, "SystemActionNativeInvoke"); - SystemActionSystemSingleNativeInvoke = GetDelegate(libraryHandle, "SystemActionSystemSingleNativeInvoke"); - SystemActionSystemSingle_SystemSingleNativeInvoke = GetDelegate(libraryHandle, "SystemActionSystemSingle_SystemSingleNativeInvoke"); - SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke = GetDelegate(libraryHandle, "SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke"); - SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke = GetDelegate(libraryHandle, "SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke"); - SystemAppDomainInitializerNativeInvoke = GetDelegate(libraryHandle, "SystemAppDomainInitializerNativeInvoke"); - UnityEngineEventsUnityActionNativeInvoke = GetDelegate(libraryHandle, "UnityEngineEventsUnityActionNativeInvoke"); - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke = GetDelegate(libraryHandle, "UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke"); - SystemComponentModelDesignComponentEventHandlerNativeInvoke = GetDelegate(libraryHandle, "SystemComponentModelDesignComponentEventHandlerNativeInvoke"); - SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke = GetDelegate(libraryHandle, "SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke"); - SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke = GetDelegate(libraryHandle, "SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke"); - SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke = GetDelegate(libraryHandle, "SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke"); + /*BEGIN GETDELEGATE CALLS*/ + NewBaseBallScript = GetDelegate(libraryHandle, "NewBaseBallScript"); + DestroyBaseBallScript = GetDelegate(libraryHandle, "DestroyBaseBallScript"); + MyGameAbstractBaseBallScriptUpdate = GetDelegate(libraryHandle, "MyGameAbstractBaseBallScriptUpdate"); SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); - /*END MONOBEHAVIOUR GETDELEGATE CALLS*/ + /*END GETDELEGATE CALLS*/ #endif // Init C++ library Init( @@ -1679,171 +744,27 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new EnumerableGetEnumeratorDelegate(EnumerableGetEnumerator)), /*BEGIN INIT CALL*/ 1000, - Marshal.GetFunctionPointerForDelegate(new SystemIComparableMethodCompareToSystemObjectDelegate(SystemIComparableMethodCompareToSystemObject)), - Marshal.GetFunctionPointerForDelegate(new SystemIDisposableMethodDisposeDelegate(SystemIDisposableMethodDispose)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3PropertyGetMagnitudeDelegate(UnityEngineVector3PropertyGetMagnitude)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate(UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)), Marshal.GetFunctionPointerForDelegate(new BoxVector3Delegate(BoxVector3)), Marshal.GetFunctionPointerForDelegate(new UnboxVector3Delegate(UnboxVector3)), Marshal.GetFunctionPointerForDelegate(new UnityEngineObjectPropertyGetNameDelegate(UnityEngineObjectPropertyGetName)), Marshal.GetFunctionPointerForDelegate(new UnityEngineObjectPropertySetNameDelegate(UnityEngineObjectPropertySetName)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObjectDelegate(UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineObjectMethodop_ImplicitUnityEngineObjectDelegate(UnityEngineObjectMethodop_ImplicitUnityEngineObject)), Marshal.GetFunctionPointerForDelegate(new UnityEngineComponentPropertyGetTransformDelegate(UnityEngineComponentPropertyGetTransform)), Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertyGetPositionDelegate(UnityEngineTransformPropertyGetPosition)), Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertySetPositionDelegate(UnityEngineTransformPropertySetPosition)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformMethodSetParentUnityEngineTransformDelegate(UnityEngineTransformMethodSetParentUnityEngineTransform)), - Marshal.GetFunctionPointerForDelegate(new BoxColorDelegate(BoxColor)), - Marshal.GetFunctionPointerForDelegate(new UnboxColorDelegate(UnboxColor)), - Marshal.GetFunctionPointerForDelegate(new BoxGradientColorKeyDelegate(BoxGradientColorKey)), - Marshal.GetFunctionPointerForDelegate(new UnboxGradientColorKeyDelegate(UnboxGradientColorKey)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineResolutionDelegate(ReleaseUnityEngineResolution)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionConstructorDelegate(UnityEngineResolutionConstructor)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetWidthDelegate(UnityEngineResolutionPropertyGetWidth)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertySetWidthDelegate(UnityEngineResolutionPropertySetWidth)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetHeightDelegate(UnityEngineResolutionPropertyGetHeight)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertySetHeightDelegate(UnityEngineResolutionPropertySetHeight)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetRefreshRateDelegate(UnityEngineResolutionPropertyGetRefreshRate)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertySetRefreshRateDelegate(UnityEngineResolutionPropertySetRefreshRate)), - Marshal.GetFunctionPointerForDelegate(new BoxResolutionDelegate(BoxResolution)), - Marshal.GetFunctionPointerForDelegate(new UnboxResolutionDelegate(UnboxResolution)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineRaycastHitDelegate(ReleaseUnityEngineRaycastHit)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitPropertyGetPointDelegate(UnityEngineRaycastHitPropertyGetPoint)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitPropertySetPointDelegate(UnityEngineRaycastHitPropertySetPoint)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitPropertyGetTransformDelegate(UnityEngineRaycastHitPropertyGetTransform)), - Marshal.GetFunctionPointerForDelegate(new BoxRaycastHitDelegate(BoxRaycastHit)), - Marshal.GetFunctionPointerForDelegate(new UnboxRaycastHitDelegate(UnboxRaycastHit)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(SystemCollectionsIEnumeratorPropertyGetCurrent)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorMethodMoveNextDelegate(SystemCollectionsIEnumeratorMethodMoveNext)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEnginePlayablesPlayableGraphDelegate(ReleaseUnityEnginePlayablesPlayableGraph)), - Marshal.GetFunctionPointerForDelegate(new BoxPlayableGraphDelegate(BoxPlayableGraph)), - Marshal.GetFunctionPointerForDelegate(new UnboxPlayableGraphDelegate(UnboxPlayableGraph)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineAnimationsAnimationMixerPlayableDelegate(ReleaseUnityEngineAnimationsAnimationMixerPlayable)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBooleanDelegate(UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)), - Marshal.GetFunctionPointerForDelegate(new BoxAnimationMixerPlayableDelegate(BoxAnimationMixerPlayable)), - Marshal.GetFunctionPointerForDelegate(new UnboxAnimationMixerPlayableDelegate(UnboxAnimationMixerPlayable)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchConstructorDelegate(SystemDiagnosticsStopwatchConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate(SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchMethodStartDelegate(SystemDiagnosticsStopwatchMethodStart)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchMethodResetDelegate(SystemDiagnosticsStopwatchMethodReset)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectConstructorDelegate(UnityEngineGameObjectConstructor)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectConstructorSystemStringDelegate(UnityEngineGameObjectConstructorSystemString)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectPropertyGetTransformDelegate(UnityEngineGameObjectPropertyGetTransform)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)), Marshal.GetFunctionPointerForDelegate(new UnityEngineDebugMethodLogSystemObjectDelegate(UnityEngineDebugMethodLogSystemObject)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate(UnityEngineAssertionsAssertFieldGetRaiseExceptions)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate(UnityEngineAssertionsAssertFieldSetRaiseExceptions)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)), Marshal.GetFunctionPointerForDelegate(new UnityEngineMonoBehaviourPropertyGetTransformDelegate(UnityEngineMonoBehaviourPropertyGetTransform)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate(UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByteDelegate(UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineNetworkingNetworkTransportMethodInitDelegate(UnityEngineNetworkingNetworkTransportMethodInit)), - Marshal.GetFunctionPointerForDelegate(new BoxQuaternionDelegate(BoxQuaternion)), - Marshal.GetFunctionPointerForDelegate(new UnboxQuaternionDelegate(UnboxQuaternion)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineMatrix4x4PropertyGetItemDelegate(UnityEngineMatrix4x4PropertyGetItem)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineMatrix4x4PropertySetItemDelegate(UnityEngineMatrix4x4PropertySetItem)), - Marshal.GetFunctionPointerForDelegate(new BoxMatrix4x4Delegate(BoxMatrix4x4)), - Marshal.GetFunctionPointerForDelegate(new UnboxMatrix4x4Delegate(UnboxMatrix4x4)), - Marshal.GetFunctionPointerForDelegate(new BoxQueryTriggerInteractionDelegate(BoxQueryTriggerInteraction)), - Marshal.GetFunctionPointerForDelegate(new UnboxQueryTriggerInteractionDelegate(UnboxQueryTriggerInteraction)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)), - Marshal.GetFunctionPointerForDelegate(new BoxKeyValuePairSystemString_SystemDoubleDelegate(BoxKeyValuePairSystemString_SystemDouble)), - Marshal.GetFunctionPointerForDelegate(new UnboxKeyValuePairSystemString_SystemDoubleDelegate(UnboxKeyValuePairSystemString_SystemDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue)), - Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)), - Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)), Marshal.GetFunctionPointerForDelegate(new SystemExceptionConstructorSystemStringDelegate(SystemExceptionConstructorSystemString)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineScreenPropertyGetResolutionsDelegate(UnityEngineScreenPropertyGetResolutions)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineRayDelegate(ReleaseUnityEngineRay)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)), - Marshal.GetFunctionPointerForDelegate(new BoxRayDelegate(BoxRay)), - Marshal.GetFunctionPointerForDelegate(new UnboxRayDelegate(UnboxRay)), - Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)), - Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(UnityEnginePhysicsMethodRaycastAllUnityEngineRay)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientConstructorDelegate(UnityEngineGradientConstructor)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientPropertyGetColorKeysDelegate(UnityEngineGradientPropertyGetColorKeys)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientPropertySetColorKeysDelegate(UnityEngineGradientPropertySetColorKeys)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainSetupConstructorDelegate(SystemAppDomainSetupConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate(SystemAppDomainSetupPropertyGetAppDomainInitializer)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainSetupPropertySetAppDomainInitializerDelegate(SystemAppDomainSetupPropertySetAppDomainInitializer)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineApplicationAddEventOnBeforeRenderDelegate(UnityEngineApplicationAddEventOnBeforeRender)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineApplicationRemoveEventOnBeforeRenderDelegate(UnityEngineApplicationRemoveEventOnBeforeRender)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate(UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineSceneManagementSceneDelegate(ReleaseUnityEngineSceneManagementScene)), - Marshal.GetFunctionPointerForDelegate(new BoxSceneDelegate(BoxScene)), - Marshal.GetFunctionPointerForDelegate(new UnboxSceneDelegate(UnboxScene)), - Marshal.GetFunctionPointerForDelegate(new BoxLoadSceneModeDelegate(BoxLoadSceneMode)), - Marshal.GetFunctionPointerForDelegate(new UnboxLoadSceneModeDelegate(UnboxLoadSceneMode)), Marshal.GetFunctionPointerForDelegate(new BoxPrimitiveTypeDelegate(BoxPrimitiveType)), Marshal.GetFunctionPointerForDelegate(new UnboxPrimitiveTypeDelegate(UnboxPrimitiveType)), Marshal.GetFunctionPointerForDelegate(new UnityEngineTimePropertyGetDeltaTimeDelegate(UnityEngineTimePropertyGetDeltaTime)), - Marshal.GetFunctionPointerForDelegate(new BoxFileModeDelegate(BoxFileMode)), - Marshal.GetFunctionPointerForDelegate(new UnboxFileModeDelegate(UnboxFileMode)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericBaseIComparerSystemInt32Delegate(ReleaseSystemCollectionsGenericBaseIComparerSystemInt32)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericBaseIComparerSystemInt32ConstructorDelegate(SystemCollectionsGenericBaseIComparerSystemInt32Constructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate(ReleaseSystemCollectionsGenericBaseIComparerSystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate(SystemCollectionsGenericBaseIComparerSystemStringConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemBaseStringComparerDelegate(ReleaseSystemBaseStringComparer)), - Marshal.GetFunctionPointerForDelegate(new SystemBaseStringComparerConstructorDelegate(SystemBaseStringComparerConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsQueuePropertyGetCountDelegate(SystemCollectionsQueuePropertyGetCount)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsBaseQueueDelegate(ReleaseSystemCollectionsBaseQueue)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsBaseQueueConstructorDelegate(SystemCollectionsBaseQueueConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignBaseIComponentChangeServiceDelegate(ReleaseSystemComponentModelDesignBaseIComponentChangeService)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignBaseIComponentChangeServiceConstructorDelegate(SystemComponentModelDesignBaseIComponentChangeServiceConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate(SystemIOFileStreamConstructorSystemString_SystemIOFileMode)), - Marshal.GetFunctionPointerForDelegate(new SystemIOFileStreamMethodWriteByteSystemByteDelegate(SystemIOFileStreamMethodWriteByteSystemByte)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemIOBaseFileStreamDelegate(ReleaseSystemIOBaseFileStream)), - Marshal.GetFunctionPointerForDelegate(new SystemIOBaseFileStreamConstructorSystemString_SystemIOFileModeDelegate(SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEnginePlayablesPlayableHandleDelegate(ReleaseUnityEnginePlayablesPlayableHandle)), - Marshal.GetFunctionPointerForDelegate(new BoxPlayableHandleDelegate(BoxPlayableHandle)), - Marshal.GetFunctionPointerForDelegate(new UnboxPlayableHandleDelegate(UnboxPlayableHandle)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)), - Marshal.GetFunctionPointerForDelegate(new BoxInteractionSourcePositionAccuracyDelegate(BoxInteractionSourcePositionAccuracy)), - Marshal.GetFunctionPointerForDelegate(new UnboxInteractionSourcePositionAccuracyDelegate(UnboxInteractionSourcePositionAccuracy)), - Marshal.GetFunctionPointerForDelegate(new BoxInteractionSourceNodeDelegate(BoxInteractionSourceNode)), - Marshal.GetFunctionPointerForDelegate(new UnboxInteractionSourceNodeDelegate(UnboxInteractionSourceNode)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineXRWSAInputInteractionSourcePoseDelegate(ReleaseUnityEngineXRWSAInputInteractionSourcePose)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate(UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)), - Marshal.GetFunctionPointerForDelegate(new BoxInteractionSourcePoseDelegate(BoxInteractionSourcePose)), - Marshal.GetFunctionPointerForDelegate(new UnboxInteractionSourcePoseDelegate(UnboxInteractionSourcePose)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate(SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate(SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringConstructorDelegate(SystemCollectionsGenericListSystemStringConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(SystemCollectionsGenericListSystemStringPropertyGetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertySetItemDelegate(SystemCollectionsGenericListSystemStringPropertySetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate(SystemCollectionsGenericListSystemStringMethodAddSystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32ConstructorDelegate(SystemCollectionsGenericListSystemInt32Constructor)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate(SystemCollectionsGenericListSystemInt32PropertyGetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32PropertySetItemDelegate(SystemCollectionsGenericListSystemInt32PropertySetItem)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)), + Marshal.GetFunctionPointerForDelegate(new ReleaseBaseBallScriptDelegate(ReleaseBaseBallScript)), + Marshal.GetFunctionPointerForDelegate(new BaseBallScriptConstructorDelegate(BaseBallScriptConstructor)), Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -1867,93 +788,7 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new BoxSingleDelegate(BoxSingle)), Marshal.GetFunctionPointerForDelegate(new UnboxSingleDelegate(UnboxSingle)), Marshal.GetFunctionPointerForDelegate(new BoxDoubleDelegate(BoxDouble)), - Marshal.GetFunctionPointerForDelegate(new UnboxDoubleDelegate(UnboxDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemInt32Array1Constructor1Delegate(SystemSystemInt32Array1Constructor1)), - Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1GetItem1Delegate(SystemInt32Array1GetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1SetItem1Delegate(SystemInt32Array1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray1Constructor1Delegate(SystemSystemSingleArray1Constructor1)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray1GetItem1Delegate(SystemSingleArray1GetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray1SetItem1Delegate(SystemSingleArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray2Constructor2Delegate(SystemSystemSingleArray2Constructor2)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray2GetLength2Delegate(SystemSystemSingleArray2GetLength2)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray2GetItem2Delegate(SystemSingleArray2GetItem2)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray2SetItem2Delegate(SystemSingleArray2SetItem2)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray3Constructor3Delegate(SystemSystemSingleArray3Constructor3)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray3GetLength3Delegate(SystemSystemSingleArray3GetLength3)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray3GetItem3Delegate(SystemSingleArray3GetItem3)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray3SetItem3Delegate(SystemSingleArray3SetItem3)), - Marshal.GetFunctionPointerForDelegate(new SystemSystemStringArray1Constructor1Delegate(SystemSystemStringArray1Constructor1)), - Marshal.GetFunctionPointerForDelegate(new SystemStringArray1GetItem1Delegate(SystemStringArray1GetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemStringArray1SetItem1Delegate(SystemStringArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineUnityEngineResolutionArray1Constructor1Delegate(UnityEngineUnityEngineResolutionArray1Constructor1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionArray1GetItem1Delegate(UnityEngineResolutionArray1GetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionArray1SetItem1Delegate(UnityEngineResolutionArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate(UnityEngineUnityEngineRaycastHitArray1Constructor1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitArray1GetItem1Delegate(UnityEngineRaycastHitArray1GetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitArray1SetItem1Delegate(UnityEngineRaycastHitArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate(UnityEngineUnityEngineGradientColorKeyArray1Constructor1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientColorKeyArray1GetItem1Delegate(UnityEngineGradientColorKeyArray1GetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientColorKeyArray1SetItem1Delegate(UnityEngineGradientColorKeyArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemActionDelegate(ReleaseSystemAction)), - Marshal.GetFunctionPointerForDelegate(new SystemActionConstructorDelegate(SystemActionConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemActionAddDelegate(SystemActionAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemActionRemoveDelegate(SystemActionRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemActionInvokeDelegate(SystemActionInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemActionSystemSingleDelegate(ReleaseSystemActionSystemSingle)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingleConstructorDelegate(SystemActionSystemSingleConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingleAddDelegate(SystemActionSystemSingleAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingleRemoveDelegate(SystemActionSystemSingleRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingleInvokeDelegate(SystemActionSystemSingleInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemActionSystemSingle_SystemSingleDelegate(ReleaseSystemActionSystemSingle_SystemSingle)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingle_SystemSingleConstructorDelegate(SystemActionSystemSingle_SystemSingleConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingle_SystemSingleAddDelegate(SystemActionSystemSingle_SystemSingleAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingle_SystemSingleRemoveDelegate(SystemActionSystemSingle_SystemSingleRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemActionSystemSingle_SystemSingleInvokeDelegate(SystemActionSystemSingle_SystemSingleInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemFuncSystemInt32_SystemSingle_SystemDoubleDelegate(ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructorDelegate(SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate(SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate(SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemFuncSystemInt16_SystemInt32_SystemStringDelegate(ReleaseSystemFuncSystemInt16_SystemInt32_SystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt16_SystemInt32_SystemStringConstructorDelegate(SystemFuncSystemInt16_SystemInt32_SystemStringConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate(SystemFuncSystemInt16_SystemInt32_SystemStringAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt16_SystemInt32_SystemStringRemoveDelegate(SystemFuncSystemInt16_SystemInt32_SystemStringRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate(SystemFuncSystemInt16_SystemInt32_SystemStringInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemAppDomainInitializerDelegate(ReleaseSystemAppDomainInitializer)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerConstructorDelegate(SystemAppDomainInitializerConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerAddDelegate(SystemAppDomainInitializerAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerRemoveDelegate(SystemAppDomainInitializerRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerInvokeDelegate(SystemAppDomainInitializerInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineEventsUnityActionDelegate(ReleaseUnityEngineEventsUnityAction)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionConstructorDelegate(UnityEngineEventsUnityActionConstructor)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionAddDelegate(UnityEngineEventsUnityActionAdd)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionRemoveDelegate(UnityEngineEventsUnityActionRemove)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionInvokeDelegate(UnityEngineEventsUnityActionInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate(ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignComponentEventHandlerDelegate(ReleaseSystemComponentModelDesignComponentEventHandler)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentEventHandlerConstructorDelegate(SystemComponentModelDesignComponentEventHandlerConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentEventHandlerAddDelegate(SystemComponentModelDesignComponentEventHandlerAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentEventHandlerRemoveDelegate(SystemComponentModelDesignComponentEventHandlerRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentEventHandlerInvokeDelegate(SystemComponentModelDesignComponentEventHandlerInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignComponentChangingEventHandlerDelegate(ReleaseSystemComponentModelDesignComponentChangingEventHandler)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangingEventHandlerConstructorDelegate(SystemComponentModelDesignComponentChangingEventHandlerConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangingEventHandlerAddDelegate(SystemComponentModelDesignComponentChangingEventHandlerAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangingEventHandlerRemoveDelegate(SystemComponentModelDesignComponentChangingEventHandlerRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangingEventHandlerInvokeDelegate(SystemComponentModelDesignComponentChangingEventHandlerInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignComponentChangedEventHandlerDelegate(ReleaseSystemComponentModelDesignComponentChangedEventHandler)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangedEventHandlerConstructorDelegate(SystemComponentModelDesignComponentChangedEventHandlerConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangedEventHandlerAddDelegate(SystemComponentModelDesignComponentChangedEventHandlerAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangedEventHandlerRemoveDelegate(SystemComponentModelDesignComponentChangedEventHandlerRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentChangedEventHandlerInvokeDelegate(SystemComponentModelDesignComponentChangedEventHandlerInvoke)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignComponentRenameEventHandlerDelegate(ReleaseSystemComponentModelDesignComponentRenameEventHandler)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentRenameEventHandlerConstructorDelegate(SystemComponentModelDesignComponentRenameEventHandlerConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentRenameEventHandlerAddDelegate(SystemComponentModelDesignComponentRenameEventHandlerAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentRenameEventHandlerRemoveDelegate(SystemComponentModelDesignComponentRenameEventHandlerRemove)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignComponentRenameEventHandlerInvokeDelegate(SystemComponentModelDesignComponentRenameEventHandlerInvoke)) + Marshal.GetFunctionPointerForDelegate(new UnboxDoubleDelegate(UnboxDouble)) /*END INIT CALL*/ ); if (UnhandledCppException != null) @@ -1973,6 +808,14 @@ public static void Close() Marshal.FreeHGlobal(memory); memory = IntPtr.Zero; } + + /// + /// Perform updates over time + /// + public static void Update() + { + DestroyAll(); + } private static void ClosePlugin() { @@ -1984,6 +827,55 @@ private static void ClosePlugin() File.Delete(pluginTempPath); #endif } + + public static void QueueDestroy(DestroyFunction function, int cppHandle) + { + lock (destroyQueueLockObj) + { + // Grow capacity if necessary + int count = destroyQueueCount; + int capacity = destroyQueueCapacity; + DestroyEntry[] queue = destroyQueue; + if (count == capacity) + { + int newCapacity = capacity * 2; + DestroyEntry[] newQueue = new DestroyEntry[newCapacity]; + for (int i = 0; i < capacity; ++i) + { + newQueue[i] = queue[i]; + } + destroyQueueCapacity = newCapacity; + destroyQueue = newQueue; + queue = newQueue; + } + + // Add to the end + queue[count] = new DestroyEntry(function, cppHandle); + destroyQueueCount = count + 1; + } + } + + static void DestroyAll() + { + lock (destroyQueueLockObj) + { + int count = destroyQueueCount; + DestroyEntry[] queue = destroyQueue; + for (int i = 0; i < count; ++i) + { + DestroyEntry entry = queue[i]; + switch (entry.Function) + { + /*BEGIN DESTROY QUEUE CASES*/ + case DestroyFunction.BaseBallScript: + DestroyBaseBallScript(entry.CppHandle); + break; + /*END DESTROY QUEUE CASES*/ + } + } + destroyQueueCount = 0; + } + } //////////////////////////////////////////////////////////////// // C# functions for C++ to call @@ -2024,5895 +916,128 @@ static int EnumerableGetEnumerator(int handle) { return ObjectStore.Store(((IEnumerable)ObjectStore.Get(handle)).GetEnumerator()); } - - /*BEGIN BASE TYPES*/ - class SystemCollectionsGenericBaseIComparerSystemInt32 : System.Collections.Generic.IComparer + + /*BEGIN FUNCTIONS*/ + [MonoPInvokeCallback(typeof(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate))] + static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(float x, float y, float z) { - public int CppHandle; - - public SystemCollectionsGenericBaseIComparerSystemInt32(int cppHandle) - : base() + try { - CppHandle = cppHandle; + var returnValue = new UnityEngine.Vector3(x, y, z); + return returnValue; } - - public int Compare(int x, int y) + catch (System.NullReferenceException ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsGenericIComparerSystemInt32Compare(thisHandle, x, y); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(int); + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Vector3); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Vector3); } - } - class SystemCollectionsGenericBaseIComparerSystemString : System.Collections.Generic.IComparer + [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] + static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) { - public int CppHandle; - - public SystemCollectionsGenericBaseIComparerSystemString(int cppHandle) - : base() + try { - CppHandle = cppHandle; + var returnValue = a + b; + return returnValue; } - - public int Compare(string x, string y) + catch (System.NullReferenceException ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int xHandle = NativeScript.Bindings.ObjectStore.GetHandle(x); - int yHandle = NativeScript.Bindings.ObjectStore.GetHandle(y); - var returnVal = NativeScript.Bindings.SystemCollectionsGenericIComparerSystemStringCompare(thisHandle, xHandle, yHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(int); + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Vector3); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Vector3); } - } - class SystemBaseStringComparer : System.StringComparer + [MonoPInvokeCallback(typeof(BoxVector3Delegate))] + static int BoxVector3(ref UnityEngine.Vector3 val) { - public int CppHandle; - - public SystemBaseStringComparer(int cppHandle) - : base() + try { - CppHandle = cppHandle; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } - - public override int Compare(string x, string y) + catch (System.NullReferenceException ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int xHandle = NativeScript.Bindings.ObjectStore.GetHandle(x); - int yHandle = NativeScript.Bindings.ObjectStore.GetHandle(y); - var returnVal = NativeScript.Bindings.SystemStringComparerCompare(thisHandle, xHandle, yHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); return default(int); } - - public override bool Equals(string x, string y) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int xHandle = NativeScript.Bindings.ObjectStore.GetHandle(x); - int yHandle = NativeScript.Bindings.ObjectStore.GetHandle(y); - var returnVal = NativeScript.Bindings.SystemStringComparerEquals(thisHandle, xHandle, yHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(bool); - } - - public override int GetHashCode(string obj) + catch (System.Exception ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int objHandle = NativeScript.Bindings.ObjectStore.GetHandle(obj); - var returnVal = NativeScript.Bindings.SystemStringComparerGetHashCode(thisHandle, objHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); return default(int); } - } - class SystemCollectionsBaseQueue : System.Collections.Queue + [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] + static UnityEngine.Vector3 UnboxVector3(int valHandle) { - public int CppHandle; - - public SystemCollectionsBaseQueue(int cppHandle) - : base() + try { - CppHandle = cppHandle; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Vector3)val; + return returnValue; } - - public override int Count - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsQueueGetCount(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(int); - } - } - - } - - class SystemComponentModelDesignBaseIComponentChangeService : System.ComponentModel.Design.IComponentChangeService - { - public int CppHandle; - - public SystemComponentModelDesignBaseIComponentChangeService(int cppHandle) - : base() - { - CppHandle = cppHandle; - } - - public void OnComponentChanged(object component, System.ComponentModel.MemberDescriptor member, object oldValue, object newValue) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int componentHandle = NativeScript.Bindings.ObjectStore.GetHandle(component); - int memberHandle = NativeScript.Bindings.ObjectStore.GetHandle(member); - int oldValueHandle = NativeScript.Bindings.ObjectStore.GetHandle(oldValue); - int newValueHandle = NativeScript.Bindings.ObjectStore.GetHandle(newValue); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceOnComponentChanged(thisHandle, componentHandle, memberHandle, oldValueHandle, newValueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public void OnComponentChanging(object component, System.ComponentModel.MemberDescriptor member) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int componentHandle = NativeScript.Bindings.ObjectStore.GetHandle(component); - int memberHandle = NativeScript.Bindings.ObjectStore.GetHandle(member); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceOnComponentChanging(thisHandle, componentHandle, memberHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public event System.ComponentModel.Design.ComponentEventHandler ComponentAdded - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentAdded(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public event System.ComponentModel.Design.ComponentEventHandler ComponentAdding - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentAdding(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public event System.ComponentModel.Design.ComponentChangedEventHandler ComponentChanged - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentChanged(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public event System.ComponentModel.Design.ComponentChangingEventHandler ComponentChanging - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentChanging(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public event System.ComponentModel.Design.ComponentEventHandler ComponentRemoved - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public event System.ComponentModel.Design.ComponentEventHandler ComponentRemoving - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public event System.ComponentModel.Design.ComponentRenameEventHandler ComponentRename - { - add - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceAddComponentRename(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - remove - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - } - - class SystemIOBaseFileStream : System.IO.FileStream - { - public int CppHandle; - - public SystemIOBaseFileStream(int cppHandle, string path, System.IO.FileMode mode) - : base(path, mode) - { - CppHandle = cppHandle; - } - - public override void WriteByte(byte value) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemIOFileStreamWriteByte(thisHandle, value); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemAction - { - public int CppHandle; - public System.Action Delegate; - - public SystemAction(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke() - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionNativeInvoke(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemActionSystemSingle - { - public int CppHandle; - public System.Action Delegate; - - public SystemActionSystemSingle(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(float obj) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionSystemSingleNativeInvoke(thisHandle, obj); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemActionSystemSingle_SystemSingle - { - public int CppHandle; - public System.Action Delegate; - - public SystemActionSystemSingle_SystemSingle(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(float arg1, float arg2) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionSystemSingle_SystemSingleNativeInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemFuncSystemInt32_SystemSingle_SystemDouble - { - public int CppHandle; - public System.Func Delegate; - - public SystemFuncSystemInt32_SystemSingle_SystemDouble(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public double NativeInvoke(int arg1, float arg2) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(double); - } - - } - - class SystemFuncSystemInt16_SystemInt32_SystemString - { - public int CppHandle; - public System.Func Delegate; - - public SystemFuncSystemInt16_SystemInt32_SystemString(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public string NativeInvoke(short arg1, int arg2) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return (string)NativeScript.Bindings.ObjectStore.Get(returnVal); - } - return default(string); - } - - } - - class SystemAppDomainInitializer - { - public int CppHandle; - public System.AppDomainInitializer Delegate; - - public SystemAppDomainInitializer(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(string[] args) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int argsHandle = NativeScript.Bindings.ObjectStore.GetHandle(args); - NativeScript.Bindings.SystemAppDomainInitializerNativeInvoke(thisHandle, argsHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class UnityEngineEventsUnityAction - { - public int CppHandle; - public UnityEngine.Events.UnityAction Delegate; - - public UnityEngineEventsUnityAction(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke() - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.UnityEngineEventsUnityActionNativeInvoke(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode - { - public int CppHandle; - public UnityEngine.Events.UnityAction Delegate; - - public UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int arg0Handle = NativeScript.Bindings.StructStore.Store(arg0); - NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(thisHandle, arg0Handle, arg1); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemComponentModelDesignComponentEventHandler - { - public int CppHandle; - public System.ComponentModel.Design.ComponentEventHandler Delegate; - - public SystemComponentModelDesignComponentEventHandler(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentEventArgs e) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int senderHandle = NativeScript.Bindings.ObjectStore.GetHandle(sender); - int eHandle = NativeScript.Bindings.ObjectStore.GetHandle(e); - NativeScript.Bindings.SystemComponentModelDesignComponentEventHandlerNativeInvoke(thisHandle, senderHandle, eHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemComponentModelDesignComponentChangingEventHandler - { - public int CppHandle; - public System.ComponentModel.Design.ComponentChangingEventHandler Delegate; - - public SystemComponentModelDesignComponentChangingEventHandler(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentChangingEventArgs e) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int senderHandle = NativeScript.Bindings.ObjectStore.GetHandle(sender); - int eHandle = NativeScript.Bindings.ObjectStore.GetHandle(e); - NativeScript.Bindings.SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke(thisHandle, senderHandle, eHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemComponentModelDesignComponentChangedEventHandler - { - public int CppHandle; - public System.ComponentModel.Design.ComponentChangedEventHandler Delegate; - - public SystemComponentModelDesignComponentChangedEventHandler(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentChangedEventArgs e) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int senderHandle = NativeScript.Bindings.ObjectStore.GetHandle(sender); - int eHandle = NativeScript.Bindings.ObjectStore.GetHandle(e); - NativeScript.Bindings.SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke(thisHandle, senderHandle, eHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - - class SystemComponentModelDesignComponentRenameEventHandler - { - public int CppHandle; - public System.ComponentModel.Design.ComponentRenameEventHandler Delegate; - - public SystemComponentModelDesignComponentRenameEventHandler(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentRenameEventArgs e) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int senderHandle = NativeScript.Bindings.ObjectStore.GetHandle(sender); - int eHandle = NativeScript.Bindings.ObjectStore.GetHandle(e); - NativeScript.Bindings.SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke(thisHandle, senderHandle, eHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - } - /*END BASE TYPES*/ - - /*BEGIN FUNCTIONS*/ - [MonoPInvokeCallback(typeof(SystemIComparableMethodCompareToSystemObjectDelegate))] - static int SystemIComparableMethodCompareToSystemObject(int thisHandle, int objHandle) - { - try - { - var thiz = (System.IComparable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var obj = NativeScript.Bindings.ObjectStore.Get(objHandle); - var returnValue = thiz.CompareTo(obj); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemIDisposableMethodDisposeDelegate))] - static void SystemIDisposableMethodDispose(int thisHandle) - { - try - { - var thiz = (System.IDisposable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Dispose(); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate))] - static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(float x, float y, float z) - { - try - { - var returnValue = new UnityEngine.Vector3(x, y, z); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineVector3PropertyGetMagnitudeDelegate))] - static float UnityEngineVector3PropertyGetMagnitude(ref UnityEngine.Vector3 thiz) - { - try - { - var returnValue = thiz.magnitude; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate))] - static void UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(ref UnityEngine.Vector3 thiz, float newX, float newY, float newZ) - { - try - { - thiz.Set(newX, newY, newZ); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] - static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) - { - try - { - var returnValue = a + b; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate))] - static UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(ref UnityEngine.Vector3 a) - { - try - { - var returnValue = -a; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - } - - [MonoPInvokeCallback(typeof(BoxVector3Delegate))] - static int BoxVector3(ref UnityEngine.Vector3 val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] - static UnityEngine.Vector3 UnboxVector3(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Vector3)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineObjectPropertyGetNameDelegate))] - static int UnityEngineObjectPropertyGetName(int thisHandle) - { - try - { - var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.name; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineObjectPropertySetNameDelegate))] - static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) - { - try - { - var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.name = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObjectDelegate))] - static bool UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(int xHandle, int yHandle) - { - try - { - var x = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(xHandle); - var y = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(yHandle); - var returnValue = x == y; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineObjectMethodop_ImplicitUnityEngineObjectDelegate))] - static bool UnityEngineObjectMethodop_ImplicitUnityEngineObject(int existsHandle) - { - try - { - var exists = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(existsHandle); - var returnValue = exists; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegate))] - static int UnityEngineComponentPropertyGetTransform(int thisHandle) - { - try - { - var thiz = (UnityEngine.Component)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] - static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) - { - try - { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.position; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegate))] - static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEngine.Vector3 value) - { - try - { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.position = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineTransformMethodSetParentUnityEngineTransformDelegate))] - static void UnityEngineTransformMethodSetParentUnityEngineTransform(int thisHandle, int parentHandle) - { - try - { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var parent = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(parentHandle); - thiz.SetParent(parent); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxColorDelegate))] - static int BoxColor(ref UnityEngine.Color val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxColorDelegate))] - static UnityEngine.Color UnboxColor(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Color)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Color); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Color); - } - } - - [MonoPInvokeCallback(typeof(BoxGradientColorKeyDelegate))] - static int BoxGradientColorKey(ref UnityEngine.GradientColorKey val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxGradientColorKeyDelegate))] - static UnityEngine.GradientColorKey UnboxGradientColorKey(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.GradientColorKey)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEngineResolutionDelegate))] - static void ReleaseUnityEngineResolution(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionConstructorDelegate))] - static int UnityEngineResolutionConstructor() - { - try - { - var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Resolution()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetWidthDelegate))] - static int UnityEngineResolutionPropertyGetWidth(int thisHandle) - { - try - { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.width; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetWidthDelegate))] - static void UnityEngineResolutionPropertySetWidth(int thisHandle, int value) - { - try - { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.width = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetHeightDelegate))] - static int UnityEngineResolutionPropertyGetHeight(int thisHandle) - { - try - { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.height; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetHeightDelegate))] - static void UnityEngineResolutionPropertySetHeight(int thisHandle, int value) - { - try - { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.height = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetRefreshRateDelegate))] - static int UnityEngineResolutionPropertyGetRefreshRate(int thisHandle) - { - try - { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.refreshRate; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetRefreshRateDelegate))] - static void UnityEngineResolutionPropertySetRefreshRate(int thisHandle, int value) - { - try - { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.refreshRate = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxResolutionDelegate))] - static int BoxResolution(int valHandle) - { - try - { - var val = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxResolutionDelegate))] - static int UnboxResolution(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Resolution)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEngineRaycastHitDelegate))] - static void ReleaseUnityEngineRaycastHit(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetPointDelegate))] - static UnityEngine.Vector3 UnityEngineRaycastHitPropertyGetPoint(int thisHandle) - { - try - { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.point; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertySetPointDelegate))] - static void UnityEngineRaycastHitPropertySetPoint(int thisHandle, ref UnityEngine.Vector3 value) - { - try - { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.point = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetTransformDelegate))] - static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) - { - try - { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(BoxRaycastHitDelegate))] - static int BoxRaycastHit(int valHandle) - { - try - { - var val = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxRaycastHitDelegate))] - static int UnboxRaycastHit(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.RaycastHit)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorPropertyGetCurrentDelegate))] - static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorMethodMoveNextDelegate))] - static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) - { - try - { - var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.MoveNext(); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableGraphDelegate))] - static void ReleaseUnityEnginePlayablesPlayableGraph(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxPlayableGraphDelegate))] - static int BoxPlayableGraph(int valHandle) - { - try - { - var val = (UnityEngine.Playables.PlayableGraph)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxPlayableGraphDelegate))] - static int UnboxPlayableGraph(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Playables.PlayableGraph)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEngineAnimationsAnimationMixerPlayableDelegate))] - static void ReleaseUnityEngineAnimationsAnimationMixerPlayable(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBooleanDelegate))] - static int UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(int graphHandle, int inputCount, bool normalizeWeights) - { - try - { - var graph = (UnityEngine.Playables.PlayableGraph)NativeScript.Bindings.StructStore.Get(graphHandle); - var returnValue = UnityEngine.Animations.AnimationMixerPlayable.Create(graph, inputCount, normalizeWeights); - return NativeScript.Bindings.StructStore.Store(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(BoxAnimationMixerPlayableDelegate))] - static int BoxAnimationMixerPlayable(int valHandle) - { - try - { - var val = (UnityEngine.Animations.AnimationMixerPlayable)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxAnimationMixerPlayableDelegate))] - static int UnboxAnimationMixerPlayable(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Animations.AnimationMixerPlayable)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] - static int SystemDiagnosticsStopwatchConstructor() - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] - static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) - { - try - { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.ElapsedMilliseconds; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); - } - } - - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] - static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) - { - try - { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Start(); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodResetDelegate))] - static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) - { - try - { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Reset(); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorDelegate))] - static int UnityEngineGameObjectConstructor() - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorSystemStringDelegate))] - static int UnityEngineGameObjectConstructorSystemString(int nameHandle) - { - try - { - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject(name)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGameObjectPropertyGetTransformDelegate))] - static int UnityEngineGameObjectPropertyGetTransform(int thisHandle) - { - try - { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate))] - static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(int thisHandle) - { - try - { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AddComponent(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate))] - static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(int thisHandle) - { - try - { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AddComponent(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] - static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) - { - try - { - var returnValue = UnityEngine.GameObject.CreatePrimitive(type); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] - static void UnityEngineDebugMethodLogSystemObject(int messageHandle) - { - try - { - var message = NativeScript.Bindings.ObjectStore.Get(messageHandle); - UnityEngine.Debug.Log(message); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate))] - static bool UnityEngineAssertionsAssertFieldGetRaiseExceptions() - { - try - { - var returnValue = UnityEngine.Assertions.Assert.raiseExceptions; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate))] - static void UnityEngineAssertionsAssertFieldSetRaiseExceptions(bool value) - { - try - { - UnityEngine.Assertions.Assert.raiseExceptions = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(int expectedHandle, int actualHandle) - { - try - { - var expected = (string)NativeScript.Bindings.ObjectStore.Get(expectedHandle); - var actual = (string)NativeScript.Bindings.ObjectStore.Get(actualHandle); - UnityEngine.Assertions.Assert.AreEqual(expected, actual); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(int expectedHandle, int actualHandle) - { - try - { - var expected = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(expectedHandle); - var actual = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(actualHandle); - UnityEngine.Assertions.Assert.AreEqual(expected, actual); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] - static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) - { - try - { - var thiz = (UnityEngine.MonoBehaviour)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate))] - static void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(ref int bufferLength, ref int numBuffers) - { - try - { - UnityEngine.AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - bufferLength = default(int); - numBuffers = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - bufferLength = default(int); - numBuffers = default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByteDelegate))] - static void UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(int hostId, ref int addressHandle, ref int port, ref byte error) - { - try - { - var address = (string)NativeScript.Bindings.ObjectStore.Get(addressHandle); - UnityEngine.Networking.NetworkTransport.GetBroadcastConnectionInfo(hostId, out address, out port, out error); - int addressHandleNew = NativeScript.Bindings.ObjectStore.GetHandle(address); - addressHandle = addressHandleNew; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - addressHandle = default(int); - port = default(int); - error = default(byte); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - addressHandle = default(int); - port = default(int); - error = default(byte); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodInitDelegate))] - static void UnityEngineNetworkingNetworkTransportMethodInit() - { - try - { - UnityEngine.Networking.NetworkTransport.Init(); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxQuaternionDelegate))] - static int BoxQuaternion(ref UnityEngine.Quaternion val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxQuaternionDelegate))] - static UnityEngine.Quaternion UnboxQuaternion(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Quaternion)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Quaternion); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Quaternion); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertyGetItemDelegate))] - static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) - { - try - { - var returnValue = thiz[row, row]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertySetItemDelegate))] - static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column, float value) - { - try - { - thiz[row, column] = column; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] - static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxMatrix4x4Delegate))] - static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Matrix4x4)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Matrix4x4); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Matrix4x4); - } - } - - [MonoPInvokeCallback(typeof(BoxQueryTriggerInteractionDelegate))] - static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxQueryTriggerInteractionDelegate))] - static UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteraction(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.QueryTriggerInteraction)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.QueryTriggerInteraction); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.QueryTriggerInteraction); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate))] - static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore>.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) - { - try - { - var key = (string)NativeScript.Bindings.ObjectStore.Get(keyHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store(new System.Collections.Generic.KeyValuePair(key, value)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Key; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] - static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Value; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); - } - } - - [MonoPInvokeCallback(typeof(BoxKeyValuePairSystemString_SystemDoubleDelegate))] - static int BoxKeyValuePairSystemString_SystemDouble(int valHandle) - { - try - { - var val = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] - static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store((System.Collections.Generic.KeyValuePair)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) - { - try - { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.LinkedListNode(value)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.LinkedListNode)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Value; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] - static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) - { - try - { - var thiz = (System.Collections.Generic.LinkedListNode)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.Value = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) - { - try - { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Runtime.CompilerServices.StrongBox(value)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) - { - try - { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Value; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] - static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) - { - try - { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.Value = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] - static int SystemExceptionConstructorSystemString(int messageHandle) - { - try - { - var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] - static int UnityEngineScreenPropertyGetResolutions() - { - try - { - var returnValue = UnityEngine.Screen.resolutions; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEngineRayDelegate))] - static void ReleaseUnityEngineRay(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] - static int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) - { - try - { - var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Ray(origin, direction)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(BoxRayDelegate))] - static int BoxRay(int valHandle) - { - try - { - var val = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxRayDelegate))] - static int UnboxRay(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Ray)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate))] - static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(int rayHandle, int resultsHandle) - { - try - { - var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); - var results = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(resultsHandle); - var returnValue = UnityEngine.Physics.RaycastNonAlloc(ray, results); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] - static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(int rayHandle) - { - try - { - var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); - var returnValue = UnityEngine.Physics.RaycastAll(ray); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGradientConstructorDelegate))] - static int UnityEngineGradientConstructor() - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Gradient()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGradientPropertyGetColorKeysDelegate))] - static int UnityEngineGradientPropertyGetColorKeys(int thisHandle) - { - try - { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.colorKeys; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGradientPropertySetColorKeysDelegate))] - static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHandle) - { - try - { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.colorKeys = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemAppDomainSetupConstructorDelegate))] - static int SystemAppDomainSetupConstructor() - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.AppDomainSetup()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate))] - static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) - { - try - { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AppDomainInitializer; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertySetAppDomainInitializerDelegate))] - static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, int valueHandle) - { - try - { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.AppDomainInitializer = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineApplicationAddEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) - { - try - { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineApplicationRemoveEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) - { - try - { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) - { - try - { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) - { - try - { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEngineSceneManagementSceneDelegate))] - static void ReleaseUnityEngineSceneManagementScene(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxSceneDelegate))] - static int BoxScene(int valHandle) - { - try - { - var val = (UnityEngine.SceneManagement.Scene)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] - static int UnboxScene(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.SceneManagement.Scene)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] - static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxLoadSceneModeDelegate))] - static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.LoadSceneMode)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); - } - } - - [MonoPInvokeCallback(typeof(BoxPrimitiveTypeDelegate))] - static int BoxPrimitiveType(UnityEngine.PrimitiveType val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxPrimitiveTypeDelegate))] - static UnityEngine.PrimitiveType UnboxPrimitiveType(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.PrimitiveType)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.PrimitiveType); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.PrimitiveType); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineTimePropertyGetDeltaTimeDelegate))] - static float UnityEngineTimePropertyGetDeltaTime() - { - try - { - var returnValue = UnityEngine.Time.deltaTime; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(BoxFileModeDelegate))] - static int BoxFileMode(System.IO.FileMode val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxFileModeDelegate))] - static System.IO.FileMode UnboxFileMode(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (System.IO.FileMode)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(System.IO.FileMode); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(System.IO.FileMode); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemInt32ConstructorDelegate))] - static void SystemCollectionsGenericBaseIComparerSystemInt32Constructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemCollectionsGenericBaseIComparerSystemInt32(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemInt32Delegate))] - static void ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(int handle) - { - try - { - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate))] - static void SystemCollectionsGenericBaseIComparerSystemStringConstructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemCollectionsGenericBaseIComparerSystemString(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate))] - static void ReleaseSystemCollectionsGenericBaseIComparerSystemString(int handle) - { - try - { - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemBaseStringComparerConstructorDelegate))] - static void SystemBaseStringComparerConstructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemBaseStringComparer(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemBaseStringComparerDelegate))] - static void ReleaseSystemBaseStringComparer(int handle) - { - try - { - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsQueuePropertyGetCountDelegate))] - static int SystemCollectionsQueuePropertyGetCount(int thisHandle) - { - try - { - var thiz = (System.Collections.Queue)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Count; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsBaseQueueConstructorDelegate))] - static void SystemCollectionsBaseQueueConstructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemCollectionsBaseQueue(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsBaseQueueDelegate))] - static void ReleaseSystemCollectionsBaseQueue(int handle) - { - try - { - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemComponentModelDesignBaseIComponentChangeServiceConstructorDelegate))] - static void SystemComponentModelDesignBaseIComponentChangeServiceConstructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemComponentModelDesignBaseIComponentChangeService(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignBaseIComponentChangeServiceDelegate))] - static void ReleaseSystemComponentModelDesignBaseIComponentChangeService(int handle) - { - try - { - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate))] - static int SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int pathHandle, System.IO.FileMode mode) - { - try - { - var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.IO.FileStream(path, mode)); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemIOFileStreamMethodWriteByteSystemByteDelegate))] - static void SystemIOFileStreamMethodWriteByteSystemByte(int thisHandle, byte value) - { - try - { - var thiz = (System.IO.FileStream)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.WriteByte(value); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemIOBaseFileStreamConstructorSystemString_SystemIOFileModeDelegate))] - static void SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode) - { - try - { - var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); - var thiz = new SystemIOBaseFileStream(cppHandle, path, mode); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemIOBaseFileStreamDelegate))] - static void ReleaseSystemIOBaseFileStream(int handle) - { - try - { - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableHandleDelegate))] - static void ReleaseUnityEnginePlayablesPlayableHandle(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxPlayableHandleDelegate))] - static int BoxPlayableHandle(int valHandle) - { - try - { - var val = (UnityEngine.Playables.PlayableHandle)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxPlayableHandleDelegate))] - static int UnboxPlayableHandle(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Playables.PlayableHandle)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate))] - static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(int eHandle, int nameHandle, int classesHandle) - { - try - { - var e = (UnityEngine.Experimental.UIElements.VisualElement)NativeScript.Bindings.ObjectStore.Get(eHandle); - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var classes = (string[])NativeScript.Bindings.ObjectStore.Get(classesHandle); - var returnValue = UnityEngine.Experimental.UIElements.UQueryExtensions.Q(e, name, classes); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate))] - static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString(int eHandle, int nameHandle, int classNameHandle) - { - try - { - var e = (UnityEngine.Experimental.UIElements.VisualElement)NativeScript.Bindings.ObjectStore.Get(eHandle); - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var className = (string)NativeScript.Bindings.ObjectStore.Get(classNameHandle); - var returnValue = UnityEngine.Experimental.UIElements.UQueryExtensions.Q(e, name, className); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(BoxInteractionSourcePositionAccuracyDelegate))] - static int BoxInteractionSourcePositionAccuracy(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxInteractionSourcePositionAccuracyDelegate))] - static UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy UnboxInteractionSourcePositionAccuracy(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy); - } - } - - [MonoPInvokeCallback(typeof(BoxInteractionSourceNodeDelegate))] - static int BoxInteractionSourceNode(UnityEngine.XR.WSA.Input.InteractionSourceNode val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxInteractionSourceNodeDelegate))] - static UnityEngine.XR.WSA.Input.InteractionSourceNode UnboxInteractionSourceNode(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.XR.WSA.Input.InteractionSourceNode)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourceNode); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.XR.WSA.Input.InteractionSourceNode); - } - } - - [MonoPInvokeCallback(typeof(ReleaseUnityEngineXRWSAInputInteractionSourcePoseDelegate))] - static void ReleaseUnityEngineXRWSAInputInteractionSourcePose(int handle) - { - try - { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNodeDelegate))] - static bool UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode(int thisHandle, out UnityEngine.Quaternion rotation, UnityEngine.XR.WSA.Input.InteractionSourceNode node) - { - try - { - var thiz = (UnityEngine.XR.WSA.Input.InteractionSourcePose)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.TryGetRotation(out rotation, node); - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - rotation = default(UnityEngine.Quaternion); - return default(bool); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - rotation = default(UnityEngine.Quaternion); - return default(bool); - } - } - - [MonoPInvokeCallback(typeof(BoxInteractionSourcePoseDelegate))] - static int BoxInteractionSourcePose(int valHandle) - { - try - { - var val = (UnityEngine.XR.WSA.Input.InteractionSourcePose)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxInteractionSourcePoseDelegate))] - static int UnboxInteractionSourcePose(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.XR.WSA.Input.InteractionSourcePose)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrentDelegate))] - static float SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.StructStore.Store(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrentDelegate))] - static UnityEngine.GradientColorKey SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrentDelegate))] - static int SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.StructStore.Store(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumeratorDelegate))] - static int SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator(int thisHandle) - { - try - { - var thiz = (System.Collections.Generic.IEnumerable)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetEnumerator(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] - static int SystemCollectionsGenericListSystemStringConstructor() - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz[index] = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] - static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); - thiz.Add(item); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var comparer = (System.Collections.Generic.IComparer)NativeScript.Bindings.ObjectStore.Get(comparerHandle); - thiz.Sort(comparer); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] - static int SystemCollectionsGenericListSystemInt32Constructor() - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index] = value; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] - static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Add(item); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) - { - try - { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var comparer = (System.Collections.Generic.IComparer)NativeScript.Bindings.ObjectStore.Get(comparerHandle); - thiz.Sort(comparer); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(BoxBooleanDelegate))] - static int BoxBoolean(bool val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxBooleanDelegate))] - static bool UnboxBoolean(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (bool)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); - } - } - - [MonoPInvokeCallback(typeof(BoxSByteDelegate))] - static int BoxSByte(sbyte val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxSByteDelegate))] - static sbyte UnboxSByte(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (sbyte)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(sbyte); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(sbyte); - } - } - - [MonoPInvokeCallback(typeof(BoxByteDelegate))] - static int BoxByte(byte val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxByteDelegate))] - static byte UnboxByte(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (byte)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(byte); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(byte); - } - } - - [MonoPInvokeCallback(typeof(BoxInt16Delegate))] - static int BoxInt16(short val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxInt16Delegate))] - static short UnboxInt16(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (short)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(short); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(short); - } - } - - [MonoPInvokeCallback(typeof(BoxUInt16Delegate))] - static int BoxUInt16(ushort val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxUInt16Delegate))] - static ushort UnboxUInt16(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (ushort)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(ushort); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(ushort); - } - } - - [MonoPInvokeCallback(typeof(BoxInt32Delegate))] - static int BoxInt32(int val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxInt32Delegate))] - static int UnboxInt32(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (int)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(BoxUInt32Delegate))] - static int BoxUInt32(uint val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxUInt32Delegate))] - static uint UnboxUInt32(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (uint)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(uint); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(uint); - } - } - - [MonoPInvokeCallback(typeof(BoxInt64Delegate))] - static int BoxInt64(long val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxInt64Delegate))] - static long UnboxInt64(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (long)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); - } - } - - [MonoPInvokeCallback(typeof(BoxUInt64Delegate))] - static int BoxUInt64(ulong val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxUInt64Delegate))] - static ulong UnboxUInt64(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (ulong)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(ulong); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(ulong); - } - } - - [MonoPInvokeCallback(typeof(BoxCharDelegate))] - static int BoxChar(char val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxCharDelegate))] - static char UnboxChar(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (char)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(char); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(char); - } - } - - [MonoPInvokeCallback(typeof(BoxSingleDelegate))] - static int BoxSingle(float val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxSingleDelegate))] - static float UnboxSingle(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (float)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(BoxDoubleDelegate))] - static int BoxDouble(double val) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnboxDoubleDelegate))] - static double UnboxDouble(int valHandle) - { - try - { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (double)val; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemInt32Array1Constructor1Delegate))] - static int SystemSystemInt32Array1Constructor1(int length0) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new int[length0]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemInt32Array1GetItem1Delegate))] - static int SystemInt32Array1GetItem1(int thisHandle, int index0) - { - try - { - var thiz = (int[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemInt32Array1SetItem1Delegate))] - static void SystemInt32Array1SetItem1(int thisHandle, int index0, int item) - { - try - { - var thiz = (int[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemSingleArray1Constructor1Delegate))] - static int SystemSystemSingleArray1Constructor1(int length0) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemSingleArray1GetItem1Delegate))] - static float SystemSingleArray1GetItem1(int thisHandle, int index0) - { - try - { - var thiz = (float[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(SystemSingleArray1SetItem1Delegate))] - static void SystemSingleArray1SetItem1(int thisHandle, int index0, float item) - { - try - { - var thiz = (float[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemSingleArray2Constructor2Delegate))] - static int SystemSystemSingleArray2Constructor2(int length0, int length1) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0, length1]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemSingleArray2GetLength2Delegate))] - static int SystemSystemSingleArray2GetLength2(int thisHandle, int dimension) - { - try - { - var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetLength(dimension); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemSingleArray2GetItem2Delegate))] - static float SystemSingleArray2GetItem2(int thisHandle, int index0, int index1) - { - try - { - var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0, index1]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(SystemSingleArray2SetItem2Delegate))] - static void SystemSingleArray2SetItem2(int thisHandle, int index0, int index1, float item) - { - try - { - var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0, index1] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemSingleArray3Constructor3Delegate))] - static int SystemSystemSingleArray3Constructor3(int length0, int length1, int length2) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0, length1, length2]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemSingleArray3GetLength3Delegate))] - static int SystemSystemSingleArray3GetLength3(int thisHandle, int dimension) - { - try - { - var thiz = (float[,,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetLength(dimension); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemSingleArray3GetItem3Delegate))] - static float SystemSingleArray3GetItem3(int thisHandle, int index0, int index1, int index2) - { - try - { - var thiz = (float[,,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0, index1, index2]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); - } - } - - [MonoPInvokeCallback(typeof(SystemSingleArray3SetItem3Delegate))] - static void SystemSingleArray3SetItem3(int thisHandle, int index0, int index1, int index2, float item) - { - try - { - var thiz = (float[,,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0, index1, index2] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemSystemStringArray1Constructor1Delegate))] - static int SystemSystemStringArray1Constructor1(int length0) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new string[length0]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemStringArray1GetItem1Delegate))] - static int SystemStringArray1GetItem1(int thisHandle, int index0) - { - try - { - var thiz = (string[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(SystemStringArray1SetItem1Delegate))] - static void SystemStringArray1SetItem1(int thisHandle, int index0, int itemHandle) - { - try - { - var thiz = (string[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); - thiz[index0] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineUnityEngineResolutionArray1Constructor1Delegate))] - static int UnityEngineUnityEngineResolutionArray1Constructor1(int length0) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Resolution[length0]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1GetItem1Delegate))] - static int UnityEngineResolutionArray1GetItem1(int thisHandle, int index0) - { - try - { - var thiz = (UnityEngine.Resolution[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return NativeScript.Bindings.StructStore.Store(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1SetItem1Delegate))] - static void UnityEngineResolutionArray1SetItem1(int thisHandle, int index0, int itemHandle) - { - try - { - var thiz = (UnityEngine.Resolution[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(itemHandle); - thiz[index0] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate))] - static int UnityEngineUnityEngineRaycastHitArray1Constructor1(int length0) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.RaycastHit[length0]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitArray1GetItem1Delegate))] - static int UnityEngineRaycastHitArray1GetItem1(int thisHandle, int index0) - { - try - { - var thiz = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return NativeScript.Bindings.StructStore.Store(returnValue); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitArray1SetItem1Delegate))] - static void UnityEngineRaycastHitArray1SetItem1(int thisHandle, int index0, int itemHandle) - { - try - { - var thiz = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(itemHandle); - thiz[index0] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate))] - static int UnityEngineUnityEngineGradientColorKeyArray1Constructor1(int length0) - { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GradientColorKey[length0]); - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGradientColorKeyArray1GetItem1Delegate))] - static UnityEngine.GradientColorKey UnityEngineGradientColorKeyArray1GetItem1(int thisHandle, int index0) - { - try - { - var thiz = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return returnValue; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); - } - } - - [MonoPInvokeCallback(typeof(UnityEngineGradientColorKeyArray1SetItem1Delegate))] - static void UnityEngineGradientColorKeyArray1SetItem1(int thisHandle, int index0, ref UnityEngine.GradientColorKey item) - { - try - { - var thiz = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0] = item; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionInvokeDelegate))] - static void SystemActionInvoke(int thisHandle) - { - try - { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionConstructorDelegate))] - static void SystemActionConstructor(int cppHandle, ref int handle, ref int classHandle) - { - try - { - var thiz = new SystemAction(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemActionDelegate))] - static void ReleaseSystemAction(int handle, int classHandle) - { - try - { - if (classHandle != 0) - { - var thiz = (SystemAction)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionAddDelegate))] - static void SystemActionAdd(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionRemoveDelegate))] - static void SystemActionRemove(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingleInvokeDelegate))] - static void SystemActionSystemSingleInvoke(int thisHandle, float obj) - { - try - { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(obj); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingleConstructorDelegate))] - static void SystemActionSystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) - { - try - { - var thiz = new SystemActionSystemSingle(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingleDelegate))] - static void ReleaseSystemActionSystemSingle(int handle, int classHandle) - { - try - { - if (classHandle != 0) - { - var thiz = (SystemActionSystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingleAddDelegate))] - static void SystemActionSystemSingleAdd(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingleRemoveDelegate))] - static void SystemActionSystemSingleRemove(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleInvokeDelegate))] - static void SystemActionSystemSingle_SystemSingleInvoke(int thisHandle, float arg1, float arg2) - { - try - { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleConstructorDelegate))] - static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) - { - try - { - var thiz = new SystemActionSystemSingle_SystemSingle(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) + catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingle_SystemSingleDelegate))] - static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHandle) + [MonoPInvokeCallback(typeof(UnityEngineObjectPropertyGetNameDelegate))] + static int UnityEngineObjectPropertyGetName(int thisHandle) { try { - if (classHandle != 0) - { - var thiz = (SystemActionSystemSingle_SystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.name; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleAddDelegate))] - static void SystemActionSystemSingle_SystemSingleAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineObjectPropertySetNameDelegate))] + static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + thiz.name = value; } catch (System.NullReferenceException ex) { @@ -7926,126 +1051,59 @@ static void SystemActionSystemSingle_SystemSingleAdd(int thisHandle, int delHand } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleRemoveDelegate))] - static void SystemActionSystemSingle_SystemSingleRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegate))] + static int UnityEngineComponentPropertyGetTransform(int thisHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var thiz = (UnityEngine.Component)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.transform; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate))] - static double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(int thisHandle, int arg1, float arg2) + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] + static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) { try { - var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.position; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); - } - } - - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructorDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(int cppHandle, ref int handle, ref int classHandle) - { - try - { - var thiz = new SystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemFuncSystemInt32_SystemSingle_SystemDoubleDelegate))] - static void ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(int handle, int classHandle) - { - try - { - if (classHandle != 0) - { - var thiz = (SystemFuncSystemInt32_SystemSingle_SystemDouble)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegate))] + static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEngine.Vector3 value) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.position = value; } catch (System.NullReferenceException ex) { @@ -8059,12 +1117,13 @@ static void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(int thisHandle } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate))] - static int SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(int thisHandle, short arg1, int arg2) + [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorPropertyGetCurrentDelegate))] + static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) { try { - var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) @@ -8081,172 +1140,81 @@ static int SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(int thisHandle, } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringConstructorDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(int cppHandle, ref int handle, ref int classHandle) - { - try - { - var thiz = new SystemFuncSystemInt16_SystemInt32_SystemString(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); - } - } - - [MonoPInvokeCallback(typeof(ReleaseSystemFuncSystemInt16_SystemInt32_SystemStringDelegate))] - static void ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(int handle, int classHandle) - { - try - { - if (classHandle != 0) - { - var thiz = (SystemFuncSystemInt16_SystemInt32_SystemString)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringRemoveDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringRemove(int thisHandle, int delHandle) - { - try - { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; - } - catch (System.NullReferenceException ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - catch (System.Exception ex) - { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - } - } - - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerInvokeDelegate))] - static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorMethodMoveNextDelegate))] + static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) { try { - var args = (string[])NativeScript.Bindings.ObjectStore.Get(argsHandle); - ((System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle))(args); + var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.MoveNext(); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(bool); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(bool); } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerConstructorDelegate))] - static void SystemAppDomainInitializerConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate))] + static int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript(int thisHandle) { try { - var thiz = new SystemAppDomainInitializer(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.AddComponent(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemAppDomainInitializerDelegate))] - static void ReleaseSystemAppDomainInitializer(int handle, int classHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] + static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) { try { - if (classHandle != 0) - { - var thiz = (SystemAppDomainInitializer)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var returnValue = UnityEngine.GameObject.CreatePrimitive(type); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerAddDelegate))] - static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] + static void UnityEngineDebugMethodLogSystemObject(int messageHandle) { try { - var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var message = NativeScript.Bindings.ObjectStore.Get(messageHandle); + UnityEngine.Debug.Log(message); } catch (System.NullReferenceException ex) { @@ -8260,143 +1228,152 @@ static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerRemoveDelegate))] - static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] + static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) { try { - var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var thiz = (UnityEngine.MonoBehaviour)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.transform; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionInvokeDelegate))] - static void UnityEngineEventsUnityActionInvoke(int thisHandle) + [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] + static int SystemExceptionConstructorSystemString(int messageHandle) { try { - ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); + var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionConstructorDelegate))] - static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(BoxPrimitiveTypeDelegate))] + static int BoxPrimitiveType(UnityEngine.PrimitiveType val) { try { - var thiz = new UnityEngineEventsUnityAction(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineEventsUnityActionDelegate))] - static void ReleaseUnityEngineEventsUnityAction(int handle, int classHandle) + [MonoPInvokeCallback(typeof(UnboxPrimitiveTypeDelegate))] + static UnityEngine.PrimitiveType UnboxPrimitiveType(int valHandle) { try { - if (classHandle != 0) - { - var thiz = (UnityEngineEventsUnityAction)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.PrimitiveType)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.PrimitiveType); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.PrimitiveType); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionAddDelegate))] - static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineTimePropertyGetDeltaTimeDelegate))] + static float UnityEngineTimePropertyGetDeltaTime() { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var returnValue = UnityEngine.Time.deltaTime; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(float); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionRemoveDelegate))] - static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(BaseBallScriptConstructorDelegate))] + static void BaseBallScriptConstructor(int cppHandle, ref int handle) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var thiz = new MyGame.BaseBallScript(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + handle = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + handle = default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, int arg0Handle, UnityEngine.SceneManagement.LoadSceneMode arg1) + [MonoPInvokeCallback(typeof(ReleaseBaseBallScriptDelegate))] + static void ReleaseBaseBallScript(int handle) { try { - var arg0 = (UnityEngine.SceneManagement.Scene)NativeScript.Bindings.StructStore.Get(arg0Handle); - ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); + MyGame.BaseBallScript thiz; + thiz = (MyGame.BaseBallScript)ObjectStore.Get(handle); + int cppHandle = thiz.CppHandle; + thiz.CppHandle = 0; + QueueDestroy(DestroyFunction.BaseBallScript, cppHandle); + ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -8410,623 +1387,583 @@ static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEng } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(BoxBooleanDelegate))] + static int BoxBoolean(bool val) { try { - var thiz = new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate))] - static void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int handle, int classHandle) + [MonoPInvokeCallback(typeof(UnboxBooleanDelegate))] + static bool UnboxBoolean(int valHandle) { try { - if (classHandle != 0) - { - var thiz = (UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (bool)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(bool); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(bool); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(BoxSByteDelegate))] + static int BoxSByte(sbyte val) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnboxSByteDelegate))] + static sbyte UnboxSByte(int valHandle) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (sbyte)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(sbyte); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(sbyte); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerInvokeDelegate))] - static void SystemComponentModelDesignComponentEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) + [MonoPInvokeCallback(typeof(BoxByteDelegate))] + static int BoxByte(byte val) { try { - var sender = NativeScript.Bindings.ObjectStore.Get(senderHandle); - var e = (System.ComponentModel.Design.ComponentEventArgs)NativeScript.Bindings.ObjectStore.Get(eHandle); - ((System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle))(sender, e); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerConstructorDelegate))] - static void SystemComponentModelDesignComponentEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(UnboxByteDelegate))] + static byte UnboxByte(int valHandle) { try { - var thiz = new SystemComponentModelDesignComponentEventHandler(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (byte)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(byte); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(byte); } } - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentEventHandlerDelegate))] - static void ReleaseSystemComponentModelDesignComponentEventHandler(int handle, int classHandle) + [MonoPInvokeCallback(typeof(BoxInt16Delegate))] + static int BoxInt16(short val) { try { - if (classHandle != 0) - { - var thiz = (SystemComponentModelDesignComponentEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerAddDelegate))] - static void SystemComponentModelDesignComponentEventHandlerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnboxInt16Delegate))] + static short UnboxInt16(int valHandle) { try { - var thiz = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (short)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(short); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(short); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerRemoveDelegate))] - static void SystemComponentModelDesignComponentEventHandlerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(BoxUInt16Delegate))] + static int BoxUInt16(ushort val) { try { - var thiz = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerInvokeDelegate))] - static void SystemComponentModelDesignComponentChangingEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) + [MonoPInvokeCallback(typeof(UnboxUInt16Delegate))] + static ushort UnboxUInt16(int valHandle) { try { - var sender = NativeScript.Bindings.ObjectStore.Get(senderHandle); - var e = (System.ComponentModel.Design.ComponentChangingEventArgs)NativeScript.Bindings.ObjectStore.Get(eHandle); - ((System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle))(sender, e); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (ushort)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(ushort); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(ushort); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerConstructorDelegate))] - static void SystemComponentModelDesignComponentChangingEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(BoxInt32Delegate))] + static int BoxInt32(int val) { try { - var thiz = new SystemComponentModelDesignComponentChangingEventHandler(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentChangingEventHandlerDelegate))] - static void ReleaseSystemComponentModelDesignComponentChangingEventHandler(int handle, int classHandle) + [MonoPInvokeCallback(typeof(UnboxInt32Delegate))] + static int UnboxInt32(int valHandle) { try { - if (classHandle != 0) - { - var thiz = (SystemComponentModelDesignComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (int)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerAddDelegate))] - static void SystemComponentModelDesignComponentChangingEventHandlerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(BoxUInt32Delegate))] + static int BoxUInt32(uint val) { try { - var thiz = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerRemoveDelegate))] - static void SystemComponentModelDesignComponentChangingEventHandlerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnboxUInt32Delegate))] + static uint UnboxUInt32(int valHandle) { try { - var thiz = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (uint)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(uint); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(uint); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerInvokeDelegate))] - static void SystemComponentModelDesignComponentChangedEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) + [MonoPInvokeCallback(typeof(BoxInt64Delegate))] + static int BoxInt64(long val) { try { - var sender = NativeScript.Bindings.ObjectStore.Get(senderHandle); - var e = (System.ComponentModel.Design.ComponentChangedEventArgs)NativeScript.Bindings.ObjectStore.Get(eHandle); - ((System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle))(sender, e); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerConstructorDelegate))] - static void SystemComponentModelDesignComponentChangedEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(UnboxInt64Delegate))] + static long UnboxInt64(int valHandle) { try { - var thiz = new SystemComponentModelDesignComponentChangedEventHandler(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (long)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(long); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(long); } } - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentChangedEventHandlerDelegate))] - static void ReleaseSystemComponentModelDesignComponentChangedEventHandler(int handle, int classHandle) + [MonoPInvokeCallback(typeof(BoxUInt64Delegate))] + static int BoxUInt64(ulong val) { try { - if (classHandle != 0) - { - var thiz = (SystemComponentModelDesignComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerAddDelegate))] - static void SystemComponentModelDesignComponentChangedEventHandlerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnboxUInt64Delegate))] + static ulong UnboxUInt64(int valHandle) { try { - var thiz = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (ulong)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(ulong); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(ulong); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerRemoveDelegate))] - static void SystemComponentModelDesignComponentChangedEventHandlerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(BoxCharDelegate))] + static int BoxChar(char val) { try { - var thiz = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerInvokeDelegate))] - static void SystemComponentModelDesignComponentRenameEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) + [MonoPInvokeCallback(typeof(UnboxCharDelegate))] + static char UnboxChar(int valHandle) { try { - var sender = NativeScript.Bindings.ObjectStore.Get(senderHandle); - var e = (System.ComponentModel.Design.ComponentRenameEventArgs)NativeScript.Bindings.ObjectStore.Get(eHandle); - ((System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle))(sender, e); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (char)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(char); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(char); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerConstructorDelegate))] - static void SystemComponentModelDesignComponentRenameEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(BoxSingleDelegate))] + static int BoxSingle(float val) { try { - var thiz = new SystemComponentModelDesignComponentRenameEventHandler(cppHandle); - handle = NativeScript.Bindings.ObjectStore.Store(thiz); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - handle = default(int); - classHandle = default(int); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentRenameEventHandlerDelegate))] - static void ReleaseSystemComponentModelDesignComponentRenameEventHandler(int handle, int classHandle) + [MonoPInvokeCallback(typeof(UnboxSingleDelegate))] + static float UnboxSingle(int valHandle) { try { - if (classHandle != 0) - { - var thiz = (SystemComponentModelDesignComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (float)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(float); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerAddDelegate))] - static void SystemComponentModelDesignComponentRenameEventHandlerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(BoxDoubleDelegate))] + static int BoxDouble(double val) { try { - var thiz = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerRemoveDelegate))] - static void SystemComponentModelDesignComponentRenameEventHandlerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnboxDoubleDelegate))] + static double UnboxDouble(int valHandle) { try { - var thiz = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (double)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(double); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(double); } } /*END FUNCTIONS*/ } } -/*BEGIN MONOBEHAVIOURS*/ +/*BEGIN BASE TYPES*/ namespace MyGame { - namespace MonoBehaviours + class BaseBallScript : MyGame.AbstractBaseBallScript { - public class TestScript : UnityEngine.MonoBehaviour + public int CppHandle; + + public BaseBallScript() { - public void Awake() - { - int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); - NativeScript.Bindings.MyGameMonoBehavioursTestScriptAwake(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - - public void OnAnimatorIK(int param0) - { - int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); - NativeScript.Bindings.MyGameMonoBehavioursTestScriptOnAnimatorIK(thisHandle, param0); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - - public void OnCollisionEnter(UnityEngine.Collision param0) - { - int param0Handle = NativeScript.Bindings.ObjectStore.GetHandle(param0); - int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); - NativeScript.Bindings.MyGameMonoBehavioursTestScriptOnCollisionEnter(thisHandle, param0Handle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - - public void Update() - { - int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); - NativeScript.Bindings.MyGameMonoBehavioursTestScriptUpdate(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } + int handle = NativeScript.Bindings.ObjectStore.Store(this); + CppHandle = NativeScript.Bindings.NewBaseBallScript(handle); } - } -} -namespace MyGame -{ - namespace MonoBehaviours - { - public class AnotherScript : UnityEngine.MonoBehaviour + + ~BaseBallScript() { - public void Awake() + if (CppHandle != 0) { - int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); - NativeScript.Bindings.MyGameMonoBehavioursAnotherScriptAwake(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } + NativeScript.Bindings.QueueDestroy(NativeScript.Bindings.DestroyFunction.BaseBallScript, CppHandle); + CppHandle = 0; } - - public void Update() + } + + public BaseBallScript(int cppHandle) + : base() + { + CppHandle = cppHandle; + } + + public override void Update() + { + if (CppHandle != 0) { - int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); - NativeScript.Bindings.MyGameMonoBehavioursAnotherScriptUpdate(thisHandle); + int thisHandle = CppHandle; + NativeScript.Bindings.MyGameAbstractBaseBallScriptUpdate(thisHandle); if (NativeScript.Bindings.UnhandledCppException != null) { Exception ex = NativeScript.Bindings.UnhandledCppException; @@ -9035,6 +1972,7 @@ public void Update() } } } + } } -/*END MONOBEHAVIOURS*/ \ No newline at end of file +/*END BASE TYPES*/ \ No newline at end of file diff --git a/Unity/Assets/NativeScript/BootScript.cs b/Unity/Assets/NativeScript/BootScript.cs index 7ca6ee0..1fe063f 100644 --- a/Unity/Assets/NativeScript/BootScript.cs +++ b/Unity/Assets/NativeScript/BootScript.cs @@ -39,6 +39,8 @@ void Awake() #if UNITY_EDITOR void Update() { + Bindings.Update(); + if (AutoReload) { if (AutoReloadPollTime > 0) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 49283b8..42d933e 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -12,8 +12,7 @@ namespace NativeScript { /// /// Code generator that reads a JSON file and outputs C# and C++ code - /// bindings so C++ can call managed functions and MonoBehaviour "messages" - /// like Update() can call their C++ counterparts. + /// bindings so the languages can call each other. /// /// /// Jackson Dunstan, 2017, http://JacksonDunstan.com @@ -98,6 +97,8 @@ class JsonType [Serializable] class JsonBaseType { + public string BaseName; + public string DerivedName; public string[] GenericTypes; public int MaxSimultaneous; public JsonConstructor[] Constructors; @@ -106,13 +107,6 @@ class JsonBaseType public JsonEvent[] OverrideEvents; } - [Serializable] - class JsonMonoBehaviour - { - public string Name; - public string[] Messages; - } - [Serializable] class JsonArray { @@ -135,7 +129,6 @@ class JsonDocument public int DefaultMaxSimultaneous; public string[] Assemblies; public JsonType[] Types; - public JsonMonoBehaviour[] MonoBehaviours; public JsonArray[] Arrays; public JsonDelegate[] Delegates; } @@ -156,14 +149,16 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpFunctions = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CsharpMonoBehaviours = - new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpDelegates = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpImports = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpGetDelegateCalls = new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CsharpDestroyFunctionEnumerators = + new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CsharpDestroyQueueCases = + new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppFunctionPointers = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppTypeDeclarations = @@ -182,14 +177,14 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppInitBodyFirstBoot = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CppMonoBehaviourMessages = - new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppGlobalStateAndFunctions = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppUnboxingMethodDeclarations = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppStringDefaultParams = new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CppMacros = + new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder TempStrBuilder = new StringBuilder(InitialStringBuilderCapacity); } @@ -252,92 +247,11 @@ int IComparer.Compare(object x, object y) : 0; } } - - class MessageInfo - { - public readonly string Name; - public readonly Type[] ParameterTypes; - public bool Selected; - - public MessageInfo( - string name, - params Type[] parameterTypes) - { - Name = name; - ParameterTypes = parameterTypes; - } - } - + const int DEFAULT_MAX_SIMULTANEOUS = 1000; const int DEFAULT_MAX_SIMULTANEOUS_OBJECTS = 1000; - - static readonly MessageInfo[] messageInfos = new[] { - new MessageInfo("Awake"), - new MessageInfo("FixedUpdate"), - new MessageInfo("LateUpdate"), - new MessageInfo("OnAnimatorIK", typeof(int)), - new MessageInfo("OnAnimatorMove"), - new MessageInfo("OnApplicationFocus", typeof(bool)), - new MessageInfo("OnApplicationPause", typeof(bool)), - new MessageInfo("OnApplicationQuit"), - new MessageInfo("OnAudioFilterRead", typeof(float[]), typeof(int)), - new MessageInfo("OnBecameInvisible"), - new MessageInfo("OnBecameVisible"), - new MessageInfo("OnCollisionEnter", typeof(Collision)), - new MessageInfo("OnCollisionEnter2D", typeof(Collision2D)), - new MessageInfo("OnCollisionExit", typeof(Collision)), - new MessageInfo("OnCollisionExit2D", typeof(Collision2D)), - new MessageInfo("OnCollisionStay", typeof(Collision)), - new MessageInfo("OnCollisionStay2D", typeof(Collision2D)), - new MessageInfo("OnConnectedToServer"), - new MessageInfo("OnControllerColliderHit", typeof(ControllerColliderHit)), - new MessageInfo("OnDestroy"), - new MessageInfo("OnDisable"), - new MessageInfo("OnDisconnectedFromServer", typeof(NetworkDisconnection)), - new MessageInfo("OnDrawGizmos"), - new MessageInfo("OnDrawGizmosSelected"), - new MessageInfo("OnEnable"), - new MessageInfo("OnFailedToConnect", typeof(NetworkConnectionError)), - new MessageInfo("OnFailedToConnectToMasterServer", typeof(NetworkConnectionError)), - new MessageInfo("OnGUI"), - new MessageInfo("OnJointBreak", typeof(float)), - new MessageInfo("OnJointBreak2D", typeof(Joint2D)), - new MessageInfo("OnMasterServerEvent", typeof(MasterServerEvent)), - new MessageInfo("OnMouseDown"), - new MessageInfo("OnMouseDrag"), - new MessageInfo("OnMouseEnter"), - new MessageInfo("OnMouseExit"), - new MessageInfo("OnMouseOver"), - new MessageInfo("OnMouseUp"), - new MessageInfo("OnMouseUpAsButton"), - new MessageInfo("OnNetworkInstantiate", typeof(NetworkMessageInfo)), - new MessageInfo("OnParticleCollision", typeof(GameObject)), - new MessageInfo("OnParticleTrigger"), - new MessageInfo("OnPlayerConnected", typeof(NetworkPlayer)), - new MessageInfo("OnPlayerDisconnected", typeof(NetworkPlayer)), - new MessageInfo("OnPostRender"), - new MessageInfo("OnPreCull"), - new MessageInfo("OnPreRender"), - new MessageInfo("OnRenderImage", typeof(RenderTexture), typeof(RenderTexture)), - new MessageInfo("OnRenderObject"), - new MessageInfo("OnSerializeNetworkView", typeof(BitStream), typeof(NetworkMessageInfo)), - new MessageInfo("OnServerInitialized"), - new MessageInfo("OnTransformChildrenChanged"), - new MessageInfo("OnTransformParentChanged"), - new MessageInfo("OnTriggerEnter", typeof(Collider)), - new MessageInfo("OnTriggerEnter2D", typeof(Collider2D)), - new MessageInfo("OnTriggerExit", typeof(Collider)), - new MessageInfo("OnTriggerExit2D", typeof(Collider2D)), - new MessageInfo("OnTriggerStay", typeof(Collider)), - new MessageInfo("OnTriggerStay2D", typeof(Collider2D)), - new MessageInfo("OnValidate"), - new MessageInfo("OnWillRenderObject"), - new MessageInfo("Reset"), - new MessageInfo("Start"), - new MessageInfo("Update"), - }; - - private static readonly Type[] PRIMITIVE_TYPES = { + + static readonly Type[] PRIMITIVE_TYPES = { typeof(bool), typeof(sbyte), typeof(byte), @@ -397,28 +311,26 @@ public static void Generate() // Determine whether we need to generate stubs // We can skip this step if we've already generated all the - // required MonoBehaviour classes and their messages + // required base types bool needStubs = false; - foreach (JsonMonoBehaviour monoBehaviour in doc.MonoBehaviours) + if (doc.Types != null) { - // Check if the MonoBehaviour type is already generated - Type type = TryGetType( - monoBehaviour.Name, - assemblies); - if (type == null) - { - needStubs = true; - break; - } - - // Check if all the messages are already generated - foreach (string message in monoBehaviour.Messages) + foreach (JsonType jsonType in doc.Types) { - MethodInfo methodInfo = type.GetMethod(message); - if (methodInfo == null) + if (jsonType.BaseTypes != null) { - needStubs = true; - goto determinedNeedStubs; + foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) + { + // Check if the type is already generated + Type type = TryGetType( + jsonBaseType.BaseName, + assemblies); + if (type == null) + { + needStubs = true; + goto determinedNeedStubs; + } + } } } } @@ -427,27 +339,19 @@ public static void Generate() if (needStubs) { // We'll need to be able to get these via reflection later - StringBuilder csharpMonoBehaviours = new StringBuilder( - InitialStringBuilderCapacity); + StringBuilders builders = new StringBuilders(); string timestamp = DateTime.Now.ToLongTimeString(); - AppendStubMonoBehaviours( - doc.MonoBehaviours, + AppendStubs( + doc.Types, + assemblies, timestamp, - csharpMonoBehaviours); - - // Inject - string csharpContents = File.ReadAllText(CsharpPath); - csharpContents = InjectIntoString( - csharpContents, - "/*BEGIN MONOBEHAVIOURS*/\n", - "\n/*END MONOBEHAVIOURS*/", - csharpMonoBehaviours.ToString()); - File.WriteAllText(CsharpPath, csharpContents); + builders); + InjectBuilders(builders); // Compile and continue after scripts are refreshed Debug.Log("Waiting for compile..."); - AssetDatabase.Refresh(); EditorPrefs.SetBool(PostCompileWorkPref, true); + AssetDatabase.Refresh(); } else { @@ -455,52 +359,137 @@ public static void Generate() } } - static void AppendStubMonoBehaviours( - JsonMonoBehaviour[] monoBehaviours, + static void AppendStubs( + JsonType[] jsonTypes, + Assembly[] assemblies, string timestamp, - StringBuilder output) + StringBuilders builders) { - if (monoBehaviours != null) + // Base types + foreach (JsonType jsonType in jsonTypes) { - foreach (JsonMonoBehaviour jsonMonoBehaviour in monoBehaviours) + if (jsonType.BaseTypes != null) { - // Split namespace from name - string fullName = jsonMonoBehaviour.Name; - string monoBehaviourName; - string monoBehaviourNamespace; - int index = fullName.LastIndexOf('.'); - if (index >= 0) + foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) { - monoBehaviourNamespace = fullName.Substring( - 0, - index); - monoBehaviourName = fullName.Substring( - index + 1); + string typeFullName = jsonType.Name; + string typeName; + string typeNamespace; + SplitJsonTypeName( + typeFullName, + out typeName, + out typeNamespace); + + string baseTypeFullName = jsonBaseType.BaseName; + string baseTypeName; + string baseTypeNamespace; + SplitJsonTypeName( + baseTypeFullName, + out baseTypeName, + out baseTypeNamespace); + + Type type = GetType(typeFullName, assemblies); + + Type[] typeParams = GetTypes( + jsonBaseType.GenericTypes, + assemblies); + + AppendStubBaseType( + typeFullName, + typeName, + typeNamespace, + baseTypeFullName, + baseTypeName, + baseTypeNamespace, + typeParams, + type, + timestamp, + builders.CsharpBaseTypes); } - else + } + } + + // Need at least one init param + builders.CsharpInitParams.Append("object stub"); + builders.CsharpInitCall.Append("null // stub"); + } + + static void AppendStubBaseType( + string typeFullName, + string typeName, + string typeNamespace, + string baseTypeFullName, + string baseTypeName, + string baseTypeNamespace, + Type[] typeParams, + Type type, + string timestamp, + StringBuilder output) + { + int indent = AppendNamespaceBeginning( + baseTypeNamespace, + output); + AppendIndent(indent, output); + if (type.IsClass) + { + output.Append("abstract public class "); + } + else + { + output.Append("public interface "); + } + output.Append(baseTypeName); + output.Append(" : "); + AppendCsharpTypeName( + typeNamespace, + typeName, + output); + AppendCSharpTypeParameters( + typeParams, + output); + output.Append('\n'); + AppendIndent(indent, output); + output.Append("{\n"); + AppendIndent(indent + 1, output); + output.Append("// Stub version. GenerateBindings is still in progress. "); + output.Append(timestamp); + output.Append('\n'); + if (type.IsClass) + { + output.Append('\n'); + ConstructorInfo[] constructors = type.GetConstructors(); + if (constructors != null && constructors.Length > 0) + { + foreach (ConstructorInfo ctor in constructors) { - monoBehaviourName = fullName; - monoBehaviourNamespace = string.Empty; + if (ctor.IsPublic + && ctor.GetCustomAttributes(typeof(ObsoleteAttribute), true).Length == 0) + { + ParameterInfo[] ctorParams = ConvertParameters( + ctor.GetParameters()); + output.Append("\t\t"); + output.Append(baseTypeName); + output.Append('('); + AppendCsharpParams( + ctorParams, + output); + output.Append(")\n"); + output.Append("\t\t\t: base("); + AppendCsharpFunctionCallParameters( + ctorParams, + output); + output.Append(")\n"); + output.Append("\t\t{\n"); + output.Append("\t\t}\n"); + output.Append("\t\t\n"); + break; + } } - - int indent = AppendNamespaceBeginning( - monoBehaviourNamespace, - output); - AppendIndent(indent, output); - output.Append("public class "); - output.Append(monoBehaviourName); - output.Append(" : UnityEngine.MonoBehaviour\n"); - AppendIndent(indent, output); - output.Append("{\n"); - AppendIndent(indent + 1, output); - output.Append("// Stub version. GenerateBindings is still in progress. "); - output.Append(timestamp); - output.Append('\n'); - AppendIndent(indent, output); - output.Append("}\n"); - AppendNamespaceEnding(indent, output); } } + AppendIndent(indent, output); + output.Append("}\n"); + AppendNamespaceEnding(indent, output); } [UnityEditor.Callbacks.DidReloadScripts] @@ -524,21 +513,17 @@ static void DoPostCompileWork(bool canRefreshAssetDb) Assembly[] assemblies = GetAssemblies(doc.Assemblies); StringBuilders builders = new StringBuilders(); - // Count the number of ref-counts in C++ - // Start with 1 for Object + // Get the default number of maximum simultaneous objects in case + // it's not specified for a specific type int defaultMaxSimultaneous = doc.DefaultMaxSimultaneous != 0 ? doc.DefaultMaxSimultaneous : DEFAULT_MAX_SIMULTANEOUS; - int totalMaxSimultaneous = defaultMaxSimultaneous; // Init param for max managed Objects - int maxSimultaneousObjects = doc.MaxSimultaneousObjects != 0 - ? doc.MaxSimultaneousObjects - : DEFAULT_MAX_SIMULTANEOUS_OBJECTS; builders.CppInitParams.Append("\tint32_t maxManagedObjects,\n"); builders.CsharpInitParams.Append("\t\t\tint maxManagedObjects,\n"); builders.CsharpInitCall.Append("\t\t\t\t"); - builders.CsharpInitCall.Append(maxSimultaneousObjects); + builders.CsharpInitCall.Append(defaultMaxSimultaneous); builders.CsharpInitCall.Append(",\n"); // C# ObjectStore Init call @@ -554,7 +539,7 @@ static void DoPostCompileWork(bool canRefreshAssetDb) { Type type = GetType(jsonType.Name, assemblies); TypeKind typeKind = GetTypeKind(type); - totalMaxSimultaneous += AppendType( + AppendType( jsonType, type, typeKind, @@ -564,31 +549,22 @@ static void DoPostCompileWork(bool canRefreshAssetDb) if (jsonType.BaseTypes != null) { - // C++ template declaration if necessary Type[] genericArgTypes = type.GetGenericArguments(); - string cppBaseTypeName = "Base" + type.Name; - if (!IsStatic(type)) - { - foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) - { - if (jsonBaseType.GenericTypes != null) - { - AppendCppTemplateDeclaration( - cppBaseTypeName, - type.Namespace, - genericArgTypes.Length, - builders.CppTemplateDeclarations); - } - } - } - foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) { - AppendBaseType( + string baseTypeName; + string baseTypeNamespace; + GetBaseTypeBaseNameAndNamespace( + jsonBaseType, type, genericArgTypes, - jsonType.Name, - cppBaseTypeName, + builders.TempStrBuilder, + out baseTypeName, + out baseTypeNamespace); + AppendBaseType( + type, + baseTypeName, + baseTypeNamespace, jsonBaseType, assemblies, defaultMaxSimultaneous, @@ -617,18 +593,6 @@ static void DoPostCompileWork(bool canRefreshAssetDb) builders); } - // Generate MonoBehaviours - if (doc.MonoBehaviours != null) - { - foreach (JsonMonoBehaviour monoBehaviour in doc.MonoBehaviours) - { - AppendMonoBehaviour( - monoBehaviour, - assemblies, - builders); - } - } - // Generate arrays if (doc.Arrays != null) { @@ -641,6 +605,7 @@ static void DoPostCompileWork(bool canRefreshAssetDb) } } + // Generate delegates if (doc.Delegates != null) { foreach (JsonDelegate del in doc.Delegates) @@ -659,9 +624,11 @@ static void DoPostCompileWork(bool canRefreshAssetDb) assemblies, builders); + // Output source files RemoveTrailingChars(builders); - InjectBuilders(builders); + + // Inform the user of the result if (canRefreshAssetDb) { AssetDatabase.Refresh(); @@ -1000,6 +967,51 @@ static Type[] GetCppCtorInitTypes(Type type, bool includeSelf) } return types.ToArray(); } + + static void AppendCppConstructorInitializerList( + Type[] interfaceTypes, + int indent, + StringBuilder output, + string newline = "\n") + { + string separator = ": "; + for (int i = 0; i < interfaceTypes.Length; ++i) + { + Type interfaceType = interfaceTypes[i]; + AppendIndent( + indent, + output); + output.Append(separator); + AppendCppTypeName( + interfaceType, + output); + output.Append("(nullptr)"); + output.Append(newline); + separator = ", "; + } + } + + static void AppendUppercaseWithUnderscores( + string str, + StringBuilder output) + { + if (string.IsNullOrEmpty(str)) + { + return; + } + char prev = str[0]; + output.Append(char.ToUpper(prev)); + for (int i = 1; i < str.Length; ++i) + { + char cur = str[i]; + if (char.IsUpper(cur) && char.IsLower(prev)) + { + output.Append('_'); + } + output.Append(char.ToUpper(cur)); + prev = cur; + } + } static bool CheckParametersMatch( string[] paramTypeNames, @@ -1119,6 +1131,39 @@ static void AppendTypeNames( } } } + + static void GetBaseTypeBaseNameAndNamespace( + JsonBaseType jsonBaseType, + Type type, + Type[] typeParams, + StringBuilder tempStringBuilder, + out string baseTypeName, + out string baseTypeNamespace) + { + // Get specified (optional) base type name + SplitJsonTypeName( + jsonBaseType.BaseName, + out baseTypeName, + out baseTypeNamespace); + + // If base type name isn't provided, make one + if (string.IsNullOrEmpty(baseTypeName)) + { + tempStringBuilder.Length = 0; + AppendNamespace( + type.Namespace, + string.Empty, + tempStringBuilder); + tempStringBuilder.Append("Base"); + AppendTypeNameWithoutSuffixes( + type.Name, + tempStringBuilder); + AppendTypeNames( + typeParams, + tempStringBuilder); + baseTypeName = tempStringBuilder.ToString(); + } + } static void AppendNamespace( string namespaceName, @@ -1157,11 +1202,39 @@ static void AppendNamespace( namespaceName.Length - startIndex); } } + + static void SplitJsonTypeName( + string fullName, + out string typeName, + out string typeNamespace) + { + // No full name + if (string.IsNullOrEmpty(fullName)) + { + typeName = string.Empty; + typeNamespace = string.Empty; + } + else + { + // Has a namespace + int index = fullName.LastIndexOf('.'); + if (index >= 0) + { + typeNamespace = fullName.Substring(0, index); + typeName = fullName.Substring(index + 1); + } + // No namespace. Just name. + else + { + typeName = fullName; + typeNamespace = string.Empty; + } + } + } static ParameterInfo[] ConvertParameters( System.Reflection.ParameterInfo[] reflectionParameters, - int start = 0, - int count = -1) + int start = 0) { int num = reflectionParameters.Length - start; ParameterInfo[] parameters = new ParameterInfo[num]; @@ -1684,9 +1757,6 @@ static void AppendType( type.Namespace, typeKind, typeParams, - baseTypeName, - baseTypeNamespace, - baseTypeTypeParams, cppCtorInterfaceTypes, isStatic, (extraIndent, subject) => {}, @@ -1861,9 +1931,8 @@ static void AppendType( static void AppendBaseType( Type type, - Type[] genericArgTypes, - string typeName, string cppBaseTypeName, + string cppBaseTypeNamespace, JsonBaseType jsonBaseType, Assembly[] assemblies, int defaultMaxSimultaneous, @@ -1882,6 +1951,7 @@ static void AppendBaseType( genericType, jsonBaseType, cppBaseTypeName, + cppBaseTypeNamespace, typeParams, maxSimultaneous, assemblies, @@ -1893,6 +1963,7 @@ static void AppendBaseType( type, jsonBaseType, cppBaseTypeName, + cppBaseTypeNamespace, null, maxSimultaneous, assemblies, @@ -2214,8 +2285,6 @@ static void AppendBoxing( out boxMethodDefinitionName, out boxMethodDeclarationName); AppendCppBoxingMethodDeclaration( - baseType, - baseType.GetGenericArguments(), boxMethodDeclarationName, boxCppParams, indent + 1, @@ -2241,8 +2310,6 @@ static void AppendBoxing( out boxMethodDefinitionName, out boxMethodDeclarationName); AppendCppBoxingMethodDeclaration( - interfaceType, - interfaceType.GetGenericArguments(), boxMethodDeclarationName, boxCppParams, indent + 1, @@ -2489,7 +2556,6 @@ static void AppendUnboxing( false, false, null, - typeParams, null, unboxCppParams, builders.CppUnboxingMethodDeclarations); @@ -2578,8 +2644,6 @@ static void AppendCppBoxingMethodNames( } static void AppendCppBoxingMethodDeclaration( - Type type, - Type[] typeParams, string boxMethodDeclarationName, ParameterInfo[] boxCppParams, int indent, @@ -2594,7 +2658,6 @@ static void AppendCppBoxingMethodDeclaration( false, false, null, - typeParams, null, boxCppParams, output); @@ -2885,7 +2948,6 @@ static void AppendConstructor( false, false, null, - enclosingTypeParams, null, parameters, builders.CppTypeDefinitions); @@ -2902,19 +2964,10 @@ static void AppendConstructor( builders.CppMethodDefinitions); if (enclosingTypeKind != TypeKind.FullStruct) { - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(separator); - AppendCppTypeName( - interfaceType, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + indent + 1, + builders.CppMethodDefinitions); } AppendIndent( indent, @@ -3445,7 +3498,6 @@ static void AppendEventAddRemoveMethod( false, cppMethodIsStatic, cppReturnType, - typeTypeParams, null, cppParameters, builders.CppTypeDefinitions); @@ -4160,7 +4212,6 @@ static void AppendMethod( false, cppMethodIsStatic, cppReturnType, - enclosingTypeParams, methodTypeParams, cppParameters, builders.CppTypeDefinitions); @@ -4259,317 +4310,14 @@ static void AppendCppTypeParameters( output.Append('>'); } } - - static void AppendMonoBehaviour( - JsonMonoBehaviour jsonMonoBehaviour, - Assembly[] assemblies, - StringBuilders builders) - { - Type type = GetType( - jsonMonoBehaviour.Name, - assemblies); - - // C++ Type Declaration - int cppIndent = AppendCppTypeDeclaration( - type.Namespace, - type.Name, - false, - null, - builders.CppTypeDeclarations); - - // C++ Type Definition (begin) - AppendCppTypeDefinitionBegin( - type.Name, - type.Namespace, - TypeKind.Class, - null, - "MonoBehaviour", - "UnityEngine", - null, - null, - false, - cppIndent, - builders.CppTypeDefinitions); - - // C++ method definition - Type[] interfaceTypes = GetCppCtorInitTypes( - type, - false); - int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( - type.Name, - type.Namespace, - TypeKind.Class, - null, - "MonoBehaviour", - "UnityEngine", - null, - interfaceTypes, - false, - (extraIndent, subject) => {}, - (extraIndent, subject) => {}, - cppIndent, - builders.CppMethodDefinitions); - AppendCppMethodDefinitionsEnd( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - - // C# Class extending MonoBehaviour - int csharpIndent = AppendNamespaceBeginning( - type.Namespace, - builders.CsharpMonoBehaviours); - AppendIndent(csharpIndent, builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append("public class "); - builders.CsharpMonoBehaviours.Append(type.Name); - builders.CsharpMonoBehaviours.Append(" : UnityEngine.MonoBehaviour\n"); - AppendIndent(csharpIndent, builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append("{\n"); - for ( - int messageIndex = 0; - messageIndex < jsonMonoBehaviour.Messages.Length; - ++messageIndex) - { - // Find the MessageInfo - string message = jsonMonoBehaviour.Messages[messageIndex]; - MessageInfo messageInfo = null; - foreach (MessageInfo mi in messageInfos) - { - if (mi.Name == message) - { - messageInfo = mi; - break; - } - } - if (messageInfo == null) - { - builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append("Unknown message '"); - builders.TempStrBuilder.Append(message); - builders.TempStrBuilder.Append("'. Aborting."); - throw new Exception(builders.TempStrBuilder.ToString()); - } - - // Build the C++ function name - builders.TempStrBuilder.Length = 0; - AppendNamespace( - type.Namespace, - string.Empty, - builders.TempStrBuilder); - builders.TempStrBuilder.Append(type.Name); - builders.TempStrBuilder.Append(messageInfo.Name); - string cppFunctionName = builders.TempStrBuilder.ToString(); - - // Build ParameterInfos - ParameterInfo[] parameters = ConvertParameters( - messageInfo.ParameterTypes); - int numParams = parameters.Length; - - // C++ Method Declaration - AppendIndent( - cppIndent + 1, - builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - messageInfo.Name, - false, - false, - false, - typeof(void), - null, - null, - parameters, - builders.CppTypeDefinitions); - - // C# message function - AppendIndent( - csharpIndent + 1, - builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append("public "); - AppendCsharpTypeName( - typeof(void), - builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append(' '); - builders.CsharpMonoBehaviours.Append(messageInfo.Name); - builders.CsharpMonoBehaviours.Append('('); - for (int i = 0; i < numParams; ++i) - { - Type paramType = parameters[i].ParameterType; - AppendCsharpTypeName( - paramType, - builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append(' '); - builders.CsharpMonoBehaviours.Append("param"); - builders.CsharpMonoBehaviours.Append(i); - if (i != numParams - 1) - { - builders.CsharpMonoBehaviours.Append(", "); - } - } - builders.CsharpMonoBehaviours.Append(")\n"); - AppendIndent( - csharpIndent + 1, - builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append("{\n"); - AppendCppFunctionCall( - cppFunctionName, - parameters, - typeof(void), - false, - csharpIndent + 2, - builders.CsharpMonoBehaviours); - AppendIndent( - csharpIndent + 1, - builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append("}\n"); - if (messageIndex != jsonMonoBehaviour.Messages.Length - 1) - { - AppendIndent( - csharpIndent + 1, - builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append('\n'); - } - - // C# Delegate - AppendCsharpDelegate( - false, - type.Name, - type.Namespace, - null, - messageInfo.Name, - parameters, - typeof(void), - TypeKind.None, - builders.CsharpDelegates); - - // C# Import - AppendCsharpImport( - type.Name, - type.Namespace, - null, - messageInfo.Name, - parameters, - builders.CsharpImports); - - // C# GetDelegate Call - AppendCsharpGetDelegateCall( - type.Name, - type.Namespace, - null, - messageInfo.Name, - builders.CsharpGetDelegateCalls); - - // C++ Message - builders.CppMonoBehaviourMessages.Append("DLLEXPORT void "); - AppendCsharpDelegateName( - type.Name, - type.Namespace, - null, - messageInfo.Name, - builders.CppMonoBehaviourMessages); - builders.CppMonoBehaviourMessages.Append("(int32_t thisHandle"); - if (numParams > 0) - { - builders.CppMonoBehaviourMessages.Append(", "); - } - for (int i = 0; i < numParams; ++i) - { - ParameterInfo param = parameters[i]; - switch (param.Kind) - { - case TypeKind.FullStruct: - case TypeKind.Primitive: - case TypeKind.Enum: - AppendCppTypeName( - param.ParameterType, - builders.CppMonoBehaviourMessages); - builders.CppMonoBehaviourMessages.Append(" param"); - builders.CppMonoBehaviourMessages.Append(i); - break; - default: - builders.CppMonoBehaviourMessages.Append("int32_t param"); - builders.CppMonoBehaviourMessages.Append(i); - builders.CppMonoBehaviourMessages.Append("Handle"); - break; - } - if (i != numParams-1) - { - builders.CppMonoBehaviourMessages.Append(", "); - } - } - builders.CppMonoBehaviourMessages.Append(")\n{\n\t"); - AppendCppTypeName( - type, - builders.CppMonoBehaviourMessages); - builders.CppMonoBehaviourMessages.Append(" thiz(Plugin::InternalUse::Only, thisHandle);\n"); - for (int i = 0; i < numParams; ++i) - { - ParameterInfo param = parameters[i]; - if (param.Kind == TypeKind.Class - || param.Kind == TypeKind.ManagedStruct) - { - builders.CppMonoBehaviourMessages.Append('\t'); - AppendCppTypeName( - param.ParameterType, - builders.CppMonoBehaviourMessages); - builders.CppMonoBehaviourMessages.Append(" param"); - builders.CppMonoBehaviourMessages.Append(i); - builders.CppMonoBehaviourMessages.Append("(Plugin::InternalUse::Only, param"); - builders.CppMonoBehaviourMessages.Append(i); - builders.CppMonoBehaviourMessages.Append("Handle);\n"); - } - } - builders.CppMonoBehaviourMessages.Append("\ttry\n"); - builders.CppMonoBehaviourMessages.Append("\t{\n"); - builders.CppMonoBehaviourMessages.Append("\t\tthiz."); - builders.CppMonoBehaviourMessages.Append(messageInfo.Name); - builders.CppMonoBehaviourMessages.Append("("); - for (int i = 0; i < numParams; ++i) - { - builders.CppMonoBehaviourMessages.Append("param"); - builders.CppMonoBehaviourMessages.Append(i); - if (i != numParams-1) - { - builders.CppMonoBehaviourMessages.Append(", "); - } - } - builders.CppMonoBehaviourMessages.Append(");\n"); - builders.CppMonoBehaviourMessages.Append("\t}\n"); - builders.CppMonoBehaviourMessages.Append("\tcatch (System::Exception ex)\n"); - builders.CppMonoBehaviourMessages.Append("\t{\n"); - builders.CppMonoBehaviourMessages.Append("\t\tPlugin::SetException(ex.Handle);\n"); - builders.CppMonoBehaviourMessages.Append("\t}\n"); - builders.CppMonoBehaviourMessages.Append("\tcatch (...)\n"); - builders.CppMonoBehaviourMessages.Append("\t{\n"); - builders.CppMonoBehaviourMessages.Append("\t\tSystem::String msg = \"Unhandled exception in "); - AppendCppTypeName( - type, - builders.CppMonoBehaviourMessages); - builders.CppMonoBehaviourMessages.Append("::"); - builders.CppMonoBehaviourMessages.Append(messageInfo.Name); - builders.CppMonoBehaviourMessages.Append("\";\n"); - builders.CppMonoBehaviourMessages.Append("\t\tSystem::Exception ex(msg);\n"); - builders.CppMonoBehaviourMessages.Append("\t\tPlugin::SetException(ex.Handle);\n"); - builders.CppMonoBehaviourMessages.Append("\t}\n"); - builders.CppMonoBehaviourMessages.Append("}\n\n\n"); - } - - // C# Class extending MonoBehaviour (end) - AppendIndent(csharpIndent, builders.CsharpMonoBehaviours); - builders.CsharpMonoBehaviours.Append("}\n"); - AppendNamespaceEnding(csharpIndent, builders.CsharpMonoBehaviours); - - // C++ Type Definition (end) - AppendCppTypeDefinitionEnd( - false, - cppIndent, - builders.CppTypeDefinitions); - } - - static void AppendCppFunctionCall( - string funcName, - ParameterInfo[] parameters, - Type returnType, - bool enclosingTypeIsStatic, - int indent, - StringBuilder output) + + static void AppendCppFunctionCall( + string funcName, + ParameterInfo[] parameters, + Type returnType, + bool enclosingTypeIsStatic, + int indent, + StringBuilder output) { foreach (ParameterInfo param in parameters) { @@ -4798,9 +4546,6 @@ static void AppendArray( "System", TypeKind.Class, cppTypeParams, - "Array", - "System", - null, cppCtorInitTypes, false, (extraIndent, subject) => { @@ -5937,7 +5682,6 @@ static void AppendArrayConstructor( false, null, null, - null, parameters, builders.CppTypeDefinitions); @@ -6076,7 +5820,6 @@ static void AppendArrayCppGetLengthFunction( false, typeof(int), null, - null, parameters, builders.CppTypeDefinitions); @@ -6155,7 +5898,6 @@ static void AppendArrayCppGetRankFunction( false, typeof(int), null, - null, parameters, builders.CppTypeDefinitions); @@ -6303,7 +6045,6 @@ static void AppendArrayMultidimensionalGetLength( false, typeof(int), null, - null, parameters, builders.CppTypeDefinitions); @@ -6791,15 +6532,15 @@ static void AppendDelegate( Kind = TypeKind.Primitive }}; - AppendCppFreeListStateAndFunctions( - type, + AppendCppPointerFreeListStateAndFunctions( + type.Namespace, typeParams, cppTypeName, bindingTypeName, builders.CppGlobalStateAndFunctions); - AppendCppFreeListInit( - type, + AppendCppPointerFreeListInit( + type.Namespace, typeParams, cppTypeName, maxSimultaneous, @@ -6841,7 +6582,6 @@ static void AppendDelegate( false, false, null, - typeParams, null, new ParameterInfo[0], builders.CppTypeDefinitions); @@ -6854,7 +6594,6 @@ static void AppendDelegate( false, false, typeof(void), - typeParams, null, addRemoveParams, builders.CppTypeDefinitions); @@ -6867,7 +6606,6 @@ static void AppendDelegate( false, false, typeof(void), - typeParams, null, addRemoveParams, builders.CppTypeDefinitions); @@ -6997,13 +6735,10 @@ static void AppendDelegate( AppendCppBaseTypeConstructor( bindingTypeName, - type.Name, type.Namespace, TypeKind.Class, cppTypeName, - typeof(object), typeParams, - null, new Type[0], new ParameterInfo[0], constructorParams, @@ -7016,9 +6751,6 @@ static void AppendDelegate( bindingTypeName, cppTypeName, typeParams, - "Object", - "System", - null, new Type[0], true, cppMethodDefinitionsIndent, @@ -7028,9 +6760,6 @@ static void AppendDelegate( bindingTypeName, cppTypeName, typeParams, - "Object", - "System", - null, new Type[0], true, cppMethodDefinitionsIndent, @@ -7039,9 +6768,6 @@ static void AppendDelegate( AppendCppBaseTypeMoveConstructor( cppTypeName, typeParams, - "Object", - "System", - null, new Type[0], true, cppMethodDefinitionsIndent, @@ -7051,9 +6777,6 @@ static void AppendDelegate( bindingTypeName, cppTypeName, typeParams, - "Object", - "System", - null, new Type[0], true, cppMethodDefinitionsIndent, @@ -7064,7 +6787,10 @@ static void AppendDelegate( cppTypeName, typeParams, true, + string.Empty, + string.Empty, releaseFuncName, + bindingTypeName, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -7097,12 +6823,14 @@ static void AppendDelegate( cppTypeName, typeParams, cppMethodDefinitionsIndent, + true, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( cppTypeName, typeParams, cppMethodDefinitionsIndent, + true, builders.CppMethodDefinitions); // C++ add @@ -7178,29 +6906,29 @@ static void AppendDelegate( builders.CsharpGetDelegateCalls); // C# class (beginning) - builders.CsharpBaseTypes.Append("\t\tclass "); + builders.CsharpBaseTypes.Append("class "); builders.CsharpBaseTypes.Append(bindingTypeName); builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.Append("{\n"); // C# class fields - builders.CsharpBaseTypes.Append("\t\t\tpublic int CppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\t\tpublic "); + builders.CsharpBaseTypes.Append("\tpublic int CppHandle;\n"); + builders.CsharpBaseTypes.Append("\tpublic "); AppendCsharpTypeName( type, builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(" Delegate;\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); + builders.CsharpBaseTypes.Append("\t\n"); // C# class constructor - builders.CsharpBaseTypes.Append("\t\t\tpublic "); + builders.CsharpBaseTypes.Append("\tpublic "); builders.CsharpBaseTypes.Append(bindingTypeName); builders.CsharpBaseTypes.Append("(int cppHandle)\n"); - builders.CsharpBaseTypes.Append("\t\t\t{\n"); - builders.CsharpBaseTypes.Append("\t\t\t\tCppHandle = cppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\t\t\tDelegate = NativeInvoke;\n"); - builders.CsharpBaseTypes.Append("\t\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); + builders.CsharpBaseTypes.Append("\t{\n"); + builders.CsharpBaseTypes.Append("\t\tCppHandle = cppHandle;\n"); + builders.CsharpBaseTypes.Append("\t\tDelegate = NativeInvoke;\n"); + builders.CsharpBaseTypes.Append("\t}\n"); + builders.CsharpBaseTypes.Append("\t\n"); // Build the name of the C++ binding function that C# calls builders.TempStrBuilder.Length = 0; @@ -7223,12 +6951,13 @@ static void AppendDelegate( nativeInvokeFuncName, "operator()", false, + true, indent, builders); // C# class (ending) - builders.CsharpBaseTypes.Append("\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.Append("}\n"); + builders.CsharpBaseTypes.Append('\n'); // Invoke() is how C++ invokes the delegate AppendBaseTypeMethodCallsCsharpMethod( @@ -7255,6 +6984,7 @@ static void AppendDelegate( AppendCsharpBaseTypeConstructorFunction( type, bindingTypeName, + string.Empty, false, constructorFuncName, constructorParams, @@ -7274,8 +7004,10 @@ static void AppendDelegate( AppendCsharpBaseTypeReleaseFunction( type, bindingTypeName, + string.Empty, true, releaseFuncName, + null, releaseParams, builders.CsharpFunctions); @@ -7350,35 +7082,34 @@ static void AppendDelegate( static void AppendBaseType( Type type, JsonBaseType jsonBaseType, - string cppBaseTypeName, + string baseTypeName, + string baseTypeNamespace, Type[] typeParams, int maxSimultaneous, Assembly[] assemblies, StringBuilders builders) { - builders.TempStrBuilder.Length = 0; - AppendNamespace( - type.Namespace, - string.Empty, - builders.TempStrBuilder); - builders.TempStrBuilder.Append("Base"); - AppendTypeNameWithoutSuffixes( - type.Name, - builders.TempStrBuilder); - AppendTypeNames( - typeParams, - builders.TempStrBuilder); - string bindingTypeName = builders.TempStrBuilder.ToString(); - + // Get specified derived type name + string derivedTypeName; + string derivedTypeNamespace; + SplitJsonTypeName( + jsonBaseType.DerivedName, + out derivedTypeName, + out derivedTypeNamespace); + builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Release"); - builders.TempStrBuilder.Append(bindingTypeName); + builders.TempStrBuilder.Append(baseTypeName); string releaseFuncName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder[0] = char.ToLower( builders.TempStrBuilder[0]); string releaseFuncNameLower = builders.TempStrBuilder.ToString(); - + + bool hasDefaultConstructor = !type.IsClass || + (type.GetConstructor(new Type[0]) != null || + type.GetConstructors().Length == 0); + // Either use specified constructors, the default constructor, or // nothing in the case of MonoBehaviour (where you can't call 'new') JsonConstructor[] jsonConstructors = jsonBaseType.Constructors; @@ -7386,9 +7117,7 @@ static void AppendBaseType( { // Base classes must have a default constructor or no // constructors at all - if (type.IsClass && - (type.GetConstructor(new Type[0]) == null && - type.GetConstructors().Length != 0)) + if (!hasDefaultConstructor) { // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); @@ -7424,7 +7153,7 @@ static void AppendBaseType( assemblies); builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append(bindingTypeName); + builders.TempStrBuilder.Append(baseTypeName); builders.TempStrBuilder.Append("Constructor"); AppendTypeNames( paramTypes, @@ -7491,16 +7220,30 @@ static void AppendBaseType( cppBaseClassTypeParams = typeParams; cppInterfaceTypes = new Type[0]; } + + AppendCppPointerFreeListStateAndFunctions( + baseTypeNamespace, + null, + baseTypeName, + baseTypeName, + builders.CppGlobalStateAndFunctions); + + AppendCppPointerFreeListInit( + baseTypeNamespace, + null, + baseTypeName, + maxSimultaneous, + baseTypeName, + builders.CppInitBody, + builders.CppInitBodyFirstBoot); // C++ type declaration int indent = AppendCppTypeDeclaration( - type.Namespace, - cppBaseTypeName, + baseTypeNamespace, + baseTypeName, false, - typeParams, - typeParams != null ? - builders.CppTemplateSpecializationDeclarations : - builders.CppTypeDeclarations); + null, + builders.CppTypeDeclarations); ParameterInfo[] releaseParams = { new ParameterInfo @@ -7513,28 +7256,12 @@ static void AppendBaseType( Kind = TypeKind.Primitive }}; - AppendCppFreeListStateAndFunctions( - type, - typeParams, - cppBaseTypeName, - bindingTypeName, - builders.CppGlobalStateAndFunctions); - - AppendCppFreeListInit( - type, - typeParams, - cppBaseTypeName, - maxSimultaneous, - bindingTypeName, - builders.CppInitBody, - builders.CppInitBodyFirstBoot); - // C++ type definition (begin) AppendCppTypeDefinitionBegin( - cppBaseTypeName, - type.Namespace, + baseTypeName, + baseTypeNamespace, TypeKind.Class, - typeParams, + null, cppBaseClass.Name, cppBaseClass.Namespace, cppBaseClassTypeParams, @@ -7556,17 +7283,90 @@ static void AppendBaseType( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - cppBaseTypeName, + baseTypeName, false, false, false, null, - typeParams, null, cppConstructorParams[i], builders.CppTypeDefinitions); } - + + // C++ constructor declaration macro + builders.CppMacros.Append("#define "); + AppendUppercaseWithUnderscores( + derivedTypeNamespace, + builders.CppMacros); + builders.CppMacros.Append('_'); + AppendUppercaseWithUnderscores( + derivedTypeName, + builders.CppMacros); + builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR_DECLARATION \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle);\n"); + builders.CppMacros.Append('\n'); + + // C++ constructor definition macro + builders.CppMacros.Append("#define "); + AppendUppercaseWithUnderscores( + derivedTypeNamespace, + builders.CppMacros); + builders.CppMacros.Append('_'); + AppendUppercaseWithUnderscores( + derivedTypeName, + builders.CppMacros); + builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR_DEFINITION \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append("::"); + builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle) \\\n"); + AppendCppConstructorInitializerList( + cppCtorInitTypes, + indent + 1, + builders.CppMacros, + " \\\n"); + AppendIndent(indent + 1, builders.CppMacros); + builders.CppMacros.Append(", "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + builders.CppMacros); + builders.CppMacros.Append("(iu, handle)\n"); + + // C++ constructor inline definition macro + builders.CppMacros.Append("#define "); + AppendUppercaseWithUnderscores( + derivedTypeNamespace, + builders.CppMacros); + builders.CppMacros.Append('_'); + AppendUppercaseWithUnderscores( + derivedTypeName, + builders.CppMacros); + builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle) \\\n"); + AppendCppConstructorInitializerList( + cppCtorInitTypes, + indent + 1, + builders.CppMacros, + " \\\n"); + AppendIndent(indent + 1, builders.CppMacros); + builders.CppMacros.Append(", "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + builders.CppMacros); + builders.CppMacros.Append("(iu, handle) \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("{ \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("} \\\n"); + builders.CppMacros.Append('\n'); + // C++ function pointers AppendCppFunctionPointerDefinition( releaseFuncName, @@ -7642,19 +7442,16 @@ static void AppendBaseType( // C++ method definitions (end) int cppMethodDefinitionsIndent = AppendNamespaceBeginning( - type.Namespace, + baseTypeNamespace, builders.CppMethodDefinitions); for (int i = 0; i < numConstructors; ++i) { AppendCppBaseTypeConstructor( - bindingTypeName, - type.Name, - type.Namespace, + baseTypeName, + baseTypeNamespace, TypeKind.Class, - cppBaseTypeName, - cppBaseClass, - typeParams, + baseTypeName, typeParams, cppCtorInitTypes, cppConstructorParams[i], @@ -7666,71 +7463,62 @@ static void AppendBaseType( } AppendCppBaseTypeNullptrConstructor( - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, - cppBaseClass.Name, - cppBaseClass.Namespace, - cppBaseClassTypeParams, cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeCopyConstructor( - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, - cppBaseClass.Name, - cppBaseClass.Namespace, - cppBaseClassTypeParams, cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeMoveConstructor( - cppBaseTypeName, + baseTypeName, typeParams, - cppBaseClass.Name, - cppBaseClass.Namespace, - cppBaseClassTypeParams, cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeHandleConstructor( - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, - cppBaseClass.Name, - cppBaseClass.Namespace, - cppBaseClassTypeParams, cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeDestructor( - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, false, + derivedTypeName, + derivedTypeNamespace, releaseFuncName, + baseTypeName, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorSameType( type, - cppBaseTypeName, + baseTypeName, typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorNullptr( - cppBaseTypeName, + baseTypeName, typeParams, false, releaseFuncName, @@ -7738,8 +7526,8 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeMoveAssignmentOperator( - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, false, releaseFuncName, @@ -7747,20 +7535,196 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeEqualityOperator( - cppBaseTypeName, + baseTypeName, typeParams, cppMethodDefinitionsIndent, + false, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( - cppBaseTypeName, + baseTypeName, typeParams, cppMethodDefinitionsIndent, + false, builders.CppMethodDefinitions); - + + if (!string.IsNullOrEmpty(derivedTypeName)) + { + // C++ whole object free list + AppendCppWholeObjectFreeListStateAndFunctions( + null, + baseTypeName, + baseTypeNamespace, + baseTypeName, + builders.CppGlobalStateAndFunctions); + AppendCppWholeObjectFreeListInit( + maxSimultaneous, + baseTypeName, + builders.CppInitBody, + builders.CppInitBodyFirstBoot); + + // C++ binding function to create the base class + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("New"); + builders.TempStrBuilder.Append(baseTypeName); + string cppDefaultConstructorBindingFunctionName = builders.TempStrBuilder.ToString(); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("DLLEXPORT int32_t "); + builders.CppMethodDefinitions.Append(cppDefaultConstructorBindingFunctionName); + builders.CppMethodDefinitions.Append("(int32_t handle)\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("* memory = Plugin::StoreWhole"); + builders.CppMethodDefinitions.Append(baseTypeName); + builders.CppMethodDefinitions.Append("();\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + AppendCppTypeName( + derivedTypeNamespace, + derivedTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("* thiz = new (memory) "); + AppendCppTypeName( + derivedTypeNamespace, + derivedTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("(Plugin::InternalUse::Only, handle);\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return thiz->CppHandle;\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n\n"); + + // C# usage of the C++ binding function to create from C# default constructor + ParameterInfo[] cppDefaultConstructorBindingFunctionParams = ConvertParameters( + new Type[] { typeof(int) }); + AppendCsharpDelegate( + true, + string.Empty, + string.Empty, + null, + cppDefaultConstructorBindingFunctionName, + cppDefaultConstructorBindingFunctionParams, + typeof(int), + TypeKind.None, + builders.CsharpDelegates); + AppendCsharpImport( + string.Empty, + string.Empty, + null, + cppDefaultConstructorBindingFunctionName, + cppDefaultConstructorBindingFunctionParams, + builders.CsharpImports); + AppendCsharpGetDelegateCall( + string.Empty, + string.Empty, + null, + cppDefaultConstructorBindingFunctionName, + builders.CsharpGetDelegateCalls); + + // C++ binding function to destroy the base class + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("Destroy"); + builders.TempStrBuilder.Append(baseTypeName); + string cppDestroyBindingFunctionName = builders.TempStrBuilder.ToString(); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("DLLEXPORT void "); + builders.CppMethodDefinitions.Append(cppDestroyBindingFunctionName); + builders.CppMethodDefinitions.Append("(int32_t cppHandle)\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + AppendCppTypeName( + string.Empty, + baseTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("* instance = Plugin::Get"); + builders.CppMethodDefinitions.Append(baseTypeName); + builders.CppMethodDefinitions.Append("(cppHandle);\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("instance->~"); + AppendCppTypeName( + string.Empty, + baseTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("();\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n\n"); + + // C# usage of the C++ binding function to destroy from C# default constructor + ParameterInfo[] cppDestroyBindingFunctionParams = ConvertParameters( + new Type[] { typeof(int) }); + AppendCsharpDelegate( + true, + string.Empty, + string.Empty, + null, + cppDestroyBindingFunctionName, + cppDestroyBindingFunctionParams, + typeof(void), + TypeKind.None, + builders.CsharpDelegates); + AppendCsharpImport( + string.Empty, + string.Empty, + null, + cppDestroyBindingFunctionName, + cppDestroyBindingFunctionParams, + builders.CsharpImports); + AppendCsharpGetDelegateCall( + string.Empty, + string.Empty, + null, + cppDestroyBindingFunctionName, + builders.CsharpGetDelegateCalls); + + // C# DestroyFunction enumerator + builders.CsharpDestroyFunctionEnumerators.Append("\t\t\t"); + builders.CsharpDestroyFunctionEnumerators.Append(baseTypeName); + builders.CsharpDestroyFunctionEnumerators.Append(",\n"); + + // C# Destroy queue cases + builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\tcase DestroyFunction."); + builders.CsharpDestroyQueueCases.Append(baseTypeName); + builders.CsharpDestroyQueueCases.Append(":\n"); + builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\t\t"); + builders.CsharpDestroyQueueCases.Append(cppDestroyBindingFunctionName); + builders.CsharpDestroyQueueCases.Append("(entry.CppHandle);\n"); + builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\t\tbreak;\n"); + } + // C# class (beginning) - builders.CsharpBaseTypes.Append("\t\tclass "); - builders.CsharpBaseTypes.Append(bindingTypeName); + builders.CsharpBaseTypes.Append("namespace "); + builders.CsharpBaseTypes.Append(baseTypeNamespace); + builders.CsharpBaseTypes.Append('\n'); + builders.CsharpBaseTypes.Append("{\n"); + builders.CsharpBaseTypes.Append("\tclass "); + builders.CsharpBaseTypes.Append(baseTypeName); if (jsonBaseType != null) { builders.CsharpBaseTypes.Append(" : "); @@ -7769,17 +7733,53 @@ static void AppendBaseType( builders.CsharpBaseTypes); } builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.Append("\t{\n"); // C# class fields - builders.CsharpBaseTypes.Append("\t\t\tpublic int CppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); - - // C# class constructor + builders.CsharpBaseTypes.Append("\t\tpublic int CppHandle;\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); + + if (derivedTypeName != null) + { + // C# class default constructor if the base class has one + if (hasDefaultConstructor) + { + builders.CsharpBaseTypes.Append("\t\tpublic "); + builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append("()\n"); + builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.Append( + "\t\t\tint handle = NativeScript.Bindings.ObjectStore.Store(this);\n"); + builders.CsharpBaseTypes.Append( + "\t\t\tCppHandle = NativeScript.Bindings.New"); + builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append("(handle);\n"); + builders.CsharpBaseTypes.Append("\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); + } + + // C# finalizer/destructor + builders.CsharpBaseTypes.Append("\t\t~"); + builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append("()\n"); + builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.Append("\t\t\tif (CppHandle != 0)\n"); + builders.CsharpBaseTypes.Append("\t\t\t{\n"); + builders.CsharpBaseTypes.Append( + "\t\t\t\tNativeScript.Bindings.QueueDestroy(NativeScript.Bindings.DestroyFunction."); + builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(", CppHandle);\n"); + builders.CsharpBaseTypes.Append("\t\t\t\tCppHandle = 0;\n"); + builders.CsharpBaseTypes.Append("\t\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); + } + + // C# class constructors for (int i = 0; i < numConstructors; ++i) { - builders.CsharpBaseTypes.Append("\t\t\tpublic "); - builders.CsharpBaseTypes.Append(bindingTypeName); + builders.CsharpBaseTypes.Append("\t\tpublic "); + builders.CsharpBaseTypes.Append(baseTypeName); builders.CsharpBaseTypes.Append("(int cppHandle"); ParameterInfo[] parameters = cppConstructorParams[i]; if (parameters.Length > 0) @@ -7790,15 +7790,15 @@ static void AppendBaseType( builders.CsharpBaseTypes); } builders.CsharpBaseTypes.Append(")\n"); - builders.CsharpBaseTypes.Append("\t\t\t\t: base("); + builders.CsharpBaseTypes.Append("\t\t\t: base("); AppendCsharpFunctionCallParameters( parameters, builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(")\n"); - builders.CsharpBaseTypes.Append("\t\t\t{\n"); - builders.CsharpBaseTypes.Append("\t\t\t\tCppHandle = cppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); + builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.Append("\t\t\tCppHandle = cppHandle;\n"); + builders.CsharpBaseTypes.Append("\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); } // C# constructor delegate type @@ -7818,7 +7818,8 @@ static void AppendBaseType( { AppendCsharpBaseTypeConstructorFunction( type, - bindingTypeName, + baseTypeName, + baseTypeNamespace, false, constructorFuncNames[i], constructorParams[i], @@ -7838,9 +7839,11 @@ static void AppendBaseType( AppendCsharpBaseTypeReleaseFunction( type, - bindingTypeName, + baseTypeName, + baseTypeNamespace, false, releaseFuncName, + jsonBaseType.DerivedName, releaseParams, builders.CsharpFunctions); @@ -7852,10 +7855,11 @@ static void AppendBaseType( { AppendBaseTypeNativeMethod( type, - bindingTypeName, + baseTypeName, typeParams, - cppBaseTypeName, + baseTypeName, methodInfo, + false, indent, builders); } @@ -7873,10 +7877,11 @@ static void AppendBaseType( { AppendBaseTypeNativeMethod( type, - bindingTypeName, + baseTypeName, typeParams, - cppBaseTypeName, + baseTypeName, methodInfo, + false, indent, builders); } @@ -7905,10 +7910,11 @@ static void AppendBaseType( jsonGenericParams.Types); AppendBaseTypeNativeMethod( type, - bindingTypeName, + baseTypeName, typeParams, - cppBaseTypeName, + baseTypeName, methodInfo, + false, indent, builders); } @@ -7924,10 +7930,11 @@ static void AppendBaseType( null); AppendBaseTypeNativeMethod( type, - bindingTypeName, + baseTypeName, typeParams, - cppBaseTypeName, + baseTypeName, methodInfo, + false, indent, builders); } @@ -7946,8 +7953,8 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, propertyInfo, getMethodInfo, @@ -7973,8 +7980,8 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, propertyInfo, getMethodInfo, @@ -8033,8 +8040,8 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, propertyInfo, getMethodInfo, @@ -8056,8 +8063,8 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, eventInfo, addMethodInfo, @@ -8082,8 +8089,8 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, eventInfo, addMethodInfo, @@ -8142,8 +8149,8 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - bindingTypeName, - cppBaseTypeName, + baseTypeName, + baseTypeName, typeParams, eventInfo, addMethodInfo, @@ -8154,14 +8161,15 @@ static void AppendBaseType( } // C# class (ending) - builders.CsharpBaseTypes.Append("\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.Append("\t}\n"); + builders.CsharpBaseTypes.Append("}\n"); + builders.CsharpBaseTypes.Append("\n"); // C++ method definitions (end) AppendCppMethodDefinitionsEnd( indent, builders.CppMethodDefinitions); - + // C++ type definition (end) AppendCppTypeDefinitionEnd( false, @@ -8175,6 +8183,7 @@ static void AppendBaseTypeNativeMethod( Type[] typeParams, string cppTypeName, MethodInfo methodInfo, + bool typeIsDelegate, int indent, StringBuilders builders) { @@ -8204,6 +8213,7 @@ static void AppendBaseTypeNativeMethod( nativeInvokeFuncName, methodInfo.Name, IsNonDelegateClass(type), + typeIsDelegate, indent, builders); } @@ -8231,13 +8241,10 @@ static void AppendBaseTypeProperty( { System.Reflection.ParameterInfo[] setParams = setMethodInfo.GetParameters(); - parameters = ConvertParameters( - setParams, - 1, - setParams.Length - 1); + parameters = ConvertParameters(setParams, 1); } - builders.CsharpBaseTypes.Append("\t\t\tpublic "); + builders.CsharpBaseTypes.Append("\t\tpublic "); if (isOverride) { builders.CsharpBaseTypes.Append("override "); @@ -8259,7 +8266,7 @@ static void AppendBaseTypeProperty( builders.CsharpBaseTypes.Append(']'); } builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t\t{\n"); + builders.CsharpBaseTypes.Append("\t\t{\n"); TypeKind propertyTypeKind = GetTypeKind( propertyInfo.PropertyType); @@ -8275,7 +8282,7 @@ static void AppendBaseTypeProperty( propertyTypeKind, getMethodInfo, "Get", - isOverride, + false, indent, builders); } @@ -8291,13 +8298,13 @@ static void AppendBaseTypeProperty( propertyTypeKind, setMethodInfo, "Set", - isOverride, + false, indent, builders); } - builders.CsharpBaseTypes.Append("\t\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); + builders.CsharpBaseTypes.Append("\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); } static void AppendBaseTypeEvent( @@ -8313,7 +8320,7 @@ static void AppendBaseTypeEvent( { bool isOverride = IsNonDelegateClass(type); - builders.CsharpBaseTypes.Append("\t\t\tpublic "); + builders.CsharpBaseTypes.Append("\t\tpublic "); if (isOverride) { builders.CsharpBaseTypes.Append("override "); @@ -8325,7 +8332,7 @@ static void AppendBaseTypeEvent( builders.CsharpBaseTypes.Append(' '); builders.CsharpBaseTypes.Append(eventInfo.Name); builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t\t{\n"); + builders.CsharpBaseTypes.Append("\t\t{\n"); TypeKind eventHandlerTypeKind = GetTypeKind( eventInfo.EventHandlerType); @@ -8341,7 +8348,7 @@ static void AppendBaseTypeEvent( eventHandlerTypeKind, addMethodInfo, "Add", - isOverride, + false, indent, builders); } @@ -8357,7 +8364,7 @@ static void AppendBaseTypeEvent( eventHandlerTypeKind, removeMethodInfo, "Remove", - isOverride, + false, indent, builders); } @@ -8375,7 +8382,7 @@ static void AppendBaseTypeNativePropertyOrEvent( TypeKind propertyOrEventTypeKind, MethodInfo methodInfo, string operationType, - bool isOverride, + bool typeIsDelegate, int indent, StringBuilders builders) { @@ -8407,31 +8414,30 @@ static void AppendBaseTypeNativePropertyOrEvent( typeParams, methodInfo, funcName, - nativeInvokeFuncName, funcName, - isOverride, + typeIsDelegate, indent, builders); // C# method that calls the C++ binding function ParameterInfo[] invokeParamsWithThis = PrependThisParameter( invokeParams); - builders.CsharpBaseTypes.Append("\t\t\t\t"); + builders.CsharpBaseTypes.Append("\t\t\t"); builders.CsharpBaseTypes.Append(char.ToLower(operationType[0])); builders.CsharpBaseTypes.Append( operationType, 1, operationType.Length - 1); builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t\t\t{\n"); + builders.CsharpBaseTypes.Append("\t\t\t{\n"); AppendCsharpBaseTypeCppMethodCallMethodBody( methodInfo, nativeInvokeFuncName, invokeParamsWithThis, propertyOrEventTypeKind, - 5, + 4, builders.CsharpBaseTypes); - builders.CsharpBaseTypes.Append("\t\t\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\t}\n"); } static void AppendCsharpParams( @@ -8485,7 +8491,6 @@ static void AppendBaseTypeMethodCallsCsharpMethod( false, false, methodInfo.ReturnType, - typeParams, null, invokeParams, builders.CppTypeDefinitions); @@ -8650,6 +8655,7 @@ static void AppendBaseTypeCppMethodCall( string nativeInvokeFuncName, string methodName, bool isOverride, + bool typeIsDelegate, int indent, StringBuilders builders) { @@ -8660,9 +8666,8 @@ static void AppendBaseTypeCppMethodCall( typeParams, invokeMethod, funcName, - nativeInvokeFuncName, methodName, - isOverride, + typeIsDelegate, indent, builders); @@ -8689,9 +8694,8 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( Type[] typeParams, MethodInfo invokeMethod, string funcName, - string nativeInvokeFuncName, string methodName, - bool isOverride, + bool typeIsDelegate, int indent, StringBuilders builders) { @@ -8707,7 +8711,6 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( true, false, invokeMethod.ReturnType, - typeParams, null, invokeParams, builders.CppTypeDefinitions); @@ -8717,7 +8720,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( cppTypeName, invokeMethod.ReturnType, methodName, - typeParams, + typeIsDelegate ? typeParams : null, null, invokeParams, indent, @@ -8812,9 +8815,11 @@ static ParameterInfo[] PrependThisParameter( static void AppendCsharpBaseTypeReleaseFunction( Type type, - string typeName, + string bindingTypeName, + string bindingTypeNamespace, bool typeIsDelegate, string releaseFuncName, + string derivedName, ParameterInfo[] releaseParams, StringBuilder output) { @@ -8826,20 +8831,43 @@ static void AppendCsharpBaseTypeReleaseFunction( typeof(void), releaseParams, output); + if (typeIsDelegate || derivedName != null) + { + AppendCsharpTypeName( + bindingTypeNamespace, + bindingTypeName, + output); + output.Append(" thiz;\n"); + } if (typeIsDelegate) { - output.Append("if (classHandle != 0)\n"); + output.Append("\t\t\t\tif (classHandle != 0)\n"); output.Append("\t\t\t\t{\n"); - output.Append("\t\t\t\t\tvar thiz = ("); - output.Append(typeName); - output.Append( - ")NativeScript.Bindings.ObjectStore.Remove(classHandle);\n"); + output.Append("\t\t\t\t\tthiz = ("); + AppendCsharpTypeName( + bindingTypeNamespace, + bindingTypeName, + output); + output.Append(")ObjectStore.Remove(classHandle);\n"); output.Append("\t\t\t\t\tthiz.CppHandle = 0;\n"); output.Append("\t\t\t\t}\n"); - output.Append("\t\t\t\t"); + output.Append("\t\t\t\t\n"); } - output.Append( - "NativeScript.Bindings.ObjectStore.Remove(handle);"); + if (derivedName != null) + { + output.Append("\t\t\t\tthiz = ("); + AppendCsharpTypeName( + bindingTypeNamespace, + bindingTypeName, + output); + output.Append(")ObjectStore.Get(handle);\n"); + output.Append("\t\t\t\tint cppHandle = thiz.CppHandle;\n"); + output.Append("\t\t\t\tthiz.CppHandle = 0;\n"); + output.Append("\t\t\t\tQueueDestroy(DestroyFunction."); + output.Append(bindingTypeName); + output.Append(", cppHandle);\n"); + } + output.Append("\t\t\t\tObjectStore.Remove(handle);"); AppendCsharpFunctionReturn( releaseParams, typeof(void), @@ -8859,7 +8887,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( TypeKind invokeReturnTypeKind, StringBuilder output) { - output.Append("\t\t\tpublic "); + output.Append("\t\tpublic "); if (isOverride) { output.Append("override "); @@ -8874,19 +8902,19 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( invokeParams, output); output.Append(")\n"); - output.Append("\t\t\t{\n"); + output.Append("\t\t{\n"); AppendCsharpBaseTypeCppMethodCallMethodBody( invokeMethod, nativeInvokeFuncName, invokeParamsWithThis, invokeReturnTypeKind, - 4, + 3, output); - output.Append("\t\t\t}\n"); - output.Append("\t\t\t\n"); + output.Append("\t\t}\n"); + output.Append("\t\n"); } - private static void AppendCsharpBaseTypeCppMethodCallMethodBody( + static void AppendCsharpBaseTypeCppMethodCallMethodBody( MethodInfo invokeMethod, string nativeInvokeFuncName, ParameterInfo[] invokeParamsWithThis, @@ -8958,9 +8986,10 @@ private static void AppendCsharpBaseTypeCppMethodCallMethodBody( } } - private static void AppendCsharpBaseTypeConstructorFunction( + static void AppendCsharpBaseTypeConstructorFunction( Type type, string typeName, + string typeNamespace, bool typeIsDelegate, string constructorFuncName, ParameterInfo[] constructorParams, @@ -8976,7 +9005,7 @@ private static void AppendCsharpBaseTypeConstructorFunction( constructorParams, output); output.Append("var thiz = new "); - output.Append(typeName); + AppendCsharpTypeName(typeNamespace, typeName, output); output.Append("(cppHandle"); if (cppConstructorParams.Length > 0) { @@ -9254,6 +9283,7 @@ static void AppendCppBaseTypeInequalityOperator( string cppTypeName, Type[] typeParams, int cppMethodDefinitionsIndent, + bool typeIsDelegate, StringBuilder output) { AppendIndent( @@ -9264,14 +9294,14 @@ static void AppendCppBaseTypeInequalityOperator( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::operator!=(const "); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("& other) const\n"); AppendIndent( @@ -9297,6 +9327,7 @@ static void AppendCppBaseTypeEqualityOperator( string cppTypeName, Type[] typeParams, int cppMethodDefinitionsIndent, + bool typeIsDelegate, StringBuilder output) { AppendIndent( @@ -9307,14 +9338,14 @@ static void AppendCppBaseTypeEqualityOperator( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::operator==(const "); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("& other) const\n"); AppendIndent( @@ -9352,21 +9383,21 @@ static void AppendCppBaseTypeMoveAssignmentOperator( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("& "); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::operator=("); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("&& other)\n"); AppendIndent( @@ -9493,14 +9524,14 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("& "); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append( "::operator=(decltype(nullptr))\n"); @@ -9609,21 +9640,21 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("& "); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::operator=(const "); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("& other)\n"); AppendIndent( @@ -9666,7 +9697,10 @@ static void AppendCppBaseTypeDestructor( string cppTypeName, Type[] typeParams, bool typeIsDelegate, + string derivedTypeName, + string derivedTypeNamespace, string releaseFuncName, + string bindingTypeName, int cppMethodDefinitionsIndent, StringBuilder output) { @@ -9677,7 +9711,7 @@ static void AppendCppBaseTypeDestructor( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::~"); AppendTypeNameWithoutGenericSuffix( @@ -9688,6 +9722,15 @@ static void AppendCppBaseTypeDestructor( cppMethodDefinitionsIndent, output); output.Append("{\n"); + if (!string.IsNullOrEmpty(derivedTypeName)) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("Plugin::RemoveWhole"); + output.Append(bindingTypeName); + output.Append("(this);\n"); + } AppendIndent( cppMethodDefinitionsIndent + 1, output); @@ -9773,9 +9816,6 @@ static void AppendCppBaseTypeHandleConstructor( string typeName, string cppTypeName, Type[] typeParams, - string baseTypeName, - string baseTypeNamespace, - Type[] baseTypeParams, Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -9788,7 +9828,7 @@ static void AppendCppBaseTypeHandleConstructor( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( @@ -9796,19 +9836,10 @@ static void AppendCppBaseTypeHandleConstructor( output); output.Append( "(Plugin::InternalUse, int32_t handle)\n"); - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - cppMethodDefinitionsIndent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + cppMethodDefinitionsIndent + 1, + output); AppendIndent( cppMethodDefinitionsIndent, output); @@ -9861,9 +9892,6 @@ static void AppendCppBaseTypeHandleConstructor( static void AppendCppBaseTypeMoveConstructor( string cppTypeName, Type[] typeParams, - string baseTypeName, - string baseTypeNamespace, - Type[] baseTypeParams, Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -9876,7 +9904,7 @@ static void AppendCppBaseTypeMoveConstructor( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( @@ -9887,22 +9915,13 @@ static void AppendCppBaseTypeMoveConstructor( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("&& other)\n"); - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - cppMethodDefinitionsIndent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + cppMethodDefinitionsIndent + 1, + output); AppendIndent( cppMethodDefinitionsIndent, output); @@ -9954,9 +9973,6 @@ static void AppendCppBaseTypeCopyConstructor( string typeName, string cppTypeName, Type[] typeParams, - string baseTypeName, - string baseTypeNamespace, - Type[] baseTypeParams, Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -9969,33 +9985,24 @@ static void AppendCppBaseTypeCopyConstructor( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( cppTypeName, - output); - output.Append("(const "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, - output); - AppendCppTypeParameters( - typeParams, - output); - output.Append("& other)\n"); - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - cppMethodDefinitionsIndent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + output); + output.Append("(const "); + AppendTypeNameWithoutGenericSuffix( + cppTypeName, + output); + AppendCppTypeParameters( + typeIsDelegate ? typeParams : null, + output); + output.Append("& other)\n"); + AppendCppConstructorInitializerList( + interfaceTypes, + cppMethodDefinitionsIndent + 1, + output); AppendIndent( cppMethodDefinitionsIndent, output); @@ -10050,9 +10057,6 @@ static void AppendCppBaseTypeNullptrConstructor( string typeName, string cppTypeName, Type[] typeParams, - string baseTypeName, - string baseTypeNamespace, - Type[] baseTypeParams, Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -10065,26 +10069,17 @@ static void AppendCppBaseTypeNullptrConstructor( cppTypeName, output); AppendCppTypeParameters( - typeParams, + typeIsDelegate ? typeParams : null, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( cppTypeName, output); output.Append("(decltype(nullptr))\n"); - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - cppMethodDefinitionsIndent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + cppMethodDefinitionsIndent + 1, + output); AppendIndent( cppMethodDefinitionsIndent, output); @@ -10114,13 +10109,10 @@ static void AppendCppBaseTypeNullptrConstructor( static void AppendCppBaseTypeConstructor( string bindingTypeName, - string typeName, string typeNamespace, TypeKind typeKind, string cppTypeName, - Type baseType, Type[] typeParams, - Type[] baseTypeParams, Type[] interfaceTypes, ParameterInfo[] cppParameters, ParameterInfo[] parameters, @@ -10133,24 +10125,15 @@ static void AppendCppBaseTypeConstructor( cppTypeName, null, cppTypeName, - typeParams, + typeIsDelegate ? typeParams : null, null, cppParameters, cppMethodDefinitionsIndent, output); - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - cppMethodDefinitionsIndent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + cppMethodDefinitionsIndent + 1, + output); AppendIndent( cppMethodDefinitionsIndent, output); @@ -10246,8 +10229,8 @@ static void AppendCppBaseTypeConstructor( output.Append('\n'); } - static void AppendCppFreeListInit( - Type type, + static void AppendCppPointerFreeListInit( + string typeNamespace, Type[] typeParams, string cppTypeName, int maxSimultaneous, @@ -10265,7 +10248,7 @@ static void AppendCppFreeListInit( output.Append(typeName); output.Append("FreeList = ("); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10277,7 +10260,7 @@ static void AppendCppFreeListInit( output.Append(maxSimultaneous); output.Append(" * sizeof("); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10295,7 +10278,7 @@ static void AppendCppFreeListInit( outputFirstBoot.Append(typeName); outputFirstBoot.Append("FreeList[i] = ("); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, outputFirstBoot); AppendCppTypeParameters( @@ -10321,19 +10304,34 @@ static void AppendCppFreeListInit( outputFirstBoot.Append("\t\t\n"); } - static void AppendCppFreeListStateAndFunctions( - Type type, + static void AppendCppPointerFreeListStateAndFunctions( + string typeNamespace, Type[] typeParams, string cppTypeName, string bindingTypeName, StringBuilder output) { + // Section comment + output.Append("\t// Free list for "); + AppendCppTypeName( + typeNamespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append(" pointers\n"); + output.Append("\t\n"); + + // Size variable output.Append("\tint32_t "); output.Append(bindingTypeName); output.Append("FreeListSize;\n"); + + // Free list variable output.Append('\t'); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10342,9 +10340,11 @@ static void AppendCppFreeListStateAndFunctions( output.Append("** "); output.Append(bindingTypeName); output.Append("FreeList;\n"); + + // Next free variable output.Append('\t'); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10354,11 +10354,13 @@ static void AppendCppFreeListStateAndFunctions( output.Append(bindingTypeName); output.Append(";\n"); output.Append("\t\n"); + + // Store function output.Append("\tint32_t Store"); output.Append(bindingTypeName); output.Append('('); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10371,7 +10373,7 @@ static void AppendCppFreeListStateAndFunctions( output.Append(" != nullptr);\n"); output.Append("\t\t"); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10384,7 +10386,7 @@ static void AppendCppFreeListStateAndFunctions( output.Append(bindingTypeName); output.Append(" = ("); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10397,9 +10399,11 @@ static void AppendCppFreeListStateAndFunctions( output.Append("FreeList);\n"); output.Append("\t}\n"); output.Append("\t\n"); + + // Get function output.Append('\t'); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10418,13 +10422,15 @@ static void AppendCppFreeListStateAndFunctions( output.Append("FreeList[handle];\n"); output.Append("\t}\n"); output.Append("\t\n"); + + // Remove function output.Append("\tvoid Remove"); output.Append(bindingTypeName); output.Append("(int32_t handle)\n"); output.Append("\t{\n"); output.Append("\t\t"); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10435,7 +10441,7 @@ static void AppendCppFreeListStateAndFunctions( output.Append("FreeList + handle;\n"); output.Append("\t\t*pRelease = ("); AppendCppTypeName( - type.Namespace, + typeNamespace, cppTypeName, output); AppendCppTypeParameters( @@ -10448,6 +10454,182 @@ static void AppendCppFreeListStateAndFunctions( output.Append(bindingTypeName); output.Append(" = pRelease;\n"); output.Append("\t}\n"); + output.Append("\t\n"); + } + + static void AppendCppWholeObjectFreeListInit( + int maxSimultaneous, + string bindingTypeName, + StringBuilder output, + StringBuilder outputFirstBoot) + { + output.Append("\tPlugin::"); + output.Append(bindingTypeName); + output.Append("FreeWholeListSize = "); + output.Append(maxSimultaneous); + output.Append(";\n"); + + output.Append("\tPlugin::"); + output.Append(bindingTypeName); + output.Append("FreeWholeList = (Plugin::"); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry*)curMemory;\n"); + + output.Append("\tcurMemory += "); + output.Append(maxSimultaneous); + output.Append(" * sizeof(Plugin::"); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry);\n"); + + output.Append("\t\n"); + + outputFirstBoot.Append("\t\tfor (int32_t i = 0, end = Plugin::"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append("FreeWholeListSize - 1; i < end; ++i)\n"); + outputFirstBoot.Append("\t\t{\n"); + outputFirstBoot.Append("\t\t\tPlugin::"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append("FreeWholeList[i].Next = Plugin::"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append("FreeWholeList[i + 1].Next;\n"); + outputFirstBoot.Append("\t\t}\n"); + + outputFirstBoot.Append("\t\tPlugin::"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append("FreeWholeList[Plugin::"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append("FreeWholeListSize - 1].Next = nullptr;\n"); + + outputFirstBoot.Append("\t\tPlugin::NextFreeWhole"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append(" = Plugin::"); + outputFirstBoot.Append(bindingTypeName); + outputFirstBoot.Append("FreeWholeList + 1;\n"); + + outputFirstBoot.Append("\t\t\n"); + } + + static void AppendCppWholeObjectFreeListStateAndFunctions( + Type[] typeParams, + string cppTypeName, + string cppTypeNamespace, + string bindingTypeName, + StringBuilder output) + { + // Section comment + output.Append("\t// Free list for whole "); + AppendCppTypeName( + cppTypeNamespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append(" objects\n"); + output.Append("\t\n"); + + // Union with a pointer and a whole object + output.Append("\tunion "); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry\n"); + output.Append("\t{\n"); + output.Append("\t\t"); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry* Next;\n"); + output.Append("\t\t"); + AppendCppTypeName( + cppTypeNamespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append(" Value;\n"); + output.Append("\t};\n"); + + // Size + output.Append("\tint32_t "); + output.Append(bindingTypeName); + output.Append("FreeWholeListSize;\n"); + + // Free list entries + output.Append('\t'); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry* "); + output.Append(bindingTypeName); + output.Append("FreeWholeList;\n"); + + // Pointer to next free entry + output.Append('\t'); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry* NextFreeWhole"); + output.Append(bindingTypeName); + output.Append(";\n"); + output.Append("\t\n"); + + // Store function + output.Append('\t'); + AppendCppTypeName( + cppTypeNamespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("* StoreWhole"); + output.Append(bindingTypeName); + output.Append("()\n"); + output.Append("\t{\n"); + output.Append("\t\tassert(NextFreeWhole"); + output.Append(bindingTypeName); + output.Append(" != nullptr);\n"); + output.Append("\t\t"); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry* pNext = NextFreeWhole"); + output.Append(bindingTypeName); + output.Append(";\n"); + output.Append("\t\tNextFreeWhole"); + output.Append(bindingTypeName); + output.Append(" = pNext->Next;\n"); + output.Append("\t\treturn &pNext->Value;\n"); + output.Append("\t}\n"); + output.Append("\t\n"); + + // Remove function + output.Append("\tvoid RemoveWhole"); + output.Append(bindingTypeName); + output.Append('('); + AppendCppTypeName( + cppTypeNamespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("* instance)\n"); + output.Append("\t{\n"); + output.Append("\t\t"); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry* pRelease = ("); + output.Append(bindingTypeName); + output.Append("FreeWholeListEntry*)instance;\n"); + output.Append("\t\tif (pRelease >= "); + output.Append(bindingTypeName); + output.Append("FreeWholeList && pRelease < "); + output.Append(bindingTypeName); + output.Append("FreeWholeList + ("); + output.Append(bindingTypeName); + output.Append("FreeWholeListSize - 1))\n"); + output.Append("\t\t{\n"); + output.Append("\t\t\tpRelease->Next = NextFreeWhole"); + output.Append(bindingTypeName); + output.Append(";\n"); + output.Append("\t\t\tNextFreeWhole"); + output.Append(bindingTypeName); + output.Append(" = pRelease->Next;\n"); + output.Append("\t\t}\n"); + output.Append("\t}\n"); + output.Append("\t\n"); } static void AppendCsharpDelegate( @@ -10998,7 +11180,6 @@ static void AppendGetter( false, methodIsStatic, fieldType, - enclosingTypeParams, null, parameters, builders.CppTypeDefinitions); @@ -11192,7 +11373,6 @@ static void AppendSetter( false, methodIsStatic, typeof(void), - enclosingTypeParams, null, parameters, builders.CppTypeDefinitions); @@ -11595,9 +11775,6 @@ static int AppendCppMethodDefinitionsBegin( string enclosingTypeNamespace, TypeKind enclosingTypeKind, Type[] enclosingTypeParams, - string baseTypeName, - string baseTypeNamespace, - Type[] baseTypeTypeParams, Type[] interfaceTypes, bool isStatic, Action extraDefault, @@ -11612,12 +11789,6 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeKind == TypeKind.Class || enclosingTypeKind == TypeKind.ManagedStruct)) { - if (baseTypeName == null) - { - baseTypeName = "Object"; - baseTypeNamespace = "System"; - } - // Construct with nullptr AppendIndent(indent, output); AppendTypeNameWithoutGenericSuffix( @@ -11633,19 +11804,10 @@ static int AppendCppMethodDefinitionsBegin( output.Append("(decltype(nullptr))\n"); if (enclosingTypeKind == TypeKind.Class) { - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - indent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + indent + 1, + output); } AppendIndent(indent, output); output.Append("{\n"); @@ -11670,19 +11832,10 @@ static int AppendCppMethodDefinitionsBegin( output.Append("(Plugin::InternalUse, int32_t handle)\n"); if (enclosingTypeKind == TypeKind.Class) { - string separator = ": "; - foreach (Type interfaceType in interfaceTypes) - { - AppendIndent( - indent + 1, - output); - output.Append(separator); - AppendCppTypeName( - interfaceType, - output); - output.Append("(nullptr)\n"); - separator = ", "; - } + AppendCppConstructorInitializerList( + interfaceTypes, + indent + 1, + output); } AppendIndent(indent, output); output.Append("{\n"); @@ -12674,7 +12827,6 @@ static void AppendCsharpBindingParameterDeclaration( static void AppendCppParameterDeclaration( ParameterInfo[] parameters, - Type[] typeTypeParameters, Type[] methodTypeParameters, bool includeDefaults, StringBuilder output) @@ -12864,7 +13016,6 @@ static void AppendCppMethodDefinitionBegin( output.Append('('); AppendCppParameterDeclaration( parameters, - null, // don't substitute type type params null, // don't substitute method type params false, output); @@ -13234,7 +13385,6 @@ static void AppendCppMethodDeclaration( bool methodIsVirtual, bool methodIsStatic, Type returnType, - Type[] typeTypeParameters, Type[] methodTypeParameters, ParameterInfo[] parameters, StringBuilder output) @@ -13284,7 +13434,6 @@ static void AppendCppMethodDeclaration( output.Append('('); AppendCppParameterDeclaration( parameters, - typeTypeParameters, methodTypeParameters, true, output); @@ -13368,17 +13517,26 @@ static void AppendCsharpTypeName( } else { - output.Append(type.Namespace); - output.Append('.'); - AppendTypeNameWithoutGenericSuffix( - type.Name, - output); + AppendCsharpTypeName(type.Namespace, type.Name, output); Type[] genTypes = type.GetGenericArguments(); AppendCSharpTypeParameters( genTypes, output); } } + + static void AppendCsharpTypeName( + string namespaceName, + string name, + StringBuilder output) + { + if (!string.IsNullOrEmpty(namespaceName)) + { + output.Append(namespaceName); + output.Append('.'); + } + AppendTypeNameWithoutGenericSuffix(name, output); + } static void AppendCppTypeName( Type type, @@ -13496,8 +13654,14 @@ static void AppendCppTypeName( string name, StringBuilder output) { - AppendNamespace(namespaceName, "::", output); - output.Append("::"); + AppendNamespace( + namespaceName, + "::", + output); + if (!string.IsNullOrEmpty(namespaceName)) + { + output.Append("::"); + } AppendTypeNameWithoutGenericSuffix( name, output); @@ -13578,11 +13742,11 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CsharpInitCall); RemoveTrailingChars(builders.CsharpBaseTypes); RemoveTrailingChars(builders.CsharpFunctions); - RemoveTrailingChars(builders.CsharpMonoBehaviours); RemoveTrailingChars(builders.CsharpDelegates); RemoveTrailingChars(builders.CsharpImports); RemoveTrailingChars(builders.CsharpGetDelegateCalls); - RemoveTrailingChars(builders.CsharpGetDelegateCalls); + RemoveTrailingChars(builders.CsharpDestroyFunctionEnumerators); + RemoveTrailingChars(builders.CsharpDestroyQueueCases); RemoveTrailingChars(builders.CppFunctionPointers); RemoveTrailingChars(builders.CppTypeDeclarations); RemoveTrailingChars(builders.CppTemplateDeclarations); @@ -13592,9 +13756,10 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CppInitParams); RemoveTrailingChars(builders.CppInitBody); RemoveTrailingChars(builders.CppInitBodyFirstBoot); - RemoveTrailingChars(builders.CppMonoBehaviourMessages); RemoveTrailingChars(builders.CppGlobalStateAndFunctions); RemoveTrailingChars(builders.CppUnboxingMethodDeclarations); + RemoveTrailingChars(builders.CppStringDefaultParams); + RemoveTrailingChars(builders.CppMacros); } // Remove trailing chars (e.g. commas) for last elements @@ -13653,7 +13818,7 @@ static void InjectBuilders( csharpContents = InjectIntoString( csharpContents, "/*BEGIN BASE TYPES*/\n", - "\n\t\t/*END BASE TYPES*/", + "\n/*END BASE TYPES*/", builders.CsharpBaseTypes.ToString()); csharpContents = InjectIntoString( csharpContents, @@ -13662,24 +13827,29 @@ static void InjectBuilders( builders.CsharpFunctions.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN MONOBEHAVIOURS*/\n", - "\n/*END MONOBEHAVIOURS*/", - builders.CsharpMonoBehaviours.ToString()); - csharpContents = InjectIntoString( - csharpContents, - "/*BEGIN MONOBEHAVIOUR DELEGATES*/\n", - "\n\t\t/*END MONOBEHAVIOUR DELEGATES*/", + "/*BEGIN DELEGATES*/\n", + "\n\t\t/*END DELEGATES*/", builders.CsharpDelegates.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN MONOBEHAVIOUR IMPORTS*/\n", - "\n\t\t/*END MONOBEHAVIOUR IMPORTS*/", + "/*BEGIN IMPORTS*/\n", + "\n\t\t/*END IMPORTS*/", builders.CsharpImports.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN MONOBEHAVIOUR GETDELEGATE CALLS*/\n", - "\n\t\t\t/*END MONOBEHAVIOUR GETDELEGATE CALLS*/", + "/*BEGIN GETDELEGATE CALLS*/\n", + "\n\t\t\t/*END GETDELEGATE CALLS*/", builders.CsharpGetDelegateCalls.ToString()); + csharpContents = InjectIntoString( + csharpContents, + "/*BEGIN DESTROY FUNCTION ENUMERATORS*/\n", + "\n\t\t\t/*END DESTROY FUNCTION ENUMERATORS*/", + builders.CsharpDestroyFunctionEnumerators.ToString()); + csharpContents = InjectIntoString( + csharpContents, + "/*BEGIN DESTROY QUEUE CASES*/\n", + "\n\t\t\t\t\t\t/*END DESTROY QUEUE CASES*/", + builders.CsharpDestroyQueueCases.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, "/*BEGIN FUNCTION POINTERS*/\n", @@ -13725,11 +13895,6 @@ static void InjectBuilders( "/*BEGIN INIT BODY FIRST BOOT*/\n", "\n\t\t/*END INIT BODY FIRST BOOT*/", builders.CppInitBodyFirstBoot.ToString()); - cppSourceContents = InjectIntoString( - cppSourceContents, - "/*BEGIN MONOBEHAVIOUR MESSAGES*/\n", - "\n/*END MONOBEHAVIOUR MESSAGES*/", - builders.CppMonoBehaviourMessages.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, "/*BEGIN GLOBAL STATE AND FUNCTIONS*/\n", @@ -13745,6 +13910,11 @@ static void InjectBuilders( "/*BEGIN STRING DEFAULT PARAMETERS*/\n", "\n\t/*END STRING DEFAULT PARAMETERS*/", builders.CppStringDefaultParams.ToString()); + cppHeaderContents = InjectIntoString( + cppHeaderContents, + "/*BEGIN MACROS*/\n", + "\n/*END MACROS*/", + builders.CppMacros.ToString()); File.WriteAllText(CsharpPath, csharpContents); File.WriteAllText(CppHeaderPath, cppHeaderContents); diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index aaf5ac5..f04e9f5 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -1,6 +1,5 @@ { "Assemblies": [ - "DOTNET_DLLS/System.Xml.dll" ], "Types": [ { @@ -10,24 +9,7 @@ "Name": " System.IConvertible" }, { - "Name": " System.IComparable", - "Methods": [ - { - "Name": "CompareTo", - "ParamTypes": [ - "System.Object" - ] - } - ] - }, - { - "Name": " System.IDisposable", - "Methods": [ - { - "Name": "Dispose", - "ParamTypes": [] - } - ] + "Name": " System.IComparable" }, { "Name": "UnityEngine.Vector3", @@ -41,32 +23,12 @@ } ], "Methods": [ - { - "Name": "Set", - "ParamTypes": [ - "System.Single", - "System.Single", - "System.Single" - ] - }, { "Name": "x+y", "ParamTypes": [ "UnityEngine.Vector3", "UnityEngine.Vector3" ] - }, - { - "Name": "-x", - "ParamTypes": [ - "UnityEngine.Vector3" - ] - } - ], - "Properties": [ - { - "Name": "magnitude", - "Get": {} } ] }, @@ -78,21 +40,6 @@ "Get": {}, "Set": {} } - ], - "Methods": [ - { - "Name": "x==y", - "ParamTypes": [ - "UnityEngine.Object", - "UnityEngine.Object" - ] - }, - { - "Name": "implicit", - "ParamTypes": [ - "UnityEngine.Object" - ] - } ] }, { @@ -106,14 +53,6 @@ }, { "Name": "UnityEngine.Transform", - "Methods": [ - { - "Name": "SetParent", - "ParamTypes": [ - "UnityEngine.Transform" - ] - } - ], "Properties": [ { "Name": "position", @@ -126,51 +65,6 @@ } ] }, - { - "Name": "UnityEngine.Color" - }, - { - "Name": "UnityEngine.GradientColorKey" - }, - { - "Name": "UnityEngine.Resolution", - "Constructors": [ - { - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "width", - "Get": {}, - "Set": {} - }, - { - "Name": "height", - "Get": {}, - "Set": {} - }, - { - "Name": "refreshRate", - "Get": {}, - "Set": {} - } - ] - }, - { - "Name": "UnityEngine.RaycastHit", - "MaxSimultaneous": 1000, - "Properties": [ - { - "Name": "point", - "Get": {} - }, - { - "Name": "transform", - "Get": {} - } - ] - }, { "Name": "System.Collections.IEnumerator", "Methods": [ @@ -193,109 +87,9 @@ { "Name": "System.Runtime.InteropServices._Exception" }, - { - "Name": "System.IAppDomainSetup" - }, - { - "Name": "System.Collections.IComparer" - }, - { - "Name": "System.Collections.IEqualityComparer" - }, - { - "Name": "System.Collections.Generic.IEqualityComparer`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - } - ] - }, - { - "Name": "UnityEngine.Playables.PlayableGraph" - }, - { - "Name": "UnityEngine.Playables.IPlayable" - }, - { - "Name": "System.IEquatable`1", - "GenericParams": [ - { - "Types": [ - "UnityEngine.Animations.AnimationMixerPlayable" - ] - } - ] - }, - { - "Name": "UnityEngine.Animations.AnimationMixerPlayable", - "Methods": [ - { - "Name": "Create", - "ParamTypes": [ - "UnityEngine.Playables.PlayableGraph", - "System.Int32", - "System.Boolean" - ] - } - ] - }, - { - "Name": " System.Runtime.CompilerServices.IStrongBox" - }, - { - "Name": "UnityEngine.Experimental.UIElements.IEventHandler" - }, - { - "Name": "UnityEngine.Experimental.UIElements.CallbackEventHandler" - }, - { - "Name": "UnityEngine.Experimental.UIElements.Focusable" - }, - { - "Name": "UnityEngine.Experimental.UIElements.IStyle" - }, - { - "Name": "System.Diagnostics.Stopwatch", - "Constructors": [ - { - "ParamTypes": [] - } - ], - "Methods": [ - { - "Name": "Start", - "ParamTypes": [] - }, - { - "Name": "Reset", - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "ElapsedMilliseconds", - "Get": {} - } - ] - }, { "Name": "UnityEngine.GameObject", "Constructors": [ - { - "ParamTypes": [] - }, - { - "ParamTypes": [ - "System.String" - ] - } ], "Methods": [ { @@ -304,17 +98,9 @@ "GenericParams": [ { "Types": [ - "MyGame.MonoBehaviours.TestScript" - ] - }, - { - "Types": [ - "MyGame.MonoBehaviours.AnotherScript" + "MyGame.BaseBallScript" ] } - ], - "Exceptions": [ - "System.NullReferenceException" ] }, { @@ -323,16 +109,6 @@ "UnityEngine.PrimitiveType" ] } - ], - "Properties": [ - { - "Name": "transform", - "Get": { - "Exceptions": [ - "System.NullReferenceException" - ] - } - } ] }, { @@ -346,36 +122,6 @@ } ] }, - { - "Name": "UnityEngine.Assertions.Assert", - "Fields": [ - "raiseExceptions" - ], - "Methods": [ - { - "Name": "AreEqual", - "ParamTypes": [ - "T", - "T" - ], - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "UnityEngine.GameObject" - ] - } - ] - } - ] - }, - { - "Name": "UnityEngine.Collision" - }, { "Name": "UnityEngine.Behaviour" }, @@ -390,800 +136,46 @@ ] }, { - "Name": "UnityEngine.AudioSettings", - "Methods": [ - { - "Name": "GetDSPBufferSize", - "ParamTypes": [ - "System.Int32", - "System.Int32" - ] - } - ] - }, - { - "Name": "UnityEngine.Networking.NetworkTransport", - "Methods": [ + "Name": "System.Exception", + "Constructors": [ { - "Name": "GetBroadcastConnectionInfo", "ParamTypes": [ - "System.Int32", - "System.String", - "System.Int32", - "System.Byte" + "System.String" ] - }, - { - "Name": "Init", - "ParamTypes": [] } ] }, { - "Name": "UnityEngine.Quaternion" - }, - { - "Name": "UnityEngine.Matrix4x4", - "Properties": [ - { - "Name": "Item", - "Get": { - "ParamTypes": [ - "System.Int32", - "System.Int32" - ] - }, - "Set": { - "ParamTypes": [ - "System.Int32", - "System.Int32", - "System.Single" - ] - } - } - ] + "Name": "System.SystemException" }, { - "Name": "UnityEngine.QueryTriggerInteraction" + "Name": "System.NullReferenceException" }, { - "Name": "System.Collections.Generic.KeyValuePair`2", - "GenericParams": [ - { - "Types": [ - "System.String", - "System.Double" - ], - "MaxSimultaneous": 20 - } - ], - "Constructors": [ - { - "ParamTypes": [ - "TKey", - "TValue" - ] - } - ], - "Properties": [ - { - "Name": "Key", - "Get": {}, - "Set": {} - }, - { - "Name": "Value", - "Get": {}, - "Set": {} - } - ] + "Name": "UnityEngine.PrimitiveType" }, { - "Name": "System.Collections.Generic.LinkedListNode`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - } - ], - "Constructors": [ - { - "ParamTypes": [ - "T" - ] - } - ], + "Name": "UnityEngine.Time", "Properties": [ { - "Name": "Value", + "Name": "deltaTime", "Get": {}, "Set": {} } ] }, { - "Name": " System.Runtime.CompilerServices.StrongBox`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - } - ], - "Fields": [ - "Value" - ], - "Constructors": [ + "Name": "MyGame.AbstractBaseBallScript", + "BaseTypes": [ { - "ParamTypes": [ - "T" - ] + "BaseName": "MyGame.BaseBallScript", + "DerivedName": "MyGame.BallScript" } ] - }, - { - "Name": "System.Exception", - "Constructors": [ - { - "ParamTypes": [ - "System.String" - ] - } - ] - }, - { - "Name": "System.SystemException" - }, - { - "Name": "System.NullReferenceException" - }, - { - "Name": "UnityEngine.Screen", - "Properties": [ - { - "Name": "resolutions", - "Get": {} - } - ] - }, - { - "Name": "UnityEngine.Ray", - "MaxSimultaneous": 10, - "Constructors": [ - { - "ParamTypes": [ - "UnityEngine.Vector3", - "UnityEngine.Vector3" - ] - } - ] - }, - { - "Name": "UnityEngine.Physics", - "Methods": [ - { - "Name": "RaycastNonAlloc", - "ParamTypes": [ - "UnityEngine.Ray", - "UnityEngine.RaycastHit[]" - ] - }, - { - "Name": "RaycastAll", - "ParamTypes": [ - "UnityEngine.Ray" - ] - } - ] - }, - { - "Name": "UnityEngine.Gradient", - "Constructors": [ - { - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "colorKeys", - "Get": {}, - "Set": {} - } - ] - }, - { - "Name": "System.AppDomainSetup", - "Constructors": [ - { - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "AppDomainInitializer", - "Get": {}, - "Set": {} - } - ] - }, - { - "Name": "UnityEngine.Application", - "Events": [ - { - "Name": "onBeforeRender" - } - ] - }, - { - "Name": "UnityEngine.SceneManagement.SceneManager", - "Events": [ - { - "Name": "sceneLoaded" - } - ] - }, - { - "Name": "UnityEngine.SceneManagement.Scene" - }, - { - "Name": "UnityEngine.SceneManagement.LoadSceneMode" - }, - { - "Name": "System.EventArgs" - }, - { - "Name": "System.ComponentModel.Design.ComponentEventArgs" - }, - { - "Name": "System.ComponentModel.Design.ComponentChangingEventArgs" - }, - { - "Name": "System.ComponentModel.Design.ComponentChangedEventArgs" - }, - { - "Name": "System.ComponentModel.Design.ComponentRenameEventArgs" - }, - { - "Name": "System.ComponentModel.MemberDescriptor" - }, - { - "Name": "UnityEngine.PrimitiveType" - }, - { - "Name": "UnityEngine.Time", - "Properties": [ - { - "Name": "deltaTime", - "Get": {}, - "Set": {} - } - ] - }, - { - "Name": "System.IO.FileMode" - }, - { - "Name": "System.MarshalByRefObject" - }, - { - "Name": "System.IO.Stream" - }, - { - "Name": "System.Collections.Generic.IComparer`1", - "GenericParams": [ - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.String" - ] - } - ], - "BaseTypes": [ - { - "GenericTypes": [ - "System.Int32" - ] - }, - { - "GenericTypes": [ - "System.String" - ] - } - ] - }, - { - "Name": "System.StringComparer", - "BaseTypes": [ - {} - ] - }, - { - "Name": "System.Collections.Queue", - "Properties": [ - { - "Name": "Count", - "Get": {}, - "Set": {} - } - ], - "BaseTypes": [ - { - "OverrideProperties": [ - { - "Name": "Count", - "Get": {}, - "Set": {} - } - ] - } - ] - }, - { - "Name": "System.ComponentModel.Design.IComponentChangeService", - "BaseTypes": [ - {} - ] - }, - { - "Name": "System.IO.FileStream", - "Methods": [ - { - "Name": "WriteByte", - "ParamTypes": [ - "System.Byte" - ] - } - ], - "Constructors": [ - { - "ParamTypes": [ - "System.String", - "System.IO.FileMode" - ] - } - ], - "BaseTypes": [ - { - "OverrideMethods": [ - { - "Name": "WriteByte", - "ParamTypes": [ - "System.Byte" - ] - } - ], - "Constructors": [ - { - "ParamTypes": [ - "System.String", - "System.IO.FileMode" - ] - } - ] - } - ] - }, - { - "Name": "UnityEngine.Playables.PlayableHandle" - }, - { - "Name": "UnityEngine.Experimental.UIElements.ITransform" - }, - { - "Name": "UnityEngine.Experimental.UIElements.IUIElementDataWatch" - }, - { - "Name": "UnityEngine.Experimental.UIElements.IVisualElementScheduler" - }, - { - "Name": "System.Collections.Generic.IEnumerator`1", - "GenericParams": [ - { - "Types": [ - "UnityEngine.Experimental.UIElements.VisualElement" - ] - } - ], - "Properties": [ - { - "Name": "Current", - "Get": {} - } - ] - }, - { - "Name": "System.Collections.Generic.IEnumerable`1", - "GenericParams": [ - { - "Types": [ - "UnityEngine.Experimental.UIElements.VisualElement" - ] - } - ], - "Methods": [ - { - "Name": "GetEnumerator", - "ParamTypes": [] - } - ] - }, - { - "Name": "UnityEngine.Experimental.UIElements.VisualElement" - }, - { - "Name": "UnityEngine.Experimental.UIElements.UQueryExtensions", - "Methods": [ - { - "Name": "Q", - "ParamTypes": [ - "UnityEngine.Experimental.UIElements.VisualElement", - "System.String", - "System.String[]" - ] - }, - { - "Name": "Q", - "ParamTypes": [ - "UnityEngine.Experimental.UIElements.VisualElement", - "System.String", - "System.String" - ] - } - ] - }, - { - "Name": "UnityEngine.XR.WSA.Input.InteractionSourcePositionAccuracy" - }, - { - "Name": "UnityEngine.XR.WSA.Input.InteractionSourceNode" - }, - { - "Name": "UnityEngine.XR.WSA.Input.InteractionSourcePose", - "Methods": [ - { - "Name": "TryGetRotation", - "ParamTypes": [ - "UnityEngine.Quaternion", - "UnityEngine.XR.WSA.Input.InteractionSourceNode" - ] - } - ] - }, - { - "Name": "System.Collections.Generic.IEnumerator`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ], - "Properties": [ - { - "Name": "Current", - "Get": {} - } - ] - }, - { - "Name": "System.Collections.Generic.IEnumerable`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ], - "Methods": [ - { - "Name": "GetEnumerator", - "ParamTypes": [] - } - ] - }, - { - "Name": "System.Collections.Generic.ICollection`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ] - }, - { - "Name": "System.Collections.Generic.IList`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.Single" - ] - }, - { - "Types": [ - "UnityEngine.RaycastHit" - ] - }, - { - "Types": [ - "UnityEngine.GradientColorKey" - ] - }, - { - "Types": [ - "UnityEngine.Resolution" - ] - } - ] - }, - { - "Name": "System.Collections.Generic.List`1", - "GenericParams": [ - { - "Types": [ - "System.String" - ] - }, - { - "Types": [ - "System.Int32" - ] - } - ], - "Constructors": [ - { - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "Item", - "Get": {}, - "Set": {} - } - ], - "Methods": [ - { - "Name": "Add", - "ParamTypes": [ - "T" - ] - }, - { - "Name": "Sort", - "ParamTypes": [ - "System.Collections.Generic.IComparer`1" - ] - } - ] - }, - { - "Name": "System.Collections.ObjectModel.Collection`1", - "GenericParams": [ - { - "Types": [ - "System.Int32" - ] - } - ] - }, - { - "Name": "System.Collections.ObjectModel.KeyedCollection`2", - "GenericParams": [ - { - "Types": [ - "System.String", - "System.Int32" - ] - } - ] - } - ], - "MonoBehaviours": [ - { - "Name": "MyGame.MonoBehaviours.TestScript", - "Messages": [ - "Awake", - "OnAnimatorIK", - "OnCollisionEnter", - "Update" - ] - }, - { - "Name": "MyGame.MonoBehaviours.AnotherScript", - "Messages": [ - "Awake", - "Update" - ] } ], "Arrays": [ - { - "Type": "System.Int32" - }, - { - "Type": "System.Single", - "Ranks": [ 1, 2, 3 ] - }, - { - "Type": "System.String" - }, - { - "Type": "UnityEngine.Resolution" - }, - { - "Type": "UnityEngine.RaycastHit" - }, - { - "Type": "UnityEngine.GradientColorKey" - } ], "Delegates": [ - { - "Type": "System.Action" - }, - { - "Type": "System.Action`1", - "GenericParams": [ - { - "Types": [ - "System.Single" - ] - } - ] - }, - { - "Type": "System.Action`2", - "GenericParams": [ - { - "Types": [ - "System.Single", - "System.Single" - ], - "MaxSimultaneous": 100 - } - ] - }, - { - "Type": "System.Func`3", - "GenericParams": [ - { - "Types": [ - "System.Int32", - "System.Single", - "System.Double" - ], - "MaxSimultaneous": 50 - }, - { - "Types": [ - "System.Int16", - "System.Int32", - "System.String" - ], - "MaxSimultaneous": 25 - } - ] - }, - { - "Type": "System.AppDomainInitializer" - }, - { - "Type": "UnityEngine.Events.UnityAction" - }, - { - "Type": "UnityEngine.Events.UnityAction`2", - "GenericParams": [ - { - "Types": [ - "UnityEngine.SceneManagement.Scene", - "UnityEngine.SceneManagement.LoadSceneMode" - ], - "MaxSimultaneous": 10 - } - ] - }, - { - "Type": "System.ComponentModel.Design.ComponentEventHandler" - }, - { - "Type": "System.ComponentModel.Design.ComponentChangingEventHandler" - }, - { - "Type": "System.ComponentModel.Design.ComponentChangedEventHandler" - }, - { - "Type": "System.ComponentModel.Design.ComponentRenameEventHandler" - } ] } \ No newline at end of file diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index d38131c..a8baeff 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -9,6 +9,7 @@ /// #include "Bindings.h" +#include "Game.h" using namespace System; using namespace UnityEngine; @@ -17,13 +18,46 @@ namespace { struct GameState { - int32_t NumCreated; - float Dir; + float BallDir; }; GameState* gameState; } +namespace MyGame +{ + void BallScript::Update() + { + Transform transform = GetTransform(); + Vector3 pos = transform.GetPosition(); + const float speed = 1.2f; + const float min = -1.5f; + const float max = 1.5f; + float distance = Time::GetDeltaTime() * speed * gameState->BallDir; + Vector3 offset(distance, 0, 0); + Vector3 newPos = pos + offset; + if (newPos.x > max) + { + gameState->BallDir *= -1.0f; + newPos.x = max - (newPos.x - max); + if (newPos.x < min) + { + newPos.x = min; + } + } + else if (newPos.x < min) + { + gameState->BallDir *= -1.0f; + newPos.x = min + (min - newPos.x); + if (newPos.x > max) + { + newPos.x = max; + } + } + transform.SetPosition(newPos); + } +} + // Called when the plugin is initialized // This is mostly full of test code. Feel free to remove it all. void PluginMain( @@ -37,88 +71,15 @@ void PluginMain( String message("Game booted up"); Debug::Log(message); - gameState->NumCreated = 0; - gameState->Dir = 1.0f; + // The ball initially goes right + gameState->BallDir = 1.0f; - String name("GameObject with a TestScript"); - GameObject go(name); - go.AddComponent(); - } -} - -void MyGame::MonoBehaviours::TestScript::Awake() -{ - String message("C++ TestScript Awake"); - Debug::Log(message); -} - -void MyGame::MonoBehaviours::TestScript::OnAnimatorIK(Int32 param0) -{ - String message("C++ TestScript OnAnimatorIK"); - Debug::Log(message); -} - -void MyGame::MonoBehaviours::TestScript::OnCollisionEnter(UnityEngine::Collision& param0) -{ - String message("C++ TestScript OnCollisionEnter"); - Debug::Log(message); -} - -void MyGame::MonoBehaviours::TestScript::Update() -{ - if (gameState->NumCreated < 10) - { - GameObject go; - Transform transform = go.GetTransform(); - float comp = (float)gameState->NumCreated; - Vector3 position(comp, comp*10.0f, comp*100.0f); - transform.SetPosition(position); - gameState->NumCreated++; - if (gameState->NumCreated == 10) - { - String message("Done spawning game objects"); - Debug::Log(message); - - GameObject go = GameObject::CreatePrimitive(PrimitiveType::Sphere); - String name("GameObject with an AnotherScript"); - go.SetName(name); - go.AddComponent(); - } - } -} - -void MyGame::MonoBehaviours::AnotherScript::Awake() -{ - String message("C++ AnotherScript Awake"); - Debug::Log(message); -} - -void MyGame::MonoBehaviours::AnotherScript::Update() -{ - Transform transform = GetTransform(); - Vector3 pos = transform.GetPosition(); - const float speed = 0.0012f; - const float min = -1.5f; - const float max = 1.5f; - Vector3 offset(Time::GetDeltaTime() * speed * gameState->Dir, 0, 0); - Vector3 newPos = pos + offset; - if (newPos.x > max) - { - gameState->Dir *= -1.0f; - newPos.x = max - (newPos.x - max); - if (newPos.x < min) - { - newPos.x = min; - } - } - else if (newPos.x < min) - { - gameState->Dir *= -1.0f; - newPos.x = min + (min - newPos.x); - if (newPos.x > max) - { - newPos.x = max; - } + // Create the ball game object out of a sphere primitive + GameObject go = GameObject::CreatePrimitive(PrimitiveType::Sphere); + String name("GameObject with a BallScript"); + go.SetName(name); + + // Attach the ball script to make it bounce back and forth + go.AddComponent(); } - transform.SetPosition(newPos); } diff --git a/Unity/CppSource/Game/Game.h b/Unity/CppSource/Game/Game.h new file mode 100644 index 0000000..a8e6e5b --- /dev/null +++ b/Unity/CppSource/Game/Game.h @@ -0,0 +1,22 @@ +/// +/// Declaration of the game types the bindings layer needs to know about +/// +/// +/// Jackson Dunstan, 2018, http://JacksonDunstan.com +/// +/// +/// MIT +/// + +#pragma once + +#include "Bindings.h" + +namespace MyGame +{ + struct BallScript : MyGame::BaseBallScript + { + MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR + void Update() override; + }; +} diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 795eec0..e9f1568 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -12,6 +12,9 @@ // Type definitions #include "Bindings.h" +// Game type definitions +#include "Game.h" + // For assert() #include @@ -24,6 +27,12 @@ // For memset(), etc. #include +// Support placement new +void* operator new(size_t, void* p) +{ + return p; +} + // Macro to put before functions that need to be exposed to C# #ifdef _WIN32 #define DLLEXPORT extern "C" __declspec(dllexport) @@ -44,171 +53,27 @@ namespace Plugin int32_t (*EnumerableGetEnumerator)(int32_t handle); /*BEGIN FUNCTION POINTERS*/ - System::Int32 (*SystemIComparableMethodCompareToSystemObject)(int32_t thisHandle, int32_t objHandle); - void (*SystemIDisposableMethodDispose)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); - System::Single (*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); int32_t (*BoxVector3)(UnityEngine::Vector3& val); UnityEngine::Vector3 (*UnboxVector3)(int32_t valHandle); int32_t (*UnityEngineObjectPropertyGetName)(int32_t thisHandle); void (*UnityEngineObjectPropertySetName)(int32_t thisHandle, int32_t valueHandle); - int32_t (*UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle); - int32_t (*UnityEngineObjectMethodop_ImplicitUnityEngineObject)(int32_t existsHandle); int32_t (*UnityEngineComponentPropertyGetTransform)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineTransformPropertyGetPosition)(int32_t thisHandle); void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value); - void (*UnityEngineTransformMethodSetParentUnityEngineTransform)(int32_t thisHandle, int32_t parentHandle); - int32_t (*BoxColor)(UnityEngine::Color& val); - UnityEngine::Color (*UnboxColor)(int32_t valHandle); - int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); - UnityEngine::GradientColorKey (*UnboxGradientColorKey)(int32_t valHandle); - void (*ReleaseUnityEngineResolution)(int32_t handle); - int32_t (*UnityEngineResolutionConstructor)(); - System::Int32 (*UnityEngineResolutionPropertyGetWidth)(int32_t thisHandle); - void (*UnityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value); - System::Int32 (*UnityEngineResolutionPropertyGetHeight)(int32_t thisHandle); - void (*UnityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value); - System::Int32 (*UnityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle); - void (*UnityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value); - int32_t (*BoxResolution)(int32_t valHandle); - int32_t (*UnboxResolution)(int32_t valHandle); - 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); - int32_t (*BoxRaycastHit)(int32_t valHandle); - int32_t (*UnboxRaycastHit)(int32_t valHandle); int32_t (*SystemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle); int32_t (*SystemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle); - void (*ReleaseUnityEnginePlayablesPlayableGraph)(int32_t handle); - int32_t (*BoxPlayableGraph)(int32_t valHandle); - int32_t (*UnboxPlayableGraph)(int32_t valHandle); - void (*ReleaseUnityEngineAnimationsAnimationMixerPlayable)(int32_t handle); - int32_t (*UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)(int32_t graphHandle, int32_t inputCount, uint32_t normalizeWeights); - int32_t (*BoxAnimationMixerPlayable)(int32_t valHandle); - int32_t (*UnboxAnimationMixerPlayable)(int32_t valHandle); - int32_t (*SystemDiagnosticsStopwatchConstructor)(); - System::Int64 (*SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle); - void (*SystemDiagnosticsStopwatchMethodStart)(int32_t thisHandle); - void (*SystemDiagnosticsStopwatchMethodReset)(int32_t thisHandle); - int32_t (*UnityEngineGameObjectConstructor)(); - int32_t (*UnityEngineGameObjectConstructorSystemString)(int32_t nameHandle); - int32_t (*UnityEngineGameObjectPropertyGetTransform)(int32_t thisHandle); - int32_t (*UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle); - int32_t (*UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript)(int32_t thisHandle); + int32_t (*UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript)(int32_t thisHandle); int32_t (*UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type); void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle); - int32_t (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); - void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(uint32_t value); - void (*UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle); - void (*UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle); int32_t (*UnityEngineMonoBehaviourPropertyGetTransform)(int32_t thisHandle); - 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)(); - int32_t (*BoxQuaternion)(UnityEngine::Quaternion& val); - UnityEngine::Quaternion (*UnboxQuaternion)(int32_t valHandle); - System::Single (*UnityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column); - void (*UnityEngineMatrix4x4PropertySetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column, float value); - int32_t (*BoxMatrix4x4)(UnityEngine::Matrix4x4& val); - UnityEngine::Matrix4x4 (*UnboxMatrix4x4)(int32_t valHandle); - int32_t (*BoxQueryTriggerInteraction)(UnityEngine::QueryTriggerInteraction val); - UnityEngine::QueryTriggerInteraction (*UnboxQueryTriggerInteraction)(int32_t valHandle); - void (*ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)(int32_t handle); - int32_t (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble)(int32_t keyHandle, double value); - int32_t (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey)(int32_t thisHandle); - System::Double (*SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)(int32_t thisHandle); - int32_t (*BoxKeyValuePairSystemString_SystemDouble)(int32_t valHandle); - int32_t (*UnboxKeyValuePairSystemString_SystemDouble)(int32_t valHandle); - 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 (*UnityEngineScreenPropertyGetResolutions)(); - void (*ReleaseUnityEngineRay)(int32_t handle); - int32_t (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); - int32_t (*BoxRay)(int32_t valHandle); - int32_t (*UnboxRay)(int32_t valHandle); - System::Int32 (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle); - int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle); - 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); - void (*UnityEngineApplicationAddEventOnBeforeRender)(int32_t delHandle); - void (*UnityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle); - void (*UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle); - void (*UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle); - void (*ReleaseUnityEngineSceneManagementScene)(int32_t handle); - int32_t (*BoxScene)(int32_t valHandle); - int32_t (*UnboxScene)(int32_t valHandle); - int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); - UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); int32_t (*BoxPrimitiveType)(UnityEngine::PrimitiveType val); UnityEngine::PrimitiveType (*UnboxPrimitiveType)(int32_t valHandle); System::Single (*UnityEngineTimePropertyGetDeltaTime)(); - int32_t (*BoxFileMode)(System::IO::FileMode val); - System::IO::FileMode (*UnboxFileMode)(int32_t valHandle); - void (*ReleaseSystemCollectionsGenericBaseIComparerSystemInt32)(int32_t handle); - void (*SystemCollectionsGenericBaseIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsGenericBaseIComparerSystemString)(int32_t handle); - void (*SystemCollectionsGenericBaseIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemBaseStringComparer)(int32_t handle); - void (*SystemBaseStringComparerConstructor)(int32_t cppHandle, int32_t* handle); - System::Int32 (*SystemCollectionsQueuePropertyGetCount)(int32_t thisHandle); - void (*ReleaseSystemCollectionsBaseQueue)(int32_t handle); - void (*SystemCollectionsBaseQueueConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemComponentModelDesignBaseIComponentChangeService)(int32_t handle); - void (*SystemComponentModelDesignBaseIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle); - int32_t (*SystemIOFileStreamConstructorSystemString_SystemIOFileMode)(int32_t pathHandle, System::IO::FileMode mode); - void (*SystemIOFileStreamMethodWriteByteSystemByte)(int32_t thisHandle, uint8_t value); - void (*ReleaseSystemIOBaseFileStream)(int32_t handle); - void (*SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode)(int32_t cppHandle, int32_t* handle, int32_t pathHandle, System::IO::FileMode mode); - void (*ReleaseUnityEnginePlayablesPlayableHandle)(int32_t handle); - int32_t (*BoxPlayableHandle)(int32_t valHandle); - int32_t (*UnboxPlayableHandle)(int32_t valHandle); - int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator)(int32_t thisHandle); - int32_t (*UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)(int32_t eHandle, int32_t nameHandle, int32_t classesHandle); - int32_t (*UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)(int32_t eHandle, int32_t nameHandle, int32_t classNameHandle); - int32_t (*BoxInteractionSourcePositionAccuracy)(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val); - UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy (*UnboxInteractionSourcePositionAccuracy)(int32_t valHandle); - int32_t (*BoxInteractionSourceNode)(UnityEngine::XR::WSA::Input::InteractionSourceNode val); - UnityEngine::XR::WSA::Input::InteractionSourceNode (*UnboxInteractionSourceNode)(int32_t valHandle); - void (*ReleaseUnityEngineXRWSAInputInteractionSourcePose)(int32_t handle); - int32_t (*UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)(int32_t thisHandle, UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node); - int32_t (*BoxInteractionSourcePose)(int32_t valHandle); - int32_t (*UnboxInteractionSourcePose)(int32_t valHandle); - int32_t (*SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)(int32_t thisHandle); - System::Int32 (*SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)(int32_t thisHandle); - System::Single (*SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)(int32_t thisHandle); - UnityEngine::GradientColorKey (*SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)(int32_t thisHandle); - int32_t (*SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)(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); - void (*SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle); - int32_t (*SystemCollectionsGenericListSystemInt32Constructor)(); - System::Int32 (*SystemCollectionsGenericListSystemInt32PropertyGetItem)(int32_t thisHandle, int32_t index); - void (*SystemCollectionsGenericListSystemInt32PropertySetItem)(int32_t thisHandle, int32_t index, int32_t value); - void (*SystemCollectionsGenericListSystemInt32MethodAddSystemInt32)(int32_t thisHandle, int32_t item); - void (*SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle); + void (*ReleaseBaseBallScript)(int32_t handle); + void (*BaseBallScriptConstructor)(int32_t cppHandle, int32_t* handle); int32_t (*BoxBoolean)(uint32_t val); int32_t (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -233,92 +98,6 @@ namespace Plugin System::Single (*UnboxSingle)(int32_t valHandle); int32_t (*BoxDouble)(double val); System::Double (*UnboxDouble)(int32_t valHandle); - int32_t (*SystemSystemInt32Array1Constructor1)(int32_t length0); - System::Int32 (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0); - int32_t (*SystemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item); - int32_t (*SystemSystemSingleArray1Constructor1)(int32_t length0); - System::Single (*SystemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0); - int32_t (*SystemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item); - int32_t (*SystemSystemSingleArray2Constructor2)(int32_t length0, int32_t length1); - int32_t (*SystemSystemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension); - System::Single (*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 (*SystemSystemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2); - int32_t (*SystemSystemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension); - System::Single (*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 (*SystemSystemStringArray1Constructor1)(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 (*UnityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0); - int32_t (*UnityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0); - int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle); - int32_t (*UnityEngineUnityEngineRaycastHitArray1Constructor1)(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 (*UnityEngineUnityEngineGradientColorKeyArray1Constructor1)(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 (*SystemActionAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemActionRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemActionInvoke)(int32_t thisHandle); - void (*ReleaseSystemActionSystemSingle)(int32_t handle, int32_t classHandle); - void (*SystemActionSystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemActionSystemSingleAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemActionSystemSingleRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemActionSystemSingleInvoke)(int32_t thisHandle, float obj); - void (*ReleaseSystemActionSystemSingle_SystemSingle)(int32_t handle, int32_t classHandle); - void (*SystemActionSystemSingle_SystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemActionSystemSingle_SystemSingleAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemActionSystemSingle_SystemSingleRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemActionSystemSingle_SystemSingleInvoke)(int32_t thisHandle, float arg1, float arg2); - void (*ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble)(int32_t handle, int32_t classHandle); - void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle); - System::Double (*SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2); - void (*ReleaseSystemFuncSystemInt16_SystemInt32_SystemString)(int32_t handle, int32_t classHandle); - void (*SystemFuncSystemInt16_SystemInt32_SystemStringConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemFuncSystemInt16_SystemInt32_SystemStringRemove)(int32_t thisHandle, int32_t delHandle); - int32_t (*SystemFuncSystemInt16_SystemInt32_SystemStringInvoke)(int32_t thisHandle, int16_t arg1, int32_t arg2); - void (*ReleaseSystemAppDomainInitializer)(int32_t handle, int32_t classHandle); - void (*SystemAppDomainInitializerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemAppDomainInitializerAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemAppDomainInitializerRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle); - void (*ReleaseUnityEngineEventsUnityAction)(int32_t handle, int32_t classHandle); - void (*UnityEngineEventsUnityActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*UnityEngineEventsUnityActionAdd)(int32_t thisHandle, int32_t delHandle); - void (*UnityEngineEventsUnityActionRemove)(int32_t thisHandle, int32_t delHandle); - void (*UnityEngineEventsUnityActionInvoke)(int32_t thisHandle); - void (*ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)(int32_t handle, int32_t classHandle); - void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle); - void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle); - void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, int32_t arg0Handle, UnityEngine::SceneManagement::LoadSceneMode arg1); - void (*ReleaseSystemComponentModelDesignComponentEventHandler)(int32_t handle, int32_t classHandle); - void (*SystemComponentModelDesignComponentEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemComponentModelDesignComponentEventHandlerAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentEventHandlerRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle); - void (*ReleaseSystemComponentModelDesignComponentChangingEventHandler)(int32_t handle, int32_t classHandle); - void (*SystemComponentModelDesignComponentChangingEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemComponentModelDesignComponentChangingEventHandlerAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentChangingEventHandlerRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentChangingEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle); - void (*ReleaseSystemComponentModelDesignComponentChangedEventHandler)(int32_t handle, int32_t classHandle); - void (*SystemComponentModelDesignComponentChangedEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemComponentModelDesignComponentChangedEventHandlerAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentChangedEventHandlerRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentChangedEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle); - void (*ReleaseSystemComponentModelDesignComponentRenameEventHandler)(int32_t handle, int32_t classHandle); - void (*SystemComponentModelDesignComponentRenameEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemComponentModelDesignComponentRenameEventHandlerAdd)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentRenameEventHandlerRemove)(int32_t thisHandle, int32_t delHandle); - void (*SystemComponentModelDesignComponentRenameEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle); /*END FUNCTION POINTERS*/ } @@ -949,777 +728,870 @@ namespace Plugin } /*BEGIN GLOBAL STATE AND FUNCTIONS*/ - int32_t RefCountsLenUnityEngineResolution; - int32_t* RefCountsUnityEngineResolution; + // Free list for MyGame::BaseBallScript pointers - void ReferenceManagedUnityEngineResolution(int32_t handle) + int32_t BaseBallScriptFreeListSize; + MyGame::BaseBallScript** BaseBallScriptFreeList; + MyGame::BaseBallScript** NextFreeBaseBallScript; + + int32_t StoreBaseBallScript(MyGame::BaseBallScript* del) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); - if (handle != 0) - { - RefCountsUnityEngineResolution[handle]++; - } + assert(NextFreeBaseBallScript != nullptr); + MyGame::BaseBallScript** pNext = NextFreeBaseBallScript; + NextFreeBaseBallScript = (MyGame::BaseBallScript**)*pNext; + *pNext = del; + return (int32_t)(pNext - BaseBallScriptFreeList); } - void DereferenceManagedUnityEngineResolution(int32_t handle) + MyGame::BaseBallScript* GetBaseBallScript(int32_t handle) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineResolution[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineResolution(handle); - } - } + assert(handle >= 0 && handle < BaseBallScriptFreeListSize); + return BaseBallScriptFreeList[handle]; + } + + void RemoveBaseBallScript(int32_t handle) + { + MyGame::BaseBallScript** pRelease = BaseBallScriptFreeList + handle; + *pRelease = (MyGame::BaseBallScript*)NextFreeBaseBallScript; + NextFreeBaseBallScript = pRelease; } - int32_t RefCountsLenUnityEngineRaycastHit; - int32_t* RefCountsUnityEngineRaycastHit; + // Free list for whole MyGame::BaseBallScript objects - void ReferenceManagedUnityEngineRaycastHit(int32_t handle) + union BaseBallScriptFreeWholeListEntry { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit); - if (handle != 0) - { - RefCountsUnityEngineRaycastHit[handle]++; - } + BaseBallScriptFreeWholeListEntry* Next; + MyGame::BaseBallScript Value; + }; + int32_t BaseBallScriptFreeWholeListSize; + BaseBallScriptFreeWholeListEntry* BaseBallScriptFreeWholeList; + BaseBallScriptFreeWholeListEntry* NextFreeWholeBaseBallScript; + + MyGame::BaseBallScript* StoreWholeBaseBallScript() + { + assert(NextFreeWholeBaseBallScript != nullptr); + BaseBallScriptFreeWholeListEntry* pNext = NextFreeWholeBaseBallScript; + NextFreeWholeBaseBallScript = pNext->Next; + return &pNext->Value; } - void DereferenceManagedUnityEngineRaycastHit(int32_t handle) + void RemoveWholeBaseBallScript(MyGame::BaseBallScript* instance) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRaycastHit); - if (handle != 0) + BaseBallScriptFreeWholeListEntry* pRelease = (BaseBallScriptFreeWholeListEntry*)instance; + if (pRelease >= BaseBallScriptFreeWholeList && pRelease < BaseBallScriptFreeWholeList + (BaseBallScriptFreeWholeListSize - 1)) { - int32_t numRemain = --RefCountsUnityEngineRaycastHit[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineRaycastHit(handle); - } + pRelease->Next = NextFreeWholeBaseBallScript; + NextFreeWholeBaseBallScript = pRelease->Next; } } + /*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::ManagedType(nullptr) + { + } - int32_t RefCountsLenUnityEnginePlayablesPlayableGraph; - int32_t* RefCountsUnityEnginePlayablesPlayableGraph; + Object::Object(Plugin::InternalUse iu, int32_t handle) + : ManagedType(Plugin::InternalUse::Only, handle) + { + } - void ReferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) + Object::Object(decltype(nullptr)) + : ManagedType(nullptr) { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); - if (handle != 0) - { - RefCountsUnityEnginePlayablesPlayableGraph[handle]++; - } } - void DereferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) + bool Object::operator==(decltype(nullptr)) const { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableGraph[handle]; - if (numRemain == 0) - { - ReleaseUnityEnginePlayablesPlayableGraph(handle); - } - } + return Handle == 0; } - int32_t RefCountsLenUnityEngineAnimationsAnimationMixerPlayable; - int32_t* RefCountsUnityEngineAnimationsAnimationMixerPlayable; + bool Object::operator!=(decltype(nullptr)) const + { + return Handle != 0; + } - void ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) + void Object::ThrowReferenceToThis() { - assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); - if (handle != 0) - { - RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]++; - } + throw *this; } - void DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) + ValueType::ValueType(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineAnimationsAnimationMixerPlayable(handle); - } - } } - int32_t RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; - int32_t* RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + ValueType::ValueType(decltype(nullptr)) + : Object(nullptr) + { + } - void ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + Enum::Enum(Plugin::InternalUse iu, int32_t handle) + : ValueType(iu, handle) { - assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); - if (handle != 0) - { - RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]++; - } } - void DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + Enum::Enum(decltype(nullptr)) + : ValueType(nullptr) { - assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); - if (handle != 0) - { - int32_t numRemain = --RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]; - if (numRemain == 0) - { - ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(handle); - } - } } - int32_t RefCountsLenUnityEngineRay; - int32_t* RefCountsUnityEngineRay; + String::String(decltype(nullptr)) + : Object(Plugin::InternalUse::Only, 0) + { + } - void ReferenceManagedUnityEngineRay(int32_t handle) + String::String(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); - if (handle != 0) + if (handle) { - RefCountsUnityEngineRay[handle]++; + Plugin::ReferenceManagedClass(handle); } } - void DereferenceManagedUnityEngineRay(int32_t handle) + String::String(const String& other) + : Object(Plugin::InternalUse::Only, other.Handle) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); - if (handle != 0) + if (Handle) { - int32_t numRemain = --RefCountsUnityEngineRay[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineRay(handle); - } + Plugin::ReferenceManagedClass(Handle); } } - int32_t RefCountsLenUnityEngineSceneManagementScene; - int32_t* RefCountsUnityEngineSceneManagementScene; + String::String(String&& other) + : Object(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } - void ReferenceManagedUnityEngineSceneManagementScene(int32_t handle) + String::~String() { - assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); - if (handle != 0) + if (Handle) { - RefCountsUnityEngineSceneManagementScene[handle]++; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - void DereferenceManagedUnityEngineSceneManagementScene(int32_t handle) + String& String::operator=(const String& other) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); - if (handle != 0) + if (Handle != other.Handle) { - int32_t numRemain = --RefCountsUnityEngineSceneManagementScene[handle]; - if (numRemain == 0) + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + if (Handle) { - ReleaseUnityEngineSceneManagementScene(handle); + Plugin::ReferenceManagedClass(Handle); } } + return *this; } - int32_t SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize; - System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemInt32FreeList; - System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; - - int32_t StoreSystemCollectionsGenericBaseIComparerSystemInt32(System::Collections::Generic::BaseIComparer* del) + String& String::operator=(decltype(nullptr)) { - assert(NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 != nullptr); - System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; - NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = (System::Collections::Generic::BaseIComparer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemInt32FreeList); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) + String& String::operator=(String&& other) { - assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize); - return SystemCollectionsGenericBaseIComparerSystemInt32FreeList[handle]; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - void RemoveSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) + String::String(const char* chars) + : Object(Plugin::InternalUse::Only, Plugin::StringNew(chars)) { - System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemInt32FreeList + handle; - *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; - NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = pRelease; } - int32_t SystemCollectionsGenericBaseIComparerSystemStringFreeListSize; - System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemStringFreeList; - System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemString; - int32_t StoreSystemCollectionsGenericBaseIComparerSystemString(System::Collections::Generic::BaseIComparer* del) + ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - assert(NextFreeSystemCollectionsGenericBaseIComparerSystemString != nullptr); - System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemString; - NextFreeSystemCollectionsGenericBaseIComparerSystemString = (System::Collections::Generic::BaseIComparer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemStringFreeList); } - System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) + ICloneable::ICloneable(decltype(nullptr)) + : Object(nullptr) { - assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemStringFreeListSize); - return SystemCollectionsGenericBaseIComparerSystemStringFreeList[handle]; } - void RemoveSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) + namespace Collections { - System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemStringFreeList + handle; - *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemString; - NextFreeSystemCollectionsGenericBaseIComparerSystemString = pRelease; + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + { + } + + IEnumerable::IEnumerable(decltype(nullptr)) + : Object(nullptr) + { + } + + IEnumerator IEnumerable::GetEnumerator() + { + return IEnumerator( + Plugin::InternalUse::Only, + Plugin::EnumerableGetEnumerator(Handle)); + } + + Plugin::EnumerableIterator begin( + System::Collections::IEnumerable& enumerable) + { + return Plugin::EnumerableIterator(enumerable); + } + + Plugin::EnumerableIterator end( + System::Collections::IEnumerable& enumerable) + { + return Plugin::EnumerableIterator(nullptr); + } + + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , IEnumerable(nullptr) + { + } + + ICollection::ICollection(decltype(nullptr)) + : Object(nullptr) + , IEnumerable(nullptr) + { + } + + IList::IList(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , IEnumerable(nullptr) + , ICollection(nullptr) + { + } + + IList::IList(decltype(nullptr)) + : Object(nullptr) + , IEnumerable(nullptr) + , ICollection(nullptr) + { + } } - int32_t SystemBaseStringComparerFreeListSize; - System::BaseStringComparer** SystemBaseStringComparerFreeList; - System::BaseStringComparer** NextFreeSystemBaseStringComparer; - int32_t StoreSystemBaseStringComparer(System::BaseStringComparer* del) + Array::Array(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , ICloneable(nullptr) + , Collections::IEnumerable(nullptr) + , Collections::ICollection(nullptr) + , Collections::IList(nullptr) { - assert(NextFreeSystemBaseStringComparer != nullptr); - System::BaseStringComparer** pNext = NextFreeSystemBaseStringComparer; - NextFreeSystemBaseStringComparer = (System::BaseStringComparer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemBaseStringComparerFreeList); } - System::BaseStringComparer* GetSystemBaseStringComparer(int32_t handle) + Array::Array(decltype(nullptr)) + : Object(nullptr) + , ICloneable(nullptr) + , Collections::IEnumerable(nullptr) + , Collections::ICollection(nullptr) + , Collections::IList(nullptr) { - assert(handle >= 0 && handle < SystemBaseStringComparerFreeListSize); - return SystemBaseStringComparerFreeList[handle]; } - void RemoveSystemBaseStringComparer(int32_t handle) + int32_t Array::GetLength() { - System::BaseStringComparer** pRelease = SystemBaseStringComparerFreeList + handle; - *pRelease = (System::BaseStringComparer*)NextFreeSystemBaseStringComparer; - NextFreeSystemBaseStringComparer = pRelease; + return Plugin::ArrayGetLength(Handle); } - int32_t SystemCollectionsBaseQueueFreeListSize; - System::Collections::BaseQueue** SystemCollectionsBaseQueueFreeList; - System::Collections::BaseQueue** NextFreeSystemCollectionsBaseQueue; - int32_t StoreSystemCollectionsBaseQueue(System::Collections::BaseQueue* del) + int32_t Array::GetRank() { - assert(NextFreeSystemCollectionsBaseQueue != nullptr); - System::Collections::BaseQueue** pNext = NextFreeSystemCollectionsBaseQueue; - NextFreeSystemCollectionsBaseQueue = (System::Collections::BaseQueue**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsBaseQueueFreeList); + return 0; } - - System::Collections::BaseQueue* GetSystemCollectionsBaseQueue(int32_t handle) +} + +/*BEGIN METHOD DEFINITIONS*/ +namespace System +{ + IFormattable::IFormattable(decltype(nullptr)) { - assert(handle >= 0 && handle < SystemCollectionsBaseQueueFreeListSize); - return SystemCollectionsBaseQueueFreeList[handle]; } - void RemoveSystemCollectionsBaseQueue(int32_t handle) + IFormattable::IFormattable(Plugin::InternalUse, int32_t handle) { - System::Collections::BaseQueue** pRelease = SystemCollectionsBaseQueueFreeList + handle; - *pRelease = (System::Collections::BaseQueue*)NextFreeSystemCollectionsBaseQueue; - NextFreeSystemCollectionsBaseQueue = pRelease; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - int32_t SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize; - System::ComponentModel::Design::BaseIComponentChangeService** SystemComponentModelDesignBaseIComponentChangeServiceFreeList; - System::ComponentModel::Design::BaseIComponentChangeService** NextFreeSystemComponentModelDesignBaseIComponentChangeService; - int32_t StoreSystemComponentModelDesignBaseIComponentChangeService(System::ComponentModel::Design::BaseIComponentChangeService* del) + IFormattable::IFormattable(const IFormattable& other) + : IFormattable(Plugin::InternalUse::Only, other.Handle) { - assert(NextFreeSystemComponentModelDesignBaseIComponentChangeService != nullptr); - System::ComponentModel::Design::BaseIComponentChangeService** pNext = NextFreeSystemComponentModelDesignBaseIComponentChangeService; - NextFreeSystemComponentModelDesignBaseIComponentChangeService = (System::ComponentModel::Design::BaseIComponentChangeService**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignBaseIComponentChangeServiceFreeList); } - System::ComponentModel::Design::BaseIComponentChangeService* GetSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) + IFormattable::IFormattable(IFormattable&& other) + : IFormattable(Plugin::InternalUse::Only, other.Handle) { - assert(handle >= 0 && handle < SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize); - return SystemComponentModelDesignBaseIComponentChangeServiceFreeList[handle]; + other.Handle = 0; } - void RemoveSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) + IFormattable::~IFormattable() { - System::ComponentModel::Design::BaseIComponentChangeService** pRelease = SystemComponentModelDesignBaseIComponentChangeServiceFreeList + handle; - *pRelease = (System::ComponentModel::Design::BaseIComponentChangeService*)NextFreeSystemComponentModelDesignBaseIComponentChangeService; - NextFreeSystemComponentModelDesignBaseIComponentChangeService = pRelease; - } - int32_t SystemIOBaseFileStreamFreeListSize; - System::IO::BaseFileStream** SystemIOBaseFileStreamFreeList; - System::IO::BaseFileStream** NextFreeSystemIOBaseFileStream; - - int32_t StoreSystemIOBaseFileStream(System::IO::BaseFileStream* del) - { - assert(NextFreeSystemIOBaseFileStream != nullptr); - System::IO::BaseFileStream** pNext = NextFreeSystemIOBaseFileStream; - NextFreeSystemIOBaseFileStream = (System::IO::BaseFileStream**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemIOBaseFileStreamFreeList); - } - - System::IO::BaseFileStream* GetSystemIOBaseFileStream(int32_t handle) - { - assert(handle >= 0 && handle < SystemIOBaseFileStreamFreeListSize); - return SystemIOBaseFileStreamFreeList[handle]; - } - - void RemoveSystemIOBaseFileStream(int32_t handle) - { - System::IO::BaseFileStream** pRelease = SystemIOBaseFileStreamFreeList + handle; - *pRelease = (System::IO::BaseFileStream*)NextFreeSystemIOBaseFileStream; - NextFreeSystemIOBaseFileStream = pRelease; - } - int32_t RefCountsLenUnityEnginePlayablesPlayableHandle; - int32_t* RefCountsUnityEnginePlayablesPlayableHandle; - - void ReferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) - { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); - if (handle != 0) + if (Handle) { - RefCountsUnityEnginePlayablesPlayableHandle[handle]++; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - void DereferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) + IFormattable& IFormattable::operator=(const IFormattable& other) { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); - if (handle != 0) + if (this->Handle) { - int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableHandle[handle]; - if (numRemain == 0) - { - ReleaseUnityEnginePlayablesPlayableHandle(handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - int32_t RefCountsLenUnityEngineXRWSAInputInteractionSourcePose; - int32_t* RefCountsUnityEngineXRWSAInputInteractionSourcePose; - - void ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) + IFormattable& IFormattable::operator=(decltype(nullptr)) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); - if (handle != 0) + if (Handle) { - RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]++; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } + return *this; } - void DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) + IFormattable& IFormattable::operator=(IFormattable&& other) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); - if (handle != 0) + if (Handle) { - int32_t numRemain = --RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineXRWSAInputInteractionSourcePose(handle); - } + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - int32_t SystemActionFreeListSize; - System::Action** SystemActionFreeList; - System::Action** NextFreeSystemAction; - - int32_t StoreSystemAction(System::Action* del) + bool IFormattable::operator==(const IFormattable& other) const { - assert(NextFreeSystemAction != nullptr); - System::Action** pNext = NextFreeSystemAction; - NextFreeSystemAction = (System::Action**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemActionFreeList); + return Handle == other.Handle; } - System::Action* GetSystemAction(int32_t handle) + bool IFormattable::operator!=(const IFormattable& other) const { - assert(handle >= 0 && handle < SystemActionFreeListSize); - return SystemActionFreeList[handle]; + return Handle != other.Handle; } - - void RemoveSystemAction(int32_t handle) +} + +namespace System +{ + IConvertible::IConvertible(decltype(nullptr)) { - 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) + IConvertible::IConvertible(Plugin::InternalUse, int32_t handle) { - assert(NextFreeSystemActionSystemSingle != nullptr); - System::Action1** pNext = NextFreeSystemActionSystemSingle; - NextFreeSystemActionSystemSingle = (System::Action1**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemActionSystemSingleFreeList); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - System::Action1* GetSystemActionSystemSingle(int32_t handle) + IConvertible::IConvertible(const IConvertible& other) + : IConvertible(Plugin::InternalUse::Only, other.Handle) { - assert(handle >= 0 && handle < SystemActionSystemSingleFreeListSize); - return SystemActionSystemSingleFreeList[handle]; } - void RemoveSystemActionSystemSingle(int32_t handle) + IConvertible::IConvertible(IConvertible&& other) + : IConvertible(Plugin::InternalUse::Only, other.Handle) { - System::Action1** pRelease = SystemActionSystemSingleFreeList + handle; - *pRelease = (System::Action1*)NextFreeSystemActionSystemSingle; - NextFreeSystemActionSystemSingle = pRelease; + other.Handle = 0; } - int32_t SystemActionSystemSingle_SystemSingleFreeListSize; - System::Action2** SystemActionSystemSingle_SystemSingleFreeList; - System::Action2** NextFreeSystemActionSystemSingle_SystemSingle; - int32_t StoreSystemActionSystemSingle_SystemSingle(System::Action2* del) + IConvertible::~IConvertible() { - assert(NextFreeSystemActionSystemSingle_SystemSingle != nullptr); - System::Action2** pNext = NextFreeSystemActionSystemSingle_SystemSingle; - NextFreeSystemActionSystemSingle_SystemSingle = (System::Action2**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemActionSystemSingle_SystemSingleFreeList); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - System::Action2* GetSystemActionSystemSingle_SystemSingle(int32_t handle) + IConvertible& IConvertible::operator=(const IConvertible& other) { - assert(handle >= 0 && handle < SystemActionSystemSingle_SystemSingleFreeListSize); - return SystemActionSystemSingle_SystemSingleFreeList[handle]; + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - void RemoveSystemActionSystemSingle_SystemSingle(int32_t handle) + IConvertible& IConvertible::operator=(decltype(nullptr)) { - System::Action2** pRelease = SystemActionSystemSingle_SystemSingleFreeList + handle; - *pRelease = (System::Action2*)NextFreeSystemActionSystemSingle_SystemSingle; - NextFreeSystemActionSystemSingle_SystemSingle = pRelease; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - int32_t SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize; - System::Func3** SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList; - System::Func3** NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble; - int32_t StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(System::Func3* del) + IConvertible& IConvertible::operator=(IConvertible&& other) { - 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); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - System::Func3* GetSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle) + bool IConvertible::operator==(const IConvertible& other) const { - assert(handle >= 0 && handle < SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize); - return SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[handle]; + return Handle == other.Handle; } - void RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(int32_t handle) + bool IConvertible::operator!=(const IConvertible& other) const { - System::Func3** pRelease = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + handle; - *pRelease = (System::Func3*)NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble; - NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = pRelease; + return Handle != other.Handle; } - int32_t SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize; - System::Func3** SystemFuncSystemInt16_SystemInt32_SystemStringFreeList; - System::Func3** NextFreeSystemFuncSystemInt16_SystemInt32_SystemString; - - int32_t StoreSystemFuncSystemInt16_SystemInt32_SystemString(System::Func3* del) +} + +namespace System +{ + IComparable::IComparable(decltype(nullptr)) { - 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) + IComparable::IComparable(Plugin::InternalUse, int32_t handle) { - assert(handle >= 0 && handle < SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize); - return SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[handle]; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - void RemoveSystemFuncSystemInt16_SystemInt32_SystemString(int32_t handle) + IComparable::IComparable(const IComparable& other) + : IComparable(Plugin::InternalUse::Only, other.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) + IComparable::IComparable(IComparable&& other) + : IComparable(Plugin::InternalUse::Only, other.Handle) { - assert(NextFreeSystemAppDomainInitializer != nullptr); - System::AppDomainInitializer** pNext = NextFreeSystemAppDomainInitializer; - NextFreeSystemAppDomainInitializer = (System::AppDomainInitializer**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemAppDomainInitializerFreeList); + other.Handle = 0; } - System::AppDomainInitializer* GetSystemAppDomainInitializer(int32_t handle) + IComparable::~IComparable() { - assert(handle >= 0 && handle < SystemAppDomainInitializerFreeListSize); - return SystemAppDomainInitializerFreeList[handle]; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - void RemoveSystemAppDomainInitializer(int32_t handle) + IComparable& IComparable::operator=(const IComparable& other) { - System::AppDomainInitializer** pRelease = SystemAppDomainInitializerFreeList + handle; - *pRelease = (System::AppDomainInitializer*)NextFreeSystemAppDomainInitializer; - NextFreeSystemAppDomainInitializer = pRelease; + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - int32_t UnityEngineEventsUnityActionFreeListSize; - UnityEngine::Events::UnityAction** UnityEngineEventsUnityActionFreeList; - UnityEngine::Events::UnityAction** NextFreeUnityEngineEventsUnityAction; - int32_t StoreUnityEngineEventsUnityAction(UnityEngine::Events::UnityAction* del) + IComparable& IComparable::operator=(decltype(nullptr)) { - assert(NextFreeUnityEngineEventsUnityAction != nullptr); - UnityEngine::Events::UnityAction** pNext = NextFreeUnityEngineEventsUnityAction; - NextFreeUnityEngineEventsUnityAction = (UnityEngine::Events::UnityAction**)*pNext; - *pNext = del; - return (int32_t)(pNext - UnityEngineEventsUnityActionFreeList); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - UnityEngine::Events::UnityAction* GetUnityEngineEventsUnityAction(int32_t handle) + IComparable& IComparable::operator=(IComparable&& other) { - assert(handle >= 0 && handle < UnityEngineEventsUnityActionFreeListSize); - return UnityEngineEventsUnityActionFreeList[handle]; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - void RemoveUnityEngineEventsUnityAction(int32_t handle) + bool IComparable::operator==(const IComparable& other) const { - UnityEngine::Events::UnityAction** pRelease = UnityEngineEventsUnityActionFreeList + handle; - *pRelease = (UnityEngine::Events::UnityAction*)NextFreeUnityEngineEventsUnityAction; - NextFreeUnityEngineEventsUnityAction = pRelease; + return Handle == other.Handle; } - int32_t UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize; - UnityEngine::Events::UnityAction2** UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList; - UnityEngine::Events::UnityAction2** NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - int32_t StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(UnityEngine::Events::UnityAction2* del) + bool IComparable::operator!=(const IComparable& other) const { - assert(NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode != nullptr); - UnityEngine::Events::UnityAction2** pNext = NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = (UnityEngine::Events::UnityAction2**)*pNext; - *pNext = del; - return (int32_t)(pNext - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList); + return Handle != other.Handle; } - - UnityEngine::Events::UnityAction2* GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) +} + +namespace UnityEngine +{ + Vector3::Vector3() { - assert(handle >= 0 && handle < UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize); - return UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[handle]; } - void RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) + Vector3::Vector3(System::Single x, System::Single y, System::Single z) { - UnityEngine::Events::UnityAction2** pRelease = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + handle; - *pRelease = (UnityEngine::Events::UnityAction2*)NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = pRelease; + 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; } - int32_t SystemComponentModelDesignComponentEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentEventHandler** SystemComponentModelDesignComponentEventHandlerFreeList; - System::ComponentModel::Design::ComponentEventHandler** NextFreeSystemComponentModelDesignComponentEventHandler; - int32_t StoreSystemComponentModelDesignComponentEventHandler(System::ComponentModel::Design::ComponentEventHandler* del) + UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a) { - assert(NextFreeSystemComponentModelDesignComponentEventHandler != nullptr); - System::ComponentModel::Design::ComponentEventHandler** pNext = NextFreeSystemComponentModelDesignComponentEventHandler; - NextFreeSystemComponentModelDesignComponentEventHandler = (System::ComponentModel::Design::ComponentEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentEventHandlerFreeList); + 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; } - System::ComponentModel::Design::ComponentEventHandler* GetSystemComponentModelDesignComponentEventHandler(int32_t handle) + Vector3::operator System::ValueType() { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentEventHandlerFreeListSize); - return SystemComponentModelDesignComponentEventHandlerFreeList[handle]; + int32_t handle = Plugin::BoxVector3(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; } - void RemoveSystemComponentModelDesignComponentEventHandler(int32_t handle) + Vector3::operator System::Object() { - System::ComponentModel::Design::ComponentEventHandler** pRelease = SystemComponentModelDesignComponentEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentEventHandler*)NextFreeSystemComponentModelDesignComponentEventHandler; - NextFreeSystemComponentModelDesignComponentEventHandler = pRelease; + int32_t handle = Plugin::BoxVector3(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } - int32_t SystemComponentModelDesignComponentChangingEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentChangingEventHandler** SystemComponentModelDesignComponentChangingEventHandlerFreeList; - System::ComponentModel::Design::ComponentChangingEventHandler** NextFreeSystemComponentModelDesignComponentChangingEventHandler; - - int32_t StoreSystemComponentModelDesignComponentChangingEventHandler(System::ComponentModel::Design::ComponentChangingEventHandler* del) +} + +namespace System +{ + Object::operator UnityEngine::Vector3() { - assert(NextFreeSystemComponentModelDesignComponentChangingEventHandler != nullptr); - System::ComponentModel::Design::ComponentChangingEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangingEventHandler; - NextFreeSystemComponentModelDesignComponentChangingEventHandler = (System::ComponentModel::Design::ComponentChangingEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentChangingEventHandlerFreeList); + UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; } - - System::ComponentModel::Design::ComponentChangingEventHandler* GetSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) +} + +namespace UnityEngine +{ + Object::Object(decltype(nullptr)) { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangingEventHandlerFreeListSize); - return SystemComponentModelDesignComponentChangingEventHandlerFreeList[handle]; } - void RemoveSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) + Object::Object(Plugin::InternalUse, int32_t handle) { - System::ComponentModel::Design::ComponentChangingEventHandler** pRelease = SystemComponentModelDesignComponentChangingEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentChangingEventHandler*)NextFreeSystemComponentModelDesignComponentChangingEventHandler; - NextFreeSystemComponentModelDesignComponentChangingEventHandler = pRelease; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - int32_t SystemComponentModelDesignComponentChangedEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentChangedEventHandler** SystemComponentModelDesignComponentChangedEventHandlerFreeList; - System::ComponentModel::Design::ComponentChangedEventHandler** NextFreeSystemComponentModelDesignComponentChangedEventHandler; - int32_t StoreSystemComponentModelDesignComponentChangedEventHandler(System::ComponentModel::Design::ComponentChangedEventHandler* del) + Object::Object(const Object& other) + : Object(Plugin::InternalUse::Only, other.Handle) { - assert(NextFreeSystemComponentModelDesignComponentChangedEventHandler != nullptr); - System::ComponentModel::Design::ComponentChangedEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangedEventHandler; - NextFreeSystemComponentModelDesignComponentChangedEventHandler = (System::ComponentModel::Design::ComponentChangedEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentChangedEventHandlerFreeList); } - System::ComponentModel::Design::ComponentChangedEventHandler* GetSystemComponentModelDesignComponentChangedEventHandler(int32_t handle) + Object::Object(Object&& other) + : Object(Plugin::InternalUse::Only, other.Handle) { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangedEventHandlerFreeListSize); - return SystemComponentModelDesignComponentChangedEventHandlerFreeList[handle]; + other.Handle = 0; } - void RemoveSystemComponentModelDesignComponentChangedEventHandler(int32_t handle) + Object::~Object() { - System::ComponentModel::Design::ComponentChangedEventHandler** pRelease = SystemComponentModelDesignComponentChangedEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentChangedEventHandler*)NextFreeSystemComponentModelDesignComponentChangedEventHandler; - NextFreeSystemComponentModelDesignComponentChangedEventHandler = pRelease; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - int32_t SystemComponentModelDesignComponentRenameEventHandlerFreeListSize; - System::ComponentModel::Design::ComponentRenameEventHandler** SystemComponentModelDesignComponentRenameEventHandlerFreeList; - System::ComponentModel::Design::ComponentRenameEventHandler** NextFreeSystemComponentModelDesignComponentRenameEventHandler; - int32_t StoreSystemComponentModelDesignComponentRenameEventHandler(System::ComponentModel::Design::ComponentRenameEventHandler* del) + Object& Object::operator=(const Object& other) { - assert(NextFreeSystemComponentModelDesignComponentRenameEventHandler != nullptr); - System::ComponentModel::Design::ComponentRenameEventHandler** pNext = NextFreeSystemComponentModelDesignComponentRenameEventHandler; - NextFreeSystemComponentModelDesignComponentRenameEventHandler = (System::ComponentModel::Design::ComponentRenameEventHandler**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignComponentRenameEventHandlerFreeList); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Object& Object::operator=(decltype(nullptr)) + { + 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; } - System::ComponentModel::Design::ComponentRenameEventHandler* GetSystemComponentModelDesignComponentRenameEventHandler(int32_t handle) + bool Object::operator==(const Object& other) const { - assert(handle >= 0 && handle < SystemComponentModelDesignComponentRenameEventHandlerFreeListSize); - return SystemComponentModelDesignComponentRenameEventHandlerFreeList[handle]; + return Handle == other.Handle; } - void RemoveSystemComponentModelDesignComponentRenameEventHandler(int32_t handle) + bool Object::operator!=(const Object& other) const { - System::ComponentModel::Design::ComponentRenameEventHandler** pRelease = SystemComponentModelDesignComponentRenameEventHandlerFreeList + handle; - *pRelease = (System::ComponentModel::Design::ComponentRenameEventHandler*)NextFreeSystemComponentModelDesignComponentRenameEventHandler; - NextFreeSystemComponentModelDesignComponentRenameEventHandler = pRelease; + 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; + } } - /*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 +namespace UnityEngine { - Object::Object() - : Plugin::ManagedType(nullptr) + Component::Component(decltype(nullptr)) + : UnityEngine::Object(nullptr) { } - Object::Object(Plugin::InternalUse iu, int32_t handle) - : ManagedType(Plugin::InternalUse::Only, handle) + Component::Component(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - Object::Object(decltype(nullptr)) - : ManagedType(nullptr) + Component::Component(const Component& other) + : Component(Plugin::InternalUse::Only, other.Handle) { } - bool Object::operator==(decltype(nullptr)) const + Component::Component(Component&& other) + : Component(Plugin::InternalUse::Only, other.Handle) { - return Handle == 0; + other.Handle = 0; } - bool Object::operator!=(decltype(nullptr)) const + Component::~Component() { - return Handle != 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - void Object::ThrowReferenceToThis() + Component& Component::operator=(const Component& other) { - throw *this; + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - ValueType::ValueType(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) + Component& Component::operator=(decltype(nullptr)) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - ValueType::ValueType(decltype(nullptr)) - : Object(nullptr) + Component& Component::operator=(Component&& other) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - Enum::Enum(Plugin::InternalUse iu, int32_t handle) - : ValueType(iu, handle) + bool Component::operator==(const Component& other) const { + return Handle == other.Handle; } - Enum::Enum(decltype(nullptr)) - : ValueType(nullptr) + bool Component::operator!=(const Component& other) const { + return Handle != other.Handle; } - String::String(decltype(nullptr)) - : Object(Plugin::InternalUse::Only, 0) + 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(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , System::Collections::IEnumerable(nullptr) { } - String::String(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) + Transform::Transform(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , System::Collections::IEnumerable(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - String::String(const String& other) - : Object(Plugin::InternalUse::Only, other.Handle) + Transform::Transform(const Transform& other) + : Transform(Plugin::InternalUse::Only, other.Handle) { - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } } - String::String(String&& other) - : Object(Plugin::InternalUse::Only, other.Handle) + Transform::Transform(Transform&& other) + : Transform(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - String::~String() + Transform::~Transform() { if (Handle) { @@ -1728,24 +1600,21 @@ namespace System } } - String& String::operator=(const String& other) + Transform& Transform::operator=(const Transform& other) { - if (Handle != other.Handle) + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - String& String::operator=(decltype(nullptr)) + Transform& Transform::operator=(decltype(nullptr)) { if (Handle) { @@ -1755,7 +1624,7 @@ namespace System return *this; } - String& String::operator=(String&& other) + Transform& Transform::operator=(Transform&& other) { if (Handle) { @@ -1766,278 +1635,335 @@ namespace System return *this; } - String::String(const char* chars) - : Object(Plugin::InternalUse::Only, Plugin::StringNew(chars)) + bool Transform::operator==(const Transform& other) const { + return Handle == other.Handle; } - ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) + bool Transform::operator!=(const Transform& other) const { + return Handle != other.Handle; } - ICloneable::ICloneable(decltype(nullptr)) - : Object(nullptr) + 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 System +{ namespace Collections { - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) + IEnumerator::IEnumerator(decltype(nullptr)) { } - IEnumerable::IEnumerable(decltype(nullptr)) - : Object(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - IEnumerator IEnumerable::GetEnumerator() + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { - return IEnumerator( - Plugin::InternalUse::Only, - Plugin::EnumerableGetEnumerator(Handle)); } - Plugin::EnumerableIterator begin( - System::Collections::IEnumerable& enumerable) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { - return Plugin::EnumerableIterator(enumerable); + other.Handle = 0; } - Plugin::EnumerableIterator end( - System::Collections::IEnumerable& enumerable) + IEnumerator::~IEnumerator() { - return Plugin::EnumerableIterator(nullptr); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - , IEnumerable(nullptr) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - ICollection::ICollection(decltype(nullptr)) - : Object(nullptr) - , IEnumerable(nullptr) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - IList::IList(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - , IEnumerable(nullptr) - , ICollection(nullptr) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - IList::IList(decltype(nullptr)) - : Object(nullptr) - , IEnumerable(nullptr) - , ICollection(nullptr) - { - } - } - - Array::Array(Plugin::InternalUse iu, int32_t handle) - : Object(iu, handle) - , ICloneable(nullptr) - , Collections::IEnumerable(nullptr) - , Collections::ICollection(nullptr) - , Collections::IList(nullptr) - { - } - - Array::Array(decltype(nullptr)) - : Object(nullptr) - , ICloneable(nullptr) - , Collections::IEnumerable(nullptr) - , Collections::ICollection(nullptr) - , Collections::IList(nullptr) - { - } - - int32_t Array::GetLength() - { - return Plugin::ArrayGetLength(Handle); - } - - int32_t Array::GetRank() - { - return 0; - } -} - -/*BEGIN METHOD DEFINITIONS*/ -namespace System -{ - IFormattable::IFormattable(decltype(nullptr)) - { - } - - IFormattable::IFormattable(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IFormattable::IFormattable(const IFormattable& other) - : IFormattable(Plugin::InternalUse::Only, other.Handle) - { - } - - IFormattable::IFormattable(IFormattable&& other) - : IFormattable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IFormattable::~IFormattable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IFormattable& IFormattable::operator=(const IFormattable& other) - { - if (this->Handle) + bool IEnumerator::operator==(const IEnumerator& other) const { - Plugin::DereferenceManagedClass(this->Handle); + return Handle == other.Handle; } - this->Handle = other.Handle; - if (this->Handle) + + bool IEnumerator::operator!=(const IEnumerator& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle != other.Handle; } - return *this; - } - - IFormattable& IFormattable::operator=(decltype(nullptr)) - { - if (Handle) + + System::Object IEnumerator::GetCurrent() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + auto returnValue = Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Object(Plugin::InternalUse::Only, returnValue); } - return *this; - } - - IFormattable& IFormattable::operator=(IFormattable&& other) - { - if (Handle) + + System::Boolean IEnumerator::MoveNext() { - Plugin::DereferenceManagedClass(Handle); + auto returnValue = Plugin::SystemCollectionsIEnumeratorMethodMoveNext(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IFormattable::operator==(const IFormattable& other) const - { - return Handle == other.Handle; - } - - bool IFormattable::operator!=(const IFormattable& other) const - { - return Handle != other.Handle; } } namespace System { - IConvertible::IConvertible(decltype(nullptr)) - { - } - - IConvertible::IConvertible(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IConvertible::IConvertible(const IConvertible& other) - : IConvertible(Plugin::InternalUse::Only, other.Handle) - { - } - - IConvertible::IConvertible(IConvertible&& other) - : IConvertible(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IConvertible::~IConvertible() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IConvertible& IConvertible::operator=(const IConvertible& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IConvertible& IConvertible::operator=(decltype(nullptr)) + namespace Runtime { - if (Handle) + namespace Serialization { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IConvertible& IConvertible::operator=(IConvertible&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); + ISerializable::ISerializable(decltype(nullptr)) + { + } + + ISerializable::ISerializable(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + ISerializable::ISerializable(const ISerializable& other) + : ISerializable(Plugin::InternalUse::Only, other.Handle) + { + } + + ISerializable::ISerializable(ISerializable&& other) + : ISerializable(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ISerializable::~ISerializable() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + ISerializable& ISerializable::operator=(const ISerializable& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ISerializable& ISerializable::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + ISerializable& ISerializable::operator=(ISerializable&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool ISerializable::operator==(const ISerializable& other) const + { + return Handle == other.Handle; + } + + bool ISerializable::operator!=(const ISerializable& other) const + { + return Handle != other.Handle; + } } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IConvertible::operator==(const IConvertible& other) const - { - return Handle == other.Handle; } - - bool IConvertible::operator!=(const IConvertible& other) const +} + +namespace System +{ + namespace Runtime { - return Handle != other.Handle; + namespace InteropServices + { + _Exception::_Exception(decltype(nullptr)) + { + } + + _Exception::_Exception(Plugin::InternalUse, int32_t handle) + { + Handle = 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) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + _Exception& _Exception::operator=(decltype(nullptr)) + { + 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; + } + } } } -namespace System +namespace UnityEngine { - IComparable::IComparable(decltype(nullptr)) + GameObject::GameObject(decltype(nullptr)) + : UnityEngine::Object(nullptr) { } - IComparable::IComparable(Plugin::InternalUse, int32_t handle) + GameObject::GameObject(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) { Handle = handle; if (handle) @@ -2046,18 +1972,18 @@ namespace System } } - IComparable::IComparable(const IComparable& other) - : IComparable(Plugin::InternalUse::Only, other.Handle) + GameObject::GameObject(const GameObject& other) + : GameObject(Plugin::InternalUse::Only, other.Handle) { } - IComparable::IComparable(IComparable&& other) - : IComparable(Plugin::InternalUse::Only, other.Handle) + GameObject::GameObject(GameObject&& other) + : GameObject(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IComparable::~IComparable() + GameObject::~GameObject() { if (Handle) { @@ -2066,7 +1992,7 @@ namespace System } } - IComparable& IComparable::operator=(const IComparable& other) + GameObject& GameObject::operator=(const GameObject& other) { if (this->Handle) { @@ -2080,7 +2006,7 @@ namespace System return *this; } - IComparable& IComparable::operator=(decltype(nullptr)) + GameObject& GameObject::operator=(decltype(nullptr)) { if (Handle) { @@ -2090,7 +2016,7 @@ namespace System return *this; } - IComparable& IComparable::operator=(IComparable&& other) + GameObject& GameObject::operator=(GameObject&& other) { if (Handle) { @@ -2101,19 +2027,19 @@ namespace System return *this; } - bool IComparable::operator==(const IComparable& other) const + bool GameObject::operator==(const GameObject& other) const { return Handle == other.Handle; } - bool IComparable::operator!=(const IComparable& other) const + bool GameObject::operator!=(const GameObject& other) const { return Handle != other.Handle; } - System::Int32 IComparable::CompareTo(System::Object& obj) + template<> MyGame::BaseBallScript GameObject::AddComponent() { - auto returnValue = Plugin::SystemIComparableMethodCompareToSystemObject(Handle, obj.Handle); + auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2121,17 +2047,30 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnValue; + return MyGame::BaseBallScript(Plugin::InternalUse::Only, returnValue); + } + + UnityEngine::GameObject GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) + { + auto returnValue = Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(type); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return UnityEngine::GameObject(Plugin::InternalUse::Only, returnValue); } } -namespace System +namespace UnityEngine { - IDisposable::IDisposable(decltype(nullptr)) + Debug::Debug(decltype(nullptr)) { } - IDisposable::IDisposable(Plugin::InternalUse, int32_t handle) + Debug::Debug(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) @@ -2140,18 +2079,18 @@ namespace System } } - IDisposable::IDisposable(const IDisposable& other) - : IDisposable(Plugin::InternalUse::Only, other.Handle) + Debug::Debug(const Debug& other) + : Debug(Plugin::InternalUse::Only, other.Handle) { } - IDisposable::IDisposable(IDisposable&& other) - : IDisposable(Plugin::InternalUse::Only, other.Handle) + Debug::Debug(Debug&& other) + : Debug(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IDisposable::~IDisposable() + Debug::~Debug() { if (Handle) { @@ -2160,7 +2099,7 @@ namespace System } } - IDisposable& IDisposable::operator=(const IDisposable& other) + Debug& Debug::operator=(const Debug& other) { if (this->Handle) { @@ -2174,7 +2113,7 @@ namespace System return *this; } - IDisposable& IDisposable::operator=(decltype(nullptr)) + Debug& Debug::operator=(decltype(nullptr)) { if (Handle) { @@ -2184,7 +2123,7 @@ namespace System return *this; } - IDisposable& IDisposable::operator=(IDisposable&& other) + Debug& Debug::operator=(Debug&& other) { if (Handle) { @@ -2195,19 +2134,19 @@ namespace System return *this; } - bool IDisposable::operator==(const IDisposable& other) const + bool Debug::operator==(const Debug& other) const { return Handle == other.Handle; } - bool IDisposable::operator!=(const IDisposable& other) const + bool Debug::operator!=(const Debug& other) const { return Handle != other.Handle; } - void IDisposable::Dispose() + void Debug::Log(System::Object& message) { - Plugin::SystemIDisposableMethodDispose(Handle); + Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2220,134 +2159,102 @@ namespace System namespace UnityEngine { - Vector3::Vector3() + Behaviour::Behaviour(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) { } - Vector3::Vector3(System::Single x, System::Single y, System::Single z) + Behaviour::Behaviour(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) { - auto returnValue = Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(x, y, z); - if (Plugin::unhandledCsharpException) + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } - *this = returnValue; } - System::Single 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(System::Single newX, System::Single newY, System::Single newZ) + Behaviour::Behaviour(const Behaviour& other) + : Behaviour(Plugin::InternalUse::Only, other.Handle) { - 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) + Behaviour::Behaviour(Behaviour&& other) + : Behaviour(Plugin::InternalUse::Only, other.Handle) { - 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; + other.Handle = 0; } - UnityEngine::Vector3 Vector3::operator-() + Behaviour::~Behaviour() { - auto returnValue = Plugin::UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(*this); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return returnValue; } - Vector3::operator System::ValueType() + Behaviour& Behaviour::operator=(const Behaviour& other) { - int32_t handle = Plugin::BoxVector3(*this); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); } - if (handle) + this->Handle = other.Handle; + if (this->Handle) { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); + Plugin::ReferenceManagedClass(this->Handle); } - return nullptr; + return *this; } - Vector3::operator System::Object() + Behaviour& Behaviour::operator=(decltype(nullptr)) { - int32_t handle = Plugin::BoxVector3(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + if (Handle) { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return nullptr; + return *this; } -} - -namespace System -{ - Object::operator UnityEngine::Vector3() + + Behaviour& Behaviour::operator=(Behaviour&& other) { - UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); } - return returnVal; + 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 { - Object::Object(decltype(nullptr)) + MonoBehaviour::MonoBehaviour(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) { } - Object::Object(Plugin::InternalUse, int32_t handle) + MonoBehaviour::MonoBehaviour(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) { Handle = handle; if (handle) @@ -2356,18 +2263,18 @@ namespace UnityEngine } } - Object::Object(const Object& other) - : Object(Plugin::InternalUse::Only, other.Handle) + MonoBehaviour::MonoBehaviour(const MonoBehaviour& other) + : MonoBehaviour(Plugin::InternalUse::Only, other.Handle) { } - Object::Object(Object&& other) - : Object(Plugin::InternalUse::Only, other.Handle) + MonoBehaviour::MonoBehaviour(MonoBehaviour&& other) + : MonoBehaviour(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Object::~Object() + MonoBehaviour::~MonoBehaviour() { if (Handle) { @@ -2376,7 +2283,7 @@ namespace UnityEngine } } - Object& Object::operator=(const Object& other) + MonoBehaviour& MonoBehaviour::operator=(const MonoBehaviour& other) { if (this->Handle) { @@ -2390,7 +2297,7 @@ namespace UnityEngine return *this; } - Object& Object::operator=(decltype(nullptr)) + MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr)) { if (Handle) { @@ -2400,7 +2307,7 @@ namespace UnityEngine return *this; } - Object& Object::operator=(Object&& other) + MonoBehaviour& MonoBehaviour::operator=(MonoBehaviour&& other) { if (Handle) { @@ -2411,57 +2318,19 @@ namespace UnityEngine return *this; } - bool Object::operator==(const Object& other) const + bool MonoBehaviour::operator==(const MonoBehaviour& other) const { return Handle == other.Handle; } - bool Object::operator!=(const Object& other) const + bool MonoBehaviour::operator!=(const MonoBehaviour& 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() + UnityEngine::Transform MonoBehaviour::GetTransform() { - auto returnValue = Plugin::UnityEngineObjectMethodop_ImplicitUnityEngineObject(Handle); + auto returnValue = Plugin::UnityEngineMonoBehaviourPropertyGetTransform(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2469,19 +2338,21 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return returnValue; + return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); } } -namespace UnityEngine +namespace System { - Component::Component(decltype(nullptr)) - : UnityEngine::Object(nullptr) + Exception::Exception(decltype(nullptr)) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) { } - Component::Component(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) + Exception::Exception(Plugin::InternalUse, int32_t handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) { Handle = handle; if (handle) @@ -2490,18 +2361,18 @@ namespace UnityEngine } } - Component::Component(const Component& other) - : Component(Plugin::InternalUse::Only, other.Handle) + Exception::Exception(const Exception& other) + : Exception(Plugin::InternalUse::Only, other.Handle) { } - Component::Component(Component&& other) - : Component(Plugin::InternalUse::Only, other.Handle) + Exception::Exception(Exception&& other) + : Exception(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Component::~Component() + Exception::~Exception() { if (Handle) { @@ -2510,7 +2381,7 @@ namespace UnityEngine } } - Component& Component::operator=(const Component& other) + Exception& Exception::operator=(const Exception& other) { if (this->Handle) { @@ -2524,7 +2395,7 @@ namespace UnityEngine return *this; } - Component& Component::operator=(decltype(nullptr)) + Exception& Exception::operator=(decltype(nullptr)) { if (Handle) { @@ -2534,7 +2405,7 @@ namespace UnityEngine return *this; } - Component& Component::operator=(Component&& other) + Exception& Exception::operator=(Exception&& other) { if (Handle) { @@ -2545,19 +2416,21 @@ namespace UnityEngine return *this; } - bool Component::operator==(const Component& other) const + bool Exception::operator==(const Exception& other) const { return Handle == other.Handle; } - bool Component::operator!=(const Component& other) const + bool Exception::operator!=(const Exception& other) const { return Handle != other.Handle; } - UnityEngine::Transform Component::GetTransform() + Exception::Exception(System::String& message) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) { - auto returnValue = Plugin::UnityEngineComponentPropertyGetTransform(Handle); + auto returnValue = Plugin::SystemExceptionConstructorSystemString(message.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2565,23 +2438,27 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + } } } -namespace UnityEngine +namespace System { - Transform::Transform(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , System::Collections::IEnumerable(nullptr) + SystemException::SystemException(decltype(nullptr)) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) { } - Transform::Transform(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , System::Collections::IEnumerable(nullptr) + SystemException::SystemException(Plugin::InternalUse, int32_t handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) { Handle = handle; if (handle) @@ -2590,18 +2467,18 @@ namespace UnityEngine } } - Transform::Transform(const Transform& other) - : Transform(Plugin::InternalUse::Only, other.Handle) + SystemException::SystemException(const SystemException& other) + : SystemException(Plugin::InternalUse::Only, other.Handle) { } - Transform::Transform(Transform&& other) - : Transform(Plugin::InternalUse::Only, other.Handle) + SystemException::SystemException(SystemException&& other) + : SystemException(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Transform::~Transform() + SystemException::~SystemException() { if (Handle) { @@ -2610,7 +2487,7 @@ namespace UnityEngine } } - Transform& Transform::operator=(const Transform& other) + SystemException& SystemException::operator=(const SystemException& other) { if (this->Handle) { @@ -2624,7 +2501,7 @@ namespace UnityEngine return *this; } - Transform& Transform::operator=(decltype(nullptr)) + SystemException& SystemException::operator=(decltype(nullptr)) { if (Handle) { @@ -2634,7 +2511,7 @@ namespace UnityEngine return *this; } - Transform& Transform::operator=(Transform&& other) + SystemException& SystemException::operator=(SystemException&& other) { if (Handle) { @@ -2645,63 +2522,131 @@ namespace UnityEngine return *this; } - bool Transform::operator==(const Transform& other) const + bool SystemException::operator==(const SystemException& other) const { return Handle == other.Handle; } - bool Transform::operator!=(const Transform& other) const + bool SystemException::operator!=(const SystemException& other) const { return Handle != other.Handle; } +} + +namespace System +{ + NullReferenceException::NullReferenceException(decltype(nullptr)) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + , System::SystemException(nullptr) + { + } - UnityEngine::Vector3 Transform::GetPosition() + NullReferenceException::NullReferenceException(Plugin::InternalUse, int32_t handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + , System::SystemException(nullptr) { - auto returnValue = Plugin::UnityEngineTransformPropertyGetPosition(Handle); - if (Plugin::unhandledCsharpException) + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } - return returnValue; } - void Transform::SetPosition(UnityEngine::Vector3& value) + NullReferenceException::NullReferenceException(const NullReferenceException& other) + : NullReferenceException(Plugin::InternalUse::Only, other.Handle) { - Plugin::UnityEngineTransformPropertySetPosition(Handle, value); - if (Plugin::unhandledCsharpException) + } + + NullReferenceException::NullReferenceException(NullReferenceException&& other) + : NullReferenceException(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + NullReferenceException::~NullReferenceException() + { + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - void Transform::SetParent(UnityEngine::Transform& parent) + NullReferenceException& NullReferenceException::operator=(const NullReferenceException& other) { - Plugin::UnityEngineTransformMethodSetParentUnityEngineTransform(Handle, parent.Handle); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + NullReferenceException& NullReferenceException::operator=(decltype(nullptr)) + { + 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 { - Color::Color() + PrimitiveType::PrimitiveType(int32_t value) + : Value(value) + { + } + + UnityEngine::PrimitiveType::operator int32_t() const + { + return Value; + } + + bool UnityEngine::PrimitiveType::operator==(PrimitiveType other) + { + return Value == other.Value; + } + + bool UnityEngine::PrimitiveType::operator!=(PrimitiveType other) { + return Value != other.Value; } - Color::operator System::ValueType() + PrimitiveType::operator System::Enum() { - int32_t handle = Plugin::BoxColor(*this); + int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2712,14 +2657,14 @@ namespace UnityEngine if (handle) { Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); + return System::Enum(Plugin::InternalUse::Only, handle); } return nullptr; } - Color::operator System::Object() + PrimitiveType::operator System::ValueType() { - int32_t handle = Plugin::BoxColor(*this); + int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2730,17 +2675,14 @@ namespace UnityEngine if (handle) { Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); + return System::ValueType(Plugin::InternalUse::Only, handle); } return nullptr; } -} - -namespace System -{ - Object::operator UnityEngine::Color() + + PrimitiveType::operator System::Object() { - UnityEngine::Color returnVal(Plugin::UnboxColor(Handle)); + int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2748,19 +2690,35 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; } -} - -namespace UnityEngine -{ - GradientColorKey::GradientColorKey() + + PrimitiveType::operator System::IFormattable() { + int32_t handle = Plugin::BoxPrimitiveType(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; } - GradientColorKey::operator System::ValueType() + PrimitiveType::operator System::IConvertible() { - int32_t handle = Plugin::BoxGradientColorKey(*this); + int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2771,14 +2729,14 @@ namespace UnityEngine if (handle) { Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); } return nullptr; } - GradientColorKey::operator System::Object() + PrimitiveType::operator System::IComparable() { - int32_t handle = Plugin::BoxGradientColorKey(*this); + int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2789,17 +2747,24 @@ namespace UnityEngine if (handle) { Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); + return System::IComparable(Plugin::InternalUse::Only, handle); } return nullptr; } + } +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Sphere(0); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Capsule(1); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Cylinder(2); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Cube(3); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Plane(4); +const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Quad(5); namespace System { - Object::operator UnityEngine::GradientColorKey() + Object::operator UnityEngine::PrimitiveType() { - UnityEngine::GradientColorKey returnVal(Plugin::UnboxGradientColorKey(Handle)); + UnityEngine::PrimitiveType returnVal(Plugin::UnboxPrimitiveType(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2813,87 +2778,87 @@ namespace System namespace UnityEngine { - Resolution::Resolution(decltype(nullptr)) + Time::Time(decltype(nullptr)) { } - Resolution::Resolution(Plugin::InternalUse, int32_t handle) + Time::Time(Plugin::InternalUse, int32_t handle) { Handle = handle; if (handle) { - Plugin::ReferenceManagedUnityEngineResolution(Handle); + Plugin::ReferenceManagedClass(handle); } } - Resolution::Resolution(const Resolution& other) - : Resolution(Plugin::InternalUse::Only, other.Handle) + Time::Time(const Time& other) + : Time(Plugin::InternalUse::Only, other.Handle) { } - Resolution::Resolution(Resolution&& other) - : Resolution(Plugin::InternalUse::Only, other.Handle) + Time::Time(Time&& other) + : Time(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Resolution::~Resolution() + Time::~Time() { if (Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } } - Resolution& Resolution::operator=(const Resolution& other) + Time& Time::operator=(const Time& other) { if (this->Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(this->Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedUnityEngineResolution(Handle); + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - Resolution& Resolution::operator=(decltype(nullptr)) + Time& Time::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } return *this; } - Resolution& Resolution::operator=(Resolution&& other) + Time& Time::operator=(Time&& other) { if (Handle) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool Resolution::operator==(const Resolution& other) const + bool Time::operator==(const Time& other) const { return Handle == other.Handle; } - bool Resolution::operator!=(const Resolution& other) const + bool Time::operator!=(const Time& other) const { return Handle != other.Handle; } - Resolution::Resolution() + System::Single Time::GetDeltaTime() { - auto returnValue = Plugin::UnityEngineResolutionConstructor(); + auto returnValue = Plugin::UnityEngineTimePropertyGetDeltaTime(); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2901,109 +2866,112 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedUnityEngineResolution(Handle); - } + return returnValue; } - - System::Int32 Resolution::GetWidth() +} + +namespace MyGame +{ + AbstractBaseBallScript::AbstractBaseBallScript(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; } - void Resolution::SetWidth(System::Int32 value) + AbstractBaseBallScript::AbstractBaseBallScript(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) { - Plugin::UnityEngineResolutionPropertySetWidth(Handle, value); - if (Plugin::unhandledCsharpException) + Handle = handle; + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } } - System::Int32 Resolution::GetHeight() + AbstractBaseBallScript::AbstractBaseBallScript(const AbstractBaseBallScript& other) + : AbstractBaseBallScript(Plugin::InternalUse::Only, other.Handle) { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; } - void Resolution::SetHeight(System::Int32 value) + AbstractBaseBallScript::AbstractBaseBallScript(AbstractBaseBallScript&& other) + : AbstractBaseBallScript(Plugin::InternalUse::Only, other.Handle) { - Plugin::UnityEngineResolutionPropertySetHeight(Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + other.Handle = 0; } - System::Int32 Resolution::GetRefreshRate() + AbstractBaseBallScript::~AbstractBaseBallScript() { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(Handle); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return returnValue; } - void Resolution::SetRefreshRate(System::Int32 value) + AbstractBaseBallScript& AbstractBaseBallScript::operator=(const AbstractBaseBallScript& other) { - Plugin::UnityEngineResolutionPropertySetRefreshRate(Handle, value); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - Resolution::operator System::ValueType() + AbstractBaseBallScript& AbstractBaseBallScript::operator=(decltype(nullptr)) { - int32_t handle = Plugin::BoxResolution(Handle); - if (Plugin::unhandledCsharpException) + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - if (handle) + return *this; + } + + AbstractBaseBallScript& AbstractBaseBallScript::operator=(AbstractBaseBallScript&& other) + { + if (Handle) { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); + Plugin::DereferenceManagedClass(Handle); } - return nullptr; + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool AbstractBaseBallScript::operator==(const AbstractBaseBallScript& other) const + { + return Handle == other.Handle; } - Resolution::operator System::Object() + bool AbstractBaseBallScript::operator!=(const AbstractBaseBallScript& other) const + { + return Handle != other.Handle; + } +} + +namespace MyGame +{ + BaseBallScript::BaseBallScript() + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) + , MyGame::AbstractBaseBallScript(nullptr) { - int32_t handle = Plugin::BoxResolution(Handle); + CppHandle = Plugin::StoreBaseBallScript(this); + System::Int32* handle = (System::Int32*)&Handle; + int32_t cppHandle = CppHandle; + Plugin::BaseBallScriptConstructor(cppHandle, &handle->Value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3011,20 +2979,15 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - if (handle) + if (Handle) { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveBaseBallScript(CppHandle); + CppHandle = 0; } - return nullptr; - } -} - -namespace System -{ - Object::operator UnityEngine::Resolution() - { - UnityEngine::Resolution returnVal(Plugin::InternalUse::Only, Plugin::UnboxResolution(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3032,118 +2995,196 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; } -} - -namespace UnityEngine -{ - RaycastHit::RaycastHit(decltype(nullptr)) + + BaseBallScript::BaseBallScript(decltype(nullptr)) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) + , MyGame::AbstractBaseBallScript(nullptr) { + CppHandle = Plugin::StoreBaseBallScript(this); } - RaycastHit::RaycastHit(Plugin::InternalUse, int32_t handle) + BaseBallScript::BaseBallScript(const BaseBallScript& other) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) + , MyGame::AbstractBaseBallScript(nullptr) { - Handle = handle; - if (handle) + Handle = other.Handle; + CppHandle = Plugin::StoreBaseBallScript(this); + if (Handle) { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); + Plugin::ReferenceManagedClass(Handle); } } - RaycastHit::RaycastHit(const RaycastHit& other) - : RaycastHit(Plugin::InternalUse::Only, other.Handle) + BaseBallScript::BaseBallScript(BaseBallScript&& other) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) + , MyGame::AbstractBaseBallScript(nullptr) { + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; } - RaycastHit::RaycastHit(RaycastHit&& other) - : RaycastHit(Plugin::InternalUse::Only, other.Handle) + BaseBallScript::BaseBallScript(Plugin::InternalUse, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) + , MyGame::AbstractBaseBallScript(nullptr) { - other.Handle = 0; + Handle = handle; + CppHandle = Plugin::StoreBaseBallScript(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - RaycastHit::~RaycastHit() + BaseBallScript::~BaseBallScript() { + Plugin::RemoveWholeBaseBallScript(this); + Plugin::RemoveBaseBallScript(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + int32_t handle = Handle; Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseBaseBallScript(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } } - RaycastHit& RaycastHit::operator=(const RaycastHit& other) + BaseBallScript& BaseBallScript::operator=(const BaseBallScript& other) { if (this->Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + Plugin::DereferenceManagedClass(this->Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - RaycastHit& RaycastHit::operator=(decltype(nullptr)) + BaseBallScript& BaseBallScript::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + int32_t handle = Handle; Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseBaseBallScript(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } + Handle = 0; return *this; } - RaycastHit& RaycastHit::operator=(RaycastHit&& other) + BaseBallScript& BaseBallScript::operator=(BaseBallScript&& other) { + Plugin::RemoveBaseBallScript(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseBaseBallScript(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } Handle = other.Handle; other.Handle = 0; return *this; } - bool RaycastHit::operator==(const RaycastHit& other) const + bool BaseBallScript::operator==(const BaseBallScript& other) const { return Handle == other.Handle; } - bool RaycastHit::operator!=(const RaycastHit& other) const + bool BaseBallScript::operator!=(const BaseBallScript& other) const { return Handle != other.Handle; } - UnityEngine::Vector3 RaycastHit::GetPoint() + DLLEXPORT int32_t NewBaseBallScript(int32_t handle) + { + MyGame::BaseBallScript* memory = Plugin::StoreWholeBaseBallScript(); + MyGame::BallScript* thiz = new (memory) MyGame::BallScript(Plugin::InternalUse::Only, handle); + return thiz->CppHandle; + } + + DLLEXPORT void DestroyBaseBallScript(int32_t cppHandle) + { + BaseBallScript* instance = Plugin::GetBaseBallScript(cppHandle); + instance->~BaseBallScript(); + } + + void BaseBallScript::Update() { - 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) + DLLEXPORT void MyGameAbstractBaseBallScriptUpdate(int32_t cppHandle) { - Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); - if (Plugin::unhandledCsharpException) + try { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::GetBaseBallScript(cppHandle)->Update(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking MyGame::AbstractBaseBallScript"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); } } - - UnityEngine::Transform RaycastHit::GetTransform() +} + +namespace System +{ + Object::operator System::Boolean() { - auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetTransform(Handle); + System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3151,12 +3192,15 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); + return returnVal; } - - RaycastHit::operator System::ValueType() +} + +namespace System +{ + Object::operator System::SByte() { - int32_t handle = Plugin::BoxRaycastHit(Handle); + System::SByte returnVal(Plugin::UnboxSByte(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3164,17 +3208,15 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; + return returnVal; } - - RaycastHit::operator System::Object() +} + +namespace System +{ + Object::operator System::Byte() { - int32_t handle = Plugin::BoxRaycastHit(Handle); + System::Byte returnVal(Plugin::UnboxByte(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3182,20 +3224,15 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; + return returnVal; } } namespace System { - Object::operator UnityEngine::RaycastHit() + Object::operator System::Int16() { - UnityEngine::RaycastHit returnVal(Plugin::InternalUse::Only, Plugin::UnboxRaycastHit(Handle)); + System::Int16 returnVal(Plugin::UnboxInt16(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3209,18131 +3246,129 @@ namespace System namespace System { - namespace Collections + Object::operator System::UInt16() { - IEnumerator::IEnumerator(decltype(nullptr)) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) + System::UInt16 returnVal(Plugin::UnboxUInt16(Handle)); + if (Plugin::unhandledCsharpException) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - System::Object IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Object(Plugin::InternalUse::Only, returnValue); - } - - System::Boolean IEnumerator::MoveNext() - { - auto returnValue = Plugin::SystemCollectionsIEnumeratorMethodMoveNext(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - } -} - -namespace System -{ - namespace Runtime - { - namespace Serialization - { - ISerializable::ISerializable(decltype(nullptr)) - { - } - - ISerializable::ISerializable(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ISerializable::ISerializable(const ISerializable& other) - : ISerializable(Plugin::InternalUse::Only, other.Handle) - { - } - - ISerializable::ISerializable(ISerializable&& other) - : ISerializable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ISerializable::~ISerializable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ISerializable& ISerializable::operator=(const ISerializable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ISerializable& ISerializable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ISerializable& ISerializable::operator=(ISerializable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ISerializable::operator==(const ISerializable& other) const - { - return Handle == other.Handle; - } - - bool ISerializable::operator!=(const ISerializable& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace Runtime - { - namespace InteropServices - { - _Exception::_Exception(decltype(nullptr)) - { - } - - _Exception::_Exception(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - _Exception& _Exception::operator=(decltype(nullptr)) - { - 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; - } - } - } -} - -namespace System -{ - IAppDomainSetup::IAppDomainSetup(decltype(nullptr)) - { - } - - IAppDomainSetup::IAppDomainSetup(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IAppDomainSetup::IAppDomainSetup(const IAppDomainSetup& other) - : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) - { - } - - IAppDomainSetup::IAppDomainSetup(IAppDomainSetup&& other) - : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IAppDomainSetup::~IAppDomainSetup() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IAppDomainSetup& IAppDomainSetup::operator=(const IAppDomainSetup& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IAppDomainSetup& IAppDomainSetup::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IAppDomainSetup& IAppDomainSetup::operator=(IAppDomainSetup&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IAppDomainSetup::operator==(const IAppDomainSetup& other) const - { - return Handle == other.Handle; - } - - bool IAppDomainSetup::operator!=(const IAppDomainSetup& other) const - { - return Handle != other.Handle; - } -} - -namespace System -{ - namespace Collections - { - IComparer::IComparer(decltype(nullptr)) - { - } - - IComparer::IComparer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IComparer::~IComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IComparer& IComparer::operator=(const IComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IComparer& IComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IComparer& IComparer::operator=(IComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IComparer::operator==(const IComparer& other) const - { - return Handle == other.Handle; - } - - bool IComparer::operator!=(const IComparer& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System -{ - namespace Collections - { - IEqualityComparer::IEqualityComparer(decltype(nullptr)) - { - } - - IEqualityComparer::IEqualityComparer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEqualityComparer::~IEqualityComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEqualityComparer::operator==(const IEqualityComparer& other) const - { - return Handle == other.Handle; - } - - bool IEqualityComparer::operator!=(const IEqualityComparer& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEqualityComparer::IEqualityComparer(decltype(nullptr)) - { - } - - IEqualityComparer::IEqualityComparer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEqualityComparer::~IEqualityComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEqualityComparer::operator==(const IEqualityComparer& other) const - { - return Handle == other.Handle; - } - - bool IEqualityComparer::operator!=(const IEqualityComparer& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEqualityComparer::IEqualityComparer(decltype(nullptr)) - { - } - - IEqualityComparer::IEqualityComparer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) - : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEqualityComparer::~IEqualityComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEqualityComparer::operator==(const IEqualityComparer& other) const - { - return Handle == other.Handle; - } - - bool IEqualityComparer::operator!=(const IEqualityComparer& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Playables - { - PlayableGraph::PlayableGraph(decltype(nullptr)) - { - } - - PlayableGraph::PlayableGraph(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); - } - } - - PlayableGraph::PlayableGraph(const PlayableGraph& other) - : PlayableGraph(Plugin::InternalUse::Only, other.Handle) - { - } - - PlayableGraph::PlayableGraph(PlayableGraph&& other) - : PlayableGraph(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - PlayableGraph::~PlayableGraph() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); - Handle = 0; - } - } - - PlayableGraph& PlayableGraph::operator=(const PlayableGraph& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); - } - return *this; - } - - PlayableGraph& PlayableGraph::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); - Handle = 0; - } - return *this; - } - - PlayableGraph& PlayableGraph::operator=(PlayableGraph&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool PlayableGraph::operator==(const PlayableGraph& other) const - { - return Handle == other.Handle; - } - - bool PlayableGraph::operator!=(const PlayableGraph& other) const - { - return Handle != other.Handle; - } - - PlayableGraph::operator System::ValueType() - { - int32_t handle = Plugin::BoxPlayableGraph(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PlayableGraph::operator System::Object() - { - int32_t handle = Plugin::BoxPlayableGraph(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - } -} - -namespace System -{ - Object::operator UnityEngine::Playables::PlayableGraph() - { - UnityEngine::Playables::PlayableGraph returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableGraph(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - namespace Playables - { - IPlayable::IPlayable(decltype(nullptr)) - { - } - - IPlayable::IPlayable(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IPlayable::IPlayable(const IPlayable& other) - : IPlayable(Plugin::InternalUse::Only, other.Handle) - { - } - - IPlayable::IPlayable(IPlayable&& other) - : IPlayable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IPlayable::~IPlayable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IPlayable& IPlayable::operator=(const IPlayable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IPlayable& IPlayable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IPlayable& IPlayable::operator=(IPlayable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IPlayable::operator==(const IPlayable& other) const - { - return Handle == other.Handle; - } - - bool IPlayable::operator!=(const IPlayable& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System -{ - IEquatable::IEquatable(decltype(nullptr)) - { - } - - IEquatable::IEquatable(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEquatable::IEquatable(const IEquatable& other) - : IEquatable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEquatable::IEquatable(IEquatable&& other) - : IEquatable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEquatable::~IEquatable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEquatable& IEquatable::operator=(const IEquatable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEquatable& IEquatable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEquatable& IEquatable::operator=(IEquatable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEquatable::operator==(const IEquatable& other) const - { - return Handle == other.Handle; - } - - bool IEquatable::operator!=(const IEquatable& other) const - { - return Handle != other.Handle; - } -} - -namespace UnityEngine -{ - namespace Animations - { - AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr)) - { - } - - AnimationMixerPlayable::AnimationMixerPlayable(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - } - - AnimationMixerPlayable::AnimationMixerPlayable(const AnimationMixerPlayable& other) - : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) - { - } - - AnimationMixerPlayable::AnimationMixerPlayable(AnimationMixerPlayable&& other) - : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - AnimationMixerPlayable::~AnimationMixerPlayable() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - Handle = 0; - } - } - - AnimationMixerPlayable& AnimationMixerPlayable::operator=(const AnimationMixerPlayable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - return *this; - } - - AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - Handle = 0; - } - return *this; - } - - AnimationMixerPlayable& AnimationMixerPlayable::operator=(AnimationMixerPlayable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool AnimationMixerPlayable::operator==(const AnimationMixerPlayable& other) const - { - return Handle == other.Handle; - } - - bool AnimationMixerPlayable::operator!=(const AnimationMixerPlayable& other) const - { - return Handle != other.Handle; - } - - UnityEngine::Animations::AnimationMixerPlayable AnimationMixerPlayable::Create(UnityEngine::Playables::PlayableGraph& graph, System::Int32 inputCount, System::Boolean normalizeWeights) - { - auto returnValue = Plugin::UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(graph.Handle, inputCount, normalizeWeights); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Animations::AnimationMixerPlayable(Plugin::InternalUse::Only, returnValue); - } - - AnimationMixerPlayable::operator System::ValueType() - { - int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - AnimationMixerPlayable::operator System::Object() - { - int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - AnimationMixerPlayable::operator UnityEngine::Playables::IPlayable() - { - int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return UnityEngine::Playables::IPlayable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - AnimationMixerPlayable::operator System::IEquatable() - { - int32_t handle = Plugin::BoxAnimationMixerPlayable(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IEquatable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - } -} - -namespace System -{ - Object::operator UnityEngine::Animations::AnimationMixerPlayable() - { - UnityEngine::Animations::AnimationMixerPlayable returnVal(Plugin::InternalUse::Only, Plugin::UnboxAnimationMixerPlayable(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - namespace Runtime - { - namespace CompilerServices - { - IStrongBox::IStrongBox(decltype(nullptr)) - { - } - - IStrongBox::IStrongBox(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IStrongBox::IStrongBox(const IStrongBox& other) - : IStrongBox(Plugin::InternalUse::Only, other.Handle) - { - } - - IStrongBox::IStrongBox(IStrongBox&& other) - : IStrongBox(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IStrongBox::~IStrongBox() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IStrongBox& IStrongBox::operator=(const IStrongBox& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IStrongBox& IStrongBox::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IStrongBox& IStrongBox::operator=(IStrongBox&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IStrongBox::operator==(const IStrongBox& other) const - { - return Handle == other.Handle; - } - - bool IStrongBox::operator!=(const IStrongBox& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - IEventHandler::IEventHandler(decltype(nullptr)) - { - } - - IEventHandler::IEventHandler(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEventHandler::IEventHandler(const IEventHandler& other) - : IEventHandler(Plugin::InternalUse::Only, other.Handle) - { - } - - IEventHandler::IEventHandler(IEventHandler&& other) - : IEventHandler(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEventHandler::~IEventHandler() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEventHandler& IEventHandler::operator=(const IEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEventHandler& IEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEventHandler& IEventHandler::operator=(IEventHandler&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEventHandler::operator==(const IEventHandler& other) const - { - return Handle == other.Handle; - } - - bool IEventHandler::operator!=(const IEventHandler& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - CallbackEventHandler::CallbackEventHandler(decltype(nullptr)) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - { - } - - CallbackEventHandler::CallbackEventHandler(Plugin::InternalUse, int32_t handle) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - CallbackEventHandler::CallbackEventHandler(const CallbackEventHandler& other) - : CallbackEventHandler(Plugin::InternalUse::Only, other.Handle) - { - } - - CallbackEventHandler::CallbackEventHandler(CallbackEventHandler&& other) - : CallbackEventHandler(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - CallbackEventHandler::~CallbackEventHandler() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - CallbackEventHandler& CallbackEventHandler::operator=(const CallbackEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - CallbackEventHandler& CallbackEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - CallbackEventHandler& CallbackEventHandler::operator=(CallbackEventHandler&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool CallbackEventHandler::operator==(const CallbackEventHandler& other) const - { - return Handle == other.Handle; - } - - bool CallbackEventHandler::operator!=(const CallbackEventHandler& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - Focusable::Focusable(decltype(nullptr)) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) - { - } - - Focusable::Focusable(Plugin::InternalUse, int32_t handle) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Focusable::Focusable(const Focusable& other) - : Focusable(Plugin::InternalUse::Only, other.Handle) - { - } - - Focusable::Focusable(Focusable&& other) - : Focusable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Focusable::~Focusable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Focusable& Focusable::operator=(const Focusable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Focusable& Focusable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Focusable& Focusable::operator=(Focusable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Focusable::operator==(const Focusable& other) const - { - return Handle == other.Handle; - } - - bool Focusable::operator!=(const Focusable& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - IStyle::IStyle(decltype(nullptr)) - { - } - - IStyle::IStyle(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IStyle::IStyle(const IStyle& other) - : IStyle(Plugin::InternalUse::Only, other.Handle) - { - } - - IStyle::IStyle(IStyle&& other) - : IStyle(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IStyle::~IStyle() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IStyle& IStyle::operator=(const IStyle& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IStyle& IStyle::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IStyle& IStyle::operator=(IStyle&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IStyle::operator==(const IStyle& other) const - { - return Handle == other.Handle; - } - - bool IStyle::operator!=(const IStyle& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace Diagnostics - { - Stopwatch::Stopwatch(decltype(nullptr)) - { - } - - Stopwatch::Stopwatch(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Stopwatch& Stopwatch::operator=(decltype(nullptr)) - { - 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() - { - 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); - } - } - - System::Int64 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 -{ - GameObject::GameObject(decltype(nullptr)) - : UnityEngine::Object(nullptr) - { - } - - GameObject::GameObject(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - GameObject& GameObject::operator=(decltype(nullptr)) - { - 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); - } - - template<> MyGame::MonoBehaviours::AnotherScript GameObject::AddComponent() - { - auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return MyGame::MonoBehaviours::AnotherScript(Plugin::InternalUse::Only, returnValue); - } - - UnityEngine::GameObject GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) - { - auto returnValue = Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(type); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::GameObject(Plugin::InternalUse::Only, returnValue); - } -} - -namespace UnityEngine -{ - Debug::Debug(decltype(nullptr)) - { - } - - Debug::Debug(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Debug& Debug::operator=(decltype(nullptr)) - { - 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(decltype(nullptr)) - { - } - - Collision::Collision(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Collision& Collision::operator=(decltype(nullptr)) - { - 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(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - { - } - - Behaviour::Behaviour(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Behaviour& Behaviour::operator=(decltype(nullptr)) - { - 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(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - { - } - - MonoBehaviour::MonoBehaviour(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr)) - { - 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; - } - - UnityEngine::Transform MonoBehaviour::GetTransform() - { - auto returnValue = Plugin::UnityEngineMonoBehaviourPropertyGetTransform(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 -{ - AudioSettings::AudioSettings(decltype(nullptr)) - { - } - - AudioSettings::AudioSettings(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - AudioSettings& AudioSettings::operator=(decltype(nullptr)) - { - 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(System::Int32* bufferLength, System::Int32* numBuffers) - { - Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(&bufferLength->Value, &numBuffers->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } -} - -namespace UnityEngine -{ - namespace Networking - { - NetworkTransport::NetworkTransport(decltype(nullptr)) - { - } - - NetworkTransport::NetworkTransport(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - NetworkTransport& NetworkTransport::operator=(decltype(nullptr)) - { - 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(System::Int32 hostId, System::String* address, System::Int32* port, System::Byte* error) - { - int32_t addressHandle = address->Handle; - Plugin::UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(hostId, &addressHandle, &port->Value, &error->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - 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 -{ - Quaternion::Quaternion() - { - } - - Quaternion::operator System::ValueType() - { - int32_t handle = Plugin::BoxQuaternion(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - Quaternion::operator System::Object() - { - int32_t handle = Plugin::BoxQuaternion(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } -} - -namespace System -{ - Object::operator UnityEngine::Quaternion() - { - UnityEngine::Quaternion returnVal(Plugin::UnboxQuaternion(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - Matrix4x4::Matrix4x4() - { - } - - System::Single Matrix4x4::GetItem(System::Int32 row, System::Int32 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(System::Int32 row, System::Int32 column, System::Single value) - { - Plugin::UnityEngineMatrix4x4PropertySetItem(this, row, column, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Matrix4x4::operator System::ValueType() - { - int32_t handle = Plugin::BoxMatrix4x4(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - Matrix4x4::operator System::Object() - { - int32_t handle = Plugin::BoxMatrix4x4(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } -} - -namespace System -{ - Object::operator UnityEngine::Matrix4x4() - { - UnityEngine::Matrix4x4 returnVal(Plugin::UnboxMatrix4x4(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - QueryTriggerInteraction::QueryTriggerInteraction(int32_t value) - : Value(value) - { - } - - UnityEngine::QueryTriggerInteraction::operator int32_t() const - { - return Value; - } - - bool UnityEngine::QueryTriggerInteraction::operator==(QueryTriggerInteraction other) - { - return Value == other.Value; - } - - bool UnityEngine::QueryTriggerInteraction::operator!=(QueryTriggerInteraction other) - { - return Value != other.Value; - } - - QueryTriggerInteraction::operator System::Enum() - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Enum(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - QueryTriggerInteraction::operator System::ValueType() - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - QueryTriggerInteraction::operator System::Object() - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - QueryTriggerInteraction::operator System::IFormattable() - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - QueryTriggerInteraction::operator System::IConvertible() - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IConvertible(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - QueryTriggerInteraction::operator System::IComparable() - { - int32_t handle = Plugin::BoxQueryTriggerInteraction(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - -} -const UnityEngine::QueryTriggerInteraction UnityEngine::QueryTriggerInteraction::UseGlobal(0); -const UnityEngine::QueryTriggerInteraction UnityEngine::QueryTriggerInteraction::Ignore(1); -const UnityEngine::QueryTriggerInteraction UnityEngine::QueryTriggerInteraction::Collide(2); - -namespace System -{ - Object::operator UnityEngine::QueryTriggerInteraction() - { - UnityEngine::QueryTriggerInteraction returnVal(Plugin::UnboxQueryTriggerInteraction(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - KeyValuePair::KeyValuePair(decltype(nullptr)) - { - } - - KeyValuePair::KeyValuePair(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); - } - return *this; - } - - KeyValuePair& KeyValuePair::operator=(decltype(nullptr)) - { - 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, System::Double value) - { - 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); - } - - System::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; - } - - KeyValuePair::operator System::ValueType() - { - int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - KeyValuePair::operator System::Object() - { - int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - } - } -} - -namespace System -{ - Object::operator System::Collections::Generic::KeyValuePair() - { - System::Collections::Generic::KeyValuePair returnVal(Plugin::InternalUse::Only, Plugin::UnboxKeyValuePairSystemString_SystemDouble(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - LinkedListNode::LinkedListNode(decltype(nullptr)) - { - } - - LinkedListNode::LinkedListNode(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - LinkedListNode& LinkedListNode::operator=(decltype(nullptr)) - { - 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) - { - 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(decltype(nullptr)) - : System::Runtime::CompilerServices::IStrongBox(nullptr) - { - } - - StrongBox::StrongBox(Plugin::InternalUse, int32_t handle) - : System::Runtime::CompilerServices::IStrongBox(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - StrongBox& StrongBox::operator=(decltype(nullptr)) - { - 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::Runtime::CompilerServices::IStrongBox(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 -{ - Exception::Exception(decltype(nullptr)) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - { - } - - Exception::Exception(Plugin::InternalUse, int32_t handle) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Exception& Exception::operator=(decltype(nullptr)) - { - 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::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(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(decltype(nullptr)) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) - { - } - - SystemException::SystemException(Plugin::InternalUse, int32_t handle) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - SystemException& SystemException::operator=(decltype(nullptr)) - { - 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(decltype(nullptr)) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) - , System::SystemException(nullptr) - { - } - - NullReferenceException::NullReferenceException(Plugin::InternalUse, int32_t handle) - : System::Runtime::InteropServices::_Exception(nullptr) - , System::Runtime::Serialization::ISerializable(nullptr) - , System::Exception(nullptr) - , System::SystemException(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - NullReferenceException& NullReferenceException::operator=(decltype(nullptr)) - { - 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 -{ - Screen::Screen(decltype(nullptr)) - { - } - - Screen::Screen(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Screen& Screen::operator=(decltype(nullptr)) - { - 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(decltype(nullptr)) - { - } - - Ray::Ray(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineRay(Handle); - } - } - - Ray::Ray(const Ray& other) - : Ray(Plugin::InternalUse::Only, other.Handle) - { - } - - Ray::Ray(Ray&& other) - : Ray(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Ray::~Ray() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineRay(Handle); - Handle = 0; - } - } - - Ray& Ray::operator=(const Ray& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineRay(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineRay(Handle); - } - return *this; - } - - Ray& Ray::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineRay(Handle); - Handle = 0; - } - return *this; - } - - Ray& Ray::operator=(Ray&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineRay(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Ray::operator==(const Ray& other) const - { - return Handle == other.Handle; - } - - bool Ray::operator!=(const Ray& other) const - { - return Handle != other.Handle; - } - - 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; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedUnityEngineRay(Handle); - } - } - - Ray::operator System::ValueType() - { - int32_t handle = Plugin::BoxRay(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - Ray::operator System::Object() - { - int32_t handle = Plugin::BoxRay(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } -} - -namespace System -{ - Object::operator UnityEngine::Ray() - { - UnityEngine::Ray returnVal(Plugin::InternalUse::Only, Plugin::UnboxRay(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - Physics::Physics(decltype(nullptr)) - { - } - - Physics::Physics(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Physics& Physics::operator=(decltype(nullptr)) - { - 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; - } - - System::Int32 Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results) - { - auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(ray.Handle, 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.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Array1(Plugin::InternalUse::Only, returnValue); - } -} - -namespace UnityEngine -{ - Gradient::Gradient(decltype(nullptr)) - { - } - - Gradient::Gradient(Plugin::InternalUse, int32_t handle) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Gradient& Gradient::operator=(decltype(nullptr)) - { - 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() - { - 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(decltype(nullptr)) - : System::IAppDomainSetup(nullptr) - { - } - - AppDomainSetup::AppDomainSetup(Plugin::InternalUse, int32_t handle) - : System::IAppDomainSetup(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr)) - { - 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::IAppDomainSetup(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 UnityEngine -{ - Application::Application(decltype(nullptr)) - { - } - - Application::Application(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Application::Application(const Application& other) - : Application(Plugin::InternalUse::Only, other.Handle) - { - } - - Application::Application(Application&& other) - : Application(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Application::~Application() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Application& Application::operator=(const Application& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Application& Application::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Application& Application::operator=(Application&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Application::operator==(const Application& other) const - { - return Handle == other.Handle; - } - - bool Application::operator!=(const Application& other) const - { - return Handle != other.Handle; - } - - void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction& del) - { - Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del) - { - Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - SceneManager::SceneManager(decltype(nullptr)) - { - } - - SceneManager::SceneManager(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - SceneManager::SceneManager(const SceneManager& other) - : SceneManager(Plugin::InternalUse::Only, other.Handle) - { - } - - SceneManager::SceneManager(SceneManager&& other) - : SceneManager(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - SceneManager::~SceneManager() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - SceneManager& SceneManager::operator=(const SceneManager& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - SceneManager& SceneManager::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - SceneManager& SceneManager::operator=(SceneManager&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool SceneManager::operator==(const SceneManager& other) const - { - return Handle == other.Handle; - } - - bool SceneManager::operator!=(const SceneManager& other) const - { - return Handle != other.Handle; - } - - void SceneManager::AddSceneLoaded(UnityEngine::Events::UnityAction2& del) - { - Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void SceneManager::RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del) - { - Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - Scene::Scene(decltype(nullptr)) - { - } - - Scene::Scene(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); - } - } - - Scene::Scene(const Scene& other) - : Scene(Plugin::InternalUse::Only, other.Handle) - { - } - - Scene::Scene(Scene&& other) - : Scene(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Scene::~Scene() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - Handle = 0; - } - } - - Scene& Scene::operator=(const Scene& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); - } - return *this; - } - - Scene& Scene::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - Handle = 0; - } - return *this; - } - - Scene& Scene::operator=(Scene&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Scene::operator==(const Scene& other) const - { - return Handle == other.Handle; - } - - bool Scene::operator!=(const Scene& other) const - { - return Handle != other.Handle; - } - - Scene::operator System::ValueType() - { - int32_t handle = Plugin::BoxScene(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - Scene::operator System::Object() - { - int32_t handle = Plugin::BoxScene(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - } -} - -namespace System -{ - Object::operator UnityEngine::SceneManagement::Scene() - { - UnityEngine::SceneManagement::Scene returnVal(Plugin::InternalUse::Only, Plugin::UnboxScene(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - LoadSceneMode::LoadSceneMode(int32_t value) - : Value(value) - { - } - - UnityEngine::SceneManagement::LoadSceneMode::operator int32_t() const - { - return Value; - } - - bool UnityEngine::SceneManagement::LoadSceneMode::operator==(LoadSceneMode other) - { - return Value == other.Value; - } - - bool UnityEngine::SceneManagement::LoadSceneMode::operator!=(LoadSceneMode other) - { - return Value != other.Value; - } - - LoadSceneMode::operator System::Enum() - { - int32_t handle = Plugin::BoxLoadSceneMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Enum(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - LoadSceneMode::operator System::ValueType() - { - int32_t handle = Plugin::BoxLoadSceneMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - LoadSceneMode::operator System::Object() - { - int32_t handle = Plugin::BoxLoadSceneMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - LoadSceneMode::operator System::IFormattable() - { - int32_t handle = Plugin::BoxLoadSceneMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - LoadSceneMode::operator System::IConvertible() - { - int32_t handle = Plugin::BoxLoadSceneMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IConvertible(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - LoadSceneMode::operator System::IComparable() - { - int32_t handle = Plugin::BoxLoadSceneMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - } -} -const UnityEngine::SceneManagement::LoadSceneMode UnityEngine::SceneManagement::LoadSceneMode::Single(0); -const UnityEngine::SceneManagement::LoadSceneMode UnityEngine::SceneManagement::LoadSceneMode::Additive(1); - -namespace System -{ - Object::operator UnityEngine::SceneManagement::LoadSceneMode() - { - UnityEngine::SceneManagement::LoadSceneMode returnVal(Plugin::UnboxLoadSceneMode(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - EventArgs::EventArgs(decltype(nullptr)) - { - } - - EventArgs::EventArgs(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - EventArgs::EventArgs(const EventArgs& other) - : EventArgs(Plugin::InternalUse::Only, other.Handle) - { - } - - EventArgs::EventArgs(EventArgs&& other) - : EventArgs(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - EventArgs::~EventArgs() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - EventArgs& EventArgs::operator=(const EventArgs& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - EventArgs& EventArgs::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - EventArgs& EventArgs::operator=(EventArgs&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool EventArgs::operator==(const EventArgs& other) const - { - return Handle == other.Handle; - } - - bool EventArgs::operator!=(const EventArgs& other) const - { - return Handle != other.Handle; - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentEventArgs::ComponentEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) - { - } - - ComponentEventArgs::ComponentEventArgs(Plugin::InternalUse, int32_t handle) - : System::EventArgs(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ComponentEventArgs::ComponentEventArgs(const ComponentEventArgs& other) - : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) - { - } - - ComponentEventArgs::ComponentEventArgs(ComponentEventArgs&& other) - : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ComponentEventArgs::~ComponentEventArgs() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ComponentEventArgs& ComponentEventArgs::operator=(const ComponentEventArgs& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ComponentEventArgs& ComponentEventArgs::operator=(ComponentEventArgs&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentEventArgs::operator==(const ComponentEventArgs& other) const - { - return Handle == other.Handle; - } - - bool ComponentEventArgs::operator!=(const ComponentEventArgs& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) - { - } - - ComponentChangingEventArgs::ComponentChangingEventArgs(Plugin::InternalUse, int32_t handle) - : System::EventArgs(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ComponentChangingEventArgs::ComponentChangingEventArgs(const ComponentChangingEventArgs& other) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) - { - } - - ComponentChangingEventArgs::ComponentChangingEventArgs(ComponentChangingEventArgs&& other) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ComponentChangingEventArgs::~ComponentChangingEventArgs() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(const ComponentChangingEventArgs& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(ComponentChangingEventArgs&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentChangingEventArgs::operator==(const ComponentChangingEventArgs& other) const - { - return Handle == other.Handle; - } - - bool ComponentChangingEventArgs::operator!=(const ComponentChangingEventArgs& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) - { - } - - ComponentChangedEventArgs::ComponentChangedEventArgs(Plugin::InternalUse, int32_t handle) - : System::EventArgs(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ComponentChangedEventArgs::ComponentChangedEventArgs(const ComponentChangedEventArgs& other) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) - { - } - - ComponentChangedEventArgs::ComponentChangedEventArgs(ComponentChangedEventArgs&& other) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ComponentChangedEventArgs::~ComponentChangedEventArgs() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(const ComponentChangedEventArgs& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(ComponentChangedEventArgs&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentChangedEventArgs::operator==(const ComponentChangedEventArgs& other) const - { - return Handle == other.Handle; - } - - bool ComponentChangedEventArgs::operator!=(const ComponentChangedEventArgs& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr)) - : System::EventArgs(nullptr) - { - } - - ComponentRenameEventArgs::ComponentRenameEventArgs(Plugin::InternalUse, int32_t handle) - : System::EventArgs(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ComponentRenameEventArgs::ComponentRenameEventArgs(const ComponentRenameEventArgs& other) - : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) - { - } - - ComponentRenameEventArgs::ComponentRenameEventArgs(ComponentRenameEventArgs&& other) - : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ComponentRenameEventArgs::~ComponentRenameEventArgs() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(const ComponentRenameEventArgs& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(ComponentRenameEventArgs&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentRenameEventArgs::operator==(const ComponentRenameEventArgs& other) const - { - return Handle == other.Handle; - } - - bool ComponentRenameEventArgs::operator!=(const ComponentRenameEventArgs& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - MemberDescriptor::MemberDescriptor(decltype(nullptr)) - { - } - - MemberDescriptor::MemberDescriptor(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - MemberDescriptor::MemberDescriptor(const MemberDescriptor& other) - : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) - { - } - - MemberDescriptor::MemberDescriptor(MemberDescriptor&& other) - : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - MemberDescriptor::~MemberDescriptor() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - MemberDescriptor& MemberDescriptor::operator=(const MemberDescriptor& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - MemberDescriptor& MemberDescriptor::operator=(MemberDescriptor&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool MemberDescriptor::operator==(const MemberDescriptor& other) const - { - return Handle == other.Handle; - } - - bool MemberDescriptor::operator!=(const MemberDescriptor& other) const - { - return Handle != other.Handle; - } - } -} - -namespace UnityEngine -{ - PrimitiveType::PrimitiveType(int32_t value) - : Value(value) - { - } - - UnityEngine::PrimitiveType::operator int32_t() const - { - return Value; - } - - bool UnityEngine::PrimitiveType::operator==(PrimitiveType other) - { - return Value == other.Value; - } - - bool UnityEngine::PrimitiveType::operator!=(PrimitiveType other) - { - return Value != other.Value; - } - - PrimitiveType::operator System::Enum() - { - int32_t handle = Plugin::BoxPrimitiveType(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Enum(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PrimitiveType::operator System::ValueType() - { - int32_t handle = Plugin::BoxPrimitiveType(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PrimitiveType::operator System::Object() - { - int32_t handle = Plugin::BoxPrimitiveType(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PrimitiveType::operator System::IFormattable() - { - int32_t handle = Plugin::BoxPrimitiveType(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PrimitiveType::operator System::IConvertible() - { - int32_t handle = Plugin::BoxPrimitiveType(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IConvertible(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PrimitiveType::operator System::IComparable() - { - int32_t handle = Plugin::BoxPrimitiveType(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - -} -const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Sphere(0); -const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Capsule(1); -const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Cylinder(2); -const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Cube(3); -const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Plane(4); -const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Quad(5); - -namespace System -{ - Object::operator UnityEngine::PrimitiveType() - { - UnityEngine::PrimitiveType returnVal(Plugin::UnboxPrimitiveType(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - Time::Time(decltype(nullptr)) - { - } - - Time::Time(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Time::Time(const Time& other) - : Time(Plugin::InternalUse::Only, other.Handle) - { - } - - Time::Time(Time&& other) - : Time(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Time::~Time() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Time& Time::operator=(const Time& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Time& Time::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Time& Time::operator=(Time&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Time::operator==(const Time& other) const - { - return Handle == other.Handle; - } - - bool Time::operator!=(const Time& other) const - { - return Handle != other.Handle; - } - - System::Single Time::GetDeltaTime() - { - auto returnValue = Plugin::UnityEngineTimePropertyGetDeltaTime(); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace System -{ - namespace IO - { - FileMode::FileMode(int32_t value) - : Value(value) - { - } - - System::IO::FileMode::operator int32_t() const - { - return Value; - } - - bool System::IO::FileMode::operator==(FileMode other) - { - return Value == other.Value; - } - - bool System::IO::FileMode::operator!=(FileMode other) - { - return Value != other.Value; - } - - FileMode::operator System::Enum() - { - int32_t handle = Plugin::BoxFileMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Enum(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - FileMode::operator System::ValueType() - { - int32_t handle = Plugin::BoxFileMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - FileMode::operator System::Object() - { - int32_t handle = Plugin::BoxFileMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - FileMode::operator System::IFormattable() - { - int32_t handle = Plugin::BoxFileMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - FileMode::operator System::IConvertible() - { - int32_t handle = Plugin::BoxFileMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IConvertible(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - FileMode::operator System::IComparable() - { - int32_t handle = Plugin::BoxFileMode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - } -} -const System::IO::FileMode System::IO::FileMode::CreateNew(1); -const System::IO::FileMode System::IO::FileMode::Create(2); -const System::IO::FileMode System::IO::FileMode::Open(3); -const System::IO::FileMode System::IO::FileMode::OpenOrCreate(4); -const System::IO::FileMode System::IO::FileMode::Truncate(5); -const System::IO::FileMode System::IO::FileMode::Append(6); - -namespace System -{ - Object::operator System::IO::FileMode() - { - System::IO::FileMode returnVal(Plugin::UnboxFileMode(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - MarshalByRefObject::MarshalByRefObject(decltype(nullptr)) - { - } - - MarshalByRefObject::MarshalByRefObject(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - MarshalByRefObject::MarshalByRefObject(const MarshalByRefObject& other) - : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) - { - } - - MarshalByRefObject::MarshalByRefObject(MarshalByRefObject&& other) - : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - MarshalByRefObject::~MarshalByRefObject() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - MarshalByRefObject& MarshalByRefObject::operator=(const MarshalByRefObject& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - MarshalByRefObject& MarshalByRefObject::operator=(MarshalByRefObject&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool MarshalByRefObject::operator==(const MarshalByRefObject& other) const - { - return Handle == other.Handle; - } - - bool MarshalByRefObject::operator!=(const MarshalByRefObject& other) const - { - return Handle != other.Handle; - } -} - -namespace System -{ - namespace IO - { - Stream::Stream(decltype(nullptr)) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - { - } - - Stream::Stream(Plugin::InternalUse, int32_t handle) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Stream::Stream(const Stream& other) - : Stream(Plugin::InternalUse::Only, other.Handle) - { - } - - Stream::Stream(Stream&& other) - : Stream(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Stream::~Stream() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Stream& Stream::operator=(const Stream& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Stream& Stream::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Stream& Stream::operator=(Stream&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Stream::operator==(const Stream& other) const - { - return Handle == other.Handle; - } - - bool Stream::operator!=(const Stream& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IComparer::IComparer(decltype(nullptr)) - { - } - - IComparer::IComparer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IComparer::~IComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IComparer& IComparer::operator=(const IComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IComparer& IComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IComparer& IComparer::operator=(IComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IComparer::operator==(const IComparer& other) const - { - return Handle == other.Handle; - } - - bool IComparer::operator!=(const IComparer& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IComparer::IComparer(decltype(nullptr)) - { - } - - IComparer::IComparer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IComparer::~IComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IComparer& IComparer::operator=(const IComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IComparer& IComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IComparer& IComparer::operator=(IComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IComparer::operator==(const IComparer& other) const - { - return Handle == other.Handle; - } - - bool IComparer::operator!=(const IComparer& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - BaseIComparer::BaseIComparer() - : System::Collections::Generic::IComparer(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor(cppHandle, &handle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseIComparer::BaseIComparer(decltype(nullptr)) - : System::Collections::Generic::IComparer(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - } - - BaseIComparer::BaseIComparer(const BaseIComparer& other) - : System::Collections::Generic::IComparer(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseIComparer::BaseIComparer(BaseIComparer&& other) - : System::Collections::Generic::IComparer(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseIComparer::BaseIComparer(Plugin::InternalUse, int32_t handle) - : System::Collections::Generic::IComparer(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseIComparer::~BaseIComparer() - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseIComparer::operator==(const BaseIComparer& other) const - { - return Handle == other.Handle; - } - - bool BaseIComparer::operator!=(const BaseIComparer& other) const - { - return Handle != other.Handle; - } - - System::Int32 BaseIComparer::Compare(System::Int32 x, System::Int32 y) - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) - { - try - { - return Plugin::GetSystemCollectionsGenericBaseIComparerSystemInt32(cppHandle)->Compare(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - BaseIComparer::BaseIComparer() - : System::Collections::Generic::IComparer(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor(cppHandle, &handle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseIComparer::BaseIComparer(decltype(nullptr)) - : System::Collections::Generic::IComparer(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - } - - BaseIComparer::BaseIComparer(const BaseIComparer& other) - : System::Collections::Generic::IComparer(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseIComparer::BaseIComparer(BaseIComparer&& other) - : System::Collections::Generic::IComparer(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseIComparer::BaseIComparer(Plugin::InternalUse, int32_t handle) - : System::Collections::Generic::IComparer(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseIComparer::~BaseIComparer() - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) - { - Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseIComparer::operator==(const BaseIComparer& other) const - { - return Handle == other.Handle; - } - - bool BaseIComparer::operator!=(const BaseIComparer& other) const - { - return Handle != other.Handle; - } - - System::Int32 BaseIComparer::Compare(System::String& x, System::String& y) - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) - { - try - { - auto x = System::String(Plugin::InternalUse::Only, xHandle); - auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemCollectionsGenericBaseIComparerSystemString(cppHandle)->Compare(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - } - } -} - -namespace System -{ - StringComparer::StringComparer(decltype(nullptr)) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - { - } - - StringComparer::StringComparer(Plugin::InternalUse, int32_t handle) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - StringComparer::StringComparer(const StringComparer& other) - : StringComparer(Plugin::InternalUse::Only, other.Handle) - { - } - - StringComparer::StringComparer(StringComparer&& other) - : StringComparer(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - StringComparer::~StringComparer() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - StringComparer& StringComparer::operator=(const StringComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - StringComparer& StringComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - StringComparer& StringComparer::operator=(StringComparer&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool StringComparer::operator==(const StringComparer& other) const - { - return Handle == other.Handle; - } - - bool StringComparer::operator!=(const StringComparer& other) const - { - return Handle != other.Handle; - } -} - -namespace System -{ - BaseStringComparer::BaseStringComparer() - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemBaseStringComparerConstructor(cppHandle, &handle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseStringComparer::BaseStringComparer(decltype(nullptr)) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - } - - BaseStringComparer::BaseStringComparer(const BaseStringComparer& other) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseStringComparer::BaseStringComparer(BaseStringComparer&& other) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseStringComparer::BaseStringComparer(Plugin::InternalUse, int32_t handle) - : System::Collections::IComparer(nullptr) - , System::Collections::Generic::IComparer(nullptr) - , System::Collections::IEqualityComparer(nullptr) - , System::Collections::Generic::IEqualityComparer(nullptr) - , System::StringComparer(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseStringComparer::~BaseStringComparer() - { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemBaseStringComparer(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - BaseStringComparer& BaseStringComparer::operator=(const BaseStringComparer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemBaseStringComparer(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseStringComparer& BaseStringComparer::operator=(BaseStringComparer&& other) - { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemBaseStringComparer(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseStringComparer::operator==(const BaseStringComparer& other) const - { - return Handle == other.Handle; - } - - bool BaseStringComparer::operator!=(const BaseStringComparer& other) const - { - return Handle != other.Handle; - } - - System::Int32 BaseStringComparer::Compare(System::String& x, System::String& y) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) - { - try - { - auto x = System::String(Plugin::InternalUse::Only, xHandle); - auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemBaseStringComparer(cppHandle)->Compare(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - - System::Boolean BaseStringComparer::Equals(System::String& x, System::String& y) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) - { - try - { - auto x = System::String(Plugin::InternalUse::Only, xHandle); - auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemBaseStringComparer(cppHandle)->Equals(x, y); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - - System::Int32 BaseStringComparer::GetHashCode(System::String& obj) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) - { - try - { - auto obj = System::String(Plugin::InternalUse::Only, objHandle); - return Plugin::GetSystemBaseStringComparer(cppHandle)->GetHashCode(obj); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } -} - -namespace System -{ - namespace Collections - { - Queue::Queue(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - { - } - - Queue::Queue(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Queue::Queue(const Queue& other) - : Queue(Plugin::InternalUse::Only, other.Handle) - { - } - - Queue::Queue(Queue&& other) - : Queue(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Queue::~Queue() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Queue& Queue::operator=(const Queue& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Queue& Queue::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Queue& Queue::operator=(Queue&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Queue::operator==(const Queue& other) const - { - return Handle == other.Handle; - } - - bool Queue::operator!=(const Queue& other) const - { - return Handle != other.Handle; - } - - System::Int32 Queue::GetCount() - { - auto returnValue = Plugin::SystemCollectionsQueuePropertyGetCount(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - } -} - -namespace System -{ - namespace Collections - { - BaseQueue::BaseQueue() - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsBaseQueueConstructor(cppHandle, &handle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseQueue::BaseQueue(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - } - - BaseQueue::BaseQueue(const BaseQueue& other) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseQueue::BaseQueue(BaseQueue&& other) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseQueue::BaseQueue(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::Queue(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseQueue::~BaseQueue() - { - Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsBaseQueue(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - BaseQueue& BaseQueue::operator=(const BaseQueue& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseQueue& BaseQueue::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsBaseQueue(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseQueue& BaseQueue::operator=(BaseQueue&& other) - { - Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsBaseQueue(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseQueue::operator==(const BaseQueue& other) const - { - return Handle == other.Handle; - } - - bool BaseQueue::operator!=(const BaseQueue& other) const - { - return Handle != other.Handle; - } - - System::Int32 BaseQueue::GetCount() - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsQueueGetCount(int32_t cppHandle) - { - try - { - return Plugin::GetSystemCollectionsBaseQueue(cppHandle)->GetCount(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::Queue"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - IComponentChangeService::IComponentChangeService(decltype(nullptr)) - { - } - - IComponentChangeService::IComponentChangeService(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IComponentChangeService::IComponentChangeService(const IComponentChangeService& other) - : IComponentChangeService(Plugin::InternalUse::Only, other.Handle) - { - } - - IComponentChangeService::IComponentChangeService(IComponentChangeService&& other) - : IComponentChangeService(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IComponentChangeService::~IComponentChangeService() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IComponentChangeService& IComponentChangeService::operator=(const IComponentChangeService& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IComponentChangeService& IComponentChangeService::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IComponentChangeService& IComponentChangeService::operator=(IComponentChangeService&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IComponentChangeService::operator==(const IComponentChangeService& other) const - { - return Handle == other.Handle; - } - - bool IComponentChangeService::operator!=(const IComponentChangeService& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - BaseIComponentChangeService::BaseIComponentChangeService() - : System::ComponentModel::Design::IComponentChangeService(nullptr) - { - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceConstructor(cppHandle, &handle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr)) - : System::ComponentModel::Design::IComponentChangeService(nullptr) - { - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - } - - BaseIComponentChangeService::BaseIComponentChangeService(const BaseIComponentChangeService& other) - : System::ComponentModel::Design::IComponentChangeService(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseIComponentChangeService::BaseIComponentChangeService(BaseIComponentChangeService&& other) - : System::ComponentModel::Design::IComponentChangeService(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseIComponentChangeService::BaseIComponentChangeService(Plugin::InternalUse, int32_t handle) - : System::ComponentModel::Design::IComponentChangeService(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseIComponentChangeService::~BaseIComponentChangeService() - { - Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - BaseIComponentChangeService& BaseIComponentChangeService::operator=(const BaseIComponentChangeService& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseIComponentChangeService& BaseIComponentChangeService::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseIComponentChangeService& BaseIComponentChangeService::operator=(BaseIComponentChangeService&& other) - { - Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseIComponentChangeService::operator==(const BaseIComponentChangeService& other) const - { - return Handle == other.Handle; - } - - bool BaseIComponentChangeService::operator!=(const BaseIComponentChangeService& other) const - { - return Handle != other.Handle; - } - - void BaseIComponentChangeService::OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanged(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle, int32_t oldValueHandle, int32_t newValueHandle) - { - try - { - auto component = System::Object(Plugin::InternalUse::Only, componentHandle); - auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - auto oldValue = System::Object(Plugin::InternalUse::Only, oldValueHandle); - auto newValue = System::Object(Plugin::InternalUse::Only, newValueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanged(component, member, oldValue, newValue); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanging(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle) - { - try - { - auto component = System::Object(Plugin::InternalUse::Only, componentHandle); - auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanging(component, member); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdded(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdded(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdded(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdding(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdding(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdding(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanged(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanged(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanged(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanging(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanging(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanging(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoved(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoved(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoving(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoving(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRename(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRename(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void BaseIComponentChangeService::RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) - { - } - - DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRename(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::IComponentChangeService"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - } - } -} - -namespace System -{ - namespace IO - { - FileStream::FileStream(decltype(nullptr)) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - { - } - - FileStream::FileStream(Plugin::InternalUse, int32_t handle) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - FileStream::FileStream(const FileStream& other) - : FileStream(Plugin::InternalUse::Only, other.Handle) - { - } - - FileStream::FileStream(FileStream&& other) - : FileStream(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - FileStream::~FileStream() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - FileStream& FileStream::operator=(const FileStream& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - FileStream& FileStream::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - FileStream& FileStream::operator=(FileStream&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool FileStream::operator==(const FileStream& other) const - { - return Handle == other.Handle; - } - - bool FileStream::operator!=(const FileStream& other) const - { - return Handle != other.Handle; - } - - FileStream::FileStream(System::String& path, System::IO::FileMode mode) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - { - auto returnValue = Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode(path.Handle, mode); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - } - } - - void FileStream::WriteByte(System::Byte value) - { - Plugin::SystemIOFileStreamMethodWriteByteSystemByte(Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } -} - -namespace System -{ - namespace IO - { - BaseFileStream::BaseFileStream(System::String& path, System::IO::FileMode mode) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(cppHandle, &handle->Value, path.Handle, mode); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemIOBaseFileStream(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - BaseFileStream::BaseFileStream(decltype(nullptr)) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - } - - BaseFileStream::BaseFileStream(const BaseFileStream& other) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseFileStream::BaseFileStream(BaseFileStream&& other) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseFileStream::BaseFileStream(Plugin::InternalUse, int32_t handle) - : System::MarshalByRefObject(nullptr) - , System::IDisposable(nullptr) - , System::IO::Stream(nullptr) - , System::IO::FileStream(nullptr) - { - Handle = handle; - CppHandle = Plugin::StoreSystemIOBaseFileStream(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - BaseFileStream::~BaseFileStream() - { - Plugin::RemoveSystemIOBaseFileStream(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemIOBaseFileStream(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - BaseFileStream& BaseFileStream::operator=(const BaseFileStream& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseFileStream& BaseFileStream::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemIOBaseFileStream(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = 0; - return *this; - } - - BaseFileStream& BaseFileStream::operator=(BaseFileStream&& other) - { - Plugin::RemoveSystemIOBaseFileStream(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemIOBaseFileStream(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseFileStream::operator==(const BaseFileStream& other) const - { - return Handle == other.Handle; - } - - bool BaseFileStream::operator!=(const BaseFileStream& other) const - { - return Handle != other.Handle; - } - - void BaseFileStream::WriteByte(System::Byte value) - { - } - - DLLEXPORT void SystemIOFileStreamWriteByte(int32_t cppHandle, uint8_t value) - { - try - { - Plugin::GetSystemIOBaseFileStream(cppHandle)->WriteByte(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::IO::FileStream"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - } -} - -namespace UnityEngine -{ - namespace Playables - { - PlayableHandle::PlayableHandle(decltype(nullptr)) - { - } - - PlayableHandle::PlayableHandle(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - } - } - - PlayableHandle::PlayableHandle(const PlayableHandle& other) - : PlayableHandle(Plugin::InternalUse::Only, other.Handle) - { - } - - PlayableHandle::PlayableHandle(PlayableHandle&& other) - : PlayableHandle(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - PlayableHandle::~PlayableHandle() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - Handle = 0; - } - } - - PlayableHandle& PlayableHandle::operator=(const PlayableHandle& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - } - return *this; - } - - PlayableHandle& PlayableHandle::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - Handle = 0; - } - return *this; - } - - PlayableHandle& PlayableHandle::operator=(PlayableHandle&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool PlayableHandle::operator==(const PlayableHandle& other) const - { - return Handle == other.Handle; - } - - bool PlayableHandle::operator!=(const PlayableHandle& other) const - { - return Handle != other.Handle; - } - - PlayableHandle::operator System::ValueType() - { - int32_t handle = Plugin::BoxPlayableHandle(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - PlayableHandle::operator System::Object() - { - int32_t handle = Plugin::BoxPlayableHandle(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - } -} - -namespace System -{ - Object::operator UnityEngine::Playables::PlayableHandle() - { - UnityEngine::Playables::PlayableHandle returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableHandle(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - ITransform::ITransform(decltype(nullptr)) - { - } - - ITransform::ITransform(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ITransform::ITransform(const ITransform& other) - : ITransform(Plugin::InternalUse::Only, other.Handle) - { - } - - ITransform::ITransform(ITransform&& other) - : ITransform(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ITransform::~ITransform() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ITransform& ITransform::operator=(const ITransform& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ITransform& ITransform::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ITransform& ITransform::operator=(ITransform&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ITransform::operator==(const ITransform& other) const - { - return Handle == other.Handle; - } - - bool ITransform::operator!=(const ITransform& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - IUIElementDataWatch::IUIElementDataWatch(decltype(nullptr)) - { - } - - IUIElementDataWatch::IUIElementDataWatch(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IUIElementDataWatch::IUIElementDataWatch(const IUIElementDataWatch& other) - : IUIElementDataWatch(Plugin::InternalUse::Only, other.Handle) - { - } - - IUIElementDataWatch::IUIElementDataWatch(IUIElementDataWatch&& other) - : IUIElementDataWatch(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IUIElementDataWatch::~IUIElementDataWatch() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IUIElementDataWatch& IUIElementDataWatch::operator=(const IUIElementDataWatch& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IUIElementDataWatch& IUIElementDataWatch::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IUIElementDataWatch& IUIElementDataWatch::operator=(IUIElementDataWatch&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IUIElementDataWatch::operator==(const IUIElementDataWatch& other) const - { - return Handle == other.Handle; - } - - bool IUIElementDataWatch::operator!=(const IUIElementDataWatch& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - IVisualElementScheduler::IVisualElementScheduler(decltype(nullptr)) - { - } - - IVisualElementScheduler::IVisualElementScheduler(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IVisualElementScheduler::IVisualElementScheduler(const IVisualElementScheduler& other) - : IVisualElementScheduler(Plugin::InternalUse::Only, other.Handle) - { - } - - IVisualElementScheduler::IVisualElementScheduler(IVisualElementScheduler&& other) - : IVisualElementScheduler(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IVisualElementScheduler::~IVisualElementScheduler() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IVisualElementScheduler& IVisualElementScheduler::operator=(const IVisualElementScheduler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IVisualElementScheduler& IVisualElementScheduler::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IVisualElementScheduler& IVisualElementScheduler::operator=(IVisualElementScheduler&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IVisualElementScheduler::operator==(const IVisualElementScheduler& other) const - { - return Handle == other.Handle; - } - - bool IVisualElementScheduler::operator!=(const IVisualElementScheduler& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::Experimental::UIElements::VisualElement IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - VisualElement::VisualElement(decltype(nullptr)) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::Focusable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , UnityEngine::Experimental::UIElements::IStyle(nullptr) - , UnityEngine::Experimental::UIElements::ITransform(nullptr) - , UnityEngine::Experimental::UIElements::IUIElementDataWatch(nullptr) - , UnityEngine::Experimental::UIElements::IVisualElementScheduler(nullptr) - { - } - - VisualElement::VisualElement(Plugin::InternalUse, int32_t handle) - : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) - , UnityEngine::Experimental::UIElements::Focusable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , UnityEngine::Experimental::UIElements::IStyle(nullptr) - , UnityEngine::Experimental::UIElements::ITransform(nullptr) - , UnityEngine::Experimental::UIElements::IUIElementDataWatch(nullptr) - , UnityEngine::Experimental::UIElements::IVisualElementScheduler(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - VisualElement::VisualElement(const VisualElement& other) - : VisualElement(Plugin::InternalUse::Only, other.Handle) - { - } - - VisualElement::VisualElement(VisualElement&& other) - : VisualElement(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - VisualElement::~VisualElement() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - VisualElement& VisualElement::operator=(const VisualElement& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - VisualElement& VisualElement::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - VisualElement& VisualElement::operator=(VisualElement&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool VisualElement::operator==(const VisualElement& other) const - { - return Handle == other.Handle; - } - - bool VisualElement::operator!=(const VisualElement& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - UnityEngineExperimentalUIElementsVisualElementIterator::UnityEngineExperimentalUIElementsVisualElementIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - UnityEngineExperimentalUIElementsVisualElementIterator::UnityEngineExperimentalUIElementsVisualElementIterator(UnityEngine::Experimental::UIElements::VisualElement& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - UnityEngineExperimentalUIElementsVisualElementIterator::~UnityEngineExperimentalUIElementsVisualElementIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - UnityEngineExperimentalUIElementsVisualElementIterator& UnityEngineExperimentalUIElementsVisualElementIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool UnityEngineExperimentalUIElementsVisualElementIterator::operator!=(const UnityEngineExperimentalUIElementsVisualElementIterator& other) - { - return hasMore; - } - - UnityEngine::Experimental::UIElements::VisualElement UnityEngineExperimentalUIElementsVisualElementIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - Plugin::UnityEngineExperimentalUIElementsVisualElementIterator begin(UnityEngine::Experimental::UIElements::VisualElement& enumerable) - { - return Plugin::UnityEngineExperimentalUIElementsVisualElementIterator(enumerable); - } - - Plugin::UnityEngineExperimentalUIElementsVisualElementIterator end(UnityEngine::Experimental::UIElements::VisualElement& enumerable) - { - return Plugin::UnityEngineExperimentalUIElementsVisualElementIterator(nullptr); - } - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - UnityEngine::Experimental::UIElements::VisualElement UQueryExtensions::Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::Array1& classes) - { - auto returnValue = Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(e.Handle, name.Handle, classes.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); - } - - UnityEngine::Experimental::UIElements::VisualElement UQueryExtensions::Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::String& className) - { - auto returnValue = Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString(e.Handle, name.Handle, className.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Experimental::UIElements::VisualElement(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - InteractionSourcePositionAccuracy::InteractionSourcePositionAccuracy(int32_t value) - : Value(value) - { - } - - UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::operator int32_t() const - { - return Value; - } - - bool UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::operator==(InteractionSourcePositionAccuracy other) - { - return Value == other.Value; - } - - bool UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::operator!=(InteractionSourcePositionAccuracy other) - { - return Value != other.Value; - } - - InteractionSourcePositionAccuracy::operator System::Enum() - { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Enum(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourcePositionAccuracy::operator System::ValueType() - { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourcePositionAccuracy::operator System::Object() - { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourcePositionAccuracy::operator System::IFormattable() - { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourcePositionAccuracy::operator System::IConvertible() - { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IConvertible(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourcePositionAccuracy::operator System::IComparable() - { - int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - } - } - } -} -const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::None(0); -const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::Approximate(1); -const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy::High(2); - -namespace System -{ - Object::operator UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy() - { - UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy returnVal(Plugin::UnboxInteractionSourcePositionAccuracy(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - InteractionSourceNode::InteractionSourceNode(int32_t value) - : Value(value) - { - } - - UnityEngine::XR::WSA::Input::InteractionSourceNode::operator int32_t() const - { - return Value; - } - - bool UnityEngine::XR::WSA::Input::InteractionSourceNode::operator==(InteractionSourceNode other) - { - return Value == other.Value; - } - - bool UnityEngine::XR::WSA::Input::InteractionSourceNode::operator!=(InteractionSourceNode other) - { - return Value != other.Value; - } - - InteractionSourceNode::operator System::Enum() - { - int32_t handle = Plugin::BoxInteractionSourceNode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Enum(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourceNode::operator System::ValueType() - { - int32_t handle = Plugin::BoxInteractionSourceNode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourceNode::operator System::Object() - { - int32_t handle = Plugin::BoxInteractionSourceNode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourceNode::operator System::IFormattable() - { - int32_t handle = Plugin::BoxInteractionSourceNode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourceNode::operator System::IConvertible() - { - int32_t handle = Plugin::BoxInteractionSourceNode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IConvertible(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourceNode::operator System::IComparable() - { - int32_t handle = Plugin::BoxInteractionSourceNode(*this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - } - } - } -} -const UnityEngine::XR::WSA::Input::InteractionSourceNode UnityEngine::XR::WSA::Input::InteractionSourceNode::Grip(0); -const UnityEngine::XR::WSA::Input::InteractionSourceNode UnityEngine::XR::WSA::Input::InteractionSourceNode::Pointer(1); - -namespace System -{ - Object::operator UnityEngine::XR::WSA::Input::InteractionSourceNode() - { - UnityEngine::XR::WSA::Input::InteractionSourceNode returnVal(Plugin::UnboxInteractionSourceNode(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - InteractionSourcePose::InteractionSourcePose(decltype(nullptr)) - { - } - - InteractionSourcePose::InteractionSourcePose(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - } - - InteractionSourcePose::InteractionSourcePose(const InteractionSourcePose& other) - : InteractionSourcePose(Plugin::InternalUse::Only, other.Handle) - { - } - - InteractionSourcePose::InteractionSourcePose(InteractionSourcePose&& other) - : InteractionSourcePose(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - InteractionSourcePose::~InteractionSourcePose() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - Handle = 0; - } - } - - InteractionSourcePose& InteractionSourcePose::operator=(const InteractionSourcePose& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - return *this; - } - - InteractionSourcePose& InteractionSourcePose::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - Handle = 0; - } - return *this; - } - - InteractionSourcePose& InteractionSourcePose::operator=(InteractionSourcePose&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool InteractionSourcePose::operator==(const InteractionSourcePose& other) const - { - return Handle == other.Handle; - } - - bool InteractionSourcePose::operator!=(const InteractionSourcePose& other) const - { - return Handle != other.Handle; - } - - System::Boolean InteractionSourcePose::TryGetRotation(UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node) - { - auto returnValue = Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode(Handle, rotation, node); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - InteractionSourcePose::operator System::ValueType() - { - int32_t handle = Plugin::BoxInteractionSourcePose(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::ValueType(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - - InteractionSourcePose::operator System::Object() - { - int32_t handle = Plugin::BoxInteractionSourcePose(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - return System::Object(Plugin::InternalUse::Only, handle); - } - return nullptr; - } - } - } - } -} - -namespace System -{ - Object::operator UnityEngine::XR::WSA::Input::InteractionSourcePose() - { - UnityEngine::XR::WSA::Input::InteractionSourcePose returnVal(Plugin::InternalUse::Only, Plugin::UnboxInteractionSourcePose(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - System::String IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::String(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - System::Int32 IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - System::Single IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::RaycastHit IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::GradientColorKey IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerator::IEnumerator(decltype(nullptr)) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse, int32_t handle) - : System::IDisposable(nullptr) - , System::Collections::IEnumerator(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerator::IEnumerator(const IEnumerator& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerator::IEnumerator(IEnumerator&& other) - : IEnumerator(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerator::~IEnumerator() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerator& IEnumerator::operator=(const IEnumerator& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerator& IEnumerator::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerator::operator==(const IEnumerator& other) const - { - return Handle == other.Handle; - } - - bool IEnumerator::operator!=(const IEnumerator& other) const - { - return Handle != other.Handle; - } - - UnityEngine::Resolution IEnumerator::GetCurrent() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Resolution(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IEnumerable::IEnumerable(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - { - } - - IEnumerable::IEnumerable(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - } - - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IEnumerable::~IEnumerable() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IEnumerable& IEnumerable::operator=(const IEnumerable& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IEnumerable& IEnumerable::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IEnumerable& IEnumerable::operator=(IEnumerable&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IEnumerable::operator==(const IEnumerable& other) const - { - return Handle == other.Handle; - } - - bool IEnumerable::operator!=(const IEnumerable& other) const - { - return Handle != other.Handle; - } - - System::Collections::Generic::IEnumerator IEnumerable::GetEnumerator() - { - auto returnValue = Plugin::SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::Collections::Generic::IEnumerator(Plugin::InternalUse::Only, returnValue); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionSystemStringIterator::SystemCollectionsGenericICollectionSystemStringIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericICollectionSystemStringIterator::SystemCollectionsGenericICollectionSystemStringIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionSystemStringIterator::~SystemCollectionsGenericICollectionSystemStringIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericICollectionSystemStringIterator& SystemCollectionsGenericICollectionSystemStringIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericICollectionSystemStringIterator::operator!=(const SystemCollectionsGenericICollectionSystemStringIterator& other) - { - return hasMore; - } - - System::String SystemCollectionsGenericICollectionSystemStringIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemStringIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemStringIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionSystemStringIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemStringIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionSystemInt32Iterator::SystemCollectionsGenericICollectionSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericICollectionSystemInt32Iterator::SystemCollectionsGenericICollectionSystemInt32Iterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionSystemInt32Iterator::~SystemCollectionsGenericICollectionSystemInt32Iterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericICollectionSystemInt32Iterator& SystemCollectionsGenericICollectionSystemInt32Iterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericICollectionSystemInt32Iterator::operator!=(const SystemCollectionsGenericICollectionSystemInt32Iterator& other) - { - return hasMore; - } - - System::Int32 SystemCollectionsGenericICollectionSystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionSystemSingleIterator::SystemCollectionsGenericICollectionSystemSingleIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericICollectionSystemSingleIterator::SystemCollectionsGenericICollectionSystemSingleIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionSystemSingleIterator::~SystemCollectionsGenericICollectionSystemSingleIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericICollectionSystemSingleIterator& SystemCollectionsGenericICollectionSystemSingleIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericICollectionSystemSingleIterator::operator!=(const SystemCollectionsGenericICollectionSystemSingleIterator& other) - { - return hasMore; - } - - System::Single SystemCollectionsGenericICollectionSystemSingleIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemSingleIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionSystemSingleIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::~SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& other) - { - return hasMore; - } - - UnityEngine::RaycastHit SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::~SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& other) - { - return hasMore; - } - - UnityEngine::GradientColorKey SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - ICollection::ICollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - } - - ICollection::ICollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - } - - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - ICollection::~ICollection() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - ICollection& ICollection::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ICollection::operator==(const ICollection& other) const - { - return Handle == other.Handle; - } - - bool ICollection::operator!=(const ICollection& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericICollectionUnityEngineResolutionIterator::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericICollectionUnityEngineResolutionIterator::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(System::Collections::Generic::ICollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericICollectionUnityEngineResolutionIterator::~SystemCollectionsGenericICollectionUnityEngineResolutionIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericICollectionUnityEngineResolutionIterator& SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator!=(const SystemCollectionsGenericICollectionUnityEngineResolutionIterator& other) - { - return hasMore; - } - - UnityEngine::Resolution SystemCollectionsGenericICollectionUnityEngineResolutionIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator begin(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(enumerable); - } - - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator end(System::Collections::Generic::ICollection& enumerable) - { - return Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericIListSystemStringIterator::SystemCollectionsGenericIListSystemStringIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListSystemStringIterator::SystemCollectionsGenericIListSystemStringIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListSystemStringIterator::~SystemCollectionsGenericIListSystemStringIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListSystemStringIterator& SystemCollectionsGenericIListSystemStringIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListSystemStringIterator::operator!=(const SystemCollectionsGenericIListSystemStringIterator& other) - { - return hasMore; - } - - System::String SystemCollectionsGenericIListSystemStringIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemStringIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemStringIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListSystemStringIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemStringIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericIListSystemInt32Iterator::SystemCollectionsGenericIListSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListSystemInt32Iterator::SystemCollectionsGenericIListSystemInt32Iterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListSystemInt32Iterator::~SystemCollectionsGenericIListSystemInt32Iterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListSystemInt32Iterator& SystemCollectionsGenericIListSystemInt32Iterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListSystemInt32Iterator::operator!=(const SystemCollectionsGenericIListSystemInt32Iterator& other) - { - return hasMore; - } - - System::Int32 SystemCollectionsGenericIListSystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemInt32Iterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListSystemInt32Iterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemInt32Iterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericIListSystemSingleIterator::SystemCollectionsGenericIListSystemSingleIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListSystemSingleIterator::SystemCollectionsGenericIListSystemSingleIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListSystemSingleIterator::~SystemCollectionsGenericIListSystemSingleIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListSystemSingleIterator& SystemCollectionsGenericIListSystemSingleIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListSystemSingleIterator::operator!=(const SystemCollectionsGenericIListSystemSingleIterator& other) - { - return hasMore; - } - - System::Single SystemCollectionsGenericIListSystemSingleIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemSingleIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListSystemSingleIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericIListUnityEngineRaycastHitIterator::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListUnityEngineRaycastHitIterator::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListUnityEngineRaycastHitIterator::~SystemCollectionsGenericIListUnityEngineRaycastHitIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListUnityEngineRaycastHitIterator& SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator!=(const SystemCollectionsGenericIListUnityEngineRaycastHitIterator& other) - { - return hasMore; - } - - UnityEngine::RaycastHit SystemCollectionsGenericIListUnityEngineRaycastHitIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::~SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator!=(const SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& other) - { - return hasMore; - } - - UnityEngine::GradientColorKey SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IList::IList(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - } - - IList::IList(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - } - - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - IList::~IList() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - IList& IList::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool IList::operator==(const IList& other) const - { - return Handle == other.Handle; - } - - bool IList::operator!=(const IList& other) const - { - return Handle != other.Handle; - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericIListUnityEngineResolutionIterator::SystemCollectionsGenericIListUnityEngineResolutionIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericIListUnityEngineResolutionIterator::SystemCollectionsGenericIListUnityEngineResolutionIterator(System::Collections::Generic::IList& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericIListUnityEngineResolutionIterator::~SystemCollectionsGenericIListUnityEngineResolutionIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericIListUnityEngineResolutionIterator& SystemCollectionsGenericIListUnityEngineResolutionIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericIListUnityEngineResolutionIterator::operator!=(const SystemCollectionsGenericIListUnityEngineResolutionIterator& other) - { - return hasMore; - } - - UnityEngine::Resolution SystemCollectionsGenericIListUnityEngineResolutionIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator begin(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator(enumerable); - } - - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator end(System::Collections::Generic::IList& enumerable) - { - return Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - List::List(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - } - - List::List(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - List& List::operator=(decltype(nullptr)) - { - 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::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(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(System::Int32 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(System::Int32 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; - } - } - - void List::Sort(System::Collections::Generic::IComparer& comparer) - { - Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericListSystemStringIterator::SystemCollectionsGenericListSystemStringIterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericListSystemStringIterator::SystemCollectionsGenericListSystemStringIterator(System::Collections::Generic::List& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericListSystemStringIterator::~SystemCollectionsGenericListSystemStringIterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericListSystemStringIterator& SystemCollectionsGenericListSystemStringIterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericListSystemStringIterator::operator!=(const SystemCollectionsGenericListSystemStringIterator& other) - { - return hasMore; - } - - System::String SystemCollectionsGenericListSystemStringIterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericListSystemStringIterator begin(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemStringIterator(enumerable); - } - - Plugin::SystemCollectionsGenericListSystemStringIterator end(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemStringIterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - List::List(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - } - - List::List(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - List& List::operator=(decltype(nullptr)) - { - 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::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32Constructor(); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - } - } - - System::Int32 List::GetItem(System::Int32 index) - { - auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32PropertyGetItem(Handle, index); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void List::SetItem(System::Int32 index, System::Int32 value) - { - Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void List::Add(System::Int32 item) - { - Plugin::SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(Handle, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void List::Sort(System::Collections::Generic::IComparer& comparer) - { - Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } -} - -namespace Plugin -{ - SystemCollectionsGenericListSystemInt32Iterator::SystemCollectionsGenericListSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsGenericListSystemInt32Iterator::SystemCollectionsGenericListSystemInt32Iterator(System::Collections::Generic::List& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsGenericListSystemInt32Iterator::~SystemCollectionsGenericListSystemInt32Iterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsGenericListSystemInt32Iterator& SystemCollectionsGenericListSystemInt32Iterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsGenericListSystemInt32Iterator::operator!=(const SystemCollectionsGenericListSystemInt32Iterator& other) - { - return hasMore; - } - - System::Int32 SystemCollectionsGenericListSystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable) - { - return Plugin::SystemCollectionsGenericListSystemInt32Iterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - Collection::Collection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - } - - Collection::Collection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Collection& Collection::operator=(decltype(nullptr)) - { - 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 Plugin -{ - SystemCollectionsObjectModelCollectionSystemInt32Iterator::SystemCollectionsObjectModelCollectionSystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsObjectModelCollectionSystemInt32Iterator::SystemCollectionsObjectModelCollectionSystemInt32Iterator(System::Collections::ObjectModel::Collection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsObjectModelCollectionSystemInt32Iterator::~SystemCollectionsObjectModelCollectionSystemInt32Iterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsObjectModelCollectionSystemInt32Iterator& SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator!=(const SystemCollectionsObjectModelCollectionSystemInt32Iterator& other) - { - return hasMore; - } - - System::Int32 SystemCollectionsObjectModelCollectionSystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable) - { - return Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable) - { - return Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator(nullptr); - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - KeyedCollection::KeyedCollection(decltype(nullptr)) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - , System::Collections::ObjectModel::Collection(nullptr) - { - } - - KeyedCollection::KeyedCollection(Plugin::InternalUse, int32_t handle) - : System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - , System::Collections::ObjectModel::Collection(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - KeyedCollection& KeyedCollection::operator=(decltype(nullptr)) - { - 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 Plugin -{ - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(decltype(nullptr)) - : enumerator(nullptr) - , hasMore(false) - { - } - - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(System::Collections::ObjectModel::KeyedCollection& enumerable) - : enumerator(enumerable.GetEnumerator()) - { - hasMore = enumerator.MoveNext(); - } - - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::~SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator() - { - if (enumerator != nullptr) - { - enumerator.Dispose(); - } - } - - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator++() - { - hasMore = enumerator.MoveNext(); - return *this; - } - - bool SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator!=(const SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& other) - { - return hasMore; - } - - System::Int32 SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator::operator*() - { - return enumerator.GetCurrent(); - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable) - { - return Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(enumerable); - } - - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable) - { - return Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(nullptr); - } - } - } -} - -namespace System -{ - Object::operator System::Boolean() - { - System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::SByte() - { - System::SByte returnVal(Plugin::UnboxSByte(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Byte() - { - System::Byte returnVal(Plugin::UnboxByte(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Int16() - { - System::Int16 returnVal(Plugin::UnboxInt16(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::UInt16() - { - System::UInt16 returnVal(Plugin::UnboxUInt16(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Int32() - { - System::Int32 returnVal(Plugin::UnboxInt32(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::UInt32() - { - System::UInt32 returnVal(Plugin::UnboxUInt32(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Int64() - { - System::Int64 returnVal(Plugin::UnboxInt64(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::UInt64() - { - System::UInt64 returnVal(Plugin::UnboxUInt64(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Char() - { - System::Char returnVal(Plugin::UnboxChar(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Single() - { - System::Single returnVal(Plugin::UnboxSingle(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace System -{ - Object::operator System::Double() - { - System::Double returnVal(Plugin::UnboxDouble(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace MyGame -{ - namespace MonoBehaviours - { - TestScript::TestScript(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - , UnityEngine::MonoBehaviour(nullptr) - { - } - - TestScript::TestScript(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - , UnityEngine::MonoBehaviour(nullptr) - { - Handle = 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) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - TestScript& TestScript::operator=(decltype(nullptr)) - { - 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 MyGame -{ - namespace MonoBehaviours - { - AnotherScript::AnotherScript(decltype(nullptr)) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - , UnityEngine::MonoBehaviour(nullptr) - { - } - - AnotherScript::AnotherScript(Plugin::InternalUse, int32_t handle) - : UnityEngine::Object(nullptr) - , UnityEngine::Component(nullptr) - , UnityEngine::Behaviour(nullptr) - , UnityEngine::MonoBehaviour(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - AnotherScript::AnotherScript(const AnotherScript& other) - : AnotherScript(Plugin::InternalUse::Only, other.Handle) - { - } - - AnotherScript::AnotherScript(AnotherScript&& other) - : AnotherScript(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - AnotherScript::~AnotherScript() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - AnotherScript& AnotherScript::operator=(const AnotherScript& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - AnotherScript& AnotherScript::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - AnotherScript& AnotherScript::operator=(AnotherScript&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool AnotherScript::operator==(const AnotherScript& other) const - { - return Handle == other.Handle; - } - - bool AnotherScript::operator!=(const AnotherScript& other) const - { - return Handle != other.Handle; - } - } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(System::Int32 item) - { - Plugin::SystemInt32Array1SetItem1(Handle, Index0, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy1_1::operator System::Int32() - { - auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace System -{ - Array1::Array1(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - this->InternalLength = 0; - } - - Array1::Array1(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; - } - - Array1::~Array1() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - return *this; - } - - Array1& Array1::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array1& Array1::operator=(Array1&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - other.Handle = 0; - other.InternalLength = 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(System::Int32 length0) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::SystemSystemInt32Array1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - System::Int32 Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array1::GetRank() - { - return 1; - } - - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - SystemInt32Array1Iterator::SystemInt32Array1Iterator(System::Array1& array, int32_t index) - : array(array) - , index(index) - { - } - - SystemInt32Array1Iterator& SystemInt32Array1Iterator::operator++() - { - index++; - return *this; - } - - bool SystemInt32Array1Iterator::operator!=(const SystemInt32Array1Iterator& other) - { - return index != other.index; - } - - System::Int32 SystemInt32Array1Iterator::operator*() - { - return array[index]; - } -} - -namespace System -{ - Plugin::SystemInt32Array1Iterator begin(System::Array1& array) - { - return Plugin::SystemInt32Array1Iterator(array, 0); - } - - Plugin::SystemInt32Array1Iterator end(System::Array1& array) - { - return Plugin::SystemInt32Array1Iterator(array, array.GetLength() - 1); - } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(System::Single item) - { - Plugin::SystemSingleArray1SetItem1(Handle, Index0, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy1_1::operator System::Single() - { - auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace Plugin -{ - ArrayElementProxy1_2::ArrayElementProxy1_2(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - Plugin::ArrayElementProxy2_2 Plugin::ArrayElementProxy1_2::operator[](int32_t index) - { - return Plugin::ArrayElementProxy2_2(Plugin::InternalUse::Only, Handle, Index0, index); - } -} - -namespace Plugin -{ - ArrayElementProxy2_2::ArrayElementProxy2_2(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1) - { - Handle = handle; - Index0 = index0; - Index1 = index1; - } - - void ArrayElementProxy2_2::operator=(System::Single item) - { - Plugin::SystemSingleArray2SetItem2(Handle, Index0, Index1, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy2_2::operator System::Single() - { - auto returnValue = Plugin::SystemSingleArray2GetItem2(Handle, Index0, Index1); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace Plugin -{ - ArrayElementProxy1_3::ArrayElementProxy1_3(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - Plugin::ArrayElementProxy2_3 Plugin::ArrayElementProxy1_3::operator[](int32_t index) - { - return Plugin::ArrayElementProxy2_3(Plugin::InternalUse::Only, Handle, Index0, index); - } -} - -namespace Plugin -{ - ArrayElementProxy2_3::ArrayElementProxy2_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1) - { - Handle = handle; - Index0 = index0; - Index1 = index1; - } - - Plugin::ArrayElementProxy3_3 Plugin::ArrayElementProxy2_3::operator[](int32_t index) - { - return Plugin::ArrayElementProxy3_3(Plugin::InternalUse::Only, Handle, Index0, Index1, index); - } -} - -namespace Plugin -{ - ArrayElementProxy3_3::ArrayElementProxy3_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1, int32_t index2) - { - Handle = handle; - Index0 = index0; - Index1 = index1; - Index2 = index2; - } - - void ArrayElementProxy3_3::operator=(System::Single item) - { - Plugin::SystemSingleArray3SetItem3(Handle, Index0, Index1, Index2, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy3_3::operator System::Single() - { - auto returnValue = Plugin::SystemSingleArray3GetItem3(Handle, Index0, Index1, Index2); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace System -{ - Array1::Array1(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - this->InternalLength = 0; - } - - Array1::Array1(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; - } - - Array1::~Array1() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - return *this; - } - - Array1& Array1::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array1& Array1::operator=(Array1&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - other.Handle = 0; - other.InternalLength = 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(System::Int32 length0) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::SystemSystemSingleArray1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - System::Int32 Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array1::GetRank() - { - return 1; - } - - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - SystemSingleArray1Iterator::SystemSingleArray1Iterator(System::Array1& array, int32_t index) - : array(array) - , index(index) - { - } - - SystemSingleArray1Iterator& SystemSingleArray1Iterator::operator++() - { - index++; - return *this; - } - - bool SystemSingleArray1Iterator::operator!=(const SystemSingleArray1Iterator& other) - { - return index != other.index; - } - - System::Single SystemSingleArray1Iterator::operator*() - { - return array[index]; - } -} - -namespace System -{ - Plugin::SystemSingleArray1Iterator begin(System::Array1& array) - { - return Plugin::SystemSingleArray1Iterator(array, 0); - } - - Plugin::SystemSingleArray1Iterator end(System::Array1& array) - { - return Plugin::SystemSingleArray1Iterator(array, array.GetLength() - 1); - } -} - -namespace System -{ - Array2::Array2(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - { - this->InternalLength = 0; - this->InternalLengths[0] = 0; - this->InternalLengths[1] = 0; - } - - Array2::Array2(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - this->InternalLengths[0] = 0; - this->InternalLengths[1] = 0; - } - - Array2::Array2(const Array2& other) - : Array2(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - } - - Array2::Array2(Array2&& other) - : Array2(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - other.InternalLength = 0; - other.InternalLengths[0] = 0; - other.InternalLengths[1] = 0; - } - - Array2::~Array2() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array2& Array2::operator=(const Array2& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - return *this; - } - - Array2& Array2::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array2& Array2::operator=(Array2&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - other.Handle = 0; - other.InternalLength = 0; - other.InternalLengths[0] = 0; - other.InternalLengths[1] = 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(System::Int32 length0, System::Int32 length1) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - { - auto returnValue = Plugin::SystemSystemSingleArray2Constructor2(length0, length1); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0 * length1; - InternalLengths[0] = length0; - InternalLengths[1] = length1; - } - } - - System::Int32 Array2::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array2::GetLength(System::Int32 dimension) - { - assert(dimension >= 0 && dimension < 2); - int32_t length = InternalLengths[dimension]; - if (length) - { - return length; - } - auto returnValue = Plugin::SystemSystemSingleArray2GetLength2(Handle, dimension); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - InternalLengths[dimension] = returnValue; - return returnValue; - } - - System::Int32 Array2::GetRank() - { - return 2; - } - - Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_2(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace System -{ - Array3::Array3(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - { - this->InternalLength = 0; - this->InternalLengths[0] = 0; - this->InternalLengths[1] = 0; - this->InternalLengths[2] = 0; - } - - Array3::Array3(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - this->InternalLengths[0] = 0; - this->InternalLengths[1] = 0; - this->InternalLengths[2] = 0; - } - - Array3::Array3(const Array3& other) - : Array3(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - InternalLengths[2] = other.InternalLengths[2]; - } - - Array3::Array3(Array3&& other) - : Array3(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - InternalLengths[2] = other.InternalLengths[2]; - other.InternalLength = 0; - other.InternalLengths[0] = 0; - other.InternalLengths[1] = 0; - other.InternalLengths[2] = 0; - } - - Array3::~Array3() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array3& Array3::operator=(const Array3& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - InternalLengths[2] = other.InternalLengths[2]; - return *this; - } - - Array3& Array3::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array3& Array3::operator=(Array3&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; - InternalLengths[2] = other.InternalLengths[2]; - other.Handle = 0; - other.InternalLength = 0; - other.InternalLengths[0] = 0; - other.InternalLengths[1] = 0; - other.InternalLengths[2] = 0; - return *this; - } - - bool Array3::operator==(const Array3& other) const - { - return Handle == other.Handle; - } - - bool Array3::operator!=(const Array3& other) const - { - return Handle != other.Handle; - } - - Array3::Array3(System::Int32 length0, System::Int32 length1, System::Int32 length2) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - { - auto returnValue = Plugin::SystemSystemSingleArray3Constructor3(length0, length1, length2); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0 * length1 * length2; - InternalLengths[0] = length0; - InternalLengths[1] = length1; - InternalLengths[2] = length2; - } - } - - System::Int32 Array3::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array3::GetLength(System::Int32 dimension) - { - assert(dimension >= 0 && dimension < 3); - int32_t length = InternalLengths[dimension]; - if (length) - { - return length; - } - auto returnValue = Plugin::SystemSystemSingleArray3GetLength3(Handle, dimension); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - InternalLengths[dimension] = returnValue; - return returnValue; - } - - System::Int32 Array3::GetRank() - { - return 3; - } - - Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_3(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(System::String item) - { - Plugin::SystemStringArray1SetItem1(Handle, Index0, item.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy1_1::operator System::String() - { - auto returnValue = Plugin::SystemStringArray1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::String(Plugin::InternalUse::Only, returnValue); - } -} - -namespace System -{ - Array1::Array1(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - this->InternalLength = 0; - } - - Array1::Array1(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; - } - - Array1::~Array1() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - return *this; - } - - Array1& Array1::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array1& Array1::operator=(Array1&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - other.Handle = 0; - other.InternalLength = 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(System::Int32 length0) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::SystemSystemStringArray1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - System::Int32 Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array1::GetRank() - { - return 1; - } - - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - SystemStringArray1Iterator::SystemStringArray1Iterator(System::Array1& array, int32_t index) - : array(array) - , index(index) - { - } - - SystemStringArray1Iterator& SystemStringArray1Iterator::operator++() - { - index++; - return *this; - } - - bool SystemStringArray1Iterator::operator!=(const SystemStringArray1Iterator& other) - { - return index != other.index; - } - - System::String SystemStringArray1Iterator::operator*() - { - return array[index]; - } -} - -namespace System -{ - Plugin::SystemStringArray1Iterator begin(System::Array1& array) - { - return Plugin::SystemStringArray1Iterator(array, 0); - } - - Plugin::SystemStringArray1Iterator end(System::Array1& array) - { - return Plugin::SystemStringArray1Iterator(array, array.GetLength() - 1); - } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(UnityEngine::Resolution item) - { - Plugin::UnityEngineResolutionArray1SetItem1(Handle, Index0, item.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy1_1::operator UnityEngine::Resolution() - { - auto returnValue = Plugin::UnityEngineResolutionArray1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Resolution(Plugin::InternalUse::Only, returnValue); - } -} - -namespace System -{ - Array1::Array1(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - this->InternalLength = 0; - } - - Array1::Array1(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; - } - - Array1::~Array1() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - return *this; - } - - Array1& Array1::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array1& Array1::operator=(Array1&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - other.Handle = 0; - other.InternalLength = 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(System::Int32 length0) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::UnityEngineUnityEngineResolutionArray1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - System::Int32 Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array1::GetRank() - { - return 1; - } - - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - UnityEngineResolutionArray1Iterator::UnityEngineResolutionArray1Iterator(System::Array1& array, int32_t index) - : array(array) - , index(index) - { - } - - UnityEngineResolutionArray1Iterator& UnityEngineResolutionArray1Iterator::operator++() - { - index++; - return *this; - } - - bool UnityEngineResolutionArray1Iterator::operator!=(const UnityEngineResolutionArray1Iterator& other) - { - return index != other.index; - } - - UnityEngine::Resolution UnityEngineResolutionArray1Iterator::operator*() - { - return array[index]; - } -} - -namespace System -{ - Plugin::UnityEngineResolutionArray1Iterator begin(System::Array1& array) - { - return Plugin::UnityEngineResolutionArray1Iterator(array, 0); - } - - Plugin::UnityEngineResolutionArray1Iterator end(System::Array1& array) - { - return Plugin::UnityEngineResolutionArray1Iterator(array, array.GetLength() - 1); - } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(UnityEngine::RaycastHit item) - { - Plugin::UnityEngineRaycastHitArray1SetItem1(Handle, Index0, item.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy1_1::operator UnityEngine::RaycastHit() - { - auto returnValue = Plugin::UnityEngineRaycastHitArray1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); - } -} - -namespace System -{ - Array1::Array1(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - this->InternalLength = 0; - } - - Array1::Array1(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; - } - - Array1::~Array1() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - return *this; - } - - Array1& Array1::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array1& Array1::operator=(Array1&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - other.Handle = 0; - other.InternalLength = 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(System::Int32 length0) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - System::Int32 Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array1::GetRank() - { - return 1; - } - - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - UnityEngineRaycastHitArray1Iterator::UnityEngineRaycastHitArray1Iterator(System::Array1& array, int32_t index) - : array(array) - , index(index) - { - } - - UnityEngineRaycastHitArray1Iterator& UnityEngineRaycastHitArray1Iterator::operator++() - { - index++; - return *this; - } - - bool UnityEngineRaycastHitArray1Iterator::operator!=(const UnityEngineRaycastHitArray1Iterator& other) - { - return index != other.index; - } - - UnityEngine::RaycastHit UnityEngineRaycastHitArray1Iterator::operator*() - { - return array[index]; - } -} - -namespace System -{ - Plugin::UnityEngineRaycastHitArray1Iterator begin(System::Array1& array) - { - return Plugin::UnityEngineRaycastHitArray1Iterator(array, 0); - } - - Plugin::UnityEngineRaycastHitArray1Iterator end(System::Array1& array) - { - return Plugin::UnityEngineRaycastHitArray1Iterator(array, array.GetLength() - 1); - } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(UnityEngine::GradientColorKey item) - { - Plugin::UnityEngineGradientColorKeyArray1SetItem1(Handle, Index0, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ArrayElementProxy1_1::operator UnityEngine::GradientColorKey() - { - auto returnValue = Plugin::UnityEngineGradientColorKeyArray1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace System -{ - Array1::Array1(decltype(nullptr)) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - this->InternalLength = 0; - } - - Array1::Array1(Plugin::InternalUse, int32_t handle) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - Handle = handle; - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - this->InternalLength = 0; - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - InternalLength = other.InternalLength; - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; - } - - Array1::~Array1() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - InternalLength = other.InternalLength; - return *this; - } - - Array1& Array1::operator=(decltype(nullptr)) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Array1& Array1::operator=(Array1&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - InternalLength = other.InternalLength; - other.Handle = 0; - other.InternalLength = 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(System::Int32 length0) - : System::ICloneable(nullptr) - , System::Collections::IEnumerable(nullptr) - , System::Collections::ICollection(nullptr) - , System::Collections::IList(nullptr) - , System::Array(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) - , System::Collections::Generic::IList(nullptr) - { - auto returnValue = Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - System::Int32 Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; - } - - System::Int32 Array1::GetRank() - { - return 1; - } - - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) - { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); - } -} - -namespace Plugin -{ - UnityEngineGradientColorKeyArray1Iterator::UnityEngineGradientColorKeyArray1Iterator(System::Array1& array, int32_t index) - : array(array) - , index(index) - { - } - - UnityEngineGradientColorKeyArray1Iterator& UnityEngineGradientColorKeyArray1Iterator::operator++() - { - index++; - return *this; - } - - bool UnityEngineGradientColorKeyArray1Iterator::operator!=(const UnityEngineGradientColorKeyArray1Iterator& other) - { - return index != other.index; - } - - UnityEngine::GradientColorKey UnityEngineGradientColorKeyArray1Iterator::operator*() - { - return array[index]; - } -} - -namespace System -{ - Plugin::UnityEngineGradientColorKeyArray1Iterator begin(System::Array1& array) - { - return Plugin::UnityEngineGradientColorKeyArray1Iterator(array, 0); - } - - Plugin::UnityEngineGradientColorKeyArray1Iterator end(System::Array1& array) - { - return Plugin::UnityEngineGradientColorKeyArray1Iterator(array, array.GetLength() - 1); - } -} - -namespace System -{ - Action::Action() - { - CppHandle = Plugin::StoreSystemAction(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemActionConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemAction(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Action::Action(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemAction(this); - ClassHandle = 0; - } - - Action::Action(const Action& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemAction(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - Action::Action(Action&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Action::Action(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemAction(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - Action::~Action() - { - Plugin::RemoveSystemAction(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemAction(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - Action& Action::operator=(const Action& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - Action& Action::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemAction(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - Action& Action::operator=(Action&& other) - { - Plugin::RemoveSystemAction(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemAction(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Action::operator==(const Action& other) const - { - return Handle == other.Handle; - } - - bool Action::operator!=(const Action& other) const - { - return Handle != other.Handle; - } - - void Action::operator+=(System::Action& del) - { - Plugin::SystemActionAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Action::operator-=(System::Action& del) - { - Plugin::SystemActionRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Action::operator()() - { - } - - DLLEXPORT void SystemActionNativeInvoke(int32_t cppHandle) - { - try - { - Plugin::GetSystemAction(cppHandle)->operator()(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Action"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void Action::Invoke() - { - Plugin::SystemActionInvoke(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } -} - -namespace System -{ - Action1::Action1() - { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemActionSystemSingleConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemActionSystemSingle(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Action1::Action1(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - ClassHandle = 0; - } - - Action1::Action1(const Action1& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - Action1::Action1(Action1&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Action1::Action1(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - Action1::~Action1() - { - Plugin::RemoveSystemActionSystemSingle(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemActionSystemSingle(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - Action1& Action1::operator=(const Action1& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - Action1& Action1::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemActionSystemSingle(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - Action1& Action1::operator=(Action1&& other) - { - Plugin::RemoveSystemActionSystemSingle(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemActionSystemSingle(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Action1::operator==(const Action1& other) const - { - return Handle == other.Handle; - } - - bool Action1::operator!=(const Action1& other) const - { - return Handle != other.Handle; - } - - void Action1::operator+=(System::Action1& del) - { - Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Action1::operator-=(System::Action1& del) - { - Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Action1::operator()(System::Single obj) - { - } - - DLLEXPORT void SystemActionSystemSingleNativeInvoke(int32_t cppHandle, float obj) - { - try - { - Plugin::GetSystemActionSystemSingle(cppHandle)->operator()(obj); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Action1"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void Action1::Invoke(System::Single obj) - { - Plugin::SystemActionSystemSingleInvoke(Handle, obj); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } -} - -namespace System -{ - Action2::Action2() - { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemActionSystemSingle_SystemSingleConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Action2::Action2(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - ClassHandle = 0; - } - - Action2::Action2(const Action2& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - Action2::Action2(Action2&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Action2::Action2(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - Action2::~Action2() - { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - Action2& Action2::operator=(const Action2& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - Action2& Action2::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - Action2& Action2::operator=(Action2&& other) - { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Action2::operator==(const Action2& other) const - { - return Handle == other.Handle; - } - - bool Action2::operator!=(const Action2& other) const - { - return Handle != other.Handle; - } - - void Action2::operator+=(System::Action2& del) - { - Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Action2::operator-=(System::Action2& del) - { - Plugin::SystemActionSystemSingle_SystemSingleRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Action2::operator()(System::Single arg1, System::Single arg2) - { - } - - DLLEXPORT void SystemActionSystemSingle_SystemSingleNativeInvoke(int32_t cppHandle, float arg1, float arg2) - { - try - { - Plugin::GetSystemActionSystemSingle_SystemSingle(cppHandle)->operator()(arg1, arg2); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Action2"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void Action2::Invoke(System::Single arg1, System::Single arg2) - { - Plugin::SystemActionSystemSingle_SystemSingleInvoke(Handle, arg1, arg2); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } -} - -namespace System -{ - Func3::Func3() - { - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Func3::Func3(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - ClassHandle = 0; - } - - Func3::Func3(const Func3& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - Func3::Func3(Func3&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Func3::Func3(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - Func3::~Func3() - { - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - Func3& Func3::operator=(const Func3& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - Func3& Func3::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - Func3& Func3::operator=(Func3&& other) - { - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Func3::operator==(const Func3& other) const - { - return Handle == other.Handle; - } - - bool Func3::operator!=(const Func3& other) const - { - return Handle != other.Handle; - } - - void Func3::operator+=(System::Func3& del) - { - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Func3::operator-=(System::Func3& del) - { - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - System::Double Func3::operator()(System::Int32 arg1, System::Single arg2) - { - return {}; - } - - DLLEXPORT double SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(int32_t cppHandle, int32_t arg1, float arg2) - { - try - { - return Plugin::GetSystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle)->operator()(arg1, arg2); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Func3"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - - System::Double Func3::Invoke(System::Int32 arg1, System::Single arg2) - { - auto returnValue = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(Handle, arg1, arg2); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } -} - -namespace System -{ - Func3::Func3() - { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Func3::Func3(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - ClassHandle = 0; - } - - Func3::Func3(const Func3& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - Func3::Func3(Func3&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Func3::Func3(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - Func3::~Func3() - { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - Func3& Func3::operator=(const Func3& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - Func3& Func3::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - Func3& Func3::operator=(Func3&& other) - { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Func3::operator==(const Func3& other) const - { - return Handle == other.Handle; - } - - bool Func3::operator!=(const Func3& other) const - { - return Handle != other.Handle; - } - - void Func3::operator+=(System::Func3& del) - { - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void Func3::operator-=(System::Func3& del) - { - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - System::String Func3::operator()(System::Int16 arg1, System::Int32 arg2) - { - return nullptr; - } - - DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) - { - try - { - return Plugin::GetSystemFuncSystemInt16_SystemInt32_SystemString(cppHandle)->operator()(arg1, arg2).Handle; - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Func3"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - - System::String Func3::Invoke(System::Int16 arg1, System::Int32 arg2) - { - auto returnValue = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(Handle, arg1, arg2); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::String(Plugin::InternalUse::Only, returnValue); - } -} - -namespace System -{ - AppDomainInitializer::AppDomainInitializer() - { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemAppDomainInitializerConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemAppDomainInitializer(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - AppDomainInitializer::AppDomainInitializer(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - ClassHandle = 0; - } - - AppDomainInitializer::AppDomainInitializer(const AppDomainInitializer& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - AppDomainInitializer::AppDomainInitializer(AppDomainInitializer&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - AppDomainInitializer::~AppDomainInitializer() - { - Plugin::RemoveSystemAppDomainInitializer(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - AppDomainInitializer& AppDomainInitializer::operator=(const AppDomainInitializer& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - AppDomainInitializer& AppDomainInitializer::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - AppDomainInitializer& AppDomainInitializer::operator=(AppDomainInitializer&& other) - { - Plugin::RemoveSystemAppDomainInitializer(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool AppDomainInitializer::operator==(const AppDomainInitializer& other) const - { - return Handle == other.Handle; - } - - bool AppDomainInitializer::operator!=(const AppDomainInitializer& other) const - { - return Handle != other.Handle; - } - - void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) - { - Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void AppDomainInitializer::operator-=(System::AppDomainInitializer& del) - { - Plugin::SystemAppDomainInitializerRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void AppDomainInitializer::operator()(System::Array1& args) - { - } - - DLLEXPORT void SystemAppDomainInitializerNativeInvoke(int32_t cppHandle, int32_t argsHandle) - { - try - { - auto args = System::Array1(Plugin::InternalUse::Only, argsHandle); - Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(args); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::AppDomainInitializer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void AppDomainInitializer::Invoke(System::Array1& args) - { - Plugin::SystemAppDomainInitializerInvoke(Handle, args.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } -} - -namespace UnityEngine -{ - namespace Events - { - UnityAction::UnityAction() - { - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::UnityEngineEventsUnityActionConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - UnityAction::UnityAction(decltype(nullptr)) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - ClassHandle = 0; - } - - UnityAction::UnityAction(const UnityAction& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - UnityAction::UnityAction(UnityAction&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - UnityAction::UnityAction(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - UnityAction::~UnityAction() - { - Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseUnityEngineEventsUnityAction(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - UnityAction& UnityAction::operator=(const UnityAction& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - UnityAction& UnityAction::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseUnityEngineEventsUnityAction(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - UnityAction& UnityAction::operator=(UnityAction&& other) - { - Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseUnityEngineEventsUnityAction(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool UnityAction::operator==(const UnityAction& other) const - { - return Handle == other.Handle; - } - - bool UnityAction::operator!=(const UnityAction& other) const - { - return Handle != other.Handle; - } - - void UnityAction::operator+=(UnityEngine::Events::UnityAction& del) - { - Plugin::UnityEngineEventsUnityActionAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void UnityAction::operator-=(UnityEngine::Events::UnityAction& del) - { - Plugin::UnityEngineEventsUnityActionRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void UnityAction::operator()() - { - } - - DLLEXPORT void UnityEngineEventsUnityActionNativeInvoke(int32_t cppHandle) - { - try - { - Plugin::GetUnityEngineEventsUnityAction(cppHandle)->operator()(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking UnityEngine::Events::UnityAction"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void UnityAction::Invoke() - { - Plugin::UnityEngineEventsUnityActionInvoke(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } -} - -namespace UnityEngine -{ - namespace Events - { - UnityAction2::UnityAction2() - { - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - UnityAction2::UnityAction2(decltype(nullptr)) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - ClassHandle = 0; - } - - UnityAction2::UnityAction2(const UnityAction2& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - UnityAction2::UnityAction2(UnityAction2&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - UnityAction2::UnityAction2(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - UnityAction2::~UnityAction2() - { - Plugin::RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - UnityAction2& UnityAction2::operator=(const UnityAction2& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - UnityAction2& UnityAction2::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - UnityAction2& UnityAction2::operator=(UnityAction2&& other) - { - Plugin::RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool UnityAction2::operator==(const UnityAction2& other) const - { - return Handle == other.Handle; - } - - bool UnityAction2::operator!=(const UnityAction2& other) const - { - return Handle != other.Handle; - } - - void UnityAction2::operator+=(UnityEngine::Events::UnityAction2& del) - { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void UnityAction2::operator-=(UnityEngine::Events::UnityAction2& del) - { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - } - - DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int32_t cppHandle, int32_t arg0Handle, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - try - { - auto arg0 = UnityEngine::SceneManagement::Scene(Plugin::InternalUse::Only, arg0Handle); - Plugin::GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle)->operator()(arg0, arg1); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking UnityEngine::Events::UnityAction2"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0.Handle, arg1); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentEventHandler::ComponentEventHandler() - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemComponentModelDesignComponentEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemComponentModelDesignComponentEventHandler(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ComponentEventHandler::ComponentEventHandler(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); - ClassHandle = 0; - } - - ComponentEventHandler::ComponentEventHandler(const ComponentEventHandler& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - ComponentEventHandler::ComponentEventHandler(ComponentEventHandler&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - ComponentEventHandler::ComponentEventHandler(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - ComponentEventHandler::~ComponentEventHandler() - { - Plugin::RemoveSystemComponentModelDesignComponentEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - ComponentEventHandler& ComponentEventHandler::operator=(const ComponentEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - ComponentEventHandler& ComponentEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - ComponentEventHandler& ComponentEventHandler::operator=(ComponentEventHandler&& other) - { - Plugin::RemoveSystemComponentModelDesignComponentEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentEventHandler::operator==(const ComponentEventHandler& other) const - { - return Handle == other.Handle; - } - - bool ComponentEventHandler::operator!=(const ComponentEventHandler& other) const - { - return Handle != other.Handle; - } - - void ComponentEventHandler::operator+=(System::ComponentModel::Design::ComponentEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentEventHandlerAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentEventHandler::operator-=(System::ComponentModel::Design::ComponentEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentEventHandlerRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentEventHandler::operator()(System::Object& sender, System::ComponentModel::Design::ComponentEventArgs& e) - { - } - - DLLEXPORT void SystemComponentModelDesignComponentEventHandlerNativeInvoke(int32_t cppHandle, int32_t senderHandle, int32_t eHandle) - { - try - { - auto sender = System::Object(Plugin::InternalUse::Only, senderHandle); - auto e = System::ComponentModel::Design::ComponentEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentEventHandler(cppHandle)->operator()(sender, e); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::ComponentEventHandler"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void ComponentEventHandler::Invoke(System::Object& sender, System::ComponentModel::Design::ComponentEventArgs& e) - { - Plugin::SystemComponentModelDesignComponentEventHandlerInvoke(Handle, sender.Handle, e.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentChangingEventHandler::ComponentChangingEventHandler() - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemComponentModelDesignComponentChangingEventHandler(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ComponentChangingEventHandler::ComponentChangingEventHandler(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); - ClassHandle = 0; - } - - ComponentChangingEventHandler::ComponentChangingEventHandler(const ComponentChangingEventHandler& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - ComponentChangingEventHandler::ComponentChangingEventHandler(ComponentChangingEventHandler&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - ComponentChangingEventHandler::ComponentChangingEventHandler(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - ComponentChangingEventHandler::~ComponentChangingEventHandler() - { - Plugin::RemoveSystemComponentModelDesignComponentChangingEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentChangingEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - ComponentChangingEventHandler& ComponentChangingEventHandler::operator=(const ComponentChangingEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - ComponentChangingEventHandler& ComponentChangingEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentChangingEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - ComponentChangingEventHandler& ComponentChangingEventHandler::operator=(ComponentChangingEventHandler&& other) - { - Plugin::RemoveSystemComponentModelDesignComponentChangingEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentChangingEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentChangingEventHandler::operator==(const ComponentChangingEventHandler& other) const - { - return Handle == other.Handle; - } - - bool ComponentChangingEventHandler::operator!=(const ComponentChangingEventHandler& other) const - { - return Handle != other.Handle; - } - - void ComponentChangingEventHandler::operator+=(System::ComponentModel::Design::ComponentChangingEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentChangingEventHandlerAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentChangingEventHandler::operator-=(System::ComponentModel::Design::ComponentChangingEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentChangingEventHandlerRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentChangingEventHandler::operator()(System::Object& sender, System::ComponentModel::Design::ComponentChangingEventArgs& e) - { - } - - DLLEXPORT void SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke(int32_t cppHandle, int32_t senderHandle, int32_t eHandle) - { - try - { - auto sender = System::Object(Plugin::InternalUse::Only, senderHandle); - auto e = System::ComponentModel::Design::ComponentChangingEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentChangingEventHandler(cppHandle)->operator()(sender, e); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::ComponentChangingEventHandler"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void ComponentChangingEventHandler::Invoke(System::Object& sender, System::ComponentModel::Design::ComponentChangingEventArgs& e) - { - Plugin::SystemComponentModelDesignComponentChangingEventHandlerInvoke(Handle, sender.Handle, e.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentChangedEventHandler::ComponentChangedEventHandler() - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemComponentModelDesignComponentChangedEventHandler(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ComponentChangedEventHandler::ComponentChangedEventHandler(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); - ClassHandle = 0; - } - - ComponentChangedEventHandler::ComponentChangedEventHandler(const ComponentChangedEventHandler& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - ComponentChangedEventHandler::ComponentChangedEventHandler(ComponentChangedEventHandler&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - ComponentChangedEventHandler::ComponentChangedEventHandler(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - ComponentChangedEventHandler::~ComponentChangedEventHandler() - { - Plugin::RemoveSystemComponentModelDesignComponentChangedEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentChangedEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(const ComponentChangedEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentChangedEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(ComponentChangedEventHandler&& other) - { - Plugin::RemoveSystemComponentModelDesignComponentChangedEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentChangedEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentChangedEventHandler::operator==(const ComponentChangedEventHandler& other) const - { - return Handle == other.Handle; - } - - bool ComponentChangedEventHandler::operator!=(const ComponentChangedEventHandler& other) const - { - return Handle != other.Handle; - } - - void ComponentChangedEventHandler::operator+=(System::ComponentModel::Design::ComponentChangedEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentChangedEventHandlerAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentChangedEventHandler::operator-=(System::ComponentModel::Design::ComponentChangedEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentChangedEventHandlerRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentChangedEventHandler::operator()(System::Object& sender, System::ComponentModel::Design::ComponentChangedEventArgs& e) - { - } - - DLLEXPORT void SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke(int32_t cppHandle, int32_t senderHandle, int32_t eHandle) - { - try - { - auto sender = System::Object(Plugin::InternalUse::Only, senderHandle); - auto e = System::ComponentModel::Design::ComponentChangedEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentChangedEventHandler(cppHandle)->operator()(sender, e); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::ComponentChangedEventHandler"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void ComponentChangedEventHandler::Invoke(System::Object& sender, System::ComponentModel::Design::ComponentChangedEventArgs& e) - { - Plugin::SystemComponentModelDesignComponentChangedEventHandlerInvoke(Handle, sender.Handle, e.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - ComponentRenameEventHandler::ComponentRenameEventHandler() - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); - System::Int32* handle = (System::Int32*)&Handle; - int32_t cppHandle = CppHandle; - System::Int32* classHandle = (System::Int32*)&ClassHandle; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor(cppHandle, &handle->Value, &classHandle->Value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemComponentModelDesignComponentRenameEventHandler(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - ComponentRenameEventHandler::ComponentRenameEventHandler(decltype(nullptr)) - { - CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); - ClassHandle = 0; - } - - ComponentRenameEventHandler::ComponentRenameEventHandler(const ComponentRenameEventHandler& other) - { - Handle = other.Handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - ComponentRenameEventHandler::ComponentRenameEventHandler(ComponentRenameEventHandler&& other) - { - Handle = other.Handle; - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - ComponentRenameEventHandler::ComponentRenameEventHandler(Plugin::InternalUse, int32_t handle) - { - Handle = handle; - CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - ComponentRenameEventHandler::~ComponentRenameEventHandler() - { - Plugin::RemoveSystemComponentModelDesignComponentRenameEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentRenameEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - } - - ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(const ComponentRenameEventHandler& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - ClassHandle = other.ClassHandle; - return *this; - } - - ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(decltype(nullptr)) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentRenameEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = 0; - Handle = 0; - return *this; - } - - ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(ComponentRenameEventHandler&& other) - { - Plugin::RemoveSystemComponentModelDesignComponentRenameEventHandler(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemComponentModelDesignComponentRenameEventHandler(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - } - ClassHandle = other.ClassHandle; - other.ClassHandle = 0; - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool ComponentRenameEventHandler::operator==(const ComponentRenameEventHandler& other) const - { - return Handle == other.Handle; - } - - bool ComponentRenameEventHandler::operator!=(const ComponentRenameEventHandler& other) const - { - return Handle != other.Handle; - } - - void ComponentRenameEventHandler::operator+=(System::ComponentModel::Design::ComponentRenameEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentRenameEventHandlerAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentRenameEventHandler::operator-=(System::ComponentModel::Design::ComponentRenameEventHandler& del) - { - Plugin::SystemComponentModelDesignComponentRenameEventHandlerRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void ComponentRenameEventHandler::operator()(System::Object& sender, System::ComponentModel::Design::ComponentRenameEventArgs& e) - { - } - - DLLEXPORT void SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke(int32_t cppHandle, int32_t senderHandle, int32_t eHandle) - { - try - { - auto sender = System::Object(Plugin::InternalUse::Only, senderHandle); - auto e = System::ComponentModel::Design::ComponentRenameEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentRenameEventHandler(cppHandle)->operator()(sender, e); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::ComponentModel::Design::ComponentRenameEventHandler"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - void ComponentRenameEventHandler::Invoke(System::Object& sender, System::ComponentModel::Design::ComponentRenameEventArgs& e) - { - Plugin::SystemComponentModelDesignComponentRenameEventHandlerInvoke(Handle, sender.Handle, e.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + return returnVal; + } +} + +namespace System +{ + Object::operator System::Int32() + { + System::Int32 returnVal(Plugin::UnboxInt32(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::operator System::UInt32() + { + System::UInt32 returnVal(Plugin::UnboxUInt32(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::operator System::Int64() + { + System::Int64 returnVal(Plugin::UnboxInt64(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::operator System::UInt64() + { + System::UInt64 returnVal(Plugin::UnboxUInt64(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::operator System::Char() + { + System::Char returnVal(Plugin::UnboxChar(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::operator System::Single() + { + System::Single returnVal(Plugin::UnboxSingle(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::operator System::Double() + { + System::Double returnVal(Plugin::UnboxDouble(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; } } @@ -21396,171 +3431,27 @@ DLLEXPORT void Init( int32_t (*enumerableGetEnumerator)(int32_t handle), /*BEGIN INIT PARAMS*/ int32_t maxManagedObjects, - System::Int32 (*systemIComparableMethodCompareToSystemObject)(int32_t thisHandle, int32_t objHandle), - void (*systemIDisposableMethodDispose)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), - System::Single (*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), int32_t (*boxVector3)(UnityEngine::Vector3& val), UnityEngine::Vector3 (*unboxVector3)(int32_t valHandle), int32_t (*unityEngineObjectPropertyGetName)(int32_t thisHandle), void (*unityEngineObjectPropertySetName)(int32_t thisHandle, int32_t valueHandle), - int32_t (*unityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle), - int32_t (*unityEngineObjectMethodop_ImplicitUnityEngineObject)(int32_t existsHandle), int32_t (*unityEngineComponentPropertyGetTransform)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineTransformPropertyGetPosition)(int32_t thisHandle), void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value), - void (*unityEngineTransformMethodSetParentUnityEngineTransform)(int32_t thisHandle, int32_t parentHandle), - int32_t (*boxColor)(UnityEngine::Color& val), - UnityEngine::Color (*unboxColor)(int32_t valHandle), - int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), - UnityEngine::GradientColorKey (*unboxGradientColorKey)(int32_t valHandle), - void (*releaseUnityEngineResolution)(int32_t handle), - int32_t (*unityEngineResolutionConstructor)(), - System::Int32 (*unityEngineResolutionPropertyGetWidth)(int32_t thisHandle), - void (*unityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value), - System::Int32 (*unityEngineResolutionPropertyGetHeight)(int32_t thisHandle), - void (*unityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value), - System::Int32 (*unityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle), - void (*unityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value), - int32_t (*boxResolution)(int32_t valHandle), - int32_t (*unboxResolution)(int32_t valHandle), - 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), - int32_t (*boxRaycastHit)(int32_t valHandle), - int32_t (*unboxRaycastHit)(int32_t valHandle), int32_t (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), int32_t (*systemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle), - void (*releaseUnityEnginePlayablesPlayableGraph)(int32_t handle), - int32_t (*boxPlayableGraph)(int32_t valHandle), - int32_t (*unboxPlayableGraph)(int32_t valHandle), - void (*releaseUnityEngineAnimationsAnimationMixerPlayable)(int32_t handle), - int32_t (*unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean)(int32_t graphHandle, int32_t inputCount, uint32_t normalizeWeights), - int32_t (*boxAnimationMixerPlayable)(int32_t valHandle), - int32_t (*unboxAnimationMixerPlayable)(int32_t valHandle), - int32_t (*systemDiagnosticsStopwatchConstructor)(), - System::Int64 (*systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle), - void (*systemDiagnosticsStopwatchMethodStart)(int32_t thisHandle), - void (*systemDiagnosticsStopwatchMethodReset)(int32_t thisHandle), - int32_t (*unityEngineGameObjectConstructor)(), - int32_t (*unityEngineGameObjectConstructorSystemString)(int32_t nameHandle), - int32_t (*unityEngineGameObjectPropertyGetTransform)(int32_t thisHandle), - int32_t (*unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle), - int32_t (*unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript)(int32_t thisHandle), + int32_t (*unityEngineGameObjectMethodAddComponentMyGameBaseBallScript)(int32_t thisHandle), int32_t (*unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type), void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), - int32_t (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), - void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(uint32_t value), - void (*unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle), - void (*unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle), int32_t (*unityEngineMonoBehaviourPropertyGetTransform)(int32_t thisHandle), - 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)(), - int32_t (*boxQuaternion)(UnityEngine::Quaternion& val), - UnityEngine::Quaternion (*unboxQuaternion)(int32_t valHandle), - System::Single (*unityEngineMatrix4x4PropertyGetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column), - void (*unityEngineMatrix4x4PropertySetItem)(UnityEngine::Matrix4x4* thiz, int32_t row, int32_t column, float value), - int32_t (*boxMatrix4x4)(UnityEngine::Matrix4x4& val), - UnityEngine::Matrix4x4 (*unboxMatrix4x4)(int32_t valHandle), - int32_t (*boxQueryTriggerInteraction)(UnityEngine::QueryTriggerInteraction val), - UnityEngine::QueryTriggerInteraction (*unboxQueryTriggerInteraction)(int32_t valHandle), - void (*releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)(int32_t handle), - int32_t (*systemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble)(int32_t keyHandle, double value), - int32_t (*systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey)(int32_t thisHandle), - System::Double (*systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue)(int32_t thisHandle), - int32_t (*boxKeyValuePairSystemString_SystemDouble)(int32_t valHandle), - int32_t (*unboxKeyValuePairSystemString_SystemDouble)(int32_t valHandle), - 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 (*unityEngineScreenPropertyGetResolutions)(), - void (*releaseUnityEngineRay)(int32_t handle), - int32_t (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), - int32_t (*boxRay)(int32_t valHandle), - int32_t (*unboxRay)(int32_t valHandle), - System::Int32 (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle), - int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle), - 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), - void (*unityEngineApplicationAddEventOnBeforeRender)(int32_t delHandle), - void (*unityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle), - void (*unityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle), - void (*unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle), - void (*releaseUnityEngineSceneManagementScene)(int32_t handle), - int32_t (*boxScene)(int32_t valHandle), - int32_t (*unboxScene)(int32_t valHandle), - int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), - UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), int32_t (*boxPrimitiveType)(UnityEngine::PrimitiveType val), UnityEngine::PrimitiveType (*unboxPrimitiveType)(int32_t valHandle), System::Single (*unityEngineTimePropertyGetDeltaTime)(), - int32_t (*boxFileMode)(System::IO::FileMode val), - System::IO::FileMode (*unboxFileMode)(int32_t valHandle), - void (*releaseSystemCollectionsGenericBaseIComparerSystemInt32)(int32_t handle), - void (*systemCollectionsGenericBaseIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsGenericBaseIComparerSystemString)(int32_t handle), - void (*systemCollectionsGenericBaseIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemBaseStringComparer)(int32_t handle), - void (*systemBaseStringComparerConstructor)(int32_t cppHandle, int32_t* handle), - System::Int32 (*systemCollectionsQueuePropertyGetCount)(int32_t thisHandle), - void (*releaseSystemCollectionsBaseQueue)(int32_t handle), - void (*systemCollectionsBaseQueueConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemComponentModelDesignBaseIComponentChangeService)(int32_t handle), - void (*systemComponentModelDesignBaseIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle), - int32_t (*systemIOFileStreamConstructorSystemString_SystemIOFileMode)(int32_t pathHandle, System::IO::FileMode mode), - void (*systemIOFileStreamMethodWriteByteSystemByte)(int32_t thisHandle, uint8_t value), - void (*releaseSystemIOBaseFileStream)(int32_t handle), - void (*systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode)(int32_t cppHandle, int32_t* handle, int32_t pathHandle, System::IO::FileMode mode), - void (*releaseUnityEnginePlayablesPlayableHandle)(int32_t handle), - int32_t (*boxPlayableHandle)(int32_t valHandle), - int32_t (*unboxPlayableHandle)(int32_t valHandle), - int32_t (*systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator)(int32_t thisHandle), - int32_t (*unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)(int32_t eHandle, int32_t nameHandle, int32_t classesHandle), - int32_t (*unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)(int32_t eHandle, int32_t nameHandle, int32_t classNameHandle), - int32_t (*boxInteractionSourcePositionAccuracy)(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val), - UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy (*unboxInteractionSourcePositionAccuracy)(int32_t valHandle), - int32_t (*boxInteractionSourceNode)(UnityEngine::XR::WSA::Input::InteractionSourceNode val), - UnityEngine::XR::WSA::Input::InteractionSourceNode (*unboxInteractionSourceNode)(int32_t valHandle), - void (*releaseUnityEngineXRWSAInputInteractionSourcePose)(int32_t handle), - int32_t (*unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)(int32_t thisHandle, UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node), - int32_t (*boxInteractionSourcePose)(int32_t valHandle), - int32_t (*unboxInteractionSourcePose)(int32_t valHandle), - int32_t (*systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent)(int32_t thisHandle), - System::Int32 (*systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent)(int32_t thisHandle), - System::Single (*systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent)(int32_t thisHandle), - UnityEngine::GradientColorKey (*systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator)(int32_t thisHandle), - int32_t (*systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator)(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), - void (*systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle), - int32_t (*systemCollectionsGenericListSystemInt32Constructor)(), - System::Int32 (*systemCollectionsGenericListSystemInt32PropertyGetItem)(int32_t thisHandle, int32_t index), - void (*systemCollectionsGenericListSystemInt32PropertySetItem)(int32_t thisHandle, int32_t index, int32_t value), - void (*systemCollectionsGenericListSystemInt32MethodAddSystemInt32)(int32_t thisHandle, int32_t item), - void (*systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer)(int32_t thisHandle, int32_t comparerHandle), + void (*releaseBaseBallScript)(int32_t handle), + void (*baseBallScriptConstructor)(int32_t cppHandle, int32_t* handle), int32_t (*boxBoolean)(uint32_t val), int32_t (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -21584,93 +3475,7 @@ DLLEXPORT void Init( int32_t (*boxSingle)(float val), System::Single (*unboxSingle)(int32_t valHandle), int32_t (*boxDouble)(double val), - System::Double (*unboxDouble)(int32_t valHandle), - int32_t (*systemSystemInt32Array1Constructor1)(int32_t length0), - System::Int32 (*systemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0), - int32_t (*systemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item), - int32_t (*systemSystemSingleArray1Constructor1)(int32_t length0), - System::Single (*systemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0), - int32_t (*systemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item), - int32_t (*systemSystemSingleArray2Constructor2)(int32_t length0, int32_t length1), - int32_t (*systemSystemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension), - System::Single (*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 (*systemSystemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2), - int32_t (*systemSystemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension), - System::Single (*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 (*systemSystemStringArray1Constructor1)(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 (*unityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0), - int32_t (*unityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0), - int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle), - int32_t (*unityEngineUnityEngineRaycastHitArray1Constructor1)(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 (*unityEngineUnityEngineGradientColorKeyArray1Constructor1)(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 (*systemActionAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemActionRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemActionInvoke)(int32_t thisHandle), - void (*releaseSystemActionSystemSingle)(int32_t handle, int32_t classHandle), - void (*systemActionSystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemActionSystemSingleAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemActionSystemSingleRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemActionSystemSingleInvoke)(int32_t thisHandle, float obj), - void (*releaseSystemActionSystemSingle_SystemSingle)(int32_t handle, int32_t classHandle), - void (*systemActionSystemSingle_SystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemActionSystemSingle_SystemSingleAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemActionSystemSingle_SystemSingleRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemActionSystemSingle_SystemSingleInvoke)(int32_t thisHandle, float arg1, float arg2), - void (*releaseSystemFuncSystemInt32_SystemSingle_SystemDouble)(int32_t handle, int32_t classHandle), - void (*systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle), - System::Double (*systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2), - void (*releaseSystemFuncSystemInt16_SystemInt32_SystemString)(int32_t handle, int32_t classHandle), - void (*systemFuncSystemInt16_SystemInt32_SystemStringConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemFuncSystemInt16_SystemInt32_SystemStringRemove)(int32_t thisHandle, int32_t delHandle), - int32_t (*systemFuncSystemInt16_SystemInt32_SystemStringInvoke)(int32_t thisHandle, int16_t arg1, int32_t arg2), - void (*releaseSystemAppDomainInitializer)(int32_t handle, int32_t classHandle), - void (*systemAppDomainInitializerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemAppDomainInitializerAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemAppDomainInitializerRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle), - void (*releaseUnityEngineEventsUnityAction)(int32_t handle, int32_t classHandle), - void (*unityEngineEventsUnityActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*unityEngineEventsUnityActionAdd)(int32_t thisHandle, int32_t delHandle), - void (*unityEngineEventsUnityActionRemove)(int32_t thisHandle, int32_t delHandle), - void (*unityEngineEventsUnityActionInvoke)(int32_t thisHandle), - void (*releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)(int32_t handle, int32_t classHandle), - void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle), - void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle), - void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, int32_t arg0Handle, UnityEngine::SceneManagement::LoadSceneMode arg1), - void (*releaseSystemComponentModelDesignComponentEventHandler)(int32_t handle, int32_t classHandle), - void (*systemComponentModelDesignComponentEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemComponentModelDesignComponentEventHandlerAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentEventHandlerRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle), - void (*releaseSystemComponentModelDesignComponentChangingEventHandler)(int32_t handle, int32_t classHandle), - void (*systemComponentModelDesignComponentChangingEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemComponentModelDesignComponentChangingEventHandlerAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentChangingEventHandlerRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentChangingEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle), - void (*releaseSystemComponentModelDesignComponentChangedEventHandler)(int32_t handle, int32_t classHandle), - void (*systemComponentModelDesignComponentChangedEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemComponentModelDesignComponentChangedEventHandlerAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentChangedEventHandlerRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentChangedEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle), - void (*releaseSystemComponentModelDesignComponentRenameEventHandler)(int32_t handle, int32_t classHandle), - void (*systemComponentModelDesignComponentRenameEventHandlerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemComponentModelDesignComponentRenameEventHandlerAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentRenameEventHandlerRemove)(int32_t thisHandle, int32_t delHandle), - void (*systemComponentModelDesignComponentRenameEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle) + System::Double (*unboxDouble)(int32_t valHandle) /*END INIT PARAMS*/) { uint8_t* curMemory = memory; @@ -21687,222 +3492,35 @@ DLLEXPORT void Init( Plugin::ArrayGetLength = arrayGetLength; Plugin::EnumerableGetEnumerator = enumerableGetEnumerator; /*BEGIN INIT BODY*/ - Plugin::SystemIComparableMethodCompareToSystemObject = systemIComparableMethodCompareToSystemObject; - Plugin::SystemIDisposableMethodDispose = systemIDisposableMethodDispose; Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle = unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle; - Plugin::UnityEngineVector3PropertyGetMagnitude = unityEngineVector3PropertyGetMagnitude; - Plugin::UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle = unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle; Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3 = unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3; - Plugin::UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3 = unityEngineVector3Methodop_UnaryNegationUnityEngineVector3; Plugin::BoxVector3 = boxVector3; Plugin::UnboxVector3 = unboxVector3; Plugin::UnityEngineObjectPropertyGetName = unityEngineObjectPropertyGetName; Plugin::UnityEngineObjectPropertySetName = unityEngineObjectPropertySetName; - Plugin::UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject = unityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject; - Plugin::UnityEngineObjectMethodop_ImplicitUnityEngineObject = unityEngineObjectMethodop_ImplicitUnityEngineObject; Plugin::UnityEngineComponentPropertyGetTransform = unityEngineComponentPropertyGetTransform; Plugin::UnityEngineTransformPropertyGetPosition = unityEngineTransformPropertyGetPosition; Plugin::UnityEngineTransformPropertySetPosition = unityEngineTransformPropertySetPosition; - Plugin::UnityEngineTransformMethodSetParentUnityEngineTransform = unityEngineTransformMethodSetParentUnityEngineTransform; - Plugin::BoxColor = boxColor; - Plugin::UnboxColor = unboxColor; - Plugin::BoxGradientColorKey = boxGradientColorKey; - Plugin::UnboxGradientColorKey = unboxGradientColorKey; - Plugin::ReleaseUnityEngineResolution = releaseUnityEngineResolution; - Plugin::RefCountsUnityEngineResolution = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEngineResolution = 1000; - Plugin::UnityEngineResolutionConstructor = unityEngineResolutionConstructor; - Plugin::UnityEngineResolutionPropertyGetWidth = unityEngineResolutionPropertyGetWidth; - Plugin::UnityEngineResolutionPropertySetWidth = unityEngineResolutionPropertySetWidth; - Plugin::UnityEngineResolutionPropertyGetHeight = unityEngineResolutionPropertyGetHeight; - Plugin::UnityEngineResolutionPropertySetHeight = unityEngineResolutionPropertySetHeight; - Plugin::UnityEngineResolutionPropertyGetRefreshRate = unityEngineResolutionPropertyGetRefreshRate; - Plugin::UnityEngineResolutionPropertySetRefreshRate = unityEngineResolutionPropertySetRefreshRate; - Plugin::BoxResolution = boxResolution; - Plugin::UnboxResolution = unboxResolution; - Plugin::ReleaseUnityEngineRaycastHit = releaseUnityEngineRaycastHit; - Plugin::RefCountsUnityEngineRaycastHit = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEngineRaycastHit = 1000; - Plugin::UnityEngineRaycastHitPropertyGetPoint = unityEngineRaycastHitPropertyGetPoint; - Plugin::UnityEngineRaycastHitPropertySetPoint = unityEngineRaycastHitPropertySetPoint; - Plugin::UnityEngineRaycastHitPropertyGetTransform = unityEngineRaycastHitPropertyGetTransform; - Plugin::BoxRaycastHit = boxRaycastHit; - Plugin::UnboxRaycastHit = unboxRaycastHit; Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = systemCollectionsIEnumeratorPropertyGetCurrent; Plugin::SystemCollectionsIEnumeratorMethodMoveNext = systemCollectionsIEnumeratorMethodMoveNext; - Plugin::ReleaseUnityEnginePlayablesPlayableGraph = releaseUnityEnginePlayablesPlayableGraph; - Plugin::RefCountsUnityEnginePlayablesPlayableGraph = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEnginePlayablesPlayableGraph = 1000; - Plugin::BoxPlayableGraph = boxPlayableGraph; - Plugin::UnboxPlayableGraph = unboxPlayableGraph; - Plugin::ReleaseUnityEngineAnimationsAnimationMixerPlayable = releaseUnityEngineAnimationsAnimationMixerPlayable; - Plugin::RefCountsUnityEngineAnimationsAnimationMixerPlayable = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEngineAnimationsAnimationMixerPlayable = 1000; - Plugin::UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean = unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean; - Plugin::BoxAnimationMixerPlayable = boxAnimationMixerPlayable; - Plugin::UnboxAnimationMixerPlayable = unboxAnimationMixerPlayable; - Plugin::SystemDiagnosticsStopwatchConstructor = systemDiagnosticsStopwatchConstructor; - Plugin::SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds = systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds; - Plugin::SystemDiagnosticsStopwatchMethodStart = systemDiagnosticsStopwatchMethodStart; - Plugin::SystemDiagnosticsStopwatchMethodReset = systemDiagnosticsStopwatchMethodReset; - Plugin::UnityEngineGameObjectConstructor = unityEngineGameObjectConstructor; - Plugin::UnityEngineGameObjectConstructorSystemString = unityEngineGameObjectConstructorSystemString; - Plugin::UnityEngineGameObjectPropertyGetTransform = unityEngineGameObjectPropertyGetTransform; - Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript = unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript; - Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript = unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript; + Plugin::UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript = unityEngineGameObjectMethodAddComponentMyGameBaseBallScript; Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType = unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType; Plugin::UnityEngineDebugMethodLogSystemObject = unityEngineDebugMethodLogSystemObject; - Plugin::UnityEngineAssertionsAssertFieldGetRaiseExceptions = unityEngineAssertionsAssertFieldGetRaiseExceptions; - Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions = unityEngineAssertionsAssertFieldSetRaiseExceptions; - Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString = unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString; - Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject = unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject; Plugin::UnityEngineMonoBehaviourPropertyGetTransform = unityEngineMonoBehaviourPropertyGetTransform; - Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32 = unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32; - Plugin::UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte = unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte; - Plugin::UnityEngineNetworkingNetworkTransportMethodInit = unityEngineNetworkingNetworkTransportMethodInit; - Plugin::BoxQuaternion = boxQuaternion; - Plugin::UnboxQuaternion = unboxQuaternion; - Plugin::UnityEngineMatrix4x4PropertyGetItem = unityEngineMatrix4x4PropertyGetItem; - Plugin::UnityEngineMatrix4x4PropertySetItem = unityEngineMatrix4x4PropertySetItem; - Plugin::BoxMatrix4x4 = boxMatrix4x4; - Plugin::UnboxMatrix4x4 = unboxMatrix4x4; - Plugin::BoxQueryTriggerInteraction = boxQueryTriggerInteraction; - Plugin::UnboxQueryTriggerInteraction = unboxQueryTriggerInteraction; - Plugin::ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; - Plugin::RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = (int32_t*)curMemory; - curMemory += 20 * sizeof(int32_t); - Plugin::RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = 20; - Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble = systemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble; - Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey = systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey; - Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue = systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue; - Plugin::BoxKeyValuePairSystemString_SystemDouble = boxKeyValuePairSystemString_SystemDouble; - Plugin::UnboxKeyValuePairSystemString_SystemDouble = unboxKeyValuePairSystemString_SystemDouble; - Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString = systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString; - Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue = systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue; - Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue = systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue; - Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString = systemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString; - Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue = systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue; - Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue = systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue; Plugin::SystemExceptionConstructorSystemString = systemExceptionConstructorSystemString; - Plugin::UnityEngineScreenPropertyGetResolutions = unityEngineScreenPropertyGetResolutions; - Plugin::ReleaseUnityEngineRay = releaseUnityEngineRay; - Plugin::RefCountsUnityEngineRay = (int32_t*)curMemory; - curMemory += 10 * sizeof(int32_t); - Plugin::RefCountsLenUnityEngineRay = 10; - Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3 = unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3; - Plugin::BoxRay = boxRay; - Plugin::UnboxRay = unboxRay; - Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1 = unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1; - Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay = unityEnginePhysicsMethodRaycastAllUnityEngineRay; - Plugin::UnityEngineGradientConstructor = unityEngineGradientConstructor; - Plugin::UnityEngineGradientPropertyGetColorKeys = unityEngineGradientPropertyGetColorKeys; - Plugin::UnityEngineGradientPropertySetColorKeys = unityEngineGradientPropertySetColorKeys; - Plugin::SystemAppDomainSetupConstructor = systemAppDomainSetupConstructor; - Plugin::SystemAppDomainSetupPropertyGetAppDomainInitializer = systemAppDomainSetupPropertyGetAppDomainInitializer; - Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer = systemAppDomainSetupPropertySetAppDomainInitializer; - Plugin::UnityEngineApplicationAddEventOnBeforeRender = unityEngineApplicationAddEventOnBeforeRender; - Plugin::UnityEngineApplicationRemoveEventOnBeforeRender = unityEngineApplicationRemoveEventOnBeforeRender; - Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded = unityEngineSceneManagementSceneManagerAddEventSceneLoaded; - Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded = unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded; - Plugin::ReleaseUnityEngineSceneManagementScene = releaseUnityEngineSceneManagementScene; - Plugin::RefCountsUnityEngineSceneManagementScene = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEngineSceneManagementScene = 1000; - Plugin::BoxScene = boxScene; - Plugin::UnboxScene = unboxScene; - Plugin::BoxLoadSceneMode = boxLoadSceneMode; - Plugin::UnboxLoadSceneMode = unboxLoadSceneMode; Plugin::BoxPrimitiveType = boxPrimitiveType; Plugin::UnboxPrimitiveType = unboxPrimitiveType; Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; - Plugin::BoxFileMode = boxFileMode; - Plugin::UnboxFileMode = unboxFileMode; - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize = 1000; - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList = (System::Collections::Generic::BaseIComparer**)curMemory; - curMemory += 1000 * sizeof(System::Collections::Generic::BaseIComparer*); - - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32 = releaseSystemCollectionsGenericBaseIComparerSystemInt32; - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor = systemCollectionsGenericBaseIComparerSystemInt32Constructor; - Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeListSize = 1000; - Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeList = (System::Collections::Generic::BaseIComparer**)curMemory; - curMemory += 1000 * sizeof(System::Collections::Generic::BaseIComparer*); - - Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString = releaseSystemCollectionsGenericBaseIComparerSystemString; - Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor = systemCollectionsGenericBaseIComparerSystemStringConstructor; - Plugin::SystemBaseStringComparerFreeListSize = 1000; - Plugin::SystemBaseStringComparerFreeList = (System::BaseStringComparer**)curMemory; - curMemory += 1000 * sizeof(System::BaseStringComparer*); - - Plugin::ReleaseSystemBaseStringComparer = releaseSystemBaseStringComparer; - Plugin::SystemBaseStringComparerConstructor = systemBaseStringComparerConstructor; - Plugin::SystemCollectionsQueuePropertyGetCount = systemCollectionsQueuePropertyGetCount; - Plugin::SystemCollectionsBaseQueueFreeListSize = 1000; - Plugin::SystemCollectionsBaseQueueFreeList = (System::Collections::BaseQueue**)curMemory; - curMemory += 1000 * sizeof(System::Collections::BaseQueue*); - - Plugin::ReleaseSystemCollectionsBaseQueue = releaseSystemCollectionsBaseQueue; - Plugin::SystemCollectionsBaseQueueConstructor = systemCollectionsBaseQueueConstructor; - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize = 1000; - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeList = (System::ComponentModel::Design::BaseIComponentChangeService**)curMemory; - curMemory += 1000 * sizeof(System::ComponentModel::Design::BaseIComponentChangeService*); - - Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService = releaseSystemComponentModelDesignBaseIComponentChangeService; - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceConstructor = systemComponentModelDesignBaseIComponentChangeServiceConstructor; - Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode = systemIOFileStreamConstructorSystemString_SystemIOFileMode; - Plugin::SystemIOFileStreamMethodWriteByteSystemByte = systemIOFileStreamMethodWriteByteSystemByte; - Plugin::SystemIOBaseFileStreamFreeListSize = 1000; - Plugin::SystemIOBaseFileStreamFreeList = (System::IO::BaseFileStream**)curMemory; - curMemory += 1000 * sizeof(System::IO::BaseFileStream*); - - Plugin::ReleaseSystemIOBaseFileStream = releaseSystemIOBaseFileStream; - Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode = systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode; - Plugin::ReleaseUnityEnginePlayablesPlayableHandle = releaseUnityEnginePlayablesPlayableHandle; - Plugin::RefCountsUnityEnginePlayablesPlayableHandle = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEnginePlayablesPlayableHandle = 1000; - Plugin::BoxPlayableHandle = boxPlayableHandle; - Plugin::UnboxPlayableHandle = unboxPlayableHandle; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineExperimentalUIElementsVisualElementPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineExperimentalUIElementsVisualElementMethodGetEnumerator; - Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1 = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1; - Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString; - Plugin::BoxInteractionSourcePositionAccuracy = boxInteractionSourcePositionAccuracy; - Plugin::UnboxInteractionSourcePositionAccuracy = unboxInteractionSourcePositionAccuracy; - Plugin::BoxInteractionSourceNode = boxInteractionSourceNode; - Plugin::UnboxInteractionSourceNode = unboxInteractionSourceNode; - Plugin::ReleaseUnityEngineXRWSAInputInteractionSourcePose = releaseUnityEngineXRWSAInputInteractionSourcePose; - Plugin::RefCountsUnityEngineXRWSAInputInteractionSourcePose = (int32_t*)curMemory; - curMemory += 1000 * sizeof(int32_t); - Plugin::RefCountsLenUnityEngineXRWSAInputInteractionSourcePose = 1000; - Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode = unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode; - Plugin::BoxInteractionSourcePose = boxInteractionSourcePose; - Plugin::UnboxInteractionSourcePose = unboxInteractionSourcePose; - Plugin::SystemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemStringPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemInt32PropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent = systemCollectionsGenericIEnumeratorSystemSinglePropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineRaycastHitPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineGradientColorKeyPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent = systemCollectionsGenericIEnumeratorUnityEngineResolutionPropertyGetCurrent; - Plugin::SystemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator = systemCollectionsGenericIEnumerableSystemStringMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator = systemCollectionsGenericIEnumerableSystemInt32MethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator = systemCollectionsGenericIEnumerableSystemSingleMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineRaycastHitMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineGradientColorKeyMethodGetEnumerator; - Plugin::SystemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator = systemCollectionsGenericIEnumerableUnityEngineResolutionMethodGetEnumerator; - Plugin::SystemCollectionsGenericListSystemStringConstructor = systemCollectionsGenericListSystemStringConstructor; - Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem = systemCollectionsGenericListSystemStringPropertyGetItem; - Plugin::SystemCollectionsGenericListSystemStringPropertySetItem = systemCollectionsGenericListSystemStringPropertySetItem; - Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString = systemCollectionsGenericListSystemStringMethodAddSystemString; - Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer = systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer; - Plugin::SystemCollectionsGenericListSystemInt32Constructor = systemCollectionsGenericListSystemInt32Constructor; - Plugin::SystemCollectionsGenericListSystemInt32PropertyGetItem = systemCollectionsGenericListSystemInt32PropertyGetItem; - Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem = systemCollectionsGenericListSystemInt32PropertySetItem; - Plugin::SystemCollectionsGenericListSystemInt32MethodAddSystemInt32 = systemCollectionsGenericListSystemInt32MethodAddSystemInt32; - Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer = systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer; + Plugin::BaseBallScriptFreeListSize = 1000; + Plugin::BaseBallScriptFreeList = (MyGame::BaseBallScript**)curMemory; + curMemory += 1000 * sizeof(MyGame::BaseBallScript*); + + Plugin::ReleaseBaseBallScript = releaseBaseBallScript; + Plugin::BaseBallScriptConstructor = baseBallScriptConstructor; + Plugin::BaseBallScriptFreeWholeListSize = 1000; + Plugin::BaseBallScriptFreeWholeList = (Plugin::BaseBallScriptFreeWholeListEntry*)curMemory; + curMemory += 1000 * sizeof(Plugin::BaseBallScriptFreeWholeListEntry); + Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; @@ -21927,140 +3545,6 @@ DLLEXPORT void Init( Plugin::UnboxSingle = unboxSingle; Plugin::BoxDouble = boxDouble; Plugin::UnboxDouble = unboxDouble; - Plugin::SystemSystemInt32Array1Constructor1 = systemSystemInt32Array1Constructor1; - Plugin::SystemInt32Array1GetItem1 = systemInt32Array1GetItem1; - Plugin::SystemInt32Array1SetItem1 = systemInt32Array1SetItem1; - Plugin::SystemSystemSingleArray1Constructor1 = systemSystemSingleArray1Constructor1; - Plugin::SystemSingleArray1GetItem1 = systemSingleArray1GetItem1; - Plugin::SystemSingleArray1SetItem1 = systemSingleArray1SetItem1; - Plugin::SystemSystemSingleArray2Constructor2 = systemSystemSingleArray2Constructor2; - Plugin::SystemSystemSingleArray2GetLength2 = systemSystemSingleArray2GetLength2; - Plugin::SystemSingleArray2GetItem2 = systemSingleArray2GetItem2; - Plugin::SystemSingleArray2SetItem2 = systemSingleArray2SetItem2; - Plugin::SystemSystemSingleArray3Constructor3 = systemSystemSingleArray3Constructor3; - Plugin::SystemSystemSingleArray3GetLength3 = systemSystemSingleArray3GetLength3; - Plugin::SystemSingleArray3GetItem3 = systemSingleArray3GetItem3; - Plugin::SystemSingleArray3SetItem3 = systemSingleArray3SetItem3; - Plugin::SystemSystemStringArray1Constructor1 = systemSystemStringArray1Constructor1; - Plugin::SystemStringArray1GetItem1 = systemStringArray1GetItem1; - Plugin::SystemStringArray1SetItem1 = systemStringArray1SetItem1; - Plugin::UnityEngineUnityEngineResolutionArray1Constructor1 = unityEngineUnityEngineResolutionArray1Constructor1; - Plugin::UnityEngineResolutionArray1GetItem1 = unityEngineResolutionArray1GetItem1; - Plugin::UnityEngineResolutionArray1SetItem1 = unityEngineResolutionArray1SetItem1; - Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1 = unityEngineUnityEngineRaycastHitArray1Constructor1; - Plugin::UnityEngineRaycastHitArray1GetItem1 = unityEngineRaycastHitArray1GetItem1; - Plugin::UnityEngineRaycastHitArray1SetItem1 = unityEngineRaycastHitArray1SetItem1; - Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1 = unityEngineUnityEngineGradientColorKeyArray1Constructor1; - Plugin::UnityEngineGradientColorKeyArray1GetItem1 = unityEngineGradientColorKeyArray1GetItem1; - Plugin::UnityEngineGradientColorKeyArray1SetItem1 = unityEngineGradientColorKeyArray1SetItem1; - Plugin::SystemActionFreeListSize = 1000; - Plugin::SystemActionFreeList = (System::Action**)curMemory; - curMemory += 1000 * sizeof(System::Action*); - - Plugin::ReleaseSystemAction = releaseSystemAction; - Plugin::SystemActionConstructor = systemActionConstructor; - Plugin::SystemActionAdd = systemActionAdd; - Plugin::SystemActionRemove = systemActionRemove; - Plugin::SystemActionInvoke = systemActionInvoke; - Plugin::SystemActionSystemSingleFreeListSize = 1000; - Plugin::SystemActionSystemSingleFreeList = (System::Action1**)curMemory; - curMemory += 1000 * sizeof(System::Action1*); - - Plugin::ReleaseSystemActionSystemSingle = releaseSystemActionSystemSingle; - Plugin::SystemActionSystemSingleConstructor = systemActionSystemSingleConstructor; - Plugin::SystemActionSystemSingleAdd = systemActionSystemSingleAdd; - Plugin::SystemActionSystemSingleRemove = systemActionSystemSingleRemove; - Plugin::SystemActionSystemSingleInvoke = systemActionSystemSingleInvoke; - Plugin::SystemActionSystemSingle_SystemSingleFreeListSize = 100; - Plugin::SystemActionSystemSingle_SystemSingleFreeList = (System::Action2**)curMemory; - curMemory += 100 * sizeof(System::Action2*); - - Plugin::ReleaseSystemActionSystemSingle_SystemSingle = releaseSystemActionSystemSingle_SystemSingle; - Plugin::SystemActionSystemSingle_SystemSingleConstructor = systemActionSystemSingle_SystemSingleConstructor; - Plugin::SystemActionSystemSingle_SystemSingleAdd = systemActionSystemSingle_SystemSingleAdd; - Plugin::SystemActionSystemSingle_SystemSingleRemove = systemActionSystemSingle_SystemSingleRemove; - Plugin::SystemActionSystemSingle_SystemSingleInvoke = systemActionSystemSingle_SystemSingleInvoke; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize = 50; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList = (System::Func3**)curMemory; - curMemory += 50 * sizeof(System::Func3*); - - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble = releaseSystemFuncSystemInt32_SystemSingle_SystemDouble; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor = systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd = systemFuncSystemInt32_SystemSingle_SystemDoubleAdd; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove = systemFuncSystemInt32_SystemSingle_SystemDoubleRemove; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke = systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize = 25; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList = (System::Func3**)curMemory; - curMemory += 25 * sizeof(System::Func3*); - - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString = releaseSystemFuncSystemInt16_SystemInt32_SystemString; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor = systemFuncSystemInt16_SystemInt32_SystemStringConstructor; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd = systemFuncSystemInt16_SystemInt32_SystemStringAdd; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove = systemFuncSystemInt16_SystemInt32_SystemStringRemove; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke = systemFuncSystemInt16_SystemInt32_SystemStringInvoke; - Plugin::SystemAppDomainInitializerFreeListSize = 1000; - Plugin::SystemAppDomainInitializerFreeList = (System::AppDomainInitializer**)curMemory; - curMemory += 1000 * sizeof(System::AppDomainInitializer*); - - Plugin::ReleaseSystemAppDomainInitializer = releaseSystemAppDomainInitializer; - Plugin::SystemAppDomainInitializerConstructor = systemAppDomainInitializerConstructor; - Plugin::SystemAppDomainInitializerAdd = systemAppDomainInitializerAdd; - Plugin::SystemAppDomainInitializerRemove = systemAppDomainInitializerRemove; - Plugin::SystemAppDomainInitializerInvoke = systemAppDomainInitializerInvoke; - Plugin::UnityEngineEventsUnityActionFreeListSize = 1000; - Plugin::UnityEngineEventsUnityActionFreeList = (UnityEngine::Events::UnityAction**)curMemory; - curMemory += 1000 * sizeof(UnityEngine::Events::UnityAction*); - - Plugin::ReleaseUnityEngineEventsUnityAction = releaseUnityEngineEventsUnityAction; - Plugin::UnityEngineEventsUnityActionConstructor = unityEngineEventsUnityActionConstructor; - Plugin::UnityEngineEventsUnityActionAdd = unityEngineEventsUnityActionAdd; - Plugin::UnityEngineEventsUnityActionRemove = unityEngineEventsUnityActionRemove; - Plugin::UnityEngineEventsUnityActionInvoke = unityEngineEventsUnityActionInvoke; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize = 10; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList = (UnityEngine::Events::UnityAction2**)curMemory; - curMemory += 10 * sizeof(UnityEngine::Events::UnityAction2*); - - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke; - Plugin::SystemComponentModelDesignComponentEventHandlerFreeListSize = 1000; - Plugin::SystemComponentModelDesignComponentEventHandlerFreeList = (System::ComponentModel::Design::ComponentEventHandler**)curMemory; - curMemory += 1000 * sizeof(System::ComponentModel::Design::ComponentEventHandler*); - - Plugin::ReleaseSystemComponentModelDesignComponentEventHandler = releaseSystemComponentModelDesignComponentEventHandler; - Plugin::SystemComponentModelDesignComponentEventHandlerConstructor = systemComponentModelDesignComponentEventHandlerConstructor; - Plugin::SystemComponentModelDesignComponentEventHandlerAdd = systemComponentModelDesignComponentEventHandlerAdd; - Plugin::SystemComponentModelDesignComponentEventHandlerRemove = systemComponentModelDesignComponentEventHandlerRemove; - Plugin::SystemComponentModelDesignComponentEventHandlerInvoke = systemComponentModelDesignComponentEventHandlerInvoke; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeListSize = 1000; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeList = (System::ComponentModel::Design::ComponentChangingEventHandler**)curMemory; - curMemory += 1000 * sizeof(System::ComponentModel::Design::ComponentChangingEventHandler*); - - Plugin::ReleaseSystemComponentModelDesignComponentChangingEventHandler = releaseSystemComponentModelDesignComponentChangingEventHandler; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor = systemComponentModelDesignComponentChangingEventHandlerConstructor; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerAdd = systemComponentModelDesignComponentChangingEventHandlerAdd; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerRemove = systemComponentModelDesignComponentChangingEventHandlerRemove; - Plugin::SystemComponentModelDesignComponentChangingEventHandlerInvoke = systemComponentModelDesignComponentChangingEventHandlerInvoke; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeListSize = 1000; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList = (System::ComponentModel::Design::ComponentChangedEventHandler**)curMemory; - curMemory += 1000 * sizeof(System::ComponentModel::Design::ComponentChangedEventHandler*); - - Plugin::ReleaseSystemComponentModelDesignComponentChangedEventHandler = releaseSystemComponentModelDesignComponentChangedEventHandler; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor = systemComponentModelDesignComponentChangedEventHandlerConstructor; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerAdd = systemComponentModelDesignComponentChangedEventHandlerAdd; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerRemove = systemComponentModelDesignComponentChangedEventHandlerRemove; - Plugin::SystemComponentModelDesignComponentChangedEventHandlerInvoke = systemComponentModelDesignComponentChangedEventHandlerInvoke; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeListSize = 1000; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList = (System::ComponentModel::Design::ComponentRenameEventHandler**)curMemory; - curMemory += 1000 * sizeof(System::ComponentModel::Design::ComponentRenameEventHandler*); - - Plugin::ReleaseSystemComponentModelDesignComponentRenameEventHandler = releaseSystemComponentModelDesignComponentRenameEventHandler; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor = systemComponentModelDesignComponentRenameEventHandlerConstructor; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerAdd = systemComponentModelDesignComponentRenameEventHandlerAdd; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerRemove = systemComponentModelDesignComponentRenameEventHandlerRemove; - Plugin::SystemComponentModelDesignComponentRenameEventHandlerInvoke = systemComponentModelDesignComponentRenameEventHandlerInvoke; /*END INIT BODY*/ // Make sure there was enough memory @@ -22078,131 +3562,19 @@ DLLEXPORT void Init( memset(memory, 0, memorySize); /*BEGIN INIT BODY FIRST BOOT*/ - for (int32_t i = 0, end = Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1; i < end; ++i) - { - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList[i] = (System::Collections::Generic::BaseIComparer*)(Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList + i + 1); - } - Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList[Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1] = nullptr; - Plugin::NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeListSize - 1; i < end; ++i) - { - Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeList[i] = (System::Collections::Generic::BaseIComparer*)(Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeList + i + 1); - } - Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeList[Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemCollectionsGenericBaseIComparerSystemString = Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemBaseStringComparerFreeListSize - 1; i < end; ++i) - { - Plugin::SystemBaseStringComparerFreeList[i] = (System::BaseStringComparer*)(Plugin::SystemBaseStringComparerFreeList + i + 1); - } - Plugin::SystemBaseStringComparerFreeList[Plugin::SystemBaseStringComparerFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemBaseStringComparer = Plugin::SystemBaseStringComparerFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemCollectionsBaseQueueFreeListSize - 1; i < end; ++i) - { - Plugin::SystemCollectionsBaseQueueFreeList[i] = (System::Collections::BaseQueue*)(Plugin::SystemCollectionsBaseQueueFreeList + i + 1); - } - Plugin::SystemCollectionsBaseQueueFreeList[Plugin::SystemCollectionsBaseQueueFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemCollectionsBaseQueue = Plugin::SystemCollectionsBaseQueueFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize - 1; i < end; ++i) - { - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeList[i] = (System::ComponentModel::Design::BaseIComponentChangeService*)(Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeList + i + 1); - } - Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeList[Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemComponentModelDesignBaseIComponentChangeService = Plugin::SystemComponentModelDesignBaseIComponentChangeServiceFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemIOBaseFileStreamFreeListSize - 1; i < end; ++i) - { - Plugin::SystemIOBaseFileStreamFreeList[i] = (System::IO::BaseFileStream*)(Plugin::SystemIOBaseFileStreamFreeList + i + 1); - } - Plugin::SystemIOBaseFileStreamFreeList[Plugin::SystemIOBaseFileStreamFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemIOBaseFileStream = Plugin::SystemIOBaseFileStreamFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemActionFreeListSize - 1; i < end; ++i) - { - Plugin::SystemActionFreeList[i] = (System::Action*)(Plugin::SystemActionFreeList + i + 1); - } - Plugin::SystemActionFreeList[Plugin::SystemActionFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemAction = Plugin::SystemActionFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemActionSystemSingleFreeListSize - 1; i < end; ++i) - { - Plugin::SystemActionSystemSingleFreeList[i] = (System::Action1*)(Plugin::SystemActionSystemSingleFreeList + i + 1); - } - Plugin::SystemActionSystemSingleFreeList[Plugin::SystemActionSystemSingleFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemActionSystemSingle = Plugin::SystemActionSystemSingleFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemActionSystemSingle_SystemSingleFreeListSize - 1; i < end; ++i) - { - Plugin::SystemActionSystemSingle_SystemSingleFreeList[i] = (System::Action2*)(Plugin::SystemActionSystemSingle_SystemSingleFreeList + i + 1); - } - Plugin::SystemActionSystemSingle_SystemSingleFreeList[Plugin::SystemActionSystemSingle_SystemSingleFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemActionSystemSingle_SystemSingle = Plugin::SystemActionSystemSingle_SystemSingleFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1; i < end; ++i) - { - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[i] = (System::Func3*)(Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + i + 1); - } - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1; i < end; ++i) - { - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[i] = (System::Func3*)(Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + i + 1); - } - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemAppDomainInitializerFreeListSize - 1; i < end; ++i) - { - Plugin::SystemAppDomainInitializerFreeList[i] = (System::AppDomainInitializer*)(Plugin::SystemAppDomainInitializerFreeList + i + 1); - } - Plugin::SystemAppDomainInitializerFreeList[Plugin::SystemAppDomainInitializerFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemAppDomainInitializer = Plugin::SystemAppDomainInitializerFreeList + 1; - - for (int32_t i = 0, end = Plugin::UnityEngineEventsUnityActionFreeListSize - 1; i < end; ++i) - { - Plugin::UnityEngineEventsUnityActionFreeList[i] = (UnityEngine::Events::UnityAction*)(Plugin::UnityEngineEventsUnityActionFreeList + i + 1); - } - Plugin::UnityEngineEventsUnityActionFreeList[Plugin::UnityEngineEventsUnityActionFreeListSize - 1] = nullptr; - Plugin::NextFreeUnityEngineEventsUnityAction = Plugin::UnityEngineEventsUnityActionFreeList + 1; - - for (int32_t i = 0, end = Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1; i < end; ++i) - { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[i] = (UnityEngine::Events::UnityAction2*)(Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + i + 1); - } - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1] = nullptr; - Plugin::NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemComponentModelDesignComponentEventHandlerFreeListSize - 1; i < end; ++i) - { - Plugin::SystemComponentModelDesignComponentEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentEventHandler*)(Plugin::SystemComponentModelDesignComponentEventHandlerFreeList + i + 1); - } - Plugin::SystemComponentModelDesignComponentEventHandlerFreeList[Plugin::SystemComponentModelDesignComponentEventHandlerFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemComponentModelDesignComponentEventHandler = Plugin::SystemComponentModelDesignComponentEventHandlerFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeListSize - 1; i < end; ++i) - { - Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangingEventHandler*)(Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeList + i + 1); - } - Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeList[Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemComponentModelDesignComponentChangingEventHandler = Plugin::SystemComponentModelDesignComponentChangingEventHandlerFreeList + 1; - - for (int32_t i = 0, end = Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1; i < end; ++i) + for (int32_t i = 0, end = Plugin::BaseBallScriptFreeListSize - 1; i < end; ++i) { - Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangedEventHandler*)(Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList + i + 1); + Plugin::BaseBallScriptFreeList[i] = (MyGame::BaseBallScript*)(Plugin::BaseBallScriptFreeList + i + 1); } - Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList[Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemComponentModelDesignComponentChangedEventHandler = Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList + 1; + Plugin::BaseBallScriptFreeList[Plugin::BaseBallScriptFreeListSize - 1] = nullptr; + Plugin::NextFreeBaseBallScript = Plugin::BaseBallScriptFreeList + 1; - for (int32_t i = 0, end = Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1; i < end; ++i) + for (int32_t i = 0, end = Plugin::BaseBallScriptFreeWholeListSize - 1; i < end; ++i) { - Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentRenameEventHandler*)(Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList + i + 1); + Plugin::BaseBallScriptFreeWholeList[i].Next = Plugin::BaseBallScriptFreeWholeList[i + 1].Next; } - Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList[Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1] = nullptr; - Plugin::NextFreeSystemComponentModelDesignComponentRenameEventHandler = Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList + 1; + Plugin::BaseBallScriptFreeWholeList[Plugin::BaseBallScriptFreeWholeListSize - 1].Next = nullptr; + Plugin::NextFreeWholeBaseBallScript = Plugin::BaseBallScriptFreeWholeList + 1; /*END INIT BODY FIRST BOOT*/ } @@ -22233,124 +3605,3 @@ DLLEXPORT void SetCsharpException(int32_t handle) handle); } -/*BEGIN MONOBEHAVIOUR MESSAGES*/ -DLLEXPORT void MyGameMonoBehavioursTestScriptAwake(int32_t thisHandle) -{ - MyGame::MonoBehaviours::TestScript thiz(Plugin::InternalUse::Only, thisHandle); - try - { - thiz.Awake(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception in MyGame::MonoBehaviours::TestScript::Awake"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } -} - - -DLLEXPORT void MyGameMonoBehavioursTestScriptOnAnimatorIK(int32_t thisHandle, System::Int32 param0) -{ - MyGame::MonoBehaviours::TestScript thiz(Plugin::InternalUse::Only, thisHandle); - try - { - thiz.OnAnimatorIK(param0); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception in MyGame::MonoBehaviours::TestScript::OnAnimatorIK"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } -} - - -DLLEXPORT void MyGameMonoBehavioursTestScriptOnCollisionEnter(int32_t thisHandle, int32_t param0Handle) -{ - MyGame::MonoBehaviours::TestScript thiz(Plugin::InternalUse::Only, thisHandle); - UnityEngine::Collision param0(Plugin::InternalUse::Only, param0Handle); - try - { - thiz.OnCollisionEnter(param0); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception in MyGame::MonoBehaviours::TestScript::OnCollisionEnter"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } -} - - -DLLEXPORT void MyGameMonoBehavioursTestScriptUpdate(int32_t thisHandle) -{ - MyGame::MonoBehaviours::TestScript thiz(Plugin::InternalUse::Only, thisHandle); - try - { - thiz.Update(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception in MyGame::MonoBehaviours::TestScript::Update"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } -} - - -DLLEXPORT void MyGameMonoBehavioursAnotherScriptAwake(int32_t thisHandle) -{ - MyGame::MonoBehaviours::AnotherScript thiz(Plugin::InternalUse::Only, thisHandle); - try - { - thiz.Awake(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception in MyGame::MonoBehaviours::AnotherScript::Awake"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } -} - - -DLLEXPORT void MyGameMonoBehavioursAnotherScriptUpdate(int32_t thisHandle) -{ - MyGame::MonoBehaviours::AnotherScript thiz(Plugin::InternalUse::Only, thisHandle); - try - { - thiz.Update(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception in MyGame::MonoBehaviours::AnotherScript::Update"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } -} -/*END MONOBEHAVIOUR MESSAGES*/ diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 4ce8ff7..04e0e99 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -259,214 +259,7 @@ namespace System } /*BEGIN TEMPLATE DECLARATIONS*/ -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IEqualityComparer; - } - } -} - -namespace System -{ - template struct IEquatable; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct KeyValuePair; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct LinkedListNode; - } - } -} - -namespace System -{ - namespace Runtime - { - namespace CompilerServices - { - template struct StrongBox; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct BaseIComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct BaseIComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template struct List; - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - template struct Collection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - template struct KeyedCollection; - } - } -} - -namespace System -{ - template struct Action1; -} - -namespace System -{ - template struct Action2; -} - -namespace System -{ - template struct Func3; -} - -namespace System -{ - template struct Func3; -} -namespace UnityEngine -{ - namespace Events - { - template struct UnityAction2; - } -} /*END TEMPLATE DECLARATIONS*/ /*BEGIN TYPE DECLARATIONS*/ @@ -485,11 +278,6 @@ namespace System struct IComparable; } -namespace System -{ - struct IDisposable; -} - namespace UnityEngine { struct Vector3; @@ -510,26 +298,6 @@ namespace UnityEngine struct Transform; } -namespace UnityEngine -{ - struct Color; -} - -namespace UnityEngine -{ - struct GradientColorKey; -} - -namespace UnityEngine -{ - struct Resolution; -} - -namespace UnityEngine -{ - struct RaycastHit; -} - namespace System { namespace Collections @@ -560,5112 +328,590 @@ namespace System } } -namespace System +namespace UnityEngine { - struct IAppDomainSetup; + struct GameObject; } -namespace System +namespace UnityEngine { - namespace Collections - { - struct IComparer; - } + struct Debug; } -namespace System +namespace UnityEngine { - namespace Collections - { - struct IEqualityComparer; - } + struct Behaviour; } namespace UnityEngine { - namespace Playables - { - struct PlayableGraph; - } + struct MonoBehaviour; } -namespace UnityEngine +namespace System { - namespace Playables - { - struct IPlayable; - } + struct Exception; } -namespace UnityEngine +namespace System { - namespace Animations - { - struct AnimationMixerPlayable; - } + struct SystemException; } namespace System { - namespace Runtime - { - namespace CompilerServices - { - struct IStrongBox; - } - } + struct NullReferenceException; } namespace UnityEngine { - namespace Experimental - { - namespace UIElements - { - struct IEventHandler; - } - } + struct PrimitiveType; } namespace UnityEngine { - namespace Experimental - { - namespace UIElements - { - struct CallbackEventHandler; - } - } + struct Time; } -namespace UnityEngine +namespace MyGame { - namespace Experimental - { - namespace UIElements - { - struct Focusable; - } - } + struct AbstractBaseBallScript; } -namespace UnityEngine +namespace MyGame { - namespace Experimental - { - namespace UIElements - { - struct IStyle; - } - } + struct BaseBallScript; } +/*END TYPE DECLARATIONS*/ + +/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/ + +/*END TEMPLATE SPECIALIZATION DECLARATIONS*/ + +//////////////////////////////////////////////////////////////// +// C# type definitions +//////////////////////////////////////////////////////////////// namespace System { - namespace Diagnostics + struct Object : Plugin::ManagedType { - struct Stopwatch; - } -} - -namespace UnityEngine -{ - struct GameObject; -} - -namespace UnityEngine -{ - struct Debug; -} - -namespace UnityEngine -{ - namespace Assertions - { - namespace Assert - { - } - } -} - -namespace UnityEngine -{ - struct Collision; -} - -namespace UnityEngine -{ - struct Behaviour; -} - -namespace UnityEngine -{ - struct MonoBehaviour; -} - -namespace UnityEngine -{ - struct AudioSettings; -} - -namespace UnityEngine -{ - namespace Networking - { - struct NetworkTransport; - } -} - -namespace UnityEngine -{ - struct Quaternion; -} - -namespace UnityEngine -{ - struct Matrix4x4; -} - -namespace UnityEngine -{ - struct QueryTriggerInteraction; -} - -namespace System -{ - struct Exception; -} - -namespace System -{ - struct SystemException; -} - -namespace System -{ - struct NullReferenceException; -} - -namespace UnityEngine -{ - struct Screen; -} - -namespace UnityEngine -{ - struct Ray; -} - -namespace UnityEngine -{ - struct Physics; -} - -namespace UnityEngine -{ - struct Gradient; -} - -namespace System -{ - struct AppDomainSetup; -} - -namespace UnityEngine -{ - struct Application; -} - -namespace UnityEngine -{ - namespace SceneManagement - { - struct SceneManager; - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - struct Scene; - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - struct LoadSceneMode; - } -} - -namespace System -{ - struct EventArgs; -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentEventArgs; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentChangingEventArgs; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentChangedEventArgs; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentRenameEventArgs; - } - } -} - -namespace System -{ - namespace ComponentModel - { - struct MemberDescriptor; - } -} - -namespace UnityEngine -{ - struct PrimitiveType; -} - -namespace UnityEngine -{ - struct Time; -} - -namespace System -{ - namespace IO - { - struct FileMode; - } -} - -namespace System -{ - struct MarshalByRefObject; -} - -namespace System -{ - namespace IO - { - struct Stream; - } -} - -namespace System -{ - struct StringComparer; -} - -namespace System -{ - struct BaseStringComparer; -} - -namespace System -{ - namespace Collections - { - struct Queue; - } -} - -namespace System -{ - namespace Collections - { - struct BaseQueue; - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct IComponentChangeService; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct BaseIComponentChangeService; - } - } -} - -namespace System -{ - namespace IO - { - struct FileStream; - } -} - -namespace System -{ - namespace IO - { - struct BaseFileStream; - } -} - -namespace UnityEngine -{ - namespace Playables - { - struct PlayableHandle; - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct ITransform; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct IUIElementDataWatch; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct IVisualElementScheduler; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct VisualElement; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - namespace UQueryExtensions - { - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - struct InteractionSourcePositionAccuracy; - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - struct InteractionSourceNode; - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - struct InteractionSourcePose; - } - } - } -} - -namespace MyGame -{ - namespace MonoBehaviours - { - struct TestScript; - } -} - -namespace MyGame -{ - namespace MonoBehaviours - { - struct AnotherScript; - } -} - -namespace System -{ - struct Action; -} - -namespace System -{ - struct AppDomainInitializer; -} - -namespace UnityEngine -{ - namespace Events - { - struct UnityAction; - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentEventHandler; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentChangingEventHandler; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentChangedEventHandler; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentRenameEventHandler; - } - } -} -/*END TYPE DECLARATIONS*/ - -/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/ -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEqualityComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEqualityComparer; - } - } -} - -namespace System -{ - template<> struct IEquatable; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct KeyValuePair; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct LinkedListNode; - } - } -} - -namespace System -{ - namespace Runtime - { - namespace CompilerServices - { - template<> struct StrongBox; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct BaseIComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct BaseIComparer; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct List; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct List; - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - template<> struct Collection; - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - template<> struct KeyedCollection; - } - } -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1; -} - -namespace System -{ - template<> struct Array1; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_2; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy2_2; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_3; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy2_3; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy3_3; -} - -namespace System -{ - template<> struct Array1; -} - -namespace System -{ - template<> struct Array2; -} - -namespace System -{ - template<> struct Array3; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1; -} - -namespace System -{ - template<> struct Array1; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1; -} - -namespace System -{ - template<> struct Array1; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1; -} - -namespace System -{ - template<> struct Array1; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1; -} - -namespace System -{ - template<> struct Array1; -} - -namespace System -{ - template<> struct Action1; -} - -namespace System -{ - template<> struct Action2; -} - -namespace System -{ - template<> struct Func3; -} - -namespace System -{ - template<> struct Func3; -} - -namespace UnityEngine -{ - namespace Events - { - template<> struct UnityAction2; - } -} -/*END TEMPLATE SPECIALIZATION DECLARATIONS*/ - -//////////////////////////////////////////////////////////////// -// C# type definitions -//////////////////////////////////////////////////////////////// - -namespace System -{ - struct Object : Plugin::ManagedType - { - Object(); - Object(Plugin::InternalUse iu, int32_t handle); - Object(decltype(nullptr)); - virtual ~Object() = default; - bool operator==(decltype(nullptr)) const; - bool operator!=(decltype(nullptr)) const; - virtual void ThrowReferenceToThis(); - - /*BEGIN UNBOXING METHOD DECLARATIONS*/ - explicit operator UnityEngine::Vector3(); - explicit operator UnityEngine::Color(); - explicit operator UnityEngine::GradientColorKey(); - explicit operator UnityEngine::Resolution(); - explicit operator UnityEngine::RaycastHit(); - explicit operator UnityEngine::Playables::PlayableGraph(); - explicit operator UnityEngine::Animations::AnimationMixerPlayable(); - explicit operator UnityEngine::Quaternion(); - explicit operator UnityEngine::Matrix4x4(); - explicit operator UnityEngine::QueryTriggerInteraction(); - explicit operator System::Collections::Generic::KeyValuePair(); - explicit operator UnityEngine::Ray(); - explicit operator UnityEngine::SceneManagement::Scene(); - explicit operator UnityEngine::SceneManagement::LoadSceneMode(); - explicit operator UnityEngine::PrimitiveType(); - explicit operator System::IO::FileMode(); - explicit operator UnityEngine::Playables::PlayableHandle(); - explicit operator UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy(); - explicit operator UnityEngine::XR::WSA::Input::InteractionSourceNode(); - explicit operator UnityEngine::XR::WSA::Input::InteractionSourcePose(); - explicit operator System::Boolean(); - explicit operator System::SByte(); - explicit operator System::Byte(); - explicit operator System::Int16(); - explicit operator System::UInt16(); - explicit operator System::Int32(); - explicit operator System::UInt32(); - explicit operator System::Int64(); - explicit operator System::UInt64(); - explicit operator System::Char(); - explicit operator System::Single(); - explicit operator System::Double(); - /*END UNBOXING METHOD DECLARATIONS*/ - }; - - struct ValueType : virtual Object - { - ValueType(Plugin::InternalUse iu, int32_t handle); - ValueType(decltype(nullptr)); - }; - - struct Enum : virtual ValueType - { - Enum(Plugin::InternalUse iu, int32_t handle); - Enum(decltype(nullptr)); - }; - - struct String : virtual Object - { - String(Plugin::InternalUse iu, int32_t handle); - String(decltype(nullptr)); - String(const String& other); - String(String&& other); - virtual ~String(); - String& operator=(const String& other); - String& operator=(decltype(nullptr)); - String& operator=(String&& other); - String(const char* chars); - }; - - struct ICloneable : virtual Object - { - ICloneable(Plugin::InternalUse iu, int32_t handle); - ICloneable(decltype(nullptr)); - }; - - namespace Collections - { - struct IEnumerable : virtual Object - { - IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(decltype(nullptr)); - IEnumerator GetEnumerator(); - }; - - struct ICollection : virtual IEnumerable - { - ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(decltype(nullptr)); - }; - - struct IList : virtual ICollection, virtual IEnumerable - { - IList(Plugin::InternalUse iu, int32_t handle); - IList(decltype(nullptr)); - }; - } - - struct Array : virtual ICloneable, virtual Collections::IList - { - Array(Plugin::InternalUse iu, int32_t handle); - Array(decltype(nullptr)); - int32_t GetLength(); - int32_t GetRank(); - }; -} - -//////////////////////////////////////////////////////////////// -// Global variables -//////////////////////////////////////////////////////////////// - -namespace Plugin -{ - extern System::String NullString; -} - -/*BEGIN TYPE DEFINITIONS*/ -namespace System -{ - struct IFormattable : virtual System::Object - { - IFormattable(decltype(nullptr)); - IFormattable(Plugin::InternalUse, int32_t handle); - IFormattable(const IFormattable& other); - IFormattable(IFormattable&& other); - virtual ~IFormattable(); - IFormattable& operator=(const IFormattable& other); - IFormattable& operator=(decltype(nullptr)); - IFormattable& operator=(IFormattable&& other); - bool operator==(const IFormattable& other) const; - bool operator!=(const IFormattable& other) const; - }; -} - -namespace System -{ - struct IConvertible : virtual System::Object - { - IConvertible(decltype(nullptr)); - IConvertible(Plugin::InternalUse, int32_t handle); - IConvertible(const IConvertible& other); - IConvertible(IConvertible&& other); - virtual ~IConvertible(); - IConvertible& operator=(const IConvertible& other); - IConvertible& operator=(decltype(nullptr)); - IConvertible& operator=(IConvertible&& other); - bool operator==(const IConvertible& other) const; - bool operator!=(const IConvertible& other) const; - }; -} - -namespace System -{ - struct IComparable : virtual System::Object - { - IComparable(decltype(nullptr)); - IComparable(Plugin::InternalUse, int32_t handle); - IComparable(const IComparable& other); - IComparable(IComparable&& other); - virtual ~IComparable(); - IComparable& operator=(const IComparable& other); - IComparable& operator=(decltype(nullptr)); - IComparable& operator=(IComparable&& other); - bool operator==(const IComparable& other) const; - bool operator!=(const IComparable& other) const; - System::Int32 CompareTo(System::Object& obj); - }; -} - -namespace System -{ - struct IDisposable : virtual System::Object - { - IDisposable(decltype(nullptr)); - IDisposable(Plugin::InternalUse, int32_t handle); - IDisposable(const IDisposable& other); - IDisposable(IDisposable&& other); - virtual ~IDisposable(); - IDisposable& operator=(const IDisposable& other); - IDisposable& operator=(decltype(nullptr)); - IDisposable& operator=(IDisposable&& other); - bool operator==(const IDisposable& other) const; - bool operator!=(const IDisposable& other) const; - void Dispose(); - }; -} - -namespace UnityEngine -{ - struct Vector3 - { - Vector3(); - Vector3(System::Single x, System::Single y, System::Single z); - System::Single GetMagnitude(); - System::Single x; - System::Single y; - System::Single z; - void Set(System::Single newX, System::Single newY, System::Single newZ); - UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); - UnityEngine::Vector3 operator-(); - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct Object : virtual System::Object - { - Object(decltype(nullptr)); - Object(Plugin::InternalUse, int32_t handle); - Object(const Object& other); - Object(Object&& other); - virtual ~Object(); - Object& operator=(const Object& other); - Object& operator=(decltype(nullptr)); - Object& operator=(Object&& other); - bool operator==(const Object& other) const; - bool operator!=(const Object& other) const; - System::String GetName(); - void SetName(System::String& value); - System::Boolean operator==(UnityEngine::Object& x); - operator System::Boolean(); - }; -} - -namespace UnityEngine -{ - struct Component : virtual UnityEngine::Object - { - Component(decltype(nullptr)); - Component(Plugin::InternalUse, int32_t handle); - Component(const Component& other); - Component(Component&& other); - virtual ~Component(); - Component& operator=(const Component& other); - Component& operator=(decltype(nullptr)); - Component& operator=(Component&& other); - bool operator==(const Component& other) const; - bool operator!=(const Component& other) const; - UnityEngine::Transform GetTransform(); - }; -} - -namespace UnityEngine -{ - struct Transform : virtual UnityEngine::Component, virtual System::Collections::IEnumerable - { - Transform(decltype(nullptr)); - Transform(Plugin::InternalUse, int32_t handle); - Transform(const Transform& other); - Transform(Transform&& other); - virtual ~Transform(); - Transform& operator=(const Transform& other); - Transform& operator=(decltype(nullptr)); - Transform& operator=(Transform&& other); - bool operator==(const Transform& other) const; - bool operator!=(const Transform& other) const; - UnityEngine::Vector3 GetPosition(); - void SetPosition(UnityEngine::Vector3& value); - void SetParent(UnityEngine::Transform& parent); - }; -} - -namespace UnityEngine -{ - struct Color - { - Color(); - System::Single r; - System::Single g; - System::Single b; - System::Single a; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct GradientColorKey - { - GradientColorKey(); - UnityEngine::Color color; - System::Single time; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct Resolution : Plugin::ManagedType - { - Resolution(decltype(nullptr)); - Resolution(Plugin::InternalUse, int32_t handle); - Resolution(const Resolution& other); - Resolution(Resolution&& other); - virtual ~Resolution(); - Resolution& operator=(const Resolution& other); - Resolution& operator=(decltype(nullptr)); - Resolution& operator=(Resolution&& other); - bool operator==(const Resolution& other) const; - bool operator!=(const Resolution& other) const; - Resolution(); - System::Int32 GetWidth(); - void SetWidth(System::Int32 value); - System::Int32 GetHeight(); - void SetHeight(System::Int32 value); - System::Int32 GetRefreshRate(); - void SetRefreshRate(System::Int32 value); - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct RaycastHit : Plugin::ManagedType - { - RaycastHit(decltype(nullptr)); - RaycastHit(Plugin::InternalUse, int32_t handle); - RaycastHit(const RaycastHit& other); - RaycastHit(RaycastHit&& other); - virtual ~RaycastHit(); - RaycastHit& operator=(const RaycastHit& other); - RaycastHit& operator=(decltype(nullptr)); - RaycastHit& operator=(RaycastHit&& other); - bool operator==(const RaycastHit& other) const; - bool operator!=(const RaycastHit& other) const; - UnityEngine::Vector3 GetPoint(); - void SetPoint(UnityEngine::Vector3& value); - UnityEngine::Transform GetTransform(); - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace System -{ - namespace Collections - { - struct IEnumerator : virtual System::Object - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - System::Object GetCurrent(); - System::Boolean MoveNext(); - }; - } -} - -namespace System -{ - namespace Runtime - { - namespace Serialization - { - struct ISerializable : virtual System::Object - { - ISerializable(decltype(nullptr)); - ISerializable(Plugin::InternalUse, int32_t handle); - ISerializable(const ISerializable& other); - ISerializable(ISerializable&& other); - virtual ~ISerializable(); - ISerializable& operator=(const ISerializable& other); - ISerializable& operator=(decltype(nullptr)); - ISerializable& operator=(ISerializable&& other); - bool operator==(const ISerializable& other) const; - bool operator!=(const ISerializable& other) const; - }; - } - } -} - -namespace System -{ - namespace Runtime - { - namespace InteropServices - { - struct _Exception : virtual System::Object - { - _Exception(decltype(nullptr)); - _Exception(Plugin::InternalUse, int32_t handle); - _Exception(const _Exception& other); - _Exception(_Exception&& other); - virtual ~_Exception(); - _Exception& operator=(const _Exception& other); - _Exception& operator=(decltype(nullptr)); - _Exception& operator=(_Exception&& other); - bool operator==(const _Exception& other) const; - bool operator!=(const _Exception& other) const; - }; - } - } -} - -namespace System -{ - struct IAppDomainSetup : virtual System::Object - { - IAppDomainSetup(decltype(nullptr)); - IAppDomainSetup(Plugin::InternalUse, int32_t handle); - IAppDomainSetup(const IAppDomainSetup& other); - IAppDomainSetup(IAppDomainSetup&& other); - virtual ~IAppDomainSetup(); - IAppDomainSetup& operator=(const IAppDomainSetup& other); - IAppDomainSetup& operator=(decltype(nullptr)); - IAppDomainSetup& operator=(IAppDomainSetup&& other); - bool operator==(const IAppDomainSetup& other) const; - bool operator!=(const IAppDomainSetup& other) const; - }; -} - -namespace System -{ - namespace Collections - { - struct IComparer : virtual System::Object - { - IComparer(decltype(nullptr)); - IComparer(Plugin::InternalUse, int32_t handle); - IComparer(const IComparer& other); - IComparer(IComparer&& other); - virtual ~IComparer(); - IComparer& operator=(const IComparer& other); - IComparer& operator=(decltype(nullptr)); - IComparer& operator=(IComparer&& other); - bool operator==(const IComparer& other) const; - bool operator!=(const IComparer& other) const; - }; - } -} - -namespace System -{ - namespace Collections - { - struct IEqualityComparer : virtual System::Object - { - IEqualityComparer(decltype(nullptr)); - IEqualityComparer(Plugin::InternalUse, int32_t handle); - IEqualityComparer(const IEqualityComparer& other); - IEqualityComparer(IEqualityComparer&& other); - virtual ~IEqualityComparer(); - IEqualityComparer& operator=(const IEqualityComparer& other); - IEqualityComparer& operator=(decltype(nullptr)); - IEqualityComparer& operator=(IEqualityComparer&& other); - bool operator==(const IEqualityComparer& other) const; - bool operator!=(const IEqualityComparer& other) const; - }; - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEqualityComparer : virtual System::Object - { - IEqualityComparer(decltype(nullptr)); - IEqualityComparer(Plugin::InternalUse, int32_t handle); - IEqualityComparer(const IEqualityComparer& other); - IEqualityComparer(IEqualityComparer&& other); - virtual ~IEqualityComparer(); - IEqualityComparer& operator=(const IEqualityComparer& other); - IEqualityComparer& operator=(decltype(nullptr)); - IEqualityComparer& operator=(IEqualityComparer&& other); - bool operator==(const IEqualityComparer& other) const; - bool operator!=(const IEqualityComparer& other) const; - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEqualityComparer : virtual System::Object - { - IEqualityComparer(decltype(nullptr)); - IEqualityComparer(Plugin::InternalUse, int32_t handle); - IEqualityComparer(const IEqualityComparer& other); - IEqualityComparer(IEqualityComparer&& other); - virtual ~IEqualityComparer(); - IEqualityComparer& operator=(const IEqualityComparer& other); - IEqualityComparer& operator=(decltype(nullptr)); - IEqualityComparer& operator=(IEqualityComparer&& other); - bool operator==(const IEqualityComparer& other) const; - bool operator!=(const IEqualityComparer& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Playables - { - struct PlayableGraph : Plugin::ManagedType - { - PlayableGraph(decltype(nullptr)); - PlayableGraph(Plugin::InternalUse, int32_t handle); - PlayableGraph(const PlayableGraph& other); - PlayableGraph(PlayableGraph&& other); - virtual ~PlayableGraph(); - PlayableGraph& operator=(const PlayableGraph& other); - PlayableGraph& operator=(decltype(nullptr)); - PlayableGraph& operator=(PlayableGraph&& other); - bool operator==(const PlayableGraph& other) const; - bool operator!=(const PlayableGraph& other) const; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; - } -} - -namespace UnityEngine -{ - namespace Playables - { - struct IPlayable : virtual System::Object - { - IPlayable(decltype(nullptr)); - IPlayable(Plugin::InternalUse, int32_t handle); - IPlayable(const IPlayable& other); - IPlayable(IPlayable&& other); - virtual ~IPlayable(); - IPlayable& operator=(const IPlayable& other); - IPlayable& operator=(decltype(nullptr)); - IPlayable& operator=(IPlayable&& other); - bool operator==(const IPlayable& other) const; - bool operator!=(const IPlayable& other) const; - }; - } -} - -namespace System -{ - template<> struct IEquatable : virtual System::Object - { - IEquatable(decltype(nullptr)); - IEquatable(Plugin::InternalUse, int32_t handle); - IEquatable(const IEquatable& other); - IEquatable(IEquatable&& other); - virtual ~IEquatable(); - IEquatable& operator=(const IEquatable& other); - IEquatable& operator=(decltype(nullptr)); - IEquatable& operator=(IEquatable&& other); - bool operator==(const IEquatable& other) const; - bool operator!=(const IEquatable& other) const; - }; -} - -namespace UnityEngine -{ - namespace Animations - { - struct AnimationMixerPlayable : Plugin::ManagedType - { - AnimationMixerPlayable(decltype(nullptr)); - AnimationMixerPlayable(Plugin::InternalUse, int32_t handle); - AnimationMixerPlayable(const AnimationMixerPlayable& other); - AnimationMixerPlayable(AnimationMixerPlayable&& other); - virtual ~AnimationMixerPlayable(); - AnimationMixerPlayable& operator=(const AnimationMixerPlayable& other); - AnimationMixerPlayable& operator=(decltype(nullptr)); - AnimationMixerPlayable& operator=(AnimationMixerPlayable&& other); - bool operator==(const AnimationMixerPlayable& other) const; - bool operator!=(const AnimationMixerPlayable& other) const; - static UnityEngine::Animations::AnimationMixerPlayable Create(UnityEngine::Playables::PlayableGraph& graph, System::Int32 inputCount = 0, System::Boolean normalizeWeights = false); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator UnityEngine::Playables::IPlayable(); - explicit operator System::IEquatable(); - }; - } -} - -namespace System -{ - namespace Runtime - { - namespace CompilerServices - { - struct IStrongBox : virtual System::Object - { - IStrongBox(decltype(nullptr)); - IStrongBox(Plugin::InternalUse, int32_t handle); - IStrongBox(const IStrongBox& other); - IStrongBox(IStrongBox&& other); - virtual ~IStrongBox(); - IStrongBox& operator=(const IStrongBox& other); - IStrongBox& operator=(decltype(nullptr)); - IStrongBox& operator=(IStrongBox&& other); - bool operator==(const IStrongBox& other) const; - bool operator!=(const IStrongBox& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct IEventHandler : virtual System::Object - { - IEventHandler(decltype(nullptr)); - IEventHandler(Plugin::InternalUse, int32_t handle); - IEventHandler(const IEventHandler& other); - IEventHandler(IEventHandler&& other); - virtual ~IEventHandler(); - IEventHandler& operator=(const IEventHandler& other); - IEventHandler& operator=(decltype(nullptr)); - IEventHandler& operator=(IEventHandler&& other); - bool operator==(const IEventHandler& other) const; - bool operator!=(const IEventHandler& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct CallbackEventHandler : virtual UnityEngine::Experimental::UIElements::IEventHandler - { - CallbackEventHandler(decltype(nullptr)); - CallbackEventHandler(Plugin::InternalUse, int32_t handle); - CallbackEventHandler(const CallbackEventHandler& other); - CallbackEventHandler(CallbackEventHandler&& other); - virtual ~CallbackEventHandler(); - CallbackEventHandler& operator=(const CallbackEventHandler& other); - CallbackEventHandler& operator=(decltype(nullptr)); - CallbackEventHandler& operator=(CallbackEventHandler&& other); - bool operator==(const CallbackEventHandler& other) const; - bool operator!=(const CallbackEventHandler& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct Focusable : virtual UnityEngine::Experimental::UIElements::CallbackEventHandler, virtual UnityEngine::Experimental::UIElements::IEventHandler - { - Focusable(decltype(nullptr)); - Focusable(Plugin::InternalUse, int32_t handle); - Focusable(const Focusable& other); - Focusable(Focusable&& other); - virtual ~Focusable(); - Focusable& operator=(const Focusable& other); - Focusable& operator=(decltype(nullptr)); - Focusable& operator=(Focusable&& other); - bool operator==(const Focusable& other) const; - bool operator!=(const Focusable& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct IStyle : virtual System::Object - { - IStyle(decltype(nullptr)); - IStyle(Plugin::InternalUse, int32_t handle); - IStyle(const IStyle& other); - IStyle(IStyle&& other); - virtual ~IStyle(); - IStyle& operator=(const IStyle& other); - IStyle& operator=(decltype(nullptr)); - IStyle& operator=(IStyle&& other); - bool operator==(const IStyle& other) const; - bool operator!=(const IStyle& other) const; - }; - } - } -} - -namespace System -{ - namespace Diagnostics - { - struct Stopwatch : virtual System::Object - { - Stopwatch(decltype(nullptr)); - Stopwatch(Plugin::InternalUse, int32_t handle); - Stopwatch(const Stopwatch& other); - Stopwatch(Stopwatch&& other); - virtual ~Stopwatch(); - Stopwatch& operator=(const Stopwatch& other); - Stopwatch& operator=(decltype(nullptr)); - Stopwatch& operator=(Stopwatch&& other); - bool operator==(const Stopwatch& other) const; - bool operator!=(const Stopwatch& other) const; - Stopwatch(); - System::Int64 GetElapsedMilliseconds(); - void Start(); - void Reset(); - }; - } -} - -namespace UnityEngine -{ - struct GameObject : virtual UnityEngine::Object - { - GameObject(decltype(nullptr)); - GameObject(Plugin::InternalUse, int32_t handle); - GameObject(const GameObject& other); - GameObject(GameObject&& other); - virtual ~GameObject(); - GameObject& operator=(const GameObject& other); - GameObject& operator=(decltype(nullptr)); - GameObject& operator=(GameObject&& other); - bool operator==(const GameObject& other) const; - bool operator!=(const GameObject& other) const; - GameObject(); - GameObject(System::String& name); - UnityEngine::Transform GetTransform(); - template MT0 AddComponent(); - static UnityEngine::GameObject CreatePrimitive(UnityEngine::PrimitiveType type); - }; -} - -namespace UnityEngine -{ - struct Debug : virtual System::Object - { - Debug(decltype(nullptr)); - Debug(Plugin::InternalUse, int32_t handle); - Debug(const Debug& other); - Debug(Debug&& other); - virtual ~Debug(); - Debug& operator=(const Debug& other); - Debug& operator=(decltype(nullptr)); - Debug& operator=(Debug&& other); - bool operator==(const Debug& other) const; - bool operator!=(const Debug& other) const; - static void Log(System::Object& message); - }; -} - -namespace UnityEngine -{ - namespace Assertions - { - namespace Assert - { - System::Boolean GetRaiseExceptions(); - void SetRaiseExceptions(System::Boolean value); - template void AreEqual(MT0& expected, MT0& actual); - } - } -} - -namespace UnityEngine -{ - struct Collision : virtual System::Object - { - Collision(decltype(nullptr)); - Collision(Plugin::InternalUse, int32_t handle); - Collision(const Collision& other); - Collision(Collision&& other); - virtual ~Collision(); - Collision& operator=(const Collision& other); - Collision& operator=(decltype(nullptr)); - Collision& operator=(Collision&& other); - bool operator==(const Collision& other) const; - bool operator!=(const Collision& other) const; - }; -} - -namespace UnityEngine -{ - struct Behaviour : virtual UnityEngine::Component - { - Behaviour(decltype(nullptr)); - Behaviour(Plugin::InternalUse, int32_t handle); - Behaviour(const Behaviour& other); - Behaviour(Behaviour&& other); - virtual ~Behaviour(); - Behaviour& operator=(const Behaviour& other); - Behaviour& operator=(decltype(nullptr)); - Behaviour& operator=(Behaviour&& other); - bool operator==(const Behaviour& other) const; - bool operator!=(const Behaviour& other) const; - }; -} - -namespace UnityEngine -{ - struct MonoBehaviour : virtual UnityEngine::Behaviour - { - MonoBehaviour(decltype(nullptr)); - MonoBehaviour(Plugin::InternalUse, int32_t handle); - MonoBehaviour(const MonoBehaviour& other); - MonoBehaviour(MonoBehaviour&& other); - virtual ~MonoBehaviour(); - MonoBehaviour& operator=(const MonoBehaviour& other); - MonoBehaviour& operator=(decltype(nullptr)); - MonoBehaviour& operator=(MonoBehaviour&& other); - bool operator==(const MonoBehaviour& other) const; - bool operator!=(const MonoBehaviour& other) const; - UnityEngine::Transform GetTransform(); - }; -} - -namespace UnityEngine -{ - struct AudioSettings : virtual System::Object - { - AudioSettings(decltype(nullptr)); - AudioSettings(Plugin::InternalUse, int32_t handle); - AudioSettings(const AudioSettings& other); - AudioSettings(AudioSettings&& other); - virtual ~AudioSettings(); - AudioSettings& operator=(const AudioSettings& other); - AudioSettings& operator=(decltype(nullptr)); - AudioSettings& operator=(AudioSettings&& other); - bool operator==(const AudioSettings& other) const; - bool operator!=(const AudioSettings& other) const; - static void GetDSPBufferSize(System::Int32* bufferLength, System::Int32* numBuffers); - }; -} - -namespace UnityEngine -{ - namespace Networking - { - struct NetworkTransport : virtual System::Object - { - NetworkTransport(decltype(nullptr)); - NetworkTransport(Plugin::InternalUse, int32_t handle); - NetworkTransport(const NetworkTransport& other); - NetworkTransport(NetworkTransport&& other); - virtual ~NetworkTransport(); - NetworkTransport& operator=(const NetworkTransport& other); - NetworkTransport& operator=(decltype(nullptr)); - NetworkTransport& operator=(NetworkTransport&& other); - bool operator==(const NetworkTransport& other) const; - bool operator!=(const NetworkTransport& other) const; - static void GetBroadcastConnectionInfo(System::Int32 hostId, System::String* address, System::Int32* port, System::Byte* error); - static void Init(); - }; - } -} - -namespace UnityEngine -{ - struct Quaternion - { - Quaternion(); - System::Single x; - System::Single y; - System::Single z; - System::Single w; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct Matrix4x4 - { - Matrix4x4(); - System::Single GetItem(System::Int32 row, System::Int32 column); - void SetItem(System::Int32 row, System::Int32 column, System::Single value); - System::Single m00; - System::Single m10; - System::Single m20; - System::Single m30; - System::Single m01; - System::Single m11; - System::Single m21; - System::Single m31; - System::Single m02; - System::Single m12; - System::Single m22; - System::Single m32; - System::Single m03; - System::Single m13; - System::Single m23; - System::Single m33; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct QueryTriggerInteraction - { - int32_t Value; - static const UnityEngine::QueryTriggerInteraction UseGlobal; - static const UnityEngine::QueryTriggerInteraction Ignore; - static const UnityEngine::QueryTriggerInteraction Collide; - explicit QueryTriggerInteraction(int32_t value); - explicit operator int32_t() const; - bool operator==(QueryTriggerInteraction other); - bool operator!=(QueryTriggerInteraction other); - explicit operator System::Enum(); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); - explicit operator System::IComparable(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct KeyValuePair : Plugin::ManagedType - { - KeyValuePair(decltype(nullptr)); - KeyValuePair(Plugin::InternalUse, int32_t handle); - KeyValuePair(const KeyValuePair& other); - KeyValuePair(KeyValuePair&& other); - virtual ~KeyValuePair(); - KeyValuePair& operator=(const KeyValuePair& other); - KeyValuePair& operator=(decltype(nullptr)); - KeyValuePair& operator=(KeyValuePair&& other); - bool operator==(const KeyValuePair& other) const; - bool operator!=(const KeyValuePair& other) const; - KeyValuePair(System::String& key, System::Double value); - System::String GetKey(); - System::Double GetValue(); - explicit operator System::ValueType(); - explicit operator System::Object(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct LinkedListNode : virtual System::Object - { - LinkedListNode(decltype(nullptr)); - LinkedListNode(Plugin::InternalUse, int32_t handle); - LinkedListNode(const LinkedListNode& other); - LinkedListNode(LinkedListNode&& other); - virtual ~LinkedListNode(); - LinkedListNode& operator=(const LinkedListNode& other); - LinkedListNode& operator=(decltype(nullptr)); - LinkedListNode& operator=(LinkedListNode&& other); - bool operator==(const LinkedListNode& other) const; - bool operator!=(const LinkedListNode& other) const; - LinkedListNode(System::String& value); - System::String GetValue(); - void SetValue(System::String& value); - }; - } - } -} - -namespace System -{ - namespace Runtime - { - namespace CompilerServices - { - template<> struct StrongBox : virtual System::Runtime::CompilerServices::IStrongBox - { - StrongBox(decltype(nullptr)); - StrongBox(Plugin::InternalUse, int32_t handle); - StrongBox(const StrongBox& other); - StrongBox(StrongBox&& other); - virtual ~StrongBox(); - StrongBox& operator=(const StrongBox& other); - StrongBox& operator=(decltype(nullptr)); - StrongBox& operator=(StrongBox&& other); - bool operator==(const StrongBox& other) const; - bool operator!=(const StrongBox& other) const; - StrongBox(System::String& value); - System::String GetValue(); - void SetValue(System::String& value); - }; - } - } -} - -namespace System -{ - struct Exception : virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable - { - Exception(decltype(nullptr)); - Exception(Plugin::InternalUse, int32_t handle); - Exception(const Exception& other); - Exception(Exception&& other); - virtual ~Exception(); - Exception& operator=(const Exception& other); - Exception& operator=(decltype(nullptr)); - Exception& operator=(Exception&& other); - bool operator==(const Exception& other) const; - bool operator!=(const Exception& other) const; - Exception(System::String& message); - }; -} - -namespace System -{ - struct SystemException : virtual System::Exception, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable - { - SystemException(decltype(nullptr)); - SystemException(Plugin::InternalUse, int32_t handle); - SystemException(const SystemException& other); - SystemException(SystemException&& other); - virtual ~SystemException(); - SystemException& operator=(const SystemException& other); - SystemException& operator=(decltype(nullptr)); - SystemException& operator=(SystemException&& other); - bool operator==(const SystemException& other) const; - bool operator!=(const SystemException& other) const; - }; -} - -namespace System -{ - struct NullReferenceException : virtual System::SystemException, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable - { - NullReferenceException(decltype(nullptr)); - NullReferenceException(Plugin::InternalUse, int32_t handle); - NullReferenceException(const NullReferenceException& other); - NullReferenceException(NullReferenceException&& other); - virtual ~NullReferenceException(); - NullReferenceException& operator=(const NullReferenceException& other); - NullReferenceException& operator=(decltype(nullptr)); - NullReferenceException& operator=(NullReferenceException&& other); - bool operator==(const NullReferenceException& other) const; - bool operator!=(const NullReferenceException& other) const; - }; -} - -namespace UnityEngine -{ - struct Screen : virtual System::Object - { - Screen(decltype(nullptr)); - Screen(Plugin::InternalUse, int32_t handle); - Screen(const Screen& other); - Screen(Screen&& other); - virtual ~Screen(); - Screen& operator=(const Screen& other); - Screen& operator=(decltype(nullptr)); - Screen& operator=(Screen&& other); - bool operator==(const Screen& other) const; - bool operator!=(const Screen& other) const; - static System::Array1 GetResolutions(); - }; -} - -namespace UnityEngine -{ - struct Ray : Plugin::ManagedType - { - Ray(decltype(nullptr)); - Ray(Plugin::InternalUse, int32_t handle); - Ray(const Ray& other); - Ray(Ray&& other); - virtual ~Ray(); - Ray& operator=(const Ray& other); - Ray& operator=(decltype(nullptr)); - Ray& operator=(Ray&& other); - bool operator==(const Ray& other) const; - bool operator!=(const Ray& other) const; - Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); - explicit operator System::ValueType(); - explicit operator System::Object(); - }; -} - -namespace UnityEngine -{ - struct Physics : virtual System::Object - { - Physics(decltype(nullptr)); - Physics(Plugin::InternalUse, int32_t handle); - Physics(const Physics& other); - Physics(Physics&& other); - virtual ~Physics(); - Physics& operator=(const Physics& other); - Physics& operator=(decltype(nullptr)); - Physics& operator=(Physics&& other); - bool operator==(const Physics& other) const; - bool operator!=(const Physics& other) const; - static System::Int32 RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results); - static System::Array1 RaycastAll(UnityEngine::Ray& ray); - }; -} - -namespace UnityEngine -{ - struct Gradient : virtual System::Object - { - Gradient(decltype(nullptr)); - Gradient(Plugin::InternalUse, int32_t handle); - Gradient(const Gradient& other); - Gradient(Gradient&& other); - virtual ~Gradient(); - Gradient& operator=(const Gradient& other); - Gradient& operator=(decltype(nullptr)); - Gradient& operator=(Gradient&& other); - bool operator==(const Gradient& other) const; - bool operator!=(const Gradient& other) const; - Gradient(); - System::Array1 GetColorKeys(); - void SetColorKeys(System::Array1& value); - }; -} - -namespace System -{ - struct AppDomainSetup : virtual System::IAppDomainSetup - { - AppDomainSetup(decltype(nullptr)); - AppDomainSetup(Plugin::InternalUse, int32_t handle); - AppDomainSetup(const AppDomainSetup& other); - AppDomainSetup(AppDomainSetup&& other); - virtual ~AppDomainSetup(); - AppDomainSetup& operator=(const AppDomainSetup& other); - AppDomainSetup& operator=(decltype(nullptr)); - AppDomainSetup& operator=(AppDomainSetup&& other); - bool operator==(const AppDomainSetup& other) const; - bool operator!=(const AppDomainSetup& other) const; - AppDomainSetup(); - System::AppDomainInitializer GetAppDomainInitializer(); - void SetAppDomainInitializer(System::AppDomainInitializer& value); - }; -} - -namespace UnityEngine -{ - struct Application : virtual System::Object - { - Application(decltype(nullptr)); - Application(Plugin::InternalUse, int32_t handle); - Application(const Application& other); - Application(Application&& other); - virtual ~Application(); - Application& operator=(const Application& other); - Application& operator=(decltype(nullptr)); - Application& operator=(Application&& other); - bool operator==(const Application& other) const; - bool operator!=(const Application& other) const; - static void AddOnBeforeRender(UnityEngine::Events::UnityAction& del); - static void RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del); - }; -} - -namespace UnityEngine -{ - namespace SceneManagement - { - struct SceneManager : virtual System::Object - { - SceneManager(decltype(nullptr)); - SceneManager(Plugin::InternalUse, int32_t handle); - SceneManager(const SceneManager& other); - SceneManager(SceneManager&& other); - virtual ~SceneManager(); - SceneManager& operator=(const SceneManager& other); - SceneManager& operator=(decltype(nullptr)); - SceneManager& operator=(SceneManager&& other); - bool operator==(const SceneManager& other) const; - bool operator!=(const SceneManager& other) const; - static void AddSceneLoaded(UnityEngine::Events::UnityAction2& del); - static void RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del); - }; - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - struct Scene : Plugin::ManagedType - { - Scene(decltype(nullptr)); - Scene(Plugin::InternalUse, int32_t handle); - Scene(const Scene& other); - Scene(Scene&& other); - virtual ~Scene(); - Scene& operator=(const Scene& other); - Scene& operator=(decltype(nullptr)); - Scene& operator=(Scene&& other); - bool operator==(const Scene& other) const; - bool operator!=(const Scene& other) const; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; - } -} - -namespace UnityEngine -{ - namespace SceneManagement - { - struct LoadSceneMode - { - int32_t Value; - static const UnityEngine::SceneManagement::LoadSceneMode Single; - static const UnityEngine::SceneManagement::LoadSceneMode Additive; - explicit LoadSceneMode(int32_t value); - explicit operator int32_t() const; - bool operator==(LoadSceneMode other); - bool operator!=(LoadSceneMode other); - explicit operator System::Enum(); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); - explicit operator System::IComparable(); - }; - } -} - -namespace System -{ - struct EventArgs : virtual System::Object - { - EventArgs(decltype(nullptr)); - EventArgs(Plugin::InternalUse, int32_t handle); - EventArgs(const EventArgs& other); - EventArgs(EventArgs&& other); - virtual ~EventArgs(); - EventArgs& operator=(const EventArgs& other); - EventArgs& operator=(decltype(nullptr)); - EventArgs& operator=(EventArgs&& other); - bool operator==(const EventArgs& other) const; - bool operator!=(const EventArgs& other) const; - }; -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentEventArgs : virtual System::EventArgs - { - ComponentEventArgs(decltype(nullptr)); - ComponentEventArgs(Plugin::InternalUse, int32_t handle); - ComponentEventArgs(const ComponentEventArgs& other); - ComponentEventArgs(ComponentEventArgs&& other); - virtual ~ComponentEventArgs(); - ComponentEventArgs& operator=(const ComponentEventArgs& other); - ComponentEventArgs& operator=(decltype(nullptr)); - ComponentEventArgs& operator=(ComponentEventArgs&& other); - bool operator==(const ComponentEventArgs& other) const; - bool operator!=(const ComponentEventArgs& other) const; - }; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentChangingEventArgs : virtual System::EventArgs - { - ComponentChangingEventArgs(decltype(nullptr)); - ComponentChangingEventArgs(Plugin::InternalUse, int32_t handle); - ComponentChangingEventArgs(const ComponentChangingEventArgs& other); - ComponentChangingEventArgs(ComponentChangingEventArgs&& other); - virtual ~ComponentChangingEventArgs(); - ComponentChangingEventArgs& operator=(const ComponentChangingEventArgs& other); - ComponentChangingEventArgs& operator=(decltype(nullptr)); - ComponentChangingEventArgs& operator=(ComponentChangingEventArgs&& other); - bool operator==(const ComponentChangingEventArgs& other) const; - bool operator!=(const ComponentChangingEventArgs& other) const; - }; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentChangedEventArgs : virtual System::EventArgs - { - ComponentChangedEventArgs(decltype(nullptr)); - ComponentChangedEventArgs(Plugin::InternalUse, int32_t handle); - ComponentChangedEventArgs(const ComponentChangedEventArgs& other); - ComponentChangedEventArgs(ComponentChangedEventArgs&& other); - virtual ~ComponentChangedEventArgs(); - ComponentChangedEventArgs& operator=(const ComponentChangedEventArgs& other); - ComponentChangedEventArgs& operator=(decltype(nullptr)); - ComponentChangedEventArgs& operator=(ComponentChangedEventArgs&& other); - bool operator==(const ComponentChangedEventArgs& other) const; - bool operator!=(const ComponentChangedEventArgs& other) const; - }; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentRenameEventArgs : virtual System::EventArgs - { - ComponentRenameEventArgs(decltype(nullptr)); - ComponentRenameEventArgs(Plugin::InternalUse, int32_t handle); - ComponentRenameEventArgs(const ComponentRenameEventArgs& other); - ComponentRenameEventArgs(ComponentRenameEventArgs&& other); - virtual ~ComponentRenameEventArgs(); - ComponentRenameEventArgs& operator=(const ComponentRenameEventArgs& other); - ComponentRenameEventArgs& operator=(decltype(nullptr)); - ComponentRenameEventArgs& operator=(ComponentRenameEventArgs&& other); - bool operator==(const ComponentRenameEventArgs& other) const; - bool operator!=(const ComponentRenameEventArgs& other) const; - }; - } - } -} - -namespace System -{ - namespace ComponentModel - { - struct MemberDescriptor : virtual System::Object - { - MemberDescriptor(decltype(nullptr)); - MemberDescriptor(Plugin::InternalUse, int32_t handle); - MemberDescriptor(const MemberDescriptor& other); - MemberDescriptor(MemberDescriptor&& other); - virtual ~MemberDescriptor(); - MemberDescriptor& operator=(const MemberDescriptor& other); - MemberDescriptor& operator=(decltype(nullptr)); - MemberDescriptor& operator=(MemberDescriptor&& other); - bool operator==(const MemberDescriptor& other) const; - bool operator!=(const MemberDescriptor& other) const; - }; - } -} - -namespace UnityEngine -{ - struct PrimitiveType - { - int32_t Value; - static const UnityEngine::PrimitiveType Sphere; - static const UnityEngine::PrimitiveType Capsule; - static const UnityEngine::PrimitiveType Cylinder; - static const UnityEngine::PrimitiveType Cube; - static const UnityEngine::PrimitiveType Plane; - static const UnityEngine::PrimitiveType Quad; - explicit PrimitiveType(int32_t value); - explicit operator int32_t() const; - bool operator==(PrimitiveType other); - bool operator!=(PrimitiveType other); - explicit operator System::Enum(); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); - explicit operator System::IComparable(); - }; -} - -namespace UnityEngine -{ - struct Time : virtual System::Object - { - Time(decltype(nullptr)); - Time(Plugin::InternalUse, int32_t handle); - Time(const Time& other); - Time(Time&& other); - virtual ~Time(); - Time& operator=(const Time& other); - Time& operator=(decltype(nullptr)); - Time& operator=(Time&& other); - bool operator==(const Time& other) const; - bool operator!=(const Time& other) const; - static System::Single GetDeltaTime(); - }; -} - -namespace System -{ - namespace IO - { - struct FileMode - { - int32_t Value; - static const System::IO::FileMode CreateNew; - static const System::IO::FileMode Create; - static const System::IO::FileMode Open; - static const System::IO::FileMode OpenOrCreate; - static const System::IO::FileMode Truncate; - static const System::IO::FileMode Append; - explicit FileMode(int32_t value); - explicit operator int32_t() const; - bool operator==(FileMode other); - bool operator!=(FileMode other); - explicit operator System::Enum(); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); - explicit operator System::IComparable(); - }; - } -} - -namespace System -{ - struct MarshalByRefObject : virtual System::Object - { - MarshalByRefObject(decltype(nullptr)); - MarshalByRefObject(Plugin::InternalUse, int32_t handle); - MarshalByRefObject(const MarshalByRefObject& other); - MarshalByRefObject(MarshalByRefObject&& other); - virtual ~MarshalByRefObject(); - MarshalByRefObject& operator=(const MarshalByRefObject& other); - MarshalByRefObject& operator=(decltype(nullptr)); - MarshalByRefObject& operator=(MarshalByRefObject&& other); - bool operator==(const MarshalByRefObject& other) const; - bool operator!=(const MarshalByRefObject& other) const; - }; -} - -namespace System -{ - namespace IO - { - struct Stream : virtual System::MarshalByRefObject, virtual System::IDisposable - { - Stream(decltype(nullptr)); - Stream(Plugin::InternalUse, int32_t handle); - Stream(const Stream& other); - Stream(Stream&& other); - virtual ~Stream(); - Stream& operator=(const Stream& other); - Stream& operator=(decltype(nullptr)); - Stream& operator=(Stream&& other); - bool operator==(const Stream& other) const; - bool operator!=(const Stream& other) const; - }; - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IComparer : virtual System::Object - { - IComparer(decltype(nullptr)); - IComparer(Plugin::InternalUse, int32_t handle); - IComparer(const IComparer& other); - IComparer(IComparer&& other); - virtual ~IComparer(); - IComparer& operator=(const IComparer& other); - IComparer& operator=(decltype(nullptr)); - IComparer& operator=(IComparer&& other); - bool operator==(const IComparer& other) const; - bool operator!=(const IComparer& other) const; - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IComparer : virtual System::Object - { - IComparer(decltype(nullptr)); - IComparer(Plugin::InternalUse, int32_t handle); - IComparer(const IComparer& other); - IComparer(IComparer&& other); - virtual ~IComparer(); - IComparer& operator=(const IComparer& other); - IComparer& operator=(decltype(nullptr)); - IComparer& operator=(IComparer&& other); - bool operator==(const IComparer& other) const; - bool operator!=(const IComparer& other) const; - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer - { - BaseIComparer(decltype(nullptr)); - BaseIComparer(Plugin::InternalUse, int32_t handle); - BaseIComparer(const BaseIComparer& other); - BaseIComparer(BaseIComparer&& other); - virtual ~BaseIComparer(); - BaseIComparer& operator=(const BaseIComparer& other); - BaseIComparer& operator=(decltype(nullptr)); - BaseIComparer& operator=(BaseIComparer&& other); - bool operator==(const BaseIComparer& other) const; - bool operator!=(const BaseIComparer& other) const; - int32_t CppHandle; - BaseIComparer(); - virtual System::Int32 Compare(System::Int32 x, System::Int32 y); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer - { - BaseIComparer(decltype(nullptr)); - BaseIComparer(Plugin::InternalUse, int32_t handle); - BaseIComparer(const BaseIComparer& other); - BaseIComparer(BaseIComparer&& other); - virtual ~BaseIComparer(); - BaseIComparer& operator=(const BaseIComparer& other); - BaseIComparer& operator=(decltype(nullptr)); - BaseIComparer& operator=(BaseIComparer&& other); - bool operator==(const BaseIComparer& other) const; - bool operator!=(const BaseIComparer& other) const; - int32_t CppHandle; - BaseIComparer(); - virtual System::Int32 Compare(System::String& x, System::String& y); - }; - } - } -} - -namespace System -{ - struct StringComparer : virtual System::Collections::IComparer, virtual System::Collections::Generic::IComparer, virtual System::Collections::IEqualityComparer, virtual System::Collections::Generic::IEqualityComparer - { - StringComparer(decltype(nullptr)); - StringComparer(Plugin::InternalUse, int32_t handle); - StringComparer(const StringComparer& other); - StringComparer(StringComparer&& other); - virtual ~StringComparer(); - StringComparer& operator=(const StringComparer& other); - StringComparer& operator=(decltype(nullptr)); - StringComparer& operator=(StringComparer&& other); - bool operator==(const StringComparer& other) const; - bool operator!=(const StringComparer& other) const; - }; -} - -namespace System -{ - struct BaseStringComparer : virtual System::StringComparer - { - BaseStringComparer(decltype(nullptr)); - BaseStringComparer(Plugin::InternalUse, int32_t handle); - BaseStringComparer(const BaseStringComparer& other); - BaseStringComparer(BaseStringComparer&& other); - virtual ~BaseStringComparer(); - BaseStringComparer& operator=(const BaseStringComparer& other); - BaseStringComparer& operator=(decltype(nullptr)); - BaseStringComparer& operator=(BaseStringComparer&& other); - bool operator==(const BaseStringComparer& other) const; - bool operator!=(const BaseStringComparer& other) const; - int32_t CppHandle; - BaseStringComparer(); - virtual System::Int32 Compare(System::String& x, System::String& y); - virtual System::Boolean Equals(System::String& x, System::String& y); - virtual System::Int32 GetHashCode(System::String& obj); - }; -} - -namespace System -{ - namespace Collections - { - struct Queue : virtual System::ICloneable, virtual System::Collections::ICollection - { - Queue(decltype(nullptr)); - Queue(Plugin::InternalUse, int32_t handle); - Queue(const Queue& other); - Queue(Queue&& other); - virtual ~Queue(); - Queue& operator=(const Queue& other); - Queue& operator=(decltype(nullptr)); - Queue& operator=(Queue&& other); - bool operator==(const Queue& other) const; - bool operator!=(const Queue& other) const; - System::Int32 GetCount(); - }; - } -} - -namespace System -{ - namespace Collections - { - struct BaseQueue : virtual System::Collections::Queue - { - BaseQueue(decltype(nullptr)); - BaseQueue(Plugin::InternalUse, int32_t handle); - BaseQueue(const BaseQueue& other); - BaseQueue(BaseQueue&& other); - virtual ~BaseQueue(); - BaseQueue& operator=(const BaseQueue& other); - BaseQueue& operator=(decltype(nullptr)); - BaseQueue& operator=(BaseQueue&& other); - bool operator==(const BaseQueue& other) const; - bool operator!=(const BaseQueue& other) const; - int32_t CppHandle; - BaseQueue(); - virtual System::Int32 GetCount(); - }; - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct IComponentChangeService : virtual System::Object - { - IComponentChangeService(decltype(nullptr)); - IComponentChangeService(Plugin::InternalUse, int32_t handle); - IComponentChangeService(const IComponentChangeService& other); - IComponentChangeService(IComponentChangeService&& other); - virtual ~IComponentChangeService(); - IComponentChangeService& operator=(const IComponentChangeService& other); - IComponentChangeService& operator=(decltype(nullptr)); - IComponentChangeService& operator=(IComponentChangeService&& other); - bool operator==(const IComponentChangeService& other) const; - bool operator!=(const IComponentChangeService& other) const; - }; - } - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct BaseIComponentChangeService : virtual System::ComponentModel::Design::IComponentChangeService - { - BaseIComponentChangeService(decltype(nullptr)); - BaseIComponentChangeService(Plugin::InternalUse, int32_t handle); - BaseIComponentChangeService(const BaseIComponentChangeService& other); - BaseIComponentChangeService(BaseIComponentChangeService&& other); - virtual ~BaseIComponentChangeService(); - BaseIComponentChangeService& operator=(const BaseIComponentChangeService& other); - BaseIComponentChangeService& operator=(decltype(nullptr)); - BaseIComponentChangeService& operator=(BaseIComponentChangeService&& other); - bool operator==(const BaseIComponentChangeService& other) const; - bool operator!=(const BaseIComponentChangeService& other) const; - int32_t CppHandle; - BaseIComponentChangeService(); - virtual void OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue); - virtual void OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member); - virtual void AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value); - virtual void RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value); - virtual void AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value); - virtual void RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value); - virtual void AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value); - virtual void AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value); - virtual void RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value); - }; - } - } -} - -namespace System -{ - namespace IO - { - struct FileStream : virtual System::IO::Stream, virtual System::IDisposable - { - FileStream(decltype(nullptr)); - FileStream(Plugin::InternalUse, int32_t handle); - FileStream(const FileStream& other); - FileStream(FileStream&& other); - virtual ~FileStream(); - FileStream& operator=(const FileStream& other); - FileStream& operator=(decltype(nullptr)); - FileStream& operator=(FileStream&& other); - bool operator==(const FileStream& other) const; - bool operator!=(const FileStream& other) const; - FileStream(System::String& path, System::IO::FileMode mode); - void WriteByte(System::Byte value); - }; - } -} - -namespace System -{ - namespace IO - { - struct BaseFileStream : virtual System::IO::FileStream - { - BaseFileStream(decltype(nullptr)); - BaseFileStream(Plugin::InternalUse, int32_t handle); - BaseFileStream(const BaseFileStream& other); - BaseFileStream(BaseFileStream&& other); - virtual ~BaseFileStream(); - BaseFileStream& operator=(const BaseFileStream& other); - BaseFileStream& operator=(decltype(nullptr)); - BaseFileStream& operator=(BaseFileStream&& other); - bool operator==(const BaseFileStream& other) const; - bool operator!=(const BaseFileStream& other) const; - int32_t CppHandle; - BaseFileStream(System::String& path, System::IO::FileMode mode); - virtual void WriteByte(System::Byte value); - }; - } -} - -namespace UnityEngine -{ - namespace Playables - { - struct PlayableHandle : Plugin::ManagedType - { - PlayableHandle(decltype(nullptr)); - PlayableHandle(Plugin::InternalUse, int32_t handle); - PlayableHandle(const PlayableHandle& other); - PlayableHandle(PlayableHandle&& other); - virtual ~PlayableHandle(); - PlayableHandle& operator=(const PlayableHandle& other); - PlayableHandle& operator=(decltype(nullptr)); - PlayableHandle& operator=(PlayableHandle&& other); - bool operator==(const PlayableHandle& other) const; - bool operator!=(const PlayableHandle& other) const; - explicit operator System::ValueType(); - explicit operator System::Object(); - }; - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct ITransform : virtual System::Object - { - ITransform(decltype(nullptr)); - ITransform(Plugin::InternalUse, int32_t handle); - ITransform(const ITransform& other); - ITransform(ITransform&& other); - virtual ~ITransform(); - ITransform& operator=(const ITransform& other); - ITransform& operator=(decltype(nullptr)); - ITransform& operator=(ITransform&& other); - bool operator==(const ITransform& other) const; - bool operator!=(const ITransform& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct IUIElementDataWatch : virtual System::Object - { - IUIElementDataWatch(decltype(nullptr)); - IUIElementDataWatch(Plugin::InternalUse, int32_t handle); - IUIElementDataWatch(const IUIElementDataWatch& other); - IUIElementDataWatch(IUIElementDataWatch&& other); - virtual ~IUIElementDataWatch(); - IUIElementDataWatch& operator=(const IUIElementDataWatch& other); - IUIElementDataWatch& operator=(decltype(nullptr)); - IUIElementDataWatch& operator=(IUIElementDataWatch&& other); - bool operator==(const IUIElementDataWatch& other) const; - bool operator!=(const IUIElementDataWatch& other) const; - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct IVisualElementScheduler : virtual System::Object - { - IVisualElementScheduler(decltype(nullptr)); - IVisualElementScheduler(Plugin::InternalUse, int32_t handle); - IVisualElementScheduler(const IVisualElementScheduler& other); - IVisualElementScheduler(IVisualElementScheduler&& other); - virtual ~IVisualElementScheduler(); - IVisualElementScheduler& operator=(const IVisualElementScheduler& other); - IVisualElementScheduler& operator=(decltype(nullptr)); - IVisualElementScheduler& operator=(IVisualElementScheduler&& other); - bool operator==(const IVisualElementScheduler& other) const; - bool operator!=(const IVisualElementScheduler& other) const; - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::Experimental::UIElements::VisualElement GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - struct VisualElement : virtual UnityEngine::Experimental::UIElements::Focusable, virtual System::Collections::Generic::IEnumerable, virtual UnityEngine::Experimental::UIElements::IEventHandler, virtual UnityEngine::Experimental::UIElements::IStyle, virtual UnityEngine::Experimental::UIElements::ITransform, virtual UnityEngine::Experimental::UIElements::IUIElementDataWatch, virtual UnityEngine::Experimental::UIElements::IVisualElementScheduler - { - VisualElement(decltype(nullptr)); - VisualElement(Plugin::InternalUse, int32_t handle); - VisualElement(const VisualElement& other); - VisualElement(VisualElement&& other); - virtual ~VisualElement(); - VisualElement& operator=(const VisualElement& other); - VisualElement& operator=(decltype(nullptr)); - VisualElement& operator=(VisualElement&& other); - bool operator==(const VisualElement& other) const; - bool operator!=(const VisualElement& other) const; - }; - } - } -} - -namespace Plugin -{ - struct UnityEngineExperimentalUIElementsVisualElementIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - UnityEngineExperimentalUIElementsVisualElementIterator(decltype(nullptr)); - UnityEngineExperimentalUIElementsVisualElementIterator(UnityEngine::Experimental::UIElements::VisualElement& enumerable); - ~UnityEngineExperimentalUIElementsVisualElementIterator(); - UnityEngineExperimentalUIElementsVisualElementIterator& operator++(); - bool operator!=(const UnityEngineExperimentalUIElementsVisualElementIterator& other); - UnityEngine::Experimental::UIElements::VisualElement operator*(); - }; -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - Plugin::UnityEngineExperimentalUIElementsVisualElementIterator begin(UnityEngine::Experimental::UIElements::VisualElement& enumerable); - Plugin::UnityEngineExperimentalUIElementsVisualElementIterator end(UnityEngine::Experimental::UIElements::VisualElement& enumerable); - } - } -} - -namespace UnityEngine -{ - namespace Experimental - { - namespace UIElements - { - namespace UQueryExtensions - { - UnityEngine::Experimental::UIElements::VisualElement Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name, System::Array1& classes); - UnityEngine::Experimental::UIElements::VisualElement Q(UnityEngine::Experimental::UIElements::VisualElement& e, System::String& name = Plugin::NullString, System::String& className = Plugin::NullString); - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - struct InteractionSourcePositionAccuracy - { - int32_t Value; - static const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy None; - static const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy Approximate; - static const UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy High; - explicit InteractionSourcePositionAccuracy(int32_t value); - explicit operator int32_t() const; - bool operator==(InteractionSourcePositionAccuracy other); - bool operator!=(InteractionSourcePositionAccuracy other); - explicit operator System::Enum(); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); - explicit operator System::IComparable(); - }; - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - struct InteractionSourceNode - { - int32_t Value; - static const UnityEngine::XR::WSA::Input::InteractionSourceNode Grip; - static const UnityEngine::XR::WSA::Input::InteractionSourceNode Pointer; - explicit InteractionSourceNode(int32_t value); - explicit operator int32_t() const; - bool operator==(InteractionSourceNode other); - bool operator!=(InteractionSourceNode other); - explicit operator System::Enum(); - explicit operator System::ValueType(); - explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); - explicit operator System::IComparable(); - }; - } - } - } -} - -namespace UnityEngine -{ - namespace XR - { - namespace WSA - { - namespace Input - { - struct InteractionSourcePose : Plugin::ManagedType - { - InteractionSourcePose(decltype(nullptr)); - InteractionSourcePose(Plugin::InternalUse, int32_t handle); - InteractionSourcePose(const InteractionSourcePose& other); - InteractionSourcePose(InteractionSourcePose&& other); - virtual ~InteractionSourcePose(); - InteractionSourcePose& operator=(const InteractionSourcePose& other); - InteractionSourcePose& operator=(decltype(nullptr)); - InteractionSourcePose& operator=(InteractionSourcePose&& other); - bool operator==(const InteractionSourcePose& other) const; - bool operator!=(const InteractionSourcePose& other) const; - System::Boolean TryGetRotation(UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node = UnityEngine::XR::WSA::Input::InteractionSourceNode::Grip); - explicit operator System::ValueType(); - explicit operator System::Object(); - }; - } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - System::String GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - System::Int32 GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - System::Single GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::RaycastHit GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::GradientColorKey GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerator : virtual System::IDisposable, virtual System::Collections::IEnumerator - { - IEnumerator(decltype(nullptr)); - IEnumerator(Plugin::InternalUse, int32_t handle); - IEnumerator(const IEnumerator& other); - IEnumerator(IEnumerator&& other); - virtual ~IEnumerator(); - IEnumerator& operator=(const IEnumerator& other); - IEnumerator& operator=(decltype(nullptr)); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - UnityEngine::Resolution GetCurrent(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IEnumerable : virtual System::Collections::IEnumerable - { - IEnumerable(decltype(nullptr)); - IEnumerable(Plugin::InternalUse, int32_t handle); - IEnumerable(const IEnumerable& other); - IEnumerable(IEnumerable&& other); - virtual ~IEnumerable(); - IEnumerable& operator=(const IEnumerable& other); - IEnumerable& operator=(decltype(nullptr)); - IEnumerable& operator=(IEnumerable&& other); - bool operator==(const IEnumerable& other) const; - bool operator!=(const IEnumerable& other) const; - System::Collections::Generic::IEnumerator GetEnumerator(); - }; - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericICollectionSystemStringIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionSystemStringIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionSystemStringIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionSystemStringIterator(); - SystemCollectionsGenericICollectionSystemStringIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionSystemStringIterator& other); - System::String operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemStringIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionSystemStringIterator end(System::Collections::Generic::ICollection& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericICollectionSystemInt32Iterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsGenericICollectionSystemInt32Iterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionSystemInt32Iterator(); - SystemCollectionsGenericICollectionSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionSystemInt32Iterator& other); - System::Int32 operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericICollectionSystemSingleIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionSystemSingleIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionSystemSingleIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionSystemSingleIterator(); - SystemCollectionsGenericICollectionSystemSingleIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionSystemSingleIterator& other); - System::Single operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionSystemSingleIterator end(System::Collections::Generic::ICollection& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator(); - SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator& other); - UnityEngine::RaycastHit operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionUnityEngineRaycastHitIterator end(System::Collections::Generic::ICollection& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator(); - SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator& other); - UnityEngine::GradientColorKey operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionUnityEngineGradientColorKeyIterator end(System::Collections::Generic::ICollection& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct ICollection : virtual System::Collections::Generic::IEnumerable - { - ICollection(decltype(nullptr)); - ICollection(Plugin::InternalUse, int32_t handle); - ICollection(const ICollection& other); - ICollection(ICollection&& other); - virtual ~ICollection(); - ICollection& operator=(const ICollection& other); - ICollection& operator=(decltype(nullptr)); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericICollectionUnityEngineResolutionIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericICollectionUnityEngineResolutionIterator(decltype(nullptr)); - SystemCollectionsGenericICollectionUnityEngineResolutionIterator(System::Collections::Generic::ICollection& enumerable); - ~SystemCollectionsGenericICollectionUnityEngineResolutionIterator(); - SystemCollectionsGenericICollectionUnityEngineResolutionIterator& operator++(); - bool operator!=(const SystemCollectionsGenericICollectionUnityEngineResolutionIterator& other); - UnityEngine::Resolution operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator begin(System::Collections::Generic::ICollection& enumerable); - Plugin::SystemCollectionsGenericICollectionUnityEngineResolutionIterator end(System::Collections::Generic::ICollection& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericIListSystemStringIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListSystemStringIterator(decltype(nullptr)); - SystemCollectionsGenericIListSystemStringIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListSystemStringIterator(); - SystemCollectionsGenericIListSystemStringIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListSystemStringIterator& other); - System::String operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemStringIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListSystemStringIterator end(System::Collections::Generic::IList& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericIListSystemInt32Iterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsGenericIListSystemInt32Iterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListSystemInt32Iterator(); - SystemCollectionsGenericIListSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListSystemInt32Iterator& other); - System::Int32 operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemInt32Iterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListSystemInt32Iterator end(System::Collections::Generic::IList& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericIListSystemSingleIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListSystemSingleIterator(decltype(nullptr)); - SystemCollectionsGenericIListSystemSingleIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListSystemSingleIterator(); - SystemCollectionsGenericIListSystemSingleIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListSystemSingleIterator& other); - System::Single operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericIListUnityEngineRaycastHitIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListUnityEngineRaycastHitIterator(decltype(nullptr)); - SystemCollectionsGenericIListUnityEngineRaycastHitIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListUnityEngineRaycastHitIterator(); - SystemCollectionsGenericIListUnityEngineRaycastHitIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListUnityEngineRaycastHitIterator& other); - UnityEngine::RaycastHit operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListUnityEngineRaycastHitIterator end(System::Collections::Generic::IList& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(decltype(nullptr)); - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator(); - SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator& other); - UnityEngine::GradientColorKey operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListUnityEngineGradientColorKeyIterator end(System::Collections::Generic::IList& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct IList : virtual System::Collections::Generic::ICollection - { - IList(decltype(nullptr)); - IList(Plugin::InternalUse, int32_t handle); - IList(const IList& other); - IList(IList&& other); - virtual ~IList(); - IList& operator=(const IList& other); - IList& operator=(decltype(nullptr)); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericIListUnityEngineResolutionIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericIListUnityEngineResolutionIterator(decltype(nullptr)); - SystemCollectionsGenericIListUnityEngineResolutionIterator(System::Collections::Generic::IList& enumerable); - ~SystemCollectionsGenericIListUnityEngineResolutionIterator(); - SystemCollectionsGenericIListUnityEngineResolutionIterator& operator++(); - bool operator!=(const SystemCollectionsGenericIListUnityEngineResolutionIterator& other); - UnityEngine::Resolution operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator begin(System::Collections::Generic::IList& enumerable); - Plugin::SystemCollectionsGenericIListUnityEngineResolutionIterator end(System::Collections::Generic::IList& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - List(decltype(nullptr)); - List(Plugin::InternalUse, int32_t handle); - List(const List& other); - List(List&& other); - virtual ~List(); - List& operator=(const List& other); - List& operator=(decltype(nullptr)); - List& operator=(List&& other); - bool operator==(const List& other) const; - bool operator!=(const List& other) const; - List(); - System::String GetItem(System::Int32 index); - void SetItem(System::Int32 index, System::String& value); - void Add(System::String& item); - void Sort(System::Collections::Generic::IComparer& comparer); - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericListSystemStringIterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericListSystemStringIterator(decltype(nullptr)); - SystemCollectionsGenericListSystemStringIterator(System::Collections::Generic::List& enumerable); - ~SystemCollectionsGenericListSystemStringIterator(); - SystemCollectionsGenericListSystemStringIterator& operator++(); - bool operator!=(const SystemCollectionsGenericListSystemStringIterator& other); - System::String operator*(); - }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericListSystemStringIterator begin(System::Collections::Generic::List& enumerable); - Plugin::SystemCollectionsGenericListSystemStringIterator end(System::Collections::Generic::List& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - List(decltype(nullptr)); - List(Plugin::InternalUse, int32_t handle); - List(const List& other); - List(List&& other); - virtual ~List(); - List& operator=(const List& other); - List& operator=(decltype(nullptr)); - List& operator=(List&& other); - bool operator==(const List& other) const; - bool operator!=(const List& other) const; - List(); - System::Int32 GetItem(System::Int32 index); - void SetItem(System::Int32 index, System::Int32 value); - void Add(System::Int32 item); - void Sort(System::Collections::Generic::IComparer& comparer); - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsGenericListSystemInt32Iterator - { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsGenericListSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsGenericListSystemInt32Iterator(System::Collections::Generic::List& enumerable); - ~SystemCollectionsGenericListSystemInt32Iterator(); - SystemCollectionsGenericListSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsGenericListSystemInt32Iterator& other); - System::Int32 operator*(); + Object(); + Object(Plugin::InternalUse iu, int32_t handle); + Object(decltype(nullptr)); + virtual ~Object() = default; + bool operator==(decltype(nullptr)) const; + bool operator!=(decltype(nullptr)) const; + virtual void ThrowReferenceToThis(); + + /*BEGIN UNBOXING METHOD DECLARATIONS*/ + explicit operator UnityEngine::Vector3(); + explicit operator UnityEngine::PrimitiveType(); + explicit operator System::Boolean(); + explicit operator System::SByte(); + explicit operator System::Byte(); + explicit operator System::Int16(); + explicit operator System::UInt16(); + explicit operator System::Int32(); + explicit operator System::UInt32(); + explicit operator System::Int64(); + explicit operator System::UInt64(); + explicit operator System::Char(); + explicit operator System::Single(); + explicit operator System::Double(); + /*END UNBOXING METHOD DECLARATIONS*/ }; -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable); - Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable); - } - } -} - -namespace System -{ - namespace Collections - { - namespace ObjectModel - { - template<> struct Collection : virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - Collection(decltype(nullptr)); - Collection(Plugin::InternalUse, int32_t handle); - Collection(const Collection& other); - Collection(Collection&& other); - virtual ~Collection(); - Collection& operator=(const Collection& other); - Collection& operator=(decltype(nullptr)); - Collection& operator=(Collection&& other); - bool operator==(const Collection& other) const; - bool operator!=(const Collection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsObjectModelCollectionSystemInt32Iterator + + struct ValueType : virtual Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsObjectModelCollectionSystemInt32Iterator(decltype(nullptr)); - SystemCollectionsObjectModelCollectionSystemInt32Iterator(System::Collections::ObjectModel::Collection& enumerable); - ~SystemCollectionsObjectModelCollectionSystemInt32Iterator(); - SystemCollectionsObjectModelCollectionSystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsObjectModelCollectionSystemInt32Iterator& other); - System::Int32 operator*(); + ValueType(Plugin::InternalUse iu, int32_t handle); + ValueType(decltype(nullptr)); }; -} - -namespace System -{ - namespace Collections + + struct Enum : virtual ValueType { - namespace ObjectModel - { - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable); - Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable); - } - } -} - -namespace System -{ - namespace Collections + Enum(Plugin::InternalUse iu, int32_t handle); + Enum(decltype(nullptr)); + }; + + struct String : virtual Object { - namespace ObjectModel - { - template<> struct KeyedCollection : virtual System::Collections::ObjectModel::Collection, virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - KeyedCollection(decltype(nullptr)); - KeyedCollection(Plugin::InternalUse, int32_t handle); - KeyedCollection(const KeyedCollection& other); - KeyedCollection(KeyedCollection&& other); - virtual ~KeyedCollection(); - KeyedCollection& operator=(const KeyedCollection& other); - KeyedCollection& operator=(decltype(nullptr)); - KeyedCollection& operator=(KeyedCollection&& other); - bool operator==(const KeyedCollection& other) const; - bool operator!=(const KeyedCollection& other) const; - }; - } - } -} - -namespace Plugin -{ - struct SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator + String(Plugin::InternalUse iu, int32_t handle); + String(decltype(nullptr)); + String(const String& other); + String(String&& other); + virtual ~String(); + String& operator=(const String& other); + String& operator=(decltype(nullptr)); + String& operator=(String&& other); + String(const char* chars); + }; + + struct ICloneable : virtual Object { - System::Collections::Generic::IEnumerator enumerator; - bool hasMore; - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(decltype(nullptr)); - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(System::Collections::ObjectModel::KeyedCollection& enumerable); - ~SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator(); - SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& operator++(); - bool operator!=(const SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator& other); - System::Int32 operator*(); + ICloneable(Plugin::InternalUse iu, int32_t handle); + ICloneable(decltype(nullptr)); }; -} - -namespace System -{ + namespace Collections { - namespace ObjectModel + struct IEnumerable : virtual Object { - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable); - Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable); - } - } -} - -namespace MyGame -{ - namespace MonoBehaviours - { - struct TestScript : virtual UnityEngine::MonoBehaviour + IEnumerable(Plugin::InternalUse iu, int32_t handle); + IEnumerable(decltype(nullptr)); + IEnumerator GetEnumerator(); + }; + + struct ICollection : virtual IEnumerable { - TestScript(decltype(nullptr)); - TestScript(Plugin::InternalUse, int32_t handle); - TestScript(const TestScript& other); - TestScript(TestScript&& other); - virtual ~TestScript(); - TestScript& operator=(const TestScript& other); - TestScript& operator=(decltype(nullptr)); - TestScript& operator=(TestScript&& other); - bool operator==(const TestScript& other) const; - bool operator!=(const TestScript& other) const; - void Awake(); - void OnAnimatorIK(System::Int32 param0); - void OnCollisionEnter(UnityEngine::Collision& param0); - void Update(); + ICollection(Plugin::InternalUse iu, int32_t handle); + ICollection(decltype(nullptr)); }; - } -} - -namespace MyGame -{ - namespace MonoBehaviours - { - struct AnotherScript : virtual UnityEngine::MonoBehaviour + + struct IList : virtual ICollection, virtual IEnumerable { - AnotherScript(decltype(nullptr)); - AnotherScript(Plugin::InternalUse, int32_t handle); - AnotherScript(const AnotherScript& other); - AnotherScript(AnotherScript&& other); - virtual ~AnotherScript(); - AnotherScript& operator=(const AnotherScript& other); - AnotherScript& operator=(decltype(nullptr)); - AnotherScript& operator=(AnotherScript&& other); - bool operator==(const AnotherScript& other) const; - bool operator!=(const AnotherScript& other) const; - void Awake(); - void Update(); + IList(Plugin::InternalUse iu, int32_t handle); + IList(decltype(nullptr)); }; } -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1 - { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); - void operator=(System::Int32 item); - operator System::Int32(); - }; -} - -namespace System -{ - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; - int32_t InternalLength; - Array1(System::Int32 length0); - System::Int32 GetLength(); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); - }; -} - -namespace Plugin -{ - struct SystemInt32Array1Iterator - { - System::Array1& array; - int index; - SystemInt32Array1Iterator(System::Array1& array, int32_t index); - SystemInt32Array1Iterator& operator++(); - bool operator!=(const SystemInt32Array1Iterator& other); - System::Int32 operator*(); - }; -} - -namespace System -{ - Plugin::SystemInt32Array1Iterator begin(System::Array1& array); - Plugin::SystemInt32Array1Iterator end(System::Array1& array); -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1 - { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); - void operator=(System::Single item); - operator System::Single(); - }; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_2 - { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_2(Plugin::InternalUse, int32_t handle, int32_t index0); - Plugin::ArrayElementProxy2_2 operator[](int32_t index); - }; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy2_2 - { - int32_t Handle; - int32_t Index0; - int32_t Index1; - ArrayElementProxy2_2(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1); - void operator=(System::Single item); - operator System::Single(); - }; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_3 - { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_3(Plugin::InternalUse, int32_t handle, int32_t index0); - Plugin::ArrayElementProxy2_3 operator[](int32_t index); - }; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy2_3 - { - int32_t Handle; - int32_t Index0; - int32_t Index1; - ArrayElementProxy2_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1); - Plugin::ArrayElementProxy3_3 operator[](int32_t index); - }; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy3_3 + + struct Array : virtual ICloneable, virtual Collections::IList { - int32_t Handle; - int32_t Index0; - int32_t Index1; - int32_t Index2; - ArrayElementProxy3_3(Plugin::InternalUse, int32_t handle, int32_t index0, int32_t index1, int32_t index2); - void operator=(System::Single item); - operator System::Single(); + Array(Plugin::InternalUse iu, int32_t handle); + Array(decltype(nullptr)); + int32_t GetLength(); + int32_t GetRank(); }; } -namespace System -{ - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; - int32_t InternalLength; - Array1(System::Int32 length0); - System::Int32 GetLength(); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); - }; -} +//////////////////////////////////////////////////////////////// +// Global variables +//////////////////////////////////////////////////////////////// namespace Plugin { - struct SystemSingleArray1Iterator - { - System::Array1& array; - int index; - SystemSingleArray1Iterator(System::Array1& array, int32_t index); - SystemSingleArray1Iterator& operator++(); - bool operator!=(const SystemSingleArray1Iterator& other); - System::Single operator*(); - }; -} - -namespace System -{ - Plugin::SystemSingleArray1Iterator begin(System::Array1& array); - Plugin::SystemSingleArray1Iterator end(System::Array1& array); -} - -namespace System -{ - template<> struct Array2 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList - { - Array2(decltype(nullptr)); - Array2(Plugin::InternalUse, int32_t handle); - Array2(const Array2& other); - Array2(Array2&& other); - virtual ~Array2(); - Array2& operator=(const Array2& other); - Array2& operator=(decltype(nullptr)); - Array2& operator=(Array2&& other); - bool operator==(const Array2& other) const; - bool operator!=(const Array2& other) const; - int32_t InternalLength; - int32_t InternalLengths[2]; - Array2(System::Int32 length0, System::Int32 length1); - System::Int32 GetLength(); - System::Int32 GetLength(System::Int32 dimension); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_2 operator[](int32_t index); - }; + extern System::String NullString; } +/*BEGIN TYPE DEFINITIONS*/ namespace System { - template<> struct Array3 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList - { - Array3(decltype(nullptr)); - Array3(Plugin::InternalUse, int32_t handle); - Array3(const Array3& other); - Array3(Array3&& other); - virtual ~Array3(); - Array3& operator=(const Array3& other); - Array3& operator=(decltype(nullptr)); - Array3& operator=(Array3&& other); - bool operator==(const Array3& other) const; - bool operator!=(const Array3& other) const; - int32_t InternalLength; - int32_t InternalLengths[3]; - Array3(System::Int32 length0, System::Int32 length1, System::Int32 length2); - System::Int32 GetLength(); - System::Int32 GetLength(System::Int32 dimension); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_3 operator[](int32_t index); - }; -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1 + struct IFormattable : virtual System::Object { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); - void operator=(System::String item); - operator System::String(); + IFormattable(decltype(nullptr)); + IFormattable(Plugin::InternalUse, int32_t handle); + IFormattable(const IFormattable& other); + IFormattable(IFormattable&& other); + virtual ~IFormattable(); + IFormattable& operator=(const IFormattable& other); + IFormattable& operator=(decltype(nullptr)); + IFormattable& operator=(IFormattable&& other); + bool operator==(const IFormattable& other) const; + bool operator!=(const IFormattable& other) const; }; } namespace System { - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList - { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; - int32_t InternalLength; - Array1(System::Int32 length0); - System::Int32 GetLength(); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); - }; -} - -namespace Plugin -{ - struct SystemStringArray1Iterator + struct IConvertible : virtual System::Object { - System::Array1& array; - int index; - SystemStringArray1Iterator(System::Array1& array, int32_t index); - SystemStringArray1Iterator& operator++(); - bool operator!=(const SystemStringArray1Iterator& other); - System::String operator*(); + IConvertible(decltype(nullptr)); + IConvertible(Plugin::InternalUse, int32_t handle); + IConvertible(const IConvertible& other); + IConvertible(IConvertible&& other); + virtual ~IConvertible(); + IConvertible& operator=(const IConvertible& other); + IConvertible& operator=(decltype(nullptr)); + IConvertible& operator=(IConvertible&& other); + bool operator==(const IConvertible& other) const; + bool operator!=(const IConvertible& other) const; }; } namespace System { - Plugin::SystemStringArray1Iterator begin(System::Array1& array); - Plugin::SystemStringArray1Iterator end(System::Array1& array); -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1 + struct IComparable : virtual System::Object { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); - void operator=(UnityEngine::Resolution item); - operator UnityEngine::Resolution(); + IComparable(decltype(nullptr)); + IComparable(Plugin::InternalUse, int32_t handle); + IComparable(const IComparable& other); + IComparable(IComparable&& other); + virtual ~IComparable(); + IComparable& operator=(const IComparable& other); + IComparable& operator=(decltype(nullptr)); + IComparable& operator=(IComparable&& other); + bool operator==(const IComparable& other) const; + bool operator!=(const IComparable& other) const; }; } -namespace System +namespace UnityEngine { - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList + struct Vector3 { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; - int32_t InternalLength; - Array1(System::Int32 length0); - System::Int32 GetLength(); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); + Vector3(); + Vector3(System::Single x, System::Single y, System::Single z); + System::Single x; + System::Single y; + System::Single z; + UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); + explicit operator System::ValueType(); + explicit operator System::Object(); }; } -namespace Plugin +namespace UnityEngine { - struct UnityEngineResolutionArray1Iterator + struct Object : virtual System::Object { - System::Array1& array; - int index; - UnityEngineResolutionArray1Iterator(System::Array1& array, int32_t index); - UnityEngineResolutionArray1Iterator& operator++(); - bool operator!=(const UnityEngineResolutionArray1Iterator& other); - UnityEngine::Resolution operator*(); + Object(decltype(nullptr)); + Object(Plugin::InternalUse, int32_t handle); + Object(const Object& other); + Object(Object&& other); + virtual ~Object(); + Object& operator=(const Object& other); + Object& operator=(decltype(nullptr)); + Object& operator=(Object&& other); + bool operator==(const Object& other) const; + bool operator!=(const Object& other) const; + System::String GetName(); + void SetName(System::String& value); }; } -namespace System -{ - Plugin::UnityEngineResolutionArray1Iterator begin(System::Array1& array); - Plugin::UnityEngineResolutionArray1Iterator end(System::Array1& array); -} - -namespace Plugin +namespace UnityEngine { - template<> struct ArrayElementProxy1_1 + struct Component : virtual UnityEngine::Object { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); - void operator=(UnityEngine::RaycastHit item); - operator UnityEngine::RaycastHit(); + Component(decltype(nullptr)); + Component(Plugin::InternalUse, int32_t handle); + Component(const Component& other); + Component(Component&& other); + virtual ~Component(); + Component& operator=(const Component& other); + Component& operator=(decltype(nullptr)); + Component& operator=(Component&& other); + bool operator==(const Component& other) const; + bool operator!=(const Component& other) const; + UnityEngine::Transform GetTransform(); }; } -namespace System +namespace UnityEngine { - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList + struct Transform : virtual UnityEngine::Component, virtual System::Collections::IEnumerable { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; - int32_t InternalLength; - Array1(System::Int32 length0); - System::Int32 GetLength(); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); + Transform(decltype(nullptr)); + Transform(Plugin::InternalUse, int32_t handle); + Transform(const Transform& other); + Transform(Transform&& other); + virtual ~Transform(); + Transform& operator=(const Transform& other); + Transform& operator=(decltype(nullptr)); + Transform& operator=(Transform&& other); + bool operator==(const Transform& other) const; + bool operator!=(const Transform& other) const; + UnityEngine::Vector3 GetPosition(); + void SetPosition(UnityEngine::Vector3& value); }; } -namespace Plugin +namespace System { - struct UnityEngineRaycastHitArray1Iterator + namespace Collections { - System::Array1& array; - int index; - UnityEngineRaycastHitArray1Iterator(System::Array1& array, int32_t index); - UnityEngineRaycastHitArray1Iterator& operator++(); - bool operator!=(const UnityEngineRaycastHitArray1Iterator& other); - UnityEngine::RaycastHit operator*(); - }; + struct IEnumerator : virtual System::Object + { + IEnumerator(decltype(nullptr)); + IEnumerator(Plugin::InternalUse, int32_t handle); + IEnumerator(const IEnumerator& other); + IEnumerator(IEnumerator&& other); + virtual ~IEnumerator(); + IEnumerator& operator=(const IEnumerator& other); + IEnumerator& operator=(decltype(nullptr)); + IEnumerator& operator=(IEnumerator&& other); + bool operator==(const IEnumerator& other) const; + bool operator!=(const IEnumerator& other) const; + System::Object GetCurrent(); + System::Boolean MoveNext(); + }; + } } namespace System { - Plugin::UnityEngineRaycastHitArray1Iterator begin(System::Array1& array); - Plugin::UnityEngineRaycastHitArray1Iterator end(System::Array1& array); -} - -namespace Plugin -{ - template<> struct ArrayElementProxy1_1 + namespace Runtime { - int32_t Handle; - int32_t Index0; - ArrayElementProxy1_1(Plugin::InternalUse, int32_t handle, int32_t index0); - void operator=(UnityEngine::GradientColorKey item); - operator UnityEngine::GradientColorKey(); - }; + namespace Serialization + { + struct ISerializable : virtual System::Object + { + ISerializable(decltype(nullptr)); + ISerializable(Plugin::InternalUse, int32_t handle); + ISerializable(const ISerializable& other); + ISerializable(ISerializable&& other); + virtual ~ISerializable(); + ISerializable& operator=(const ISerializable& other); + ISerializable& operator=(decltype(nullptr)); + ISerializable& operator=(ISerializable&& other); + bool operator==(const ISerializable& other) const; + bool operator!=(const ISerializable& other) const; + }; + } + } } namespace System { - template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList + namespace Runtime { - Array1(decltype(nullptr)); - Array1(Plugin::InternalUse, int32_t handle); - Array1(const Array1& other); - Array1(Array1&& other); - virtual ~Array1(); - Array1& operator=(const Array1& other); - Array1& operator=(decltype(nullptr)); - Array1& operator=(Array1&& other); - bool operator==(const Array1& other) const; - bool operator!=(const Array1& other) const; - int32_t InternalLength; - Array1(System::Int32 length0); - System::Int32 GetLength(); - System::Int32 GetRank(); - Plugin::ArrayElementProxy1_1 operator[](int32_t index); - }; + namespace InteropServices + { + struct _Exception : virtual System::Object + { + _Exception(decltype(nullptr)); + _Exception(Plugin::InternalUse, int32_t handle); + _Exception(const _Exception& other); + _Exception(_Exception&& other); + virtual ~_Exception(); + _Exception& operator=(const _Exception& other); + _Exception& operator=(decltype(nullptr)); + _Exception& operator=(_Exception&& other); + bool operator==(const _Exception& other) const; + bool operator!=(const _Exception& other) const; + }; + } + } } -namespace Plugin +namespace UnityEngine { - struct UnityEngineGradientColorKeyArray1Iterator + struct GameObject : virtual UnityEngine::Object { - System::Array1& array; - int index; - UnityEngineGradientColorKeyArray1Iterator(System::Array1& array, int32_t index); - UnityEngineGradientColorKeyArray1Iterator& operator++(); - bool operator!=(const UnityEngineGradientColorKeyArray1Iterator& other); - UnityEngine::GradientColorKey operator*(); + GameObject(decltype(nullptr)); + GameObject(Plugin::InternalUse, int32_t handle); + GameObject(const GameObject& other); + GameObject(GameObject&& other); + virtual ~GameObject(); + GameObject& operator=(const GameObject& other); + GameObject& operator=(decltype(nullptr)); + GameObject& operator=(GameObject&& other); + bool operator==(const GameObject& other) const; + bool operator!=(const GameObject& other) const; + template MT0 AddComponent(); + static UnityEngine::GameObject CreatePrimitive(UnityEngine::PrimitiveType type); }; } -namespace System -{ - Plugin::UnityEngineGradientColorKeyArray1Iterator begin(System::Array1& array); - Plugin::UnityEngineGradientColorKeyArray1Iterator end(System::Array1& array); -} - -namespace System +namespace UnityEngine { - struct Action : virtual System::Object + struct Debug : virtual System::Object { - Action(decltype(nullptr)); - Action(Plugin::InternalUse, int32_t handle); - Action(const Action& other); - Action(Action&& other); - virtual ~Action(); - Action& operator=(const Action& other); - Action& operator=(decltype(nullptr)); - Action& operator=(Action&& other); - bool operator==(const Action& other) const; - bool operator!=(const Action& other) const; - int32_t CppHandle; - int32_t ClassHandle; - Action(); - void operator+=(System::Action& del); - void operator-=(System::Action& del); - virtual void operator()(); - void Invoke(); + Debug(decltype(nullptr)); + Debug(Plugin::InternalUse, int32_t handle); + Debug(const Debug& other); + Debug(Debug&& other); + virtual ~Debug(); + Debug& operator=(const Debug& other); + Debug& operator=(decltype(nullptr)); + Debug& operator=(Debug&& other); + bool operator==(const Debug& other) const; + bool operator!=(const Debug& other) const; + static void Log(System::Object& message); }; } -namespace System +namespace UnityEngine { - template<> struct Action1 : virtual System::Object + struct Behaviour : virtual UnityEngine::Component { - Action1(decltype(nullptr)); - Action1(Plugin::InternalUse, int32_t handle); - Action1(const Action1& other); - Action1(Action1&& other); - virtual ~Action1(); - Action1& operator=(const Action1& other); - Action1& operator=(decltype(nullptr)); - Action1& operator=(Action1&& other); - bool operator==(const Action1& other) const; - bool operator!=(const Action1& other) const; - int32_t CppHandle; - int32_t ClassHandle; - Action1(); - void operator+=(System::Action1& del); - void operator-=(System::Action1& del); - virtual void operator()(System::Single obj); - void Invoke(System::Single obj); + Behaviour(decltype(nullptr)); + Behaviour(Plugin::InternalUse, int32_t handle); + Behaviour(const Behaviour& other); + Behaviour(Behaviour&& other); + virtual ~Behaviour(); + Behaviour& operator=(const Behaviour& other); + Behaviour& operator=(decltype(nullptr)); + Behaviour& operator=(Behaviour&& other); + bool operator==(const Behaviour& other) const; + bool operator!=(const Behaviour& other) const; }; } -namespace System +namespace UnityEngine { - template<> struct Action2 : virtual System::Object + struct MonoBehaviour : virtual UnityEngine::Behaviour { - Action2(decltype(nullptr)); - Action2(Plugin::InternalUse, int32_t handle); - Action2(const Action2& other); - Action2(Action2&& other); - virtual ~Action2(); - Action2& operator=(const Action2& other); - Action2& operator=(decltype(nullptr)); - Action2& operator=(Action2&& other); - bool operator==(const Action2& other) const; - bool operator!=(const Action2& other) const; - int32_t CppHandle; - int32_t ClassHandle; - Action2(); - void operator+=(System::Action2& del); - void operator-=(System::Action2& del); - virtual void operator()(System::Single arg1, System::Single arg2); - void Invoke(System::Single arg1, System::Single arg2); + MonoBehaviour(decltype(nullptr)); + MonoBehaviour(Plugin::InternalUse, int32_t handle); + MonoBehaviour(const MonoBehaviour& other); + MonoBehaviour(MonoBehaviour&& other); + virtual ~MonoBehaviour(); + MonoBehaviour& operator=(const MonoBehaviour& other); + MonoBehaviour& operator=(decltype(nullptr)); + MonoBehaviour& operator=(MonoBehaviour&& other); + bool operator==(const MonoBehaviour& other) const; + bool operator!=(const MonoBehaviour& other) const; + UnityEngine::Transform GetTransform(); }; } namespace System { - template<> struct Func3 : virtual System::Object + struct Exception : virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - Func3(decltype(nullptr)); - Func3(Plugin::InternalUse, int32_t handle); - Func3(const Func3& other); - Func3(Func3&& other); - virtual ~Func3(); - Func3& operator=(const Func3& other); - Func3& operator=(decltype(nullptr)); - Func3& operator=(Func3&& other); - bool operator==(const Func3& other) const; - bool operator!=(const Func3& other) const; - int32_t CppHandle; - int32_t ClassHandle; - Func3(); - void operator+=(System::Func3& del); - void operator-=(System::Func3& del); - virtual System::Double operator()(System::Int32 arg1, System::Single arg2); - System::Double Invoke(System::Int32 arg1, System::Single arg2); + Exception(decltype(nullptr)); + Exception(Plugin::InternalUse, int32_t handle); + Exception(const Exception& other); + Exception(Exception&& other); + virtual ~Exception(); + Exception& operator=(const Exception& other); + Exception& operator=(decltype(nullptr)); + Exception& operator=(Exception&& other); + bool operator==(const Exception& other) const; + bool operator!=(const Exception& other) const; + Exception(System::String& message); }; } namespace System { - template<> struct Func3 : virtual System::Object + struct SystemException : virtual System::Exception, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - Func3(decltype(nullptr)); - Func3(Plugin::InternalUse, int32_t handle); - Func3(const Func3& other); - Func3(Func3&& other); - virtual ~Func3(); - Func3& operator=(const Func3& other); - Func3& operator=(decltype(nullptr)); - Func3& operator=(Func3&& other); - bool operator==(const Func3& other) const; - bool operator!=(const Func3& other) const; - int32_t CppHandle; - int32_t ClassHandle; - Func3(); - void operator+=(System::Func3& del); - void operator-=(System::Func3& del); - virtual System::String operator()(System::Int16 arg1, System::Int32 arg2); - System::String Invoke(System::Int16 arg1, System::Int32 arg2); + SystemException(decltype(nullptr)); + SystemException(Plugin::InternalUse, int32_t handle); + SystemException(const SystemException& other); + SystemException(SystemException&& other); + virtual ~SystemException(); + SystemException& operator=(const SystemException& other); + SystemException& operator=(decltype(nullptr)); + SystemException& operator=(SystemException&& other); + bool operator==(const SystemException& other) const; + bool operator!=(const SystemException& other) const; }; } namespace System { - struct AppDomainInitializer : virtual System::Object + struct NullReferenceException : virtual System::SystemException, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - AppDomainInitializer(decltype(nullptr)); - AppDomainInitializer(Plugin::InternalUse, int32_t handle); - AppDomainInitializer(const AppDomainInitializer& other); - AppDomainInitializer(AppDomainInitializer&& other); - virtual ~AppDomainInitializer(); - AppDomainInitializer& operator=(const AppDomainInitializer& other); - AppDomainInitializer& operator=(decltype(nullptr)); - AppDomainInitializer& operator=(AppDomainInitializer&& other); - bool operator==(const AppDomainInitializer& other) const; - bool operator!=(const AppDomainInitializer& other) const; - int32_t CppHandle; - int32_t ClassHandle; - AppDomainInitializer(); - void operator+=(System::AppDomainInitializer& del); - void operator-=(System::AppDomainInitializer& del); - virtual void operator()(System::Array1& args); - void Invoke(System::Array1& args); + NullReferenceException(decltype(nullptr)); + NullReferenceException(Plugin::InternalUse, int32_t handle); + NullReferenceException(const NullReferenceException& other); + NullReferenceException(NullReferenceException&& other); + virtual ~NullReferenceException(); + NullReferenceException& operator=(const NullReferenceException& other); + NullReferenceException& operator=(decltype(nullptr)); + NullReferenceException& operator=(NullReferenceException&& other); + bool operator==(const NullReferenceException& other) const; + bool operator!=(const NullReferenceException& other) const; }; } namespace UnityEngine { - namespace Events + struct PrimitiveType { - struct UnityAction : virtual System::Object - { - UnityAction(decltype(nullptr)); - UnityAction(Plugin::InternalUse, int32_t handle); - UnityAction(const UnityAction& other); - UnityAction(UnityAction&& other); - virtual ~UnityAction(); - UnityAction& operator=(const UnityAction& other); - UnityAction& operator=(decltype(nullptr)); - UnityAction& operator=(UnityAction&& other); - bool operator==(const UnityAction& other) const; - bool operator!=(const UnityAction& other) const; - int32_t CppHandle; - int32_t ClassHandle; - UnityAction(); - void operator+=(UnityEngine::Events::UnityAction& del); - void operator-=(UnityEngine::Events::UnityAction& del); - virtual void operator()(); - void Invoke(); - }; - } + int32_t Value; + static const UnityEngine::PrimitiveType Sphere; + static const UnityEngine::PrimitiveType Capsule; + static const UnityEngine::PrimitiveType Cylinder; + static const UnityEngine::PrimitiveType Cube; + static const UnityEngine::PrimitiveType Plane; + static const UnityEngine::PrimitiveType Quad; + explicit PrimitiveType(int32_t value); + explicit operator int32_t() const; + bool operator==(PrimitiveType other); + bool operator!=(PrimitiveType other); + explicit operator System::Enum(); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + }; } namespace UnityEngine { - namespace Events - { - template<> struct UnityAction2 : virtual System::Object - { - UnityAction2(decltype(nullptr)); - UnityAction2(Plugin::InternalUse, int32_t handle); - UnityAction2(const UnityAction2& other); - UnityAction2(UnityAction2&& other); - virtual ~UnityAction2(); - UnityAction2& operator=(const UnityAction2& other); - UnityAction2& operator=(decltype(nullptr)); - UnityAction2& operator=(UnityAction2&& other); - bool operator==(const UnityAction2& other) const; - bool operator!=(const UnityAction2& other) const; - int32_t CppHandle; - int32_t ClassHandle; - UnityAction2(); - void operator+=(UnityEngine::Events::UnityAction2& del); - void operator-=(UnityEngine::Events::UnityAction2& del); - virtual void operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); - void Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); - }; - } -} - -namespace System -{ - namespace ComponentModel - { - namespace Design - { - struct ComponentEventHandler : virtual System::Object - { - ComponentEventHandler(decltype(nullptr)); - ComponentEventHandler(Plugin::InternalUse, int32_t handle); - ComponentEventHandler(const ComponentEventHandler& other); - ComponentEventHandler(ComponentEventHandler&& other); - virtual ~ComponentEventHandler(); - ComponentEventHandler& operator=(const ComponentEventHandler& other); - ComponentEventHandler& operator=(decltype(nullptr)); - ComponentEventHandler& operator=(ComponentEventHandler&& other); - bool operator==(const ComponentEventHandler& other) const; - bool operator!=(const ComponentEventHandler& other) const; - int32_t CppHandle; - int32_t ClassHandle; - ComponentEventHandler(); - void operator+=(System::ComponentModel::Design::ComponentEventHandler& del); - void operator-=(System::ComponentModel::Design::ComponentEventHandler& del); - virtual void operator()(System::Object& sender, System::ComponentModel::Design::ComponentEventArgs& e); - void Invoke(System::Object& sender, System::ComponentModel::Design::ComponentEventArgs& e); - }; - } - } -} - -namespace System -{ - namespace ComponentModel + struct Time : virtual System::Object { - namespace Design - { - struct ComponentChangingEventHandler : virtual System::Object - { - ComponentChangingEventHandler(decltype(nullptr)); - ComponentChangingEventHandler(Plugin::InternalUse, int32_t handle); - ComponentChangingEventHandler(const ComponentChangingEventHandler& other); - ComponentChangingEventHandler(ComponentChangingEventHandler&& other); - virtual ~ComponentChangingEventHandler(); - ComponentChangingEventHandler& operator=(const ComponentChangingEventHandler& other); - ComponentChangingEventHandler& operator=(decltype(nullptr)); - ComponentChangingEventHandler& operator=(ComponentChangingEventHandler&& other); - bool operator==(const ComponentChangingEventHandler& other) const; - bool operator!=(const ComponentChangingEventHandler& other) const; - int32_t CppHandle; - int32_t ClassHandle; - ComponentChangingEventHandler(); - void operator+=(System::ComponentModel::Design::ComponentChangingEventHandler& del); - void operator-=(System::ComponentModel::Design::ComponentChangingEventHandler& del); - virtual void operator()(System::Object& sender, System::ComponentModel::Design::ComponentChangingEventArgs& e); - void Invoke(System::Object& sender, System::ComponentModel::Design::ComponentChangingEventArgs& e); - }; - } - } + Time(decltype(nullptr)); + Time(Plugin::InternalUse, int32_t handle); + Time(const Time& other); + Time(Time&& other); + virtual ~Time(); + Time& operator=(const Time& other); + Time& operator=(decltype(nullptr)); + Time& operator=(Time&& other); + bool operator==(const Time& other) const; + bool operator!=(const Time& other) const; + static System::Single GetDeltaTime(); + }; } -namespace System +namespace MyGame { - namespace ComponentModel + struct AbstractBaseBallScript : virtual UnityEngine::MonoBehaviour { - namespace Design - { - struct ComponentChangedEventHandler : virtual System::Object - { - ComponentChangedEventHandler(decltype(nullptr)); - ComponentChangedEventHandler(Plugin::InternalUse, int32_t handle); - ComponentChangedEventHandler(const ComponentChangedEventHandler& other); - ComponentChangedEventHandler(ComponentChangedEventHandler&& other); - virtual ~ComponentChangedEventHandler(); - ComponentChangedEventHandler& operator=(const ComponentChangedEventHandler& other); - ComponentChangedEventHandler& operator=(decltype(nullptr)); - ComponentChangedEventHandler& operator=(ComponentChangedEventHandler&& other); - bool operator==(const ComponentChangedEventHandler& other) const; - bool operator!=(const ComponentChangedEventHandler& other) const; - int32_t CppHandle; - int32_t ClassHandle; - ComponentChangedEventHandler(); - void operator+=(System::ComponentModel::Design::ComponentChangedEventHandler& del); - void operator-=(System::ComponentModel::Design::ComponentChangedEventHandler& del); - virtual void operator()(System::Object& sender, System::ComponentModel::Design::ComponentChangedEventArgs& e); - void Invoke(System::Object& sender, System::ComponentModel::Design::ComponentChangedEventArgs& e); - }; - } - } + AbstractBaseBallScript(decltype(nullptr)); + AbstractBaseBallScript(Plugin::InternalUse, int32_t handle); + AbstractBaseBallScript(const AbstractBaseBallScript& other); + AbstractBaseBallScript(AbstractBaseBallScript&& other); + virtual ~AbstractBaseBallScript(); + AbstractBaseBallScript& operator=(const AbstractBaseBallScript& other); + AbstractBaseBallScript& operator=(decltype(nullptr)); + AbstractBaseBallScript& operator=(AbstractBaseBallScript&& other); + bool operator==(const AbstractBaseBallScript& other) const; + bool operator!=(const AbstractBaseBallScript& other) const; + }; } -namespace System +namespace MyGame { - namespace ComponentModel - { - namespace Design - { - struct ComponentRenameEventHandler : virtual System::Object - { - ComponentRenameEventHandler(decltype(nullptr)); - ComponentRenameEventHandler(Plugin::InternalUse, int32_t handle); - ComponentRenameEventHandler(const ComponentRenameEventHandler& other); - ComponentRenameEventHandler(ComponentRenameEventHandler&& other); - virtual ~ComponentRenameEventHandler(); - ComponentRenameEventHandler& operator=(const ComponentRenameEventHandler& other); - ComponentRenameEventHandler& operator=(decltype(nullptr)); - ComponentRenameEventHandler& operator=(ComponentRenameEventHandler&& other); - bool operator==(const ComponentRenameEventHandler& other) const; - bool operator!=(const ComponentRenameEventHandler& other) const; - int32_t CppHandle; - int32_t ClassHandle; - ComponentRenameEventHandler(); - void operator+=(System::ComponentModel::Design::ComponentRenameEventHandler& del); - void operator-=(System::ComponentModel::Design::ComponentRenameEventHandler& del); - virtual void operator()(System::Object& sender, System::ComponentModel::Design::ComponentRenameEventArgs& e); - void Invoke(System::Object& sender, System::ComponentModel::Design::ComponentRenameEventArgs& e); - }; - } - } + struct BaseBallScript : virtual MyGame::AbstractBaseBallScript + { + BaseBallScript(decltype(nullptr)); + BaseBallScript(Plugin::InternalUse, int32_t handle); + BaseBallScript(const BaseBallScript& other); + BaseBallScript(BaseBallScript&& other); + virtual ~BaseBallScript(); + BaseBallScript& operator=(const BaseBallScript& other); + BaseBallScript& operator=(decltype(nullptr)); + BaseBallScript& operator=(BaseBallScript&& other); + bool operator==(const BaseBallScript& other) const; + bool operator!=(const BaseBallScript& other) const; + int32_t CppHandle; + BaseBallScript(); + virtual void Update(); + }; } /*END TYPE DEFINITIONS*/ +/*BEGIN MACROS*/ +#define MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR_DECLARATION \ + BallScript(Plugin::InternalUse iu, int32_t handle); + +#define MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR_DEFINITION \ + BallScript::BallScript(Plugin::InternalUse iu, int32_t handle) \ + : UnityEngine::Object(nullptr) \ + , UnityEngine::Component(nullptr) \ + , UnityEngine::Behaviour(nullptr) \ + , UnityEngine::MonoBehaviour(nullptr) \ + , MyGame::AbstractBaseBallScript(nullptr) \ + , MyGame::BaseBallScript(iu, handle) +#define MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR \ + BallScript(Plugin::InternalUse iu, int32_t handle) \ + : UnityEngine::Object(nullptr) \ + , UnityEngine::Component(nullptr) \ + , UnityEngine::Behaviour(nullptr) \ + , UnityEngine::MonoBehaviour(nullptr) \ + , MyGame::AbstractBaseBallScript(nullptr) \ + , MyGame::BaseBallScript(iu, handle) \ + { \ + } \ +/*END MACROS*/ + //////////////////////////////////////////////////////////////// // Support for using IEnumerable with range for loops //////////////////////////////////////////////////////////////// diff --git a/Unity/ProjectSettings/EditorBuildSettings.asset b/Unity/ProjectSettings/EditorBuildSettings.asset index 990bcc2..c813dae 100644 --- a/Unity/ProjectSettings/EditorBuildSettings.asset +++ b/Unity/ProjectSettings/EditorBuildSettings.asset @@ -5,6 +5,6 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 1 - path: Assets/TestScene.unity + - enabled: 0 + path: guid: 00000000000000000000000000000000 From ac7bb116bafcf57ededd6c0467b9bfcdd8382079 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Mon, 19 Mar 2018 00:29:04 -0700 Subject: [PATCH 04/41] Support type overloading and decimal --- README.md | 79 +- Unity/Assets/NativeScript/Bindings.cs | 133 + .../NativeScript/Editor/GenerateBindings.cs | 1669 +++++------ Unity/Assets/NativeScriptTypes.json | 155 + Unity/CppSource/NativeScript/Bindings.cpp | 2638 ++++++++++++++++- Unity/CppSource/NativeScript/Bindings.h | 643 ++++ 6 files changed, 4309 insertions(+), 1008 deletions(-) diff --git a/README.md b/README.md index dd0bb7b..d07f917 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,11 @@ While IL2CPP transforms C# into C++ already, it generates a lot of overhead. The ## Industry Standard Language -C++ is the standard language for video games as well as many other fields. By programming in C++ you can more easily transfer your skills and code to and from non-Unity projects. For example, you can avoid lock-in by using the same language (C++) that you'd use in the Unreal or Lumberyard engines. +C++ is the standard language for video games as well as many other fields. By programming in C++ you can more easily transfer your skills and code to and from non-Unity projects. For example, you can avoid lock-in by using the same language (C++) that you'd use in the [Unreal](https://www.unrealengine.com) or [Lumberyard](https://aws.amazon.com/lumberyard/) engines. # UnityNativeScripting Features +* Code generator exposes any C# API to C++ * Supports Windows, macOS, Linux, iOS, and Android (editor and standalone) * Works with Unity 2017.x and 5.x * Plays nice with other C# scripts- no need to use 100% C++ @@ -85,26 +86,48 @@ C++ is the standard language for video games as well as many other fields. By pr * Platform-dependent compilation via the [usual flags](https://docs.unity3d.com/Manual/PlatformDependentCompilation.html) (e.g. `#if UNITY_EDITOR`) * [CMake](https://cmake.org/) build system sets up any IDE project or command-line build -* Code generator exposes any C# API (Unity, .NET, custom DLLs) with a simple JSON config file and runs from a menu in the Unity editor. It supports a wide range of features: - * Class types - * Struct types - * Enumeration types - * Base classes - * Constructors - * Methods - * Fields - * Properties (getters and setters) - * `out` and `ref` parameters - * Exceptions - * Overloaded operators - * Arrays (single- and multi-dimensional) - * Delegates - * Events - * Boxing and unboxing (e.g. casting `int` to `object` and visa versa) - * Implementing C# interfaces with C++ classes - * Deriving from C# classes with C++ classes - * Default parameters - * Generic types and methods + +# Code Generator + +The core of this project is a code generator. It generates C# and C++ code called "bindings" that make C# APIs available to C++ game code. It supports a wide range of language features: + +* Types + * `class` + * `struct` + * `enum` + * Arrays (single- and multi-dimensional) + * Delegates (e.g. `Action`) + * `decimal` +* Type Contents + * Constructors + * Methods + * Fields + * Properties (`get` and `set` like `obj.x`) + * Indexers (`get` and `set` like `obj[x]`) + * Events (`add` and `remove` delegates) + * Overloaded operators + * Boxing and unboxing (e.g. casting `int` to `object` and visa versa) +* Function Features + * `out` and `ref` parameters + * Generic types and methods + * Default parameters +* Cross-Language Features + * Exceptions (C# to C++ and C++ to C#) + * Implementing C# interfaces with C++ classes + * Deriving from C# classes with C++ classes + +Note that the code generator does not yet support: + +* `Array`, `string`, and `object` methods (e.g. `GetHashCode`) +* Non-null string default parameters and null non-string default parameters +* Implicit `params` parameter (a.k.a. "var args") passing +* C# pointers +* Nested types +* Down-casting + +To configure the code generator, open `Unity/Assets/NativeScriptTypes.json` and notice the existing examples. Add on to this file to expose more C# APIs from Unity, .NET, or custom DLLs to your C++ code. + +To run the code generator, choose `NativeScript > Generate Bindings` from the Unity editor. # Performance @@ -194,20 +217,6 @@ With C++, the workflow looks like this: 6. The build scripts or IDE project files are now generated in your build directory 7. Build as appropriate for your generator. For example, execute `make` if you chose `Unix Makefiles` as your generator. -# The Code Generator - -To run the code generator, choose `NativeScript > Generate Bindings` from the Unity editor. - -To configure the code generator, open `NativeScriptTypes.json` and notice the existing examples. Add on to this file to expose more C# APIs from Unity, .NET, or custom DLLs to your C++ code. - -Note that the code generator does not support (yet): - -* `Array`, `string`, and `object` methods (e.g. `GetHashCode`) -* Non-null string default parameters and null non-string default parameters -* Implicit `params` parameter (a.k.a. "var args") passing -* `decimal` -* C# pointers - # Updating To A New Version To update to a new version of this project, overwrite your Unity project's `Assets/NativeScript` directory with this project's `Unity/Assets/NativeScript` directory and re-run the code generator. diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 0b877fd..4d182da 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -334,6 +334,11 @@ delegate void InitDelegate( IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ int maxManagedObjects, + IntPtr releaseSystemDecimal, + IntPtr systemDecimalConstructorSystemDouble, + IntPtr systemDecimalConstructorSystemUInt64, + IntPtr boxDecimal, + IntPtr unboxDecimal, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, IntPtr boxVector3, @@ -498,6 +503,11 @@ static extern void Init( IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ int maxManagedObjects, + IntPtr releaseSystemDecimal, + IntPtr systemDecimalConstructorSystemDouble, + IntPtr systemDecimalConstructorSystemUInt64, + IntPtr boxDecimal, + IntPtr unboxDecimal, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, IntPtr boxVector3, @@ -570,6 +580,11 @@ IntPtr unboxDouble delegate int EnumerableGetEnumeratorDelegate(int handle); /*BEGIN DELEGATE TYPES*/ + delegate void ReleaseSystemDecimalDelegate(int handle); + delegate int SystemDecimalConstructorSystemDoubleDelegate(double value); + delegate int SystemDecimalConstructorSystemUInt64Delegate(ulong value); + delegate int BoxDecimalDelegate(int valHandle); + delegate int UnboxDecimalDelegate(int valHandle); delegate UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(float x, float y, float z); delegate UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b); delegate int BoxVector3Delegate(ref UnityEngine.Vector3 val); @@ -641,6 +656,7 @@ public static void Open(int memorySize) { /*BEGIN STORE INIT CALLS*/ NativeScript.Bindings.ObjectStore.Init(1000); + NativeScript.Bindings.StructStore.Init(1000); /*END STORE INIT CALLS*/ // Allocate unmanaged memory @@ -744,6 +760,11 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new EnumerableGetEnumeratorDelegate(EnumerableGetEnumerator)), /*BEGIN INIT CALL*/ 1000, + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemDecimalDelegate(ReleaseSystemDecimal)), + Marshal.GetFunctionPointerForDelegate(new SystemDecimalConstructorSystemDoubleDelegate(SystemDecimalConstructorSystemDouble)), + Marshal.GetFunctionPointerForDelegate(new SystemDecimalConstructorSystemUInt64Delegate(SystemDecimalConstructorSystemUInt64)), + Marshal.GetFunctionPointerForDelegate(new BoxDecimalDelegate(BoxDecimal)), + Marshal.GetFunctionPointerForDelegate(new UnboxDecimalDelegate(UnboxDecimal)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)), Marshal.GetFunctionPointerForDelegate(new BoxVector3Delegate(BoxVector3)), @@ -918,6 +939,118 @@ static int EnumerableGetEnumerator(int handle) } /*BEGIN FUNCTIONS*/ + [MonoPInvokeCallback(typeof(ReleaseSystemDecimalDelegate))] + static void ReleaseSystemDecimal(int handle) + { + try + { + if (handle != 0) + { + NativeScript.Bindings.StructStore.Remove(handle); + } + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + } + + [MonoPInvokeCallback(typeof(SystemDecimalConstructorSystemDoubleDelegate))] + static int SystemDecimalConstructorSystemDouble(double value) + { + try + { + var returnValue = NativeScript.Bindings.StructStore.Store(new System.Decimal(value)); + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + + [MonoPInvokeCallback(typeof(SystemDecimalConstructorSystemUInt64Delegate))] + static int SystemDecimalConstructorSystemUInt64(ulong value) + { + try + { + var returnValue = NativeScript.Bindings.StructStore.Store(new System.Decimal(value)); + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + + [MonoPInvokeCallback(typeof(BoxDecimalDelegate))] + static int BoxDecimal(int valHandle) + { + try + { + var val = (System.Decimal)NativeScript.Bindings.StructStore.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + + [MonoPInvokeCallback(typeof(UnboxDecimalDelegate))] + static int UnboxDecimal(int valHandle) + { + try + { + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = NativeScript.Bindings.StructStore.Store((System.Decimal)val); + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); + } + } + [MonoPInvokeCallback(typeof(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate))] static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(float x, float y, float z) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 42d933e..7bd5513 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -248,6 +248,13 @@ int IComparer.Compare(object x, object y) } } + struct TypeName + { + public string Name; + public string Namespace; + public int NumTypeParams; + } + const int DEFAULT_MAX_SIMULTANEOUS = 1000; const int DEFAULT_MAX_SIMULTANEOUS_OBJECTS = 1000; @@ -373,20 +380,10 @@ static void AppendStubs( foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) { string typeFullName = jsonType.Name; - string typeName; - string typeNamespace; - SplitJsonTypeName( - typeFullName, - out typeName, - out typeNamespace); + TypeName typeName = SplitJsonTypeName(typeFullName); string baseTypeFullName = jsonBaseType.BaseName; - string baseTypeName; - string baseTypeNamespace; - SplitJsonTypeName( - baseTypeFullName, - out baseTypeName, - out baseTypeNamespace); + TypeName baseTypeName = SplitJsonTypeName(baseTypeFullName); Type type = GetType(typeFullName, assemblies); @@ -395,12 +392,8 @@ static void AppendStubs( assemblies); AppendStubBaseType( - typeFullName, typeName, - typeNamespace, - baseTypeFullName, baseTypeName, - baseTypeNamespace, typeParams, type, timestamp, @@ -415,19 +408,15 @@ static void AppendStubs( } static void AppendStubBaseType( - string typeFullName, - string typeName, - string typeNamespace, - string baseTypeFullName, - string baseTypeName, - string baseTypeNamespace, + TypeName typeName, + TypeName baseTypeName, Type[] typeParams, Type type, string timestamp, StringBuilder output) { int indent = AppendNamespaceBeginning( - baseTypeNamespace, + baseTypeName.Namespace, output); AppendIndent(indent, output); if (type.IsClass) @@ -438,10 +427,9 @@ static void AppendStubBaseType( { output.Append("public interface "); } - output.Append(baseTypeName); + output.Append(baseTypeName.Name); output.Append(" : "); - AppendCsharpTypeName( - typeNamespace, + AppendCsharpTypeFullName( typeName, output); AppendCSharpTypeParameters( @@ -468,7 +456,7 @@ static void AppendStubBaseType( ParameterInfo[] ctorParams = ConvertParameters( ctor.GetParameters()); output.Append("\t\t"); - output.Append(baseTypeName); + output.Append(baseTypeName.Name); output.Append('('); AppendCsharpParams( ctorParams, @@ -552,19 +540,14 @@ static void DoPostCompileWork(bool canRefreshAssetDb) Type[] genericArgTypes = type.GetGenericArguments(); foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) { - string baseTypeName; - string baseTypeNamespace; - GetBaseTypeBaseNameAndNamespace( + TypeName baseTypeTypeName = GetBaseTypeBaseNameAndNamespace( jsonBaseType, type, genericArgTypes, - builders.TempStrBuilder, - out baseTypeName, - out baseTypeNamespace); + builders.TempStrBuilder); AppendBaseType( type, - baseTypeName, - baseTypeNamespace, + baseTypeTypeName, jsonBaseType, assemblies, defaultMaxSimultaneous, @@ -850,7 +833,7 @@ System.Reflection.ParameterInfo[] reflectionParams // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Constructor \""); - AppendCsharpTypeName(type, errorBuilder); + AppendCsharpTypeFullName(type, errorBuilder); errorBuilder.Append('('); for (int i = 0; i < paramTypeNames.Length; ++i) { @@ -899,7 +882,7 @@ static MethodInfo GetMethod( // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Method \""); - AppendCsharpTypeName(type, errorBuilder); + AppendCsharpTypeFullName(type, errorBuilder); errorBuilder.Append('.'); errorBuilder.Append(methodName); errorBuilder.Append('('); @@ -982,7 +965,7 @@ static void AppendCppConstructorInitializerList( indent, output); output.Append(separator); - AppendCppTypeName( + AppendCppTypeFullName( interfaceType, output); output.Append("(nullptr)"); @@ -1132,22 +1115,17 @@ static void AppendTypeNames( } } - static void GetBaseTypeBaseNameAndNamespace( + static TypeName GetBaseTypeBaseNameAndNamespace( JsonBaseType jsonBaseType, Type type, Type[] typeParams, - StringBuilder tempStringBuilder, - out string baseTypeName, - out string baseTypeNamespace) + StringBuilder tempStringBuilder) { // Get specified (optional) base type name - SplitJsonTypeName( - jsonBaseType.BaseName, - out baseTypeName, - out baseTypeNamespace); + TypeName baseTypeTypeName = SplitJsonTypeName(jsonBaseType.BaseName); // If base type name isn't provided, make one - if (string.IsNullOrEmpty(baseTypeName)) + if (string.IsNullOrEmpty(baseTypeTypeName.Name)) { tempStringBuilder.Length = 0; AppendNamespace( @@ -1161,8 +1139,11 @@ static void GetBaseTypeBaseNameAndNamespace( AppendTypeNames( typeParams, tempStringBuilder); - baseTypeName = tempStringBuilder.ToString(); + baseTypeTypeName.Name = tempStringBuilder.ToString(); } + + baseTypeTypeName.NumTypeParams = typeParams.Length; + return baseTypeTypeName; } static void AppendNamespace( @@ -1203,11 +1184,11 @@ static void AppendNamespace( } } - static void SplitJsonTypeName( - string fullName, - out string typeName, - out string typeNamespace) + static TypeName SplitJsonTypeName(string fullName) { + string typeName; + string typeNamespace; + // No full name if (string.IsNullOrEmpty(fullName)) { @@ -1230,6 +1211,8 @@ static void SplitJsonTypeName( typeNamespace = string.Empty; } } + + return GetTypeName(typeName, typeNamespace); } static ParameterInfo[] ConvertParameters( @@ -1294,6 +1277,38 @@ static ParameterInfo[] ConvertParameters( } return parameters; } + + static TypeName GetTypeName(Type type) + { + TypeName typeName; + typeName.Name = type.Name; + typeName.Namespace = type.Namespace; + typeName.NumTypeParams = type.GetGenericArguments().Length; + return typeName; + } + + static TypeName GetTypeName( + string name, + string namespaceName) + { + TypeName typeName; + typeName.Name = name; + typeName.Namespace = namespaceName; + typeName.NumTypeParams = 0; + return typeName; + } + + static TypeName GetTypeName( + string name, + string namespaceName, + int numTypeParams) + { + TypeName typeName; + typeName.Name = name; + typeName.Namespace = namespaceName; + typeName.NumTypeParams = numTypeParams; + return typeName; + } static bool IsStatic(Type type) { @@ -1441,9 +1456,7 @@ static int AppendType( if (!IsStatic(type)) { AppendCppTemplateDeclaration( - type.Name, - type.Namespace, - genericArgTypes.Length, + GetTypeName(type), builders.CppTemplateDeclarations); } @@ -1523,7 +1536,7 @@ static void AppendType( // C# StructStore Init call builders.CsharpStoreInitCalls.Append( "\t\t\tNativeScript.Bindings.StructStore<"); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpStoreInitCalls); builders.CsharpStoreInitCalls.Append(">.Init("); @@ -1533,8 +1546,7 @@ static void AppendType( // Build function name suffix builders.TempStrBuilder.Length = 0; AppendReleaseFunctionNameSuffix( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, builders.TempStrBuilder); string funcNameSuffix = builders.TempStrBuilder.ToString(); @@ -1543,8 +1555,7 @@ static void AppendType( builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Release"); AppendReleaseFunctionNameSuffix( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); @@ -1587,7 +1598,7 @@ static void AppendType( "if (handle != 0)\n\t\t\t{\n"); builders.CsharpFunctions.Append( "\t\t\t\tNativeScript.Bindings.StructStore<"); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpFunctions); builders.CsharpFunctions.Append( @@ -1602,8 +1613,7 @@ static void AppendType( AppendCppFunctionPointerDefinition( funcName, true, - null, - null, + default(TypeName), TypeKind.None, parameters, typeof(void), @@ -1613,8 +1623,7 @@ static void AppendType( AppendCppInitParam( funcNameLower, true, - null, - null, + default(TypeName), TypeKind.None, parameters, typeof(void), @@ -1693,8 +1702,7 @@ static void AppendType( // C++ type declaration int indent = AppendCppTypeDeclaration( - type.Namespace, - type.Name, + GetTypeName(type), isStatic, typeParams, typeParams != null ? @@ -1736,12 +1744,10 @@ static void AppendType( } AppendCppTypeDefinitionBegin( - type.Name, - type.Namespace, + GetTypeName(type), typeKind, typeParams, - baseTypeName, - baseTypeNamespace, + GetTypeName(baseTypeName, baseTypeNamespace), baseTypeTypeParams, interfaceTypes, isStatic, @@ -1753,8 +1759,7 @@ static void AppendType( type, false); int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( - type.Name, - type.Namespace, + GetTypeName(type), typeKind, typeParams, cppCtorInterfaceTypes, @@ -1931,8 +1936,7 @@ static void AppendType( static void AppendBaseType( Type type, - string cppBaseTypeName, - string cppBaseTypeNamespace, + TypeName cppBaseTypeTypeName, JsonBaseType jsonBaseType, Assembly[] assemblies, int defaultMaxSimultaneous, @@ -1950,8 +1954,7 @@ static void AppendBaseType( AppendBaseType( genericType, jsonBaseType, - cppBaseTypeName, - cppBaseTypeNamespace, + cppBaseTypeTypeName, typeParams, maxSimultaneous, assemblies, @@ -1962,8 +1965,7 @@ static void AppendBaseType( AppendBaseType( type, jsonBaseType, - cppBaseTypeName, - cppBaseTypeNamespace, + cppBaseTypeTypeName, null, maxSimultaneous, assemblies, @@ -1972,17 +1974,16 @@ static void AppendBaseType( } static void AppendReleaseFunctionNameSuffix( - string typeName, - string typeNamespace, + TypeName typeTypeName, Type[] typeParams, StringBuilder output) { AppendNamespace( - typeNamespace, + typeTypeName.Namespace, string.Empty, output); AppendTypeNameWithoutSuffixes( - typeName, + typeTypeName.Name, output); if (typeParams != null) { @@ -2010,20 +2011,17 @@ static void AppendEnum( { // C++ type declaration int indent = AppendCppTypeDeclaration( - type.Namespace, - type.Name, + GetTypeName(type), false, null, builders.CppTypeDeclarations); // C++ type definition (begin) AppendCppTypeDefinitionBegin( - type.Name, - type.Namespace, + GetTypeName(type), TypeKind.FullStruct, null, - null, - null, + default(TypeName), null, null, false, @@ -2051,7 +2049,7 @@ static void AppendEnum( indent + 1, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("static const "); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(' '); @@ -2134,7 +2132,7 @@ static void AppendEnum( AppendIndent( indent, builders.CppMethodDefinitions); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("::operator "); @@ -2164,7 +2162,7 @@ static void AppendEnum( indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("bool "); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("::operator==("); @@ -2192,7 +2190,7 @@ static void AppendEnum( indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("bool "); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("::operator!=("); @@ -2239,11 +2237,11 @@ static void AppendEnum( { FieldInfo field = fields[i]; builders.CppMethodDefinitions.Append("const "); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(' '); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("::"); @@ -2406,8 +2404,7 @@ static void AppendBoxingBindings( AppendCppFunctionPointerDefinition( boxFuncName, true, - type.Name, - type.Namespace, + GetTypeName(type), typeKind, boxParams, typeof(object), @@ -2417,8 +2414,7 @@ static void AppendBoxingBindings( AppendCppInitParam( boxFuncNameLower, true, - type.Name, - type.Namespace, + GetTypeName(type), typeKind, boxParams, typeof(object), @@ -2453,7 +2449,7 @@ static void AppendUnboxing( builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("operator "); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.TempStrBuilder); string unboxMethodDefinitionName = builders.TempStrBuilder.ToString(); @@ -2514,14 +2510,14 @@ static void AppendUnboxing( type, builders.CsharpFunctions); builders.CsharpFunctions.Append(".Store(("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpFunctions); builders.CsharpFunctions.Append(")val);"); break; default: builders.CsharpFunctions.Append('('); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpFunctions); builders.CsharpFunctions.Append(")val;"); @@ -2539,8 +2535,7 @@ static void AppendUnboxing( AppendCppFunctionPointerDefinition( unboxFuncName, true, - type.Name, - type.Namespace, + GetTypeName(type), typeKind, unboxParams, type, @@ -2563,7 +2558,7 @@ static void AppendUnboxing( "System", builders.CppMethodDefinitions); AppendCppMethodDefinitionBegin( - "Object", + GetTypeName(typeof(object)), null, unboxMethodDefinitionName, null, @@ -2578,7 +2573,7 @@ static void AppendUnboxing( AppendIndent( indent + 1, builders.CppMethodDefinitions); - AppendCppTypeName( + AppendCppTypeFullName( type, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(" returnVal("); @@ -2610,8 +2605,7 @@ static void AppendUnboxing( AppendCppInitParam( unboxFuncNameLower, true, - type.Name, - type.Namespace, + GetTypeName(type), typeKind, unboxParams, type, @@ -2632,7 +2626,7 @@ static void AppendCppBoxingMethodNames( { tempBuilder.Length = 0; tempBuilder.Append("operator "); - AppendCppTypeName( + AppendCppTypeFullName( baseType, tempBuilder); boxMethodDefinitionName = tempBuilder.ToString(); @@ -2675,7 +2669,7 @@ static void AppendCppBoxingMethodDefinition( StringBuilder output) { AppendCppMethodDefinitionBegin( - enclosingType.Name, + GetTypeName(enclosingType), null, boxMethodDefinitionName, enclosingTypeTypeParams, @@ -2719,8 +2713,7 @@ static void AppendCppBoxingMethodDefinition( indent + 2, output); AppendReferenceManagedHandleFunctionCall( - "Object", - "System", + GetTypeName(typeof(object)), TypeKind.Class, null, "handle", @@ -2730,7 +2723,7 @@ static void AppendCppBoxingMethodDefinition( indent + 2, output); output.Append("return "); - AppendCppTypeName( + AppendCppTypeFullName( boxedType, output); output.Append("(Plugin::InternalUse::Only, handle);\n"); @@ -2761,7 +2754,7 @@ static void AppendHandleStoreTypeName( if (IsManagedValueType(type)) { output.Append("StructStore<"); - AppendCsharpTypeName(type, output); + AppendCsharpTypeFullName(type, output); output.Append('>'); } else @@ -2839,6 +2832,15 @@ static void AppendConstructor( builders.TempStrBuilder[0] = char.ToLower( builders.TempStrBuilder[0]); string funcNameLower = builders.TempStrBuilder.ToString(); + + TypeName enclosingTypeTypeName = GetTypeName(enclosingType); + + // Build C++ constructor method name + builders.TempStrBuilder.Length = 0; + AppendCppTypeName( + enclosingTypeTypeName, + builders.TempStrBuilder); + string cppMethodName = builders.TempStrBuilder.ToString(); // C# init param declaration AppendCsharpInitParam( @@ -2879,7 +2881,7 @@ static void AppendConstructor( parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append("new "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( enclosingType, builders.CsharpFunctions); builders.CsharpFunctions.Append('('); @@ -2910,7 +2912,7 @@ static void AppendConstructor( builders.CsharpFunctions); builders.CsharpFunctions.Append( ".Store(new "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( enclosingType, builders.CsharpFunctions); builders.CsharpFunctions.Append('('); @@ -2931,8 +2933,7 @@ static void AppendConstructor( AppendCppFunctionPointerDefinition( funcName, true, - enclosingType.Name, - enclosingType.Namespace, + enclosingTypeTypeName, enclosingTypeKind, parameters, enclosingType, @@ -2943,7 +2944,7 @@ static void AppendConstructor( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - enclosingType.Name, + cppMethodName, enclosingTypeIsStatic, false, false, @@ -2954,15 +2955,15 @@ static void AppendConstructor( // C++ method definition AppendCppMethodDefinitionBegin( - enclosingType.Name, + GetTypeName(enclosingType), null, - enclosingType.Name, + cppMethodName, enclosingTypeParams, null, parameters, indent, builders.CppMethodDefinitions); - if (enclosingTypeKind != TypeKind.FullStruct) + if (enclosingTypeKind == TypeKind.Class) { AppendCppConstructorInitializerList( interfaceTypes, @@ -2975,8 +2976,7 @@ static void AppendConstructor( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( true, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, enclosingTypeParams, enclosingType, @@ -3013,8 +3013,7 @@ static void AppendConstructor( indent + 2, builders.CppMethodDefinitions); AppendReferenceManagedHandleFunctionCall( - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, enclosingTypeParams, "returnValue", @@ -3039,8 +3038,7 @@ static void AppendConstructor( AppendCppInitParam( funcNameLower, true, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, parameters, enclosingType, @@ -3273,7 +3271,7 @@ static void AppendFullValueTypeFields( AppendIndent( indent, builders.CppTypeDefinitions); - AppendCppTypeName( + AppendCppTypeFullName( field.FieldType, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(' '); @@ -3476,8 +3474,7 @@ static void AppendEventAddRemoveMethod( AppendCppFunctionPointerDefinition( funcName, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, methodParams, typeof(void), @@ -3504,7 +3501,7 @@ static void AppendEventAddRemoveMethod( // C++ method definition AppendCppMethodDefinitionBegin( - enclosingType.Name, + GetTypeName(enclosingType), cppReturnType, cppMethodName, typeTypeParams, @@ -3518,8 +3515,7 @@ static void AppendEventAddRemoveMethod( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, typeTypeParams, typeof(void), @@ -3536,8 +3532,7 @@ static void AppendEventAddRemoveMethod( AppendCppInitParam( funcNameLower, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, methodParams, typeof(void), @@ -4036,8 +4031,7 @@ static void AppendMethod( AppendCppFunctionPointerDefinition( funcName, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, parameters, returnType, @@ -4074,7 +4068,7 @@ static void AppendMethod( case "op_Implicit": builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("operator "); - AppendCppTypeName( + AppendCppTypeFullName( returnType, builders.TempStrBuilder); cppMethodName = builders.TempStrBuilder.ToString(); @@ -4083,7 +4077,7 @@ static void AppendMethod( case "op_Explicit": builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("explicit operator "); - AppendCppTypeName( + AppendCppTypeFullName( returnType, builders.TempStrBuilder); cppMethodName = builders.TempStrBuilder.ToString(); @@ -4219,7 +4213,7 @@ static void AppendMethod( // C++ method definition AppendCppMethodDefinitionBegin( - enclosingType.Name, + GetTypeName(enclosingType), cppReturnType, cppMethodName, enclosingTypeParams, @@ -4233,8 +4227,7 @@ static void AppendMethod( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, enclosingTypeParams, returnType, @@ -4256,8 +4249,7 @@ static void AppendMethod( AppendCppInitParam( funcNameLower, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, parameters, returnType, @@ -4281,7 +4273,7 @@ StringBuilder output for (int i = 0; i < typeParams.Length; ++i) { Type typeParam = typeParams[i]; - AppendCsharpTypeName(typeParam, output); + AppendCsharpTypeFullName(typeParam, output); if (i != typeParams.Length - 1) { output.Append(", "); @@ -4301,7 +4293,7 @@ static void AppendCppTypeParameters( for (int i = 0; i < typeParams.Length; ++i) { Type typeParam = typeParams[i]; - AppendCppTypeName(typeParam, output); + AppendCppTypeFullName(typeParam, output); if (i != typeParams.Length - 1) { output.Append(", "); @@ -4472,7 +4464,7 @@ static void AppendArray( // Build array name with element type builders.TempStrBuilder.Append('<'); - AppendCppTypeName( + AppendCppTypeFullName( elementType, builders.TempStrBuilder); builders.TempStrBuilder.Append('>'); @@ -4489,11 +4481,14 @@ static void AppendArray( // Build "TypeArray" name builders.TempStrBuilder.Length = 0; - AppendBindingArrayTypeName( - elementType.Name, + AppendNamespace( elementType.Namespace, - cppArrayTypeName, + string.Empty, + builders.TempStrBuilder); + AppendTypeNameWithoutGenericSuffix( + elementType.Name, builders.TempStrBuilder); + builders.TempStrBuilder.Append(cppArrayTypeName); string bindingArrayTypeName = builders.TempStrBuilder.ToString(); // MakeArrayType() creates a Type for a "vector" @@ -4514,8 +4509,7 @@ static void AppendArray( // C++ type declaration int indent = AppendCppTypeDeclaration( - "System", - cppArrayTypeName, + GetTypeName(cppArrayTypeName, "System"), false, cppTypeParams, cppTypeParams != null ? @@ -4525,12 +4519,10 @@ static void AppendArray( // C++ type definition (beginning) Type[] interfaceTypes = GetDirectInterfaces(arrayType); AppendCppTypeDefinitionBegin( - cppArrayTypeName, - "System", + GetTypeName(cppArrayTypeName, "System"), TypeKind.Class, cppTypeParams, - "Array", - "System", + GetTypeName("Array", "System"), null, interfaceTypes, false, @@ -4542,8 +4534,7 @@ static void AppendArray( arrayType, false); int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( - cppArrayTypeName, - "System", + GetTypeName(cppArrayTypeName, "System"), TypeKind.Class, cppTypeParams, cppCtorInitTypes, @@ -4693,8 +4684,7 @@ static void AppendArray( AppendCppArrayIndexOperatorMethodDefinition( 0, cppMethodDefinitionsIndent, - cppGenericArrayTypeName, - "System", + GetTypeName(cppGenericArrayTypeName, "System"), cppElementProxyTypeName, builders.CppMethodDefinitions); @@ -4751,7 +4741,7 @@ static void AppendArrayIterator( cppTypeDefinitions.Append(bindingArrayTypeName); cppTypeDefinitions.Append("Iterator& other);\n"); cppTypeDefinitions.Append("\t\t"); - AppendCppTypeName( + AppendCppTypeFullName( elementType, cppTypeDefinitions); cppTypeDefinitions.Append(" operator*();\n"); @@ -4812,7 +4802,7 @@ static void AppendArrayIterator( cppMethodDefinitions.Append("\t}\n"); cppMethodDefinitions.Append("\t\n"); cppMethodDefinitions.Append('\t'); - AppendCppTypeName( + AppendCppTypeFullName( elementType, cppMethodDefinitions); cppMethodDefinitions.Append(' '); @@ -4869,7 +4859,7 @@ static void AppendGenericEnumerableIterator( cppTypeDefinitions.Append("Iterator\n"); cppTypeDefinitions.Append("\t{\n"); cppTypeDefinitions.Append("\t\t"); - AppendCppTypeName( + AppendCppTypeFullName( enumeratorType, cppTypeDefinitions); cppTypeDefinitions.Append(" enumerator;\n"); @@ -4880,7 +4870,7 @@ static void AppendGenericEnumerableIterator( cppTypeDefinitions.Append("\t\t"); cppTypeDefinitions.Append(bindingEnumerableTypeName); cppTypeDefinitions.Append("Iterator("); - AppendCppTypeName( + AppendCppTypeFullName( enumerableType, cppTypeDefinitions); cppTypeDefinitions.Append("& enumerable);\n"); @@ -4894,7 +4884,7 @@ static void AppendGenericEnumerableIterator( cppTypeDefinitions.Append(bindingEnumerableTypeName); cppTypeDefinitions.Append("Iterator& other);\n"); cppTypeDefinitions.Append("\t\t"); - AppendCppTypeName( + AppendCppTypeFullName( elementType, cppTypeDefinitions); cppTypeDefinitions.Append(" operator*();\n"); @@ -4912,7 +4902,7 @@ static void AppendGenericEnumerableIterator( cppTypeDefinitions.Append("Plugin::"); cppTypeDefinitions.Append(bindingEnumerableTypeName); cppTypeDefinitions.Append("Iterator begin("); - AppendCppTypeName( + AppendCppTypeFullName( enumerableType, cppTypeDefinitions); cppTypeDefinitions.Append("& enumerable);\n"); @@ -4922,7 +4912,7 @@ static void AppendGenericEnumerableIterator( cppTypeDefinitions.Append("Plugin::"); cppTypeDefinitions.Append(bindingEnumerableTypeName); cppTypeDefinitions.Append("Iterator end("); - AppendCppTypeName( + AppendCppTypeFullName( enumerableType, cppTypeDefinitions); cppTypeDefinitions.Append("& enumerable);\n"); @@ -4949,7 +4939,7 @@ static void AppendGenericEnumerableIterator( cppMethodDefinitions.Append("Iterator::"); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator("); - AppendCppTypeName( + AppendCppTypeFullName( enumerableType, cppMethodDefinitions); cppMethodDefinitions.Append("& enumerable)\n"); @@ -4992,7 +4982,7 @@ static void AppendGenericEnumerableIterator( cppMethodDefinitions.Append("\t}\n"); cppMethodDefinitions.Append("\t\n"); cppMethodDefinitions.Append('\t'); - AppendCppTypeName( + AppendCppTypeFullName( elementType, cppMethodDefinitions); cppMethodDefinitions.Append(' '); @@ -5015,7 +5005,7 @@ static void AppendGenericEnumerableIterator( cppMethodDefinitions.Append("Plugin::"); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator begin("); - AppendCppTypeName( + AppendCppTypeFullName( enumerableType, cppMethodDefinitions); cppMethodDefinitions.Append("& enumerable)\n"); @@ -5043,7 +5033,7 @@ static void AppendGenericEnumerableIterator( cppMethodDefinitions.Append("Plugin::"); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator end("); - AppendCppTypeName( + AppendCppTypeFullName( enumerableType, cppMethodDefinitions); cppMethodDefinitions.Append("& enumerable)\n"); @@ -5070,23 +5060,21 @@ static void AppendGenericEnumerableIterator( static void AppendCppArrayIndexOperatorMethodDefinition( int rank, int indent, - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, string nextCppElementProxyTypeName, StringBuilder output) { AppendIndent( indent, output); - AppendCppTypeName( - "Plugin", - nextCppElementProxyTypeName, + AppendCppTypeFullName( + GetTypeName(nextCppElementProxyTypeName, "Plugin"), output); output.Append(' '); - output.Append(enclosingTypeNamespace); + output.Append(enclosingTypeTypeName.Namespace); output.Append("::"); AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + enclosingTypeTypeName.Name, output); output.Append("::operator[](int32_t index)\n"); AppendIndent( @@ -5135,28 +5123,12 @@ static void AppendCppArrayElementProxyName( output.Append('_'); output.Append(maxRank); output.Append('<'); - AppendCppTypeName( + AppendCppTypeFullName( elementType, output); output.Append('>'); } - - static void AppendBindingArrayTypeName( - string elementTypeName, - string elementTypeNamespace, - string cppArrayTypeName, - StringBuilder output) - { - AppendNamespace( - elementTypeNamespace, - string.Empty, - output); - AppendTypeNameWithoutGenericSuffix( - elementTypeName, - output); - output.Append(cppArrayTypeName); - } - + static ParameterInfo[] BuildArrayGetItemsParams( int rank, string indexName) @@ -5210,17 +5182,16 @@ static ParameterInfo[] BuildArraySetItemsParams( } static void AppendArrayGetItemFuncName( - string elementTypeName, - string elementTypeNamespace, + TypeName elementTypeTypeName, string bindingArrayTypeName, int rank, StringBuilder output) { AppendNamespace( - elementTypeNamespace, + elementTypeTypeName.Namespace, string.Empty, output); - output.Append(elementTypeName); + output.Append(elementTypeTypeName.Name); AppendTypeNameWithoutGenericSuffix( bindingArrayTypeName, output); @@ -5229,17 +5200,16 @@ static void AppendArrayGetItemFuncName( } static void AppendArraySetItemFuncName( - string elementTypeName, - string elementTypeNamespace, + TypeName elementTypeTypeName, string bindingArrayTypeName, int rank, StringBuilder output) { AppendNamespace( - elementTypeNamespace, + elementTypeTypeName.Namespace, string.Empty, output); - output.Append(elementTypeName); + output.Append(elementTypeTypeName.Name); AppendTypeNameWithoutGenericSuffix( bindingArrayTypeName, output); @@ -5277,8 +5247,7 @@ static void AppendArrayElementProxy( // GetItem name builders.TempStrBuilder.Length = 0; AppendArrayGetItemFuncName( - elementType.Name, - elementType.Namespace, + GetTypeName(elementType), cppArrayTypeName, rank, builders.TempStrBuilder); @@ -5287,8 +5256,7 @@ static void AppendArrayElementProxy( // SetItem name builders.TempStrBuilder.Length = 0; AppendArraySetItemFuncName( - elementType.Name, - elementType.Namespace, + GetTypeName(elementType), cppArrayTypeName, rank, builders.TempStrBuilder); @@ -5369,7 +5337,7 @@ static void AppendArrayElementProxy( indent + 1, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("void operator=("); - AppendCppTypeName( + AppendCppTypeFullName( elementType, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(" item);\n"); @@ -5377,7 +5345,7 @@ static void AppendArrayElementProxy( indent + 1, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("operator "); - AppendCppTypeName( + AppendCppTypeFullName( elementType, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("();\n"); @@ -5468,7 +5436,7 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append(cppElementProxyTypeName); builders.CppMethodDefinitions.Append("::"); builders.CppMethodDefinitions.Append("operator=("); - AppendCppTypeName( + AppendCppTypeFullName( elementType, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(" item)\n"); @@ -5478,8 +5446,7 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( false, - cppArrayTypeName, - "System", + GetTypeName(cppArrayTypeName, "System"), TypeKind.Class, cppTypeParams, typeof(void), @@ -5503,7 +5470,7 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append(cppElementProxyTypeName); builders.CppMethodDefinitions.Append("::"); builders.CppMethodDefinitions.Append("operator "); - AppendCppTypeName( + AppendCppTypeFullName( elementType, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("()\n"); @@ -5513,8 +5480,7 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( false, - cppArrayTypeName, - "System", + GetTypeName(cppArrayTypeName, "System"), TypeKind.Class, cppTypeParams, elementType, @@ -5537,8 +5503,7 @@ static void AppendArrayElementProxy( AppendCppArrayIndexOperatorMethodDefinition( rank, cppMethodDefinitionsIndent, - cppElementProxyTypeName, - "Plugin", + GetTypeName(cppElementProxyTypeName, "Plugin"), nextCppElementProxyTypeName, builders.CppMethodDefinitions); } @@ -5587,6 +5552,10 @@ static void AppendArrayConstructor( info.Kind = TypeKind.Primitive; parameters[i] = info; } + + TypeName cppArrayTypeTypeName = GetTypeName( + cppArrayTypeName, + "System"); // C# Delegate Type AppendCsharpDelegateType( @@ -5621,7 +5590,7 @@ static void AppendArrayConstructor( arrayType, builders.CsharpFunctions); builders.CsharpFunctions.Append(".Store(new "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( elementType, builders.CsharpFunctions); builders.CsharpFunctions.Append('['); @@ -5647,8 +5616,7 @@ static void AppendArrayConstructor( AppendCppFunctionPointerDefinition( funcName, true, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, @@ -5658,8 +5626,7 @@ static void AppendArrayConstructor( AppendCppInitParam( funcNameLower, true, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, @@ -5688,7 +5655,7 @@ static void AppendArrayConstructor( // C++ method definition Type[] cppTypeParams = { elementType }; AppendCppMethodDefinitionBegin( - cppArrayTypeName, + GetTypeName(cppArrayTypeName, "System"), null, cppArrayTypeName, cppTypeParams, @@ -5703,7 +5670,7 @@ static void AppendArrayConstructor( indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(separator); - AppendCppTypeName( + AppendCppTypeFullName( interfaceType, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("(nullptr)\n"); @@ -5715,8 +5682,7 @@ static void AppendArrayConstructor( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( true, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, cppTypeParams, arrayType, @@ -5743,8 +5709,7 @@ static void AppendArrayConstructor( indent + 2, builders.CppMethodDefinitions); AppendReferenceManagedHandleFunctionCall( - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, cppTypeParams, "returnValue", @@ -5825,7 +5790,7 @@ static void AppendArrayCppGetLengthFunction( // C++ method definition AppendCppMethodDefinitionBegin( - cppArrayTypeName, + GetTypeName(cppArrayTypeName, "System"), typeof(int), "GetLength", cppTypeParams, @@ -5903,7 +5868,7 @@ static void AppendArrayCppGetRankFunction( // C++ method definition AppendCppMethodDefinitionBegin( - cppArrayTypeName, + GetTypeName(cppArrayTypeName, "System"), typeof(int), "GetRank", cppTypeParams, @@ -5966,6 +5931,10 @@ static void AppendArrayMultidimensionalGetLength( Kind = TypeKind.Primitive, } }; + + TypeName cppArrayTypeTypeName = GetTypeName( + cppArrayTypeName, + "System"); // C# Delegate Type AppendCsharpDelegateType( @@ -6010,8 +5979,7 @@ static void AppendArrayMultidimensionalGetLength( AppendCppFunctionPointerDefinition( funcName, false, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, @@ -6021,8 +5989,7 @@ static void AppendArrayMultidimensionalGetLength( AppendCppInitParam( funcNameLower, false, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, @@ -6051,7 +6018,7 @@ static void AppendArrayMultidimensionalGetLength( // C++ method definition Type[] cppTypeParams = { elementType }; AppendCppMethodDefinitionBegin( - cppArrayTypeName, + GetTypeName(cppArrayTypeName, "System"), typeof(int), "GetLength", cppTypeParams, @@ -6093,8 +6060,7 @@ static void AppendArrayMultidimensionalGetLength( builders.CppMethodDefinitions.Append("}\n"); AppendCppPluginFunctionCall( false, - cppArrayTypeName, - "System", + GetTypeName(cppArrayTypeName, "System"), TypeKind.Class, cppTypeParams, typeof(int), @@ -6132,8 +6098,7 @@ static void AppendArrayGetItem( { builders.TempStrBuilder.Length = 0; AppendArrayGetItemFuncName( - elementType.Name, - elementType.Namespace, + GetTypeName(elementType), cppArrayTypeName, rank, builders.TempStrBuilder); @@ -6194,13 +6159,16 @@ static void AppendArrayGetItem( null, false, builders.CsharpFunctions); - + + TypeName cppArrayTypeTypeName = GetTypeName( + "System", + cppArrayTypeName); + // C++ function pointer definition AppendCppFunctionPointerDefinition( funcName, false, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, elementType, @@ -6210,8 +6178,7 @@ static void AppendArrayGetItem( AppendCppInitParam( funcNameLower, false, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, elementType, @@ -6233,8 +6200,7 @@ static void AppendArraySetItem( { builders.TempStrBuilder.Length = 0; AppendArraySetItemFuncName( - elementType.Name, - elementType.Namespace, + GetTypeName(elementType), cppArrayTypeName, rank, builders.TempStrBuilder); @@ -6297,13 +6263,16 @@ static void AppendArraySetItem( null, false, builders.CsharpFunctions); - + + TypeName cppArrayTypeTypeName = GetTypeName( + "System", + cppArrayTypeName); + // C++ function pointer definition AppendCppFunctionPointerDefinition( funcName, false, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, @@ -6313,8 +6282,7 @@ static void AppendArraySetItem( AppendCppInitParam( funcNameLower, false, - cppArrayTypeName, - "System", + cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, @@ -6336,26 +6304,14 @@ static void AppendDelegate( Type type = GetType( jsonDelegate.Type, assemblies); - Type[] genericArgTypes = type.GetGenericArguments(); if (jsonDelegate.GenericParams != null) { foreach (JsonGenericParams jsonGenericParams in jsonDelegate.GenericParams) { - // Build numbered C++ class name (e.g. Action2) - builders.TempStrBuilder.Length = 0; - AppendTypeNameWithoutSuffixes( - type.Name, - builders.TempStrBuilder); - builders.TempStrBuilder.Append( - jsonGenericParams.Types.Length); - string cppTypeName = builders.TempStrBuilder.ToString(); - // C++ template declaration AppendCppTemplateDeclaration( - cppTypeName, - type.Namespace, - genericArgTypes.Length, + GetTypeName(type), builders.CppTemplateDeclarations); } @@ -6367,11 +6323,12 @@ static void AppendDelegate( assemblies); Type genericType = type.MakeGenericType(typeParams); - // Build numbered C++ class name (e.g. Action2) + // Build numbered C++ class name (e.g. Action_2) builders.TempStrBuilder.Length = 0; AppendTypeNameWithoutSuffixes( type.Name, builders.TempStrBuilder); + builders.TempStrBuilder.Append('_'); builders.TempStrBuilder.Append( jsonGenericParams.Types.Length); string cppTypeName = builders.TempStrBuilder.ToString(); @@ -6404,7 +6361,7 @@ static void AppendDelegate( builders); } } - + static void AppendDelegate( Type type, string cppTypeName, @@ -6460,11 +6417,12 @@ static void AppendDelegate( builders.TempStrBuilder[0] = char.ToLower( builders.TempStrBuilder[0]); string removeFuncNameLower = builders.TempStrBuilder.ToString(); - + + TypeName typeTypeName = GetTypeName(type); + // C++ type declaration int indent = AppendCppTypeDeclaration( - type.Namespace, - cppTypeName, + typeTypeName, false, typeParams, typeParams != null ? @@ -6533,16 +6491,14 @@ static void AppendDelegate( }}; AppendCppPointerFreeListStateAndFunctions( - type.Namespace, + GetTypeName(cppTypeName, type.Namespace), typeParams, - cppTypeName, bindingTypeName, builders.CppGlobalStateAndFunctions); AppendCppPointerFreeListInit( - type.Namespace, typeParams, - cppTypeName, + GetTypeName(cppTypeName, type.Namespace), maxSimultaneous, bindingTypeName, builders.CppInitBody, @@ -6550,12 +6506,10 @@ static void AppendDelegate( // C++ type definition (begin) AppendCppTypeDefinitionBegin( - cppTypeName, - type.Namespace, + GetTypeName(cppTypeName, type.Namespace), TypeKind.Class, typeParams, - "Object", - "System", + GetTypeName(typeof(object)), null, null, false, @@ -6614,8 +6568,7 @@ static void AppendDelegate( AppendCppFunctionPointerDefinition( releaseFuncName, true, - null, - null, + default(TypeName), TypeKind.None, releaseParams, typeof(void), @@ -6623,8 +6576,7 @@ static void AppendDelegate( AppendCppFunctionPointerDefinition( constructorFuncName, true, - null, - null, + default(TypeName), TypeKind.None, constructorParams, typeof(void), @@ -6632,8 +6584,7 @@ static void AppendDelegate( AppendCppFunctionPointerDefinition( addFuncName, false, - null, - null, + default(TypeName), TypeKind.None, addRemoveParams, typeof(void), @@ -6641,8 +6592,7 @@ static void AppendDelegate( AppendCppFunctionPointerDefinition( removeFuncName, false, - null, - null, + default(TypeName), TypeKind.None, addRemoveParams, typeof(void), @@ -6652,8 +6602,7 @@ static void AppendDelegate( AppendCppInitParam( releaseFuncNameLower, true, - null, - null, + default(TypeName), TypeKind.None, releaseParams, typeof(void), @@ -6661,8 +6610,7 @@ static void AppendDelegate( AppendCppInitParam( constructorFuncNameLower, true, - null, - null, + default(TypeName), TypeKind.None, constructorParams, typeof(void), @@ -6670,8 +6618,7 @@ static void AppendDelegate( AppendCppInitParam( addFuncNameLower, false, - null, - null, + default(TypeName), TypeKind.None, addRemoveParams, typeof(void), @@ -6679,8 +6626,7 @@ static void AppendDelegate( AppendCppInitParam( removeFuncNameLower, false, - null, - null, + default(TypeName), TypeKind.None, addRemoveParams, typeof(void), @@ -6735,7 +6681,7 @@ static void AppendDelegate( AppendCppBaseTypeConstructor( bindingTypeName, - type.Namespace, + typeTypeName, TypeKind.Class, cppTypeName, typeParams, @@ -6749,7 +6695,7 @@ static void AppendDelegate( AppendCppBaseTypeNullptrConstructor( bindingTypeName, - cppTypeName, + typeTypeName, typeParams, new Type[0], true, @@ -6758,7 +6704,7 @@ static void AppendDelegate( AppendCppBaseTypeCopyConstructor( bindingTypeName, - cppTypeName, + typeTypeName, typeParams, new Type[0], true, @@ -6766,7 +6712,7 @@ static void AppendDelegate( builders.CppMethodDefinitions); AppendCppBaseTypeMoveConstructor( - cppTypeName, + typeTypeName, typeParams, new Type[0], true, @@ -6775,7 +6721,7 @@ static void AppendDelegate( AppendCppBaseTypeHandleConstructor( bindingTypeName, - cppTypeName, + typeTypeName, typeParams, new Type[0], true, @@ -6784,26 +6730,24 @@ static void AppendDelegate( AppendCppBaseTypeDestructor( bindingTypeName, - cppTypeName, + typeTypeName, typeParams, true, string.Empty, - string.Empty, releaseFuncName, bindingTypeName, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorSameType( - type, - cppTypeName, + typeTypeName, typeParams, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorNullptr( - cppTypeName, + typeTypeName, typeParams, true, releaseFuncName, @@ -6812,7 +6756,7 @@ static void AppendDelegate( AppendCppBaseTypeMoveAssignmentOperator( bindingTypeName, - cppTypeName, + typeTypeName, typeParams, true, releaseFuncName, @@ -6820,14 +6764,14 @@ static void AppendDelegate( builders.CppMethodDefinitions); AppendCppBaseTypeEqualityOperator( - cppTypeName, + typeTypeName, typeParams, cppMethodDefinitionsIndent, true, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( - cppTypeName, + typeTypeName, typeParams, cppMethodDefinitionsIndent, true, @@ -6835,7 +6779,7 @@ static void AppendDelegate( // C++ add AppendCppMethodDefinitionBegin( - cppTypeName, + GetTypeName(type), typeof(void), "operator+=", typeParams, @@ -6867,7 +6811,7 @@ static void AppendDelegate( // C++ remove AppendCppMethodDefinitionBegin( - cppTypeName, + GetTypeName(type), typeof(void), "operator-=", typeParams, @@ -6899,8 +6843,7 @@ static void AppendDelegate( // C# GetDelegate call AppendCsharpGetDelegateCall( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, "NativeInvoke", builders.CsharpGetDelegateCalls); @@ -6914,7 +6857,7 @@ static void AppendDelegate( // C# class fields builders.CsharpBaseTypes.Append("\tpublic int CppHandle;\n"); builders.CsharpBaseTypes.Append("\tpublic "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(" Delegate;\n"); @@ -6944,7 +6887,7 @@ static void AppendDelegate( AppendBaseTypeCppMethodCall( type, bindingTypeName, - cppTypeName, + typeTypeName, typeParams, invokeMethod, "NativeInvoke", @@ -6963,7 +6906,6 @@ static void AppendDelegate( AppendBaseTypeMethodCallsCsharpMethod( type, bindingTypeName, - cppTypeName, typeParams, invokeMethod, "Invoke", @@ -6983,8 +6925,7 @@ static void AppendDelegate( AppendCsharpBaseTypeConstructorFunction( type, - bindingTypeName, - string.Empty, + GetTypeName(bindingTypeName, string.Empty), false, constructorFuncName, constructorParams, @@ -7003,8 +6944,7 @@ static void AppendDelegate( AppendCsharpBaseTypeReleaseFunction( type, - bindingTypeName, - string.Empty, + GetTypeName(bindingTypeName, string.Empty), true, releaseFuncName, null, @@ -7082,30 +7022,31 @@ static void AppendDelegate( static void AppendBaseType( Type type, JsonBaseType jsonBaseType, - string baseTypeName, - string baseTypeNamespace, + TypeName baseTypeTypeName, Type[] typeParams, int maxSimultaneous, Assembly[] assemblies, StringBuilders builders) { // Get specified derived type name - string derivedTypeName; - string derivedTypeNamespace; - SplitJsonTypeName( - jsonBaseType.DerivedName, - out derivedTypeName, - out derivedTypeNamespace); + TypeName derivedTypeTypeName = SplitJsonTypeName( + jsonBaseType.DerivedName); builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Release"); - builders.TempStrBuilder.Append(baseTypeName); + builders.TempStrBuilder.Append(baseTypeTypeName.Name); string releaseFuncName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder[0] = char.ToLower( builders.TempStrBuilder[0]); string releaseFuncNameLower = builders.TempStrBuilder.ToString(); + builders.TempStrBuilder.Length = 0; + AppendCppTypeName( + baseTypeTypeName, + builders.TempStrBuilder); + string cppBaseTypeName = builders.TempStrBuilder.ToString(); + bool hasDefaultConstructor = !type.IsClass || (type.GetConstructor(new Type[0]) != null || type.GetConstructors().Length == 0); @@ -7122,7 +7063,7 @@ static void AppendBaseType( // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Base type \""); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, errorBuilder); errorBuilder.Append( @@ -7153,7 +7094,7 @@ static void AppendBaseType( assemblies); builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append(baseTypeName); + builders.TempStrBuilder.Append(baseTypeTypeName.Name); builders.TempStrBuilder.Append("Constructor"); AppendTypeNames( paramTypes, @@ -7222,25 +7163,22 @@ static void AppendBaseType( } AppendCppPointerFreeListStateAndFunctions( - baseTypeNamespace, + baseTypeTypeName, null, - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, builders.CppGlobalStateAndFunctions); AppendCppPointerFreeListInit( - baseTypeNamespace, null, - baseTypeName, + baseTypeTypeName, maxSimultaneous, - baseTypeName, + baseTypeTypeName.Name, builders.CppInitBody, builders.CppInitBodyFirstBoot); // C++ type declaration int indent = AppendCppTypeDeclaration( - baseTypeNamespace, - baseTypeName, + baseTypeTypeName, false, null, builders.CppTypeDeclarations); @@ -7258,12 +7196,10 @@ static void AppendBaseType( // C++ type definition (begin) AppendCppTypeDefinitionBegin( - baseTypeName, - baseTypeNamespace, + baseTypeTypeName, TypeKind.Class, null, - cppBaseClass.Name, - cppBaseClass.Namespace, + GetTypeName(cppBaseClass), cppBaseClassTypeParams, cppInterfaceTypes, false, @@ -7283,7 +7219,7 @@ static void AppendBaseType( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - baseTypeName, + cppBaseTypeName, false, false, false, @@ -7296,32 +7232,32 @@ static void AppendBaseType( // C++ constructor declaration macro builders.CppMacros.Append("#define "); AppendUppercaseWithUnderscores( - derivedTypeNamespace, + derivedTypeTypeName.Namespace, builders.CppMacros); builders.CppMacros.Append('_'); AppendUppercaseWithUnderscores( - derivedTypeName, + derivedTypeTypeName.Name, builders.CppMacros); builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR_DECLARATION \\\n"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append(derivedTypeTypeName.Name); builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle);\n"); builders.CppMacros.Append('\n'); // C++ constructor definition macro builders.CppMacros.Append("#define "); AppendUppercaseWithUnderscores( - derivedTypeNamespace, + derivedTypeTypeName.Namespace, builders.CppMacros); builders.CppMacros.Append('_'); AppendUppercaseWithUnderscores( - derivedTypeName, + derivedTypeTypeName.Name, builders.CppMacros); builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR_DEFINITION \\\n"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append(derivedTypeTypeName.Name); builders.CppMacros.Append("::"); - builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append(derivedTypeTypeName.Name); builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle) \\\n"); AppendCppConstructorInitializerList( cppCtorInitTypes, @@ -7330,24 +7266,23 @@ static void AppendBaseType( " \\\n"); AppendIndent(indent + 1, builders.CppMacros); builders.CppMacros.Append(", "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, + AppendCppTypeFullName( + baseTypeTypeName, builders.CppMacros); builders.CppMacros.Append("(iu, handle)\n"); // C++ constructor inline definition macro builders.CppMacros.Append("#define "); AppendUppercaseWithUnderscores( - derivedTypeNamespace, + derivedTypeTypeName.Namespace, builders.CppMacros); builders.CppMacros.Append('_'); AppendUppercaseWithUnderscores( - derivedTypeName, + derivedTypeTypeName.Name, builders.CppMacros); builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR \\\n"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append(derivedTypeName); + builders.CppMacros.Append(derivedTypeTypeName.Name); builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle) \\\n"); AppendCppConstructorInitializerList( cppCtorInitTypes, @@ -7356,9 +7291,8 @@ static void AppendBaseType( " \\\n"); AppendIndent(indent + 1, builders.CppMacros); builders.CppMacros.Append(", "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, + AppendCppTypeFullName( + baseTypeTypeName, builders.CppMacros); builders.CppMacros.Append("(iu, handle) \\\n"); AppendIndent(indent, builders.CppMacros); @@ -7371,8 +7305,7 @@ static void AppendBaseType( AppendCppFunctionPointerDefinition( releaseFuncName, true, - null, - null, + default(TypeName), TypeKind.None, releaseParams, typeof(void), @@ -7382,8 +7315,7 @@ static void AppendBaseType( AppendCppFunctionPointerDefinition( constructorFuncNames[i], true, - null, - null, + default(TypeName), TypeKind.None, constructorParams[i], typeof(void), @@ -7394,8 +7326,7 @@ static void AppendBaseType( AppendCppInitParam( releaseFuncNameLower, true, - null, - null, + default(TypeName), TypeKind.None, releaseParams, typeof(void), @@ -7405,8 +7336,7 @@ static void AppendBaseType( AppendCppInitParam( constructorFuncNameLowers[i], true, - null, - null, + default(TypeName), TypeKind.None, constructorParams[i], typeof(void), @@ -7442,16 +7372,16 @@ static void AppendBaseType( // C++ method definitions (end) int cppMethodDefinitionsIndent = AppendNamespaceBeginning( - baseTypeNamespace, + baseTypeTypeName.Namespace, builders.CppMethodDefinitions); for (int i = 0; i < numConstructors; ++i) { AppendCppBaseTypeConstructor( - baseTypeName, - baseTypeNamespace, + baseTypeTypeName.Name, + baseTypeTypeName, TypeKind.Class, - baseTypeName, + cppBaseTypeName, typeParams, cppCtorInitTypes, cppConstructorParams[i], @@ -7463,8 +7393,8 @@ static void AppendBaseType( } AppendCppBaseTypeNullptrConstructor( - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, cppCtorInitTypes, false, @@ -7472,8 +7402,8 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeCopyConstructor( - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, cppCtorInitTypes, false, @@ -7481,7 +7411,7 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeMoveConstructor( - baseTypeName, + baseTypeTypeName, typeParams, cppCtorInitTypes, false, @@ -7489,8 +7419,8 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeHandleConstructor( - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, cppCtorInitTypes, false, @@ -7498,27 +7428,25 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeDestructor( - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, false, - derivedTypeName, - derivedTypeNamespace, + derivedTypeTypeName.Name, releaseFuncName, - baseTypeName, + baseTypeTypeName.Name, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorSameType( - type, - baseTypeName, + baseTypeTypeName, typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorNullptr( - baseTypeName, + baseTypeTypeName, typeParams, false, releaseFuncName, @@ -7526,8 +7454,8 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeMoveAssignmentOperator( - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, false, releaseFuncName, @@ -7535,38 +7463,37 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeEqualityOperator( - baseTypeName, + baseTypeTypeName, typeParams, cppMethodDefinitionsIndent, false, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( - baseTypeName, + baseTypeTypeName, typeParams, cppMethodDefinitionsIndent, false, builders.CppMethodDefinitions); - if (!string.IsNullOrEmpty(derivedTypeName)) + if (!string.IsNullOrEmpty(derivedTypeTypeName.Name)) { // C++ whole object free list AppendCppWholeObjectFreeListStateAndFunctions( null, - baseTypeName, - baseTypeNamespace, - baseTypeName, + baseTypeTypeName, + baseTypeTypeName.Name, builders.CppGlobalStateAndFunctions); AppendCppWholeObjectFreeListInit( maxSimultaneous, - baseTypeName, + baseTypeTypeName.Name, builders.CppInitBody, builders.CppInitBodyFirstBoot); // C++ binding function to create the base class builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("New"); - builders.TempStrBuilder.Append(baseTypeName); + builders.TempStrBuilder.Append(baseTypeTypeName.Name); string cppDefaultConstructorBindingFunctionName = builders.TempStrBuilder.ToString(); AppendIndent( indent, @@ -7581,24 +7508,21 @@ static void AppendBaseType( AppendIndent( indent + 1, builders.CppMethodDefinitions); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, + AppendCppTypeFullName( + baseTypeTypeName, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("* memory = Plugin::StoreWhole"); - builders.CppMethodDefinitions.Append(baseTypeName); + builders.CppMethodDefinitions.Append(baseTypeTypeName.Name); builders.CppMethodDefinitions.Append("();\n"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - AppendCppTypeName( - derivedTypeNamespace, - derivedTypeName, + AppendCppTypeFullName( + derivedTypeTypeName, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("* thiz = new (memory) "); - AppendCppTypeName( - derivedTypeNamespace, - derivedTypeName, + AppendCppTypeFullName( + derivedTypeTypeName, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("(Plugin::InternalUse::Only, handle);\n"); AppendIndent( @@ -7615,8 +7539,7 @@ static void AppendBaseType( new Type[] { typeof(int) }); AppendCsharpDelegate( true, - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, cppDefaultConstructorBindingFunctionName, cppDefaultConstructorBindingFunctionParams, @@ -7624,15 +7547,13 @@ static void AppendBaseType( TypeKind.None, builders.CsharpDelegates); AppendCsharpImport( - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, cppDefaultConstructorBindingFunctionName, cppDefaultConstructorBindingFunctionParams, builders.CsharpImports); AppendCsharpGetDelegateCall( - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, cppDefaultConstructorBindingFunctionName, builders.CsharpGetDelegateCalls); @@ -7640,7 +7561,7 @@ static void AppendBaseType( // C++ binding function to destroy the base class builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Destroy"); - builders.TempStrBuilder.Append(baseTypeName); + builders.TempStrBuilder.Append(baseTypeTypeName.Name); string cppDestroyBindingFunctionName = builders.TempStrBuilder.ToString(); AppendIndent( indent, @@ -7655,20 +7576,18 @@ static void AppendBaseType( AppendIndent( indent + 1, builders.CppMethodDefinitions); - AppendCppTypeName( - string.Empty, - baseTypeName, + AppendCppTypeFullName( + baseTypeTypeName, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("* instance = Plugin::Get"); - builders.CppMethodDefinitions.Append(baseTypeName); + builders.CppMethodDefinitions.Append(baseTypeTypeName.Name); builders.CppMethodDefinitions.Append("(cppHandle);\n"); AppendIndent( indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("instance->~"); AppendCppTypeName( - string.Empty, - baseTypeName, + baseTypeTypeName, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("();\n"); AppendIndent( @@ -7681,8 +7600,7 @@ static void AppendBaseType( new Type[] { typeof(int) }); AppendCsharpDelegate( true, - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, cppDestroyBindingFunctionName, cppDestroyBindingFunctionParams, @@ -7690,27 +7608,25 @@ static void AppendBaseType( TypeKind.None, builders.CsharpDelegates); AppendCsharpImport( - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, cppDestroyBindingFunctionName, cppDestroyBindingFunctionParams, builders.CsharpImports); AppendCsharpGetDelegateCall( - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, cppDestroyBindingFunctionName, builders.CsharpGetDelegateCalls); // C# DestroyFunction enumerator builders.CsharpDestroyFunctionEnumerators.Append("\t\t\t"); - builders.CsharpDestroyFunctionEnumerators.Append(baseTypeName); + builders.CsharpDestroyFunctionEnumerators.Append(baseTypeTypeName.Name); builders.CsharpDestroyFunctionEnumerators.Append(",\n"); // C# Destroy queue cases builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\tcase DestroyFunction."); - builders.CsharpDestroyQueueCases.Append(baseTypeName); + builders.CsharpDestroyQueueCases.Append(baseTypeTypeName.Name); builders.CsharpDestroyQueueCases.Append(":\n"); builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\t\t"); builders.CsharpDestroyQueueCases.Append(cppDestroyBindingFunctionName); @@ -7720,15 +7636,15 @@ static void AppendBaseType( // C# class (beginning) builders.CsharpBaseTypes.Append("namespace "); - builders.CsharpBaseTypes.Append(baseTypeNamespace); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Namespace); builders.CsharpBaseTypes.Append('\n'); builders.CsharpBaseTypes.Append("{\n"); builders.CsharpBaseTypes.Append("\tclass "); - builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); if (jsonBaseType != null) { builders.CsharpBaseTypes.Append(" : "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpBaseTypes); } @@ -7739,20 +7655,20 @@ static void AppendBaseType( builders.CsharpBaseTypes.Append("\t\tpublic int CppHandle;\n"); builders.CsharpBaseTypes.Append("\t\t\n"); - if (derivedTypeName != null) + if (derivedTypeTypeName.Name != null) { // C# class default constructor if the base class has one if (hasDefaultConstructor) { builders.CsharpBaseTypes.Append("\t\tpublic "); - builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); builders.CsharpBaseTypes.Append("()\n"); builders.CsharpBaseTypes.Append("\t\t{\n"); builders.CsharpBaseTypes.Append( "\t\t\tint handle = NativeScript.Bindings.ObjectStore.Store(this);\n"); builders.CsharpBaseTypes.Append( "\t\t\tCppHandle = NativeScript.Bindings.New"); - builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); builders.CsharpBaseTypes.Append("(handle);\n"); builders.CsharpBaseTypes.Append("\t\t}\n"); builders.CsharpBaseTypes.Append("\t\t\n"); @@ -7760,14 +7676,14 @@ static void AppendBaseType( // C# finalizer/destructor builders.CsharpBaseTypes.Append("\t\t~"); - builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); builders.CsharpBaseTypes.Append("()\n"); builders.CsharpBaseTypes.Append("\t\t{\n"); builders.CsharpBaseTypes.Append("\t\t\tif (CppHandle != 0)\n"); builders.CsharpBaseTypes.Append("\t\t\t{\n"); builders.CsharpBaseTypes.Append( "\t\t\t\tNativeScript.Bindings.QueueDestroy(NativeScript.Bindings.DestroyFunction."); - builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); builders.CsharpBaseTypes.Append(", CppHandle);\n"); builders.CsharpBaseTypes.Append("\t\t\t\tCppHandle = 0;\n"); builders.CsharpBaseTypes.Append("\t\t\t}\n"); @@ -7779,7 +7695,7 @@ static void AppendBaseType( for (int i = 0; i < numConstructors; ++i) { builders.CsharpBaseTypes.Append("\t\tpublic "); - builders.CsharpBaseTypes.Append(baseTypeName); + builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); builders.CsharpBaseTypes.Append("(int cppHandle"); ParameterInfo[] parameters = cppConstructorParams[i]; if (parameters.Length > 0) @@ -7818,8 +7734,7 @@ static void AppendBaseType( { AppendCsharpBaseTypeConstructorFunction( type, - baseTypeName, - baseTypeNamespace, + baseTypeTypeName, false, constructorFuncNames[i], constructorParams[i], @@ -7839,8 +7754,7 @@ static void AppendBaseType( AppendCsharpBaseTypeReleaseFunction( type, - baseTypeName, - baseTypeNamespace, + baseTypeTypeName, false, releaseFuncName, jsonBaseType.DerivedName, @@ -7855,9 +7769,8 @@ static void AppendBaseType( { AppendBaseTypeNativeMethod( type, - baseTypeName, + baseTypeTypeName, typeParams, - baseTypeName, methodInfo, false, indent, @@ -7877,9 +7790,8 @@ static void AppendBaseType( { AppendBaseTypeNativeMethod( type, - baseTypeName, + baseTypeTypeName, typeParams, - baseTypeName, methodInfo, false, indent, @@ -7910,9 +7822,8 @@ static void AppendBaseType( jsonGenericParams.Types); AppendBaseTypeNativeMethod( type, - baseTypeName, + baseTypeTypeName, typeParams, - baseTypeName, methodInfo, false, indent, @@ -7930,9 +7841,8 @@ static void AppendBaseType( null); AppendBaseTypeNativeMethod( type, - baseTypeName, + baseTypeTypeName, typeParams, - baseTypeName, methodInfo, false, indent, @@ -7953,8 +7863,8 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, propertyInfo, getMethodInfo, @@ -7980,8 +7890,8 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, propertyInfo, getMethodInfo, @@ -8012,7 +7922,7 @@ static void AppendBaseType( // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Property \""); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, errorBuilder); errorBuilder.Append('.'); @@ -8029,7 +7939,7 @@ static void AppendBaseType( // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Property \""); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, errorBuilder); errorBuilder.Append('.'); @@ -8040,8 +7950,8 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - baseTypeName, - baseTypeName, + baseTypeTypeName.Name, + baseTypeTypeName, typeParams, propertyInfo, getMethodInfo, @@ -8063,8 +7973,7 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - baseTypeName, - baseTypeName, + baseTypeTypeName, typeParams, eventInfo, addMethodInfo, @@ -8089,8 +7998,7 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - baseTypeName, - baseTypeName, + baseTypeTypeName, typeParams, eventInfo, addMethodInfo, @@ -8121,7 +8029,7 @@ static void AppendBaseType( // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Event \""); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, errorBuilder); errorBuilder.Append('.'); @@ -8138,7 +8046,7 @@ static void AppendBaseType( // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Event \""); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, errorBuilder); errorBuilder.Append('.'); @@ -8149,8 +8057,7 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - baseTypeName, - baseTypeName, + baseTypeTypeName, typeParams, eventInfo, addMethodInfo, @@ -8179,17 +8086,15 @@ static void AppendBaseType( static void AppendBaseTypeNativeMethod( Type type, - string typeName, + TypeName typeTypeName, Type[] typeParams, - string cppTypeName, MethodInfo methodInfo, bool typeIsDelegate, int indent, StringBuilders builders) { AppendCsharpGetDelegateCall( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, methodInfo.Name, builders.CsharpGetDelegateCalls); @@ -8205,8 +8110,8 @@ static void AppendBaseTypeNativeMethod( AppendBaseTypeCppMethodCall( type, - typeName, - cppTypeName, + typeTypeName.Name, + typeTypeName, typeParams, methodInfo, methodInfo.Name, @@ -8221,7 +8126,7 @@ static void AppendBaseTypeNativeMethod( static void AppendBaseTypeProperty( Type type, string typeName, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, PropertyInfo propertyInfo, MethodInfo getMethodInfo, @@ -8249,7 +8154,7 @@ static void AppendBaseTypeProperty( { builders.CsharpBaseTypes.Append("override "); } - AppendCsharpTypeName( + AppendCsharpTypeFullName( propertyInfo.PropertyType, builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(' '); @@ -8277,7 +8182,7 @@ static void AppendBaseTypeProperty( type, typeName, typeParams, - cppTypeName, + typeTypeName, propertyInfo.Name, propertyTypeKind, getMethodInfo, @@ -8293,7 +8198,7 @@ static void AppendBaseTypeProperty( type, typeName, typeParams, - cppTypeName, + typeTypeName, propertyInfo.Name, propertyTypeKind, setMethodInfo, @@ -8309,8 +8214,7 @@ static void AppendBaseTypeProperty( static void AppendBaseTypeEvent( Type type, - string typeName, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, EventInfo eventInfo, MethodInfo addMethodInfo, @@ -8326,7 +8230,7 @@ static void AppendBaseTypeEvent( builders.CsharpBaseTypes.Append("override "); } builders.CsharpBaseTypes.Append("event "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( eventInfo.EventHandlerType, builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(' '); @@ -8341,9 +8245,9 @@ static void AppendBaseTypeEvent( { AppendBaseTypeNativePropertyOrEvent( type, - typeName, + typeTypeName.Name, typeParams, - cppTypeName, + typeTypeName, eventInfo.Name, eventHandlerTypeKind, addMethodInfo, @@ -8357,9 +8261,9 @@ static void AppendBaseTypeEvent( { AppendBaseTypeNativePropertyOrEvent( type, - typeName, + typeTypeName.Name, typeParams, - cppTypeName, + typeTypeName, eventInfo.Name, eventHandlerTypeKind, removeMethodInfo, @@ -8377,7 +8281,7 @@ static void AppendBaseTypeNativePropertyOrEvent( Type type, string typeName, Type[] typeParams, - string cppTypeName, + TypeName typeTypeName, string propertyOrEventName, TypeKind propertyOrEventTypeKind, MethodInfo methodInfo, @@ -8392,8 +8296,7 @@ static void AppendBaseTypeNativePropertyOrEvent( string funcName = builders.TempStrBuilder.ToString(); AppendCsharpGetDelegateCall( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, funcName, builders.CsharpGetDelegateCalls); @@ -8410,7 +8313,7 @@ static void AppendBaseTypeNativePropertyOrEvent( ParameterInfo[] invokeParams = AppendBaseTypeCppNativeInvokeCall( type, typeName, - cppTypeName, + typeTypeName, typeParams, methodInfo, funcName, @@ -8447,7 +8350,7 @@ static void AppendCsharpParams( for (int i = 0; i < parameters.Length; ++i) { ParameterInfo param = parameters[i]; - AppendCsharpTypeName( + AppendCsharpTypeFullName( param.ParameterType, output); output.Append(' '); @@ -8462,7 +8365,6 @@ static void AppendCsharpParams( static void AppendBaseTypeMethodCallsCsharpMethod( Type type, string typeName, - string cppTypeName, Type[] typeParams, MethodInfo methodInfo, string methodName, @@ -8499,8 +8401,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( AppendCppFunctionPointerDefinition( funcName, false, - null, - null, + default(TypeName), TypeKind.None, invokeParams, methodInfo.ReturnType, @@ -8510,8 +8411,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( AppendCppInitParam( funcNameLower, false, - null, - null, + default(TypeName), TypeKind.None, invokeParams, methodInfo.ReturnType, @@ -8531,7 +8431,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( TypeKind returnTypeKind = GetTypeKind( methodInfo.ReturnType); AppendCppMethodDefinitionBegin( - cppTypeName, + GetTypeName(type), methodInfo.ReturnType, methodName, typeParams, @@ -8545,8 +8445,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( false, - type.Name, - type.Namespace, + GetTypeName(type), TypeKind.Class, typeParams, methodInfo.ReturnType, @@ -8602,7 +8501,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( invokeParamsWithThis, builders.CsharpFunctions); builders.CsharpFunctions.Append("(("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( type, builders.CsharpFunctions); builders.CsharpFunctions.Append( @@ -8648,7 +8547,7 @@ static void AppendNativeInvokeFuncName( static void AppendBaseTypeCppMethodCall( Type type, string typeName, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, MethodInfo invokeMethod, string funcName, @@ -8662,7 +8561,7 @@ static void AppendBaseTypeCppMethodCall( ParameterInfo[] invokeParams = AppendBaseTypeCppNativeInvokeCall( type, typeName, - cppTypeName, + typeTypeName, typeParams, invokeMethod, funcName, @@ -8690,7 +8589,7 @@ static void AppendBaseTypeCppMethodCall( static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( Type type, string typeName, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, MethodInfo invokeMethod, string funcName, @@ -8717,7 +8616,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( // C++ method definition. This is a no-op that game code overrides. AppendCppMethodDefinitionBegin( - cppTypeName, + typeTypeName, invokeMethod.ReturnType, methodName, typeIsDelegate ? typeParams : null, @@ -8772,8 +8671,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( // C# delegate for the C++ binding function AppendCsharpDelegate( false, - type.Name, - type.Namespace, + GetTypeName(type), typeParams, funcName, invokeParams, @@ -8783,8 +8681,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( // C# import for the C++ binding function AppendCsharpImport( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, funcName, invokeParams, @@ -8815,8 +8712,7 @@ static ParameterInfo[] PrependThisParameter( static void AppendCsharpBaseTypeReleaseFunction( Type type, - string bindingTypeName, - string bindingTypeNamespace, + TypeName bindingTypeTypeName, bool typeIsDelegate, string releaseFuncName, string derivedName, @@ -8833,9 +8729,8 @@ static void AppendCsharpBaseTypeReleaseFunction( output); if (typeIsDelegate || derivedName != null) { - AppendCsharpTypeName( - bindingTypeNamespace, - bindingTypeName, + AppendCsharpTypeFullName( + bindingTypeTypeName, output); output.Append(" thiz;\n"); } @@ -8844,9 +8739,8 @@ static void AppendCsharpBaseTypeReleaseFunction( output.Append("\t\t\t\tif (classHandle != 0)\n"); output.Append("\t\t\t\t{\n"); output.Append("\t\t\t\t\tthiz = ("); - AppendCsharpTypeName( - bindingTypeNamespace, - bindingTypeName, + AppendCsharpTypeFullName( + bindingTypeTypeName, output); output.Append(")ObjectStore.Remove(classHandle);\n"); output.Append("\t\t\t\t\tthiz.CppHandle = 0;\n"); @@ -8856,15 +8750,14 @@ static void AppendCsharpBaseTypeReleaseFunction( if (derivedName != null) { output.Append("\t\t\t\tthiz = ("); - AppendCsharpTypeName( - bindingTypeNamespace, - bindingTypeName, + AppendCsharpTypeFullName( + bindingTypeTypeName, output); output.Append(")ObjectStore.Get(handle);\n"); output.Append("\t\t\t\tint cppHandle = thiz.CppHandle;\n"); output.Append("\t\t\t\tthiz.CppHandle = 0;\n"); output.Append("\t\t\t\tQueueDestroy(DestroyFunction."); - output.Append(bindingTypeName); + output.Append(bindingTypeTypeName.Name); output.Append(", cppHandle);\n"); } output.Append("\t\t\t\tObjectStore.Remove(handle);"); @@ -8892,7 +8785,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( { output.Append("override "); } - AppendCsharpTypeName( + AppendCsharpTypeFullName( invokeMethod.ReturnType, output); output.Append(' '); @@ -8954,7 +8847,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethodBody( if (invokeMethod.ReturnType != typeof(object)) { output.Append('('); - AppendCsharpTypeName( + AppendCsharpTypeFullName( invokeMethod.ReturnType, output); output.Append(')'); @@ -8979,7 +8872,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethodBody( indent, output); output.Append("return default("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( invokeMethod.ReturnType, output); output.Append(");\n"); @@ -8988,8 +8881,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethodBody( static void AppendCsharpBaseTypeConstructorFunction( Type type, - string typeName, - string typeNamespace, + TypeName typeTypeName, bool typeIsDelegate, string constructorFuncName, ParameterInfo[] constructorParams, @@ -9005,7 +8897,7 @@ static void AppendCsharpBaseTypeConstructorFunction( constructorParams, output); output.Append("var thiz = new "); - AppendCsharpTypeName(typeNamespace, typeName, output); + AppendCsharpTypeFullName(typeTypeName, output); output.Append("(cppHandle"); if (cppConstructorParams.Length > 0) { @@ -9080,7 +8972,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output); break; default: - AppendCppTypeName( + AppendCppTypeFullName( method.ReturnType, output); break; @@ -9088,8 +8980,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( } output.Append(' '); AppendCsharpDelegateName( - type.Name, - type.Namespace, + GetTypeName(type), typeParams, funcName, output); @@ -9117,7 +9008,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output.Append(param.Name); break; default: - AppendCppTypeName( + AppendCppTypeFullName( param.ParameterType, output); output.Append(' '); @@ -9154,7 +9045,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output.Append("auto "); output.Append(parameter.Name); output.Append(" = "); - AppendCppTypeName( + AppendCppTypeFullName( parameter.ParameterType, output); output.Append("(Plugin::InternalUse::Only, "); @@ -9243,7 +9134,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output); output.Append( "System::String msg = \"Unhandled exception invoking "); - AppendCppTypeName( + AppendCppTypeFullName( type, output); output.Append("\";\n"); @@ -9280,7 +9171,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( } static void AppendCppBaseTypeInequalityOperator( - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, int cppMethodDefinitionsIndent, bool typeIsDelegate, @@ -9290,15 +9181,15 @@ static void AppendCppBaseTypeInequalityOperator( cppMethodDefinitionsIndent, output); output.Append("bool "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::operator!=(const "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -9324,7 +9215,7 @@ static void AppendCppBaseTypeInequalityOperator( } static void AppendCppBaseTypeEqualityOperator( - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, int cppMethodDefinitionsIndent, bool typeIsDelegate, @@ -9334,15 +9225,15 @@ static void AppendCppBaseTypeEqualityOperator( cppMethodDefinitionsIndent, output); output.Append("bool "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::operator==(const "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -9368,8 +9259,8 @@ static void AppendCppBaseTypeEqualityOperator( } static void AppendCppBaseTypeMoveAssignmentOperator( - string typeName, - string cppTypeName, + string bindingTypeName, + TypeName typeTypeName, Type[] typeParams, bool typeIsDelegate, string releaseFuncName, @@ -9379,22 +9270,22 @@ static void AppendCppBaseTypeMoveAssignmentOperator( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("& "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::operator=("); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -9408,7 +9299,7 @@ static void AppendCppBaseTypeMoveAssignmentOperator( cppMethodDefinitionsIndent + 1, output); output.Append("Plugin::Remove"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("(CppHandle);\n"); AppendIndent( cppMethodDefinitionsIndent + 1, @@ -9510,7 +9401,7 @@ static void AppendCppBaseTypeMoveAssignmentOperator( } static void AppendCppBaseTypeAssignmentOperatorNullptr( - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, bool typeIsDelegate, string releaseFuncName, @@ -9520,15 +9411,15 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("& "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -9626,8 +9517,7 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( } static void AppendCppBaseTypeAssignmentOperatorSameType( - Type type, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -9636,22 +9526,22 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("& "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::operator=(const "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -9662,8 +9552,7 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( output); output.Append("{\n"); AppendSetHandle( - cppTypeName, - type.Namespace, + typeTypeName, TypeKind.Class, typeParams, cppMethodDefinitionsIndent + 1, @@ -9694,11 +9583,10 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( static void AppendCppBaseTypeDestructor( string typeName, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, bool typeIsDelegate, string derivedTypeName, - string derivedTypeNamespace, string releaseFuncName, string bindingTypeName, int cppMethodDefinitionsIndent, @@ -9707,15 +9595,18 @@ static void AppendCppBaseTypeDestructor( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::~"); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeName( + typeTypeName, + output); + AppendCppTypeParameters( + typeIsDelegate ? typeParams : null, output); output.Append("()\n"); AppendIndent( @@ -9813,8 +9704,8 @@ static void AppendCppBaseTypeDestructor( } static void AppendCppBaseTypeHandleConstructor( - string typeName, - string cppTypeName, + string bindingTypeName, + TypeName typeTypeName, Type[] typeParams, Type[] interfaceTypes, bool typeIsDelegate, @@ -9824,15 +9715,15 @@ static void AppendCppBaseTypeHandleConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeName( + typeTypeName, output); output.Append( "(Plugin::InternalUse, int32_t handle)\n"); @@ -9852,7 +9743,7 @@ static void AppendCppBaseTypeHandleConstructor( cppMethodDefinitionsIndent + 1, output); output.Append("CppHandle = Plugin::Store"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("(this);\n"); AppendIndent( cppMethodDefinitionsIndent + 1, @@ -9890,7 +9781,7 @@ static void AppendCppBaseTypeHandleConstructor( } static void AppendCppBaseTypeMoveConstructor( - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, Type[] interfaceTypes, bool typeIsDelegate, @@ -9900,19 +9791,19 @@ static void AppendCppBaseTypeMoveConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeName( + typeTypeName, output); output.Append("("); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -9971,7 +9862,7 @@ static void AppendCppBaseTypeMoveConstructor( static void AppendCppBaseTypeCopyConstructor( string typeName, - string cppTypeName, + TypeName typeTypeName, Type[] typeParams, Type[] interfaceTypes, bool typeIsDelegate, @@ -9981,19 +9872,19 @@ static void AppendCppBaseTypeCopyConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeName( + typeTypeName, output); output.Append("(const "); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeFullName( + typeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, @@ -10055,7 +9946,7 @@ static void AppendCppBaseTypeCopyConstructor( static void AppendCppBaseTypeNullptrConstructor( string typeName, - string cppTypeName, + TypeName cppTypeTypeName, Type[] typeParams, Type[] interfaceTypes, bool typeIsDelegate, @@ -10065,15 +9956,15 @@ static void AppendCppBaseTypeNullptrConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeName( + cppTypeTypeName, output); AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - cppTypeName, + AppendCppTypeName( + cppTypeTypeName, output); output.Append("(decltype(nullptr))\n"); AppendCppConstructorInitializerList( @@ -10109,7 +10000,7 @@ static void AppendCppBaseTypeNullptrConstructor( static void AppendCppBaseTypeConstructor( string bindingTypeName, - string typeNamespace, + TypeName typeTypeName, TypeKind typeKind, string cppTypeName, Type[] typeParams, @@ -10122,7 +10013,7 @@ static void AppendCppBaseTypeConstructor( StringBuilder output) { AppendCppMethodDefinitionBegin( - cppTypeName, + typeTypeName, null, cppTypeName, typeIsDelegate ? typeParams : null, @@ -10161,8 +10052,7 @@ static void AppendCppBaseTypeConstructor( } AppendCppPluginFunctionCall( true, - bindingTypeName, - typeNamespace, + GetTypeName(bindingTypeName, typeTypeName.Namespace), typeKind, typeParams, null, @@ -10230,9 +10120,8 @@ static void AppendCppBaseTypeConstructor( } static void AppendCppPointerFreeListInit( - string typeNamespace, Type[] typeParams, - string cppTypeName, + TypeName cppTypeTypeName, int maxSimultaneous, string typeName, StringBuilder output, @@ -10247,9 +10136,8 @@ static void AppendCppPointerFreeListInit( output.Append("\tPlugin::"); output.Append(typeName); output.Append("FreeList = ("); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10259,9 +10147,8 @@ static void AppendCppPointerFreeListInit( output.Append("\tcurMemory += "); output.Append(maxSimultaneous); output.Append(" * sizeof("); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10277,9 +10164,8 @@ static void AppendCppPointerFreeListInit( outputFirstBoot.Append("\t\t\tPlugin::"); outputFirstBoot.Append(typeName); outputFirstBoot.Append("FreeList[i] = ("); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, outputFirstBoot); AppendCppTypeParameters( typeParams, @@ -10305,17 +10191,15 @@ static void AppendCppPointerFreeListInit( } static void AppendCppPointerFreeListStateAndFunctions( - string typeNamespace, + TypeName cppTypeTypeName, Type[] typeParams, - string cppTypeName, string bindingTypeName, StringBuilder output) { // Section comment output.Append("\t// Free list for "); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10330,9 +10214,8 @@ static void AppendCppPointerFreeListStateAndFunctions( // Free list variable output.Append('\t'); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10343,9 +10226,8 @@ static void AppendCppPointerFreeListStateAndFunctions( // Next free variable output.Append('\t'); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10359,9 +10241,8 @@ static void AppendCppPointerFreeListStateAndFunctions( output.Append("\tint32_t Store"); output.Append(bindingTypeName); output.Append('('); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10372,9 +10253,8 @@ static void AppendCppPointerFreeListStateAndFunctions( output.Append(bindingTypeName); output.Append(" != nullptr);\n"); output.Append("\t\t"); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10385,9 +10265,8 @@ static void AppendCppPointerFreeListStateAndFunctions( output.Append("\t\tNextFree"); output.Append(bindingTypeName); output.Append(" = ("); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10402,9 +10281,8 @@ static void AppendCppPointerFreeListStateAndFunctions( // Get function output.Append('\t'); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10429,9 +10307,8 @@ static void AppendCppPointerFreeListStateAndFunctions( output.Append("(int32_t handle)\n"); output.Append("\t{\n"); output.Append("\t\t"); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10440,9 +10317,8 @@ static void AppendCppPointerFreeListStateAndFunctions( output.Append(bindingTypeName); output.Append("FreeList + handle;\n"); output.Append("\t\t*pRelease = ("); - AppendCppTypeName( - typeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10511,16 +10387,14 @@ static void AppendCppWholeObjectFreeListInit( static void AppendCppWholeObjectFreeListStateAndFunctions( Type[] typeParams, - string cppTypeName, - string cppTypeNamespace, + TypeName cppTypeTypeName, string bindingTypeName, StringBuilder output) { // Section comment output.Append("\t// Free list for whole "); - AppendCppTypeName( - cppTypeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10537,9 +10411,8 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( output.Append(bindingTypeName); output.Append("FreeWholeListEntry* Next;\n"); output.Append("\t\t"); - AppendCppTypeName( - cppTypeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10569,9 +10442,8 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( // Store function output.Append('\t'); - AppendCppTypeName( - cppTypeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10599,9 +10471,8 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( output.Append("\tvoid RemoveWhole"); output.Append(bindingTypeName); output.Append('('); - AppendCppTypeName( - cppTypeNamespace, - cppTypeName, + AppendCppTypeFullName( + cppTypeTypeName, output); AppendCppTypeParameters( typeParams, @@ -10634,8 +10505,7 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( static void AppendCsharpDelegate( bool isStatic, - string typeName, - string typeNamespace, + TypeName typeTypeName, Type[] typeParams, string funcName, ParameterInfo[] parameters, @@ -10657,7 +10527,7 @@ static void AppendCsharpDelegate( output.Append("int"); break; default: - AppendCsharpTypeName( + AppendCsharpTypeFullName( returnType, output); break; @@ -10665,8 +10535,7 @@ static void AppendCsharpDelegate( } output.Append(' '); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); @@ -10687,7 +10556,7 @@ static void AppendCsharpDelegate( case TypeKind.FullStruct: case TypeKind.Primitive: case TypeKind.Enum: - AppendCsharpTypeName( + AppendCsharpTypeFullName( param.ParameterType, output); output.Append(" param"); @@ -10706,15 +10575,13 @@ static void AppendCsharpDelegate( output.Append(");\n"); output.Append("\t\tpublic static "); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); output.Append("Delegate "); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); @@ -10722,18 +10589,17 @@ static void AppendCsharpDelegate( } static void AppendCsharpDelegateName( - string typeName, - string typeNamespace, + TypeName typeTypeName, Type[] typeParams, string funcName, StringBuilder output) { AppendNamespace( - typeNamespace, + typeTypeName.Namespace, string.Empty, output); AppendTypeNameWithoutSuffixes( - typeName, + typeTypeName.Name, output); AppendTypeNames( typeParams, @@ -10742,30 +10608,26 @@ static void AppendCsharpDelegateName( } static void AppendCsharpGetDelegateCall( - string typeName, - string typeNamespace, + TypeName typeTypeName, Type[] typeParams, string funcName, StringBuilder output) { output.Append("\t\t\t"); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); output.Append(" = GetDelegate<"); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); output.Append("Delegate>(libraryHandle, \""); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); @@ -10773,8 +10635,7 @@ static void AppendCsharpGetDelegateCall( } static void AppendCsharpImport( - string typeName, - string typeNamespace, + TypeName typeTypeName, Type[] typeParams, string funcName, ParameterInfo[] parameters, @@ -10784,8 +10645,7 @@ StringBuilder output output.Append("\t\t[DllImport(Constants.PluginName)]\n"); output.Append("\t\tpublic static extern void "); AppendCsharpDelegateName( - typeName, - typeNamespace, + typeTypeName, typeParams, funcName, output); @@ -10799,7 +10659,7 @@ StringBuilder output ParameterInfo param = parameters[i]; if (param.Kind == TypeKind.FullStruct) { - AppendCsharpTypeName( + AppendCsharpTypeFullName( param.ParameterType, output); output.Append(" param"); @@ -10901,7 +10761,7 @@ static void AppendExceptions( builders.CppMethodDefinitions.Append("struct "); builders.CppMethodDefinitions.Append(exceptionType.Name); builders.CppMethodDefinitions.Append("Thrower : "); - AppendCppTypeName( + AppendCppTypeFullName( exceptionType, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); @@ -10934,7 +10794,7 @@ static void AppendExceptions( throwerIndent + 2, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(", "); - AppendCppTypeName( + AppendCppTypeFullName( exceptionType, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("(Plugin::InternalUse::Only, handle)\n"); @@ -10982,7 +10842,7 @@ static void AppendExceptions( builders.CppMethodDefinitions.Append("{\n"); builders.CppMethodDefinitions.Append("\tdelete Plugin::unhandledCsharpException;\n"); builders.CppMethodDefinitions.Append("\tPlugin::unhandledCsharpException = new "); - AppendCppTypeName( + AppendCppTypeFullName( exceptionType, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("Thrower(handle);\n"); @@ -10994,8 +10854,7 @@ static void AppendExceptions( // C# imports AppendCsharpImport( - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, funcName, parameters, @@ -11004,8 +10863,7 @@ static void AppendExceptions( // C# delegate AppendCsharpDelegate( true, - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, funcName, parameters, @@ -11016,8 +10874,7 @@ static void AppendExceptions( // C# GetDelegate call AppendCsharpGetDelegateCall( - string.Empty, - string.Empty, + GetTypeName(string.Empty, string.Empty), null, funcName, builders.CsharpGetDelegateCalls); @@ -11071,8 +10928,7 @@ static void AppendGetter( // Build uppercase function name builders.TempStrBuilder.Length = 0; AppendFieldPropertyFuncName( - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeParams, syntaxType, "Get", @@ -11165,8 +11021,7 @@ static void AppendGetter( AppendCppFunctionPointerDefinition( funcName, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, parameters, fieldType, @@ -11186,7 +11041,7 @@ static void AppendGetter( // C++ method definition AppendCppMethodDefinitionBegin( - enclosingType.Name, + GetTypeName(enclosingType), fieldType, methodName, enclosingTypeParams, @@ -11198,8 +11053,7 @@ static void AppendGetter( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, enclosingTypeParams, fieldType, @@ -11221,8 +11075,7 @@ static void AppendGetter( AppendCppInitParam( funcNameLower, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + GetTypeName(enclosingType), enclosingTypeKind, parameters, fieldType, @@ -11249,6 +11102,8 @@ static void AppendSetter( Type[] exceptionTypes, StringBuilders builders) { + TypeName enclosingTypeTypeName = GetTypeName(enclosingType); + // Build uppercased field name builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(char.ToUpper(fieldName[0])); @@ -11261,8 +11116,7 @@ static void AppendSetter( // Build uppercase function name builders.TempStrBuilder.Length = 0; AppendFieldPropertyFuncName( - enclosingType.Name, - enclosingType.Namespace, + enclosingTypeTypeName, enclosingTypeParams, syntaxType, "Set", @@ -11358,8 +11212,7 @@ static void AppendSetter( AppendCppFunctionPointerDefinition( funcName, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + enclosingTypeTypeName, enclosingTypeKind, parameters, typeof(void), @@ -11379,7 +11232,7 @@ static void AppendSetter( // C++ method definition AppendCppMethodDefinitionBegin( - enclosingType.Name, + GetTypeName(enclosingType), typeof(void), methodName, enclosingTypeParams, @@ -11391,8 +11244,7 @@ static void AppendSetter( builders.CppMethodDefinitions.Append("{\n"); AppendCppPluginFunctionCall( methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, null, @@ -11409,8 +11261,7 @@ static void AppendSetter( AppendCppInitParam( funcNameLower, methodIsStatic, - enclosingType.Name, - enclosingType.Namespace, + enclosingTypeTypeName, enclosingTypeKind, parameters, typeof(void), @@ -11424,8 +11275,7 @@ static void AppendSetter( } static void AppendFieldPropertyFuncName( - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, Type[] enclosingTypeParams, string syntaxType, string operationType, @@ -11433,11 +11283,11 @@ static void AppendFieldPropertyFuncName( StringBuilder output) { AppendNamespace( - enclosingTypeNamespace, + enclosingTypeTypeName.Namespace, string.Empty, output); AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + enclosingTypeTypeName.Name, output); AppendTypeNames( enclosingTypeParams, @@ -11449,24 +11299,22 @@ static void AppendFieldPropertyFuncName( } static void AppendCppTemplateDeclaration( - string typeName, - string typeNamespace, - int numTypeParameters, + TypeName typeTypeName, StringBuilder output) { int indent = AppendNamespaceBeginning( - typeNamespace, + typeTypeName.Namespace, output); AppendIndent( indent, output); AppendCppTemplateTypenames( - numTypeParameters, + typeTypeName.NumTypeParams, 'T', output); output.Append("struct "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); output.Append(";"); output.Append('\n'); @@ -11477,21 +11325,20 @@ static void AppendCppTemplateDeclaration( } static int AppendCppTypeDeclaration( - string typeNamespace, - string typeName, + TypeName typeTypeName, bool isStatic, Type[] typeParams, StringBuilder output) { int indent = AppendNamespaceBeginning( - typeNamespace, + typeTypeName.Namespace, output); AppendIndent(indent, output); if (isStatic) { output.Append("namespace "); AppendTypeNameWithoutGenericSuffix( - typeName, + typeTypeName.Name, output); output.Append('\n'); AppendIndent(indent, output); @@ -11506,8 +11353,8 @@ static int AppendCppTypeDeclaration( output.Append("template<> "); } output.Append("struct "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11523,12 +11370,10 @@ static int AppendCppTypeDeclaration( } static void AppendCppTypeDefinitionBegin( - string typeName, - string typeNamespace, + TypeName typeTypeName, TypeKind typeKind, Type[] typeParams, - string baseTypeName, - string baseTypeNamespace, + TypeName baseTypeTypeName, Type[] baseTypeTypeParams, Type[] interfaceTypes, bool isStatic, @@ -11536,7 +11381,7 @@ static void AppendCppTypeDefinitionBegin( StringBuilder output) { AppendNamespaceBeginning( - typeNamespace, + typeTypeName.Namespace, output); AppendIndent( indent, @@ -11545,7 +11390,7 @@ static void AppendCppTypeDefinitionBegin( { output.Append("namespace "); AppendTypeNameWithoutGenericSuffix( - typeName, + typeTypeName.Name, output); } else @@ -11555,8 +11400,8 @@ static void AppendCppTypeDefinitionBegin( output.Append("template<> "); } output.Append("struct "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters(typeParams, output); switch (typeKind) @@ -11566,17 +11411,19 @@ static void AppendCppTypeDefinitionBegin( // there are no interfaces (since they always extend it) string separator = " : virtual "; if ( - (baseTypeName != null && - (baseTypeNamespace != "System" || - baseTypeName != "Object")) || + (baseTypeTypeName.Name != null && + (baseTypeTypeName.Namespace != "System" || + baseTypeTypeName.Name != "Object")) || (interfaceTypes == null || interfaceTypes.Length == 0)) { output.Append(separator); separator = ", virtual "; - AppendCppTypeName( - baseTypeNamespace ?? "System", - baseTypeName ?? "Object", + AppendCppTypeFullName( + GetTypeName( + baseTypeTypeName.Name ?? "Object", + baseTypeTypeName.Namespace ?? "System", + baseTypeTypeParams != null ? baseTypeTypeParams.Length : 0), output); AppendCppTypeParameters( baseTypeTypeParams, @@ -11588,9 +11435,8 @@ static void AppendCppTypeDefinitionBegin( { output.Append(separator); separator = ", virtual "; - AppendCppTypeName( - interfaceType.Namespace, - interfaceType.Name, + AppendCppTypeFullName( + GetTypeName(interfaceType), output); AppendCppTypeParameters( interfaceType.GetGenericArguments(), @@ -11616,8 +11462,8 @@ static void AppendCppTypeDefinitionBegin( case TypeKind.ManagedStruct: // Constructor from nullptr AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11626,8 +11472,8 @@ static void AppendCppTypeDefinitionBegin( // Constructor from handle AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11637,15 +11483,15 @@ static void AppendCppTypeDefinitionBegin( // Copy constructor AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("(const "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11654,15 +11500,15 @@ static void AppendCppTypeDefinitionBegin( // Move constructor AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append('('); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11672,8 +11518,8 @@ static void AppendCppTypeDefinitionBegin( // Destructor AppendIndent(indent + 1, output); output.Append("virtual ~"); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11682,15 +11528,15 @@ static void AppendCppTypeDefinitionBegin( // Assignment operator to same type AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("& operator=(const "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11699,8 +11545,8 @@ static void AppendCppTypeDefinitionBegin( // Assignment operator to nullptr AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11709,15 +11555,15 @@ static void AppendCppTypeDefinitionBegin( // Move assignment operator to same type AppendIndent(indent + 1, output); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("& operator=("); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11727,8 +11573,8 @@ static void AppendCppTypeDefinitionBegin( // Equality operator with same type AppendIndent(indent + 1, output); output.Append("bool operator==(const "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11738,8 +11584,8 @@ static void AppendCppTypeDefinitionBegin( // Inequality operator with same type AppendIndent(indent + 1, output); output.Append("bool operator!=(const "); - AppendTypeNameWithoutGenericSuffix( - typeName, + AppendCppTypeName( + typeTypeName, output); AppendCppTypeParameters( typeParams, @@ -11771,8 +11617,7 @@ static void AppendCppTypeDefinitionEnd( } static int AppendCppMethodDefinitionsBegin( - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, Type[] enclosingTypeParams, Type[] interfaceTypes, @@ -11783,7 +11628,7 @@ static int AppendCppMethodDefinitionsBegin( StringBuilder output) { int cppMethodDefinitionsIndent = AppendNamespaceBeginning( - enclosingTypeNamespace, + enclosingTypeTypeName.Namespace, output); if (!isStatic && ( enclosingTypeKind == TypeKind.Class @@ -11791,15 +11636,15 @@ static int AppendCppMethodDefinitionsBegin( { // Construct with nullptr AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); output.Append("(decltype(nullptr))\n"); if (enclosingTypeKind == TypeKind.Class) @@ -11819,15 +11664,15 @@ static int AppendCppMethodDefinitionsBegin( // Handle constructor AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); output.Append("(Plugin::InternalUse, int32_t handle)\n"); if (enclosingTypeKind == TypeKind.Class) @@ -11847,8 +11692,7 @@ static int AppendCppMethodDefinitionsBegin( output.Append("{\n"); AppendIndent(indent + 2, output); AppendReferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, "handle", @@ -11864,19 +11708,19 @@ static int AppendCppMethodDefinitionsBegin( // Copy constructor AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); output.Append("(const "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -11884,8 +11728,8 @@ static int AppendCppMethodDefinitionsBegin( output.Append("& other)\n"); AppendIndent(indent + 1, output); output.Append(": "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent(indent, output); @@ -11898,19 +11742,19 @@ static int AppendCppMethodDefinitionsBegin( // Move constructor AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); output.Append("("); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -11918,8 +11762,8 @@ static int AppendCppMethodDefinitionsBegin( output.Append("&& other)\n"); AppendIndent(indent, output); output.Append("\t: "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent(indent, output); @@ -11932,18 +11776,18 @@ static int AppendCppMethodDefinitionsBegin( output.Append("}\n"); AppendIndent(indent, output); output.Append('\n'); - + // Destructor AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::~"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -11957,8 +11801,7 @@ static int AppendCppMethodDefinitionsBegin( output.Append("{\n"); AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, "Handle", @@ -11975,22 +11818,22 @@ static int AppendCppMethodDefinitionsBegin( // Assignment operator to same type AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("& "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::operator=(const "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -11999,8 +11842,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("{\n"); AppendSetHandle( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, indent + 1, @@ -12017,15 +11859,15 @@ static int AppendCppMethodDefinitionsBegin( // Assignment operator to nullptr AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("& "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -12039,8 +11881,7 @@ static int AppendCppMethodDefinitionsBegin( output.Append("{\n"); AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, "Handle", @@ -12059,22 +11900,22 @@ static int AppendCppMethodDefinitionsBegin( // Move assignment operator to same type AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("& "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::operator=("); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -12088,8 +11929,7 @@ static int AppendCppMethodDefinitionsBegin( output.Append("{\n"); AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, "Handle", @@ -12113,15 +11953,15 @@ static int AppendCppMethodDefinitionsBegin( // Equality operator with same type AppendIndent(indent, output); output.Append("bool "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::operator==(const "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -12139,15 +11979,15 @@ static int AppendCppMethodDefinitionsBegin( // Inequality operator with same type AppendIndent(indent, output); output.Append("bool "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, output); output.Append("::operator!=(const "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeParams, @@ -12166,8 +12006,7 @@ static int AppendCppMethodDefinitionsBegin( } static void AppendSetHandle( - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, Type[] enclosingTypeParams, int indent, @@ -12184,8 +12023,7 @@ static void AppendSetHandle( output.Append("{\n"); AppendIndent(indent + 1, output); AppendDereferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, thisHandleExpression, @@ -12206,8 +12044,7 @@ static void AppendSetHandle( output.Append("{\n"); AppendIndent(indent + 1, output); AppendReferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, thisHandleExpression, @@ -12218,8 +12055,7 @@ static void AppendSetHandle( } static void AppendReferenceManagedHandleFunctionCall( - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, Type[] enclosingTypeParams, string handleVariable, @@ -12229,8 +12065,7 @@ static void AppendReferenceManagedHandleFunctionCall( { output.Append("Plugin::ReferenceManaged"); AppendReleaseFunctionNameSuffix( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeParams, output); output.Append("(Handle)"); @@ -12244,8 +12079,7 @@ static void AppendReferenceManagedHandleFunctionCall( } static void AppendDereferenceManagedHandleFunctionCall( - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, Type[] enclosingTypeParams, string handleVariable, @@ -12255,8 +12089,7 @@ static void AppendDereferenceManagedHandleFunctionCall( { output.Append("Plugin::DereferenceManaged"); AppendReleaseFunctionNameSuffix( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeParams, output); output.Append("(Handle)"); @@ -12367,7 +12200,7 @@ static void AppendCsharpDelegateType( // Return type if (IsFullValueType(returnType)) { - AppendCsharpTypeName( + AppendCsharpTypeFullName( returnType, output); } @@ -12384,7 +12217,7 @@ static void AppendCsharpDelegateType( if (enclosingTypeKind == TypeKind.FullStruct) { output.Append("ref "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( enclosingType, output); output.Append(" thiz"); @@ -12422,7 +12255,7 @@ static void AppendCsharpFunctionBeginning( { if (IsFullValueType(returnType)) { - AppendCsharpTypeName( + AppendCsharpTypeFullName( returnType, output); } @@ -12443,7 +12276,7 @@ static void AppendCsharpFunctionBeginning( if (enclosingTypeKind == TypeKind.FullStruct) { output.Append("ref "); - AppendCsharpTypeName( + AppendCsharpTypeFullName( enclosingType, output); output.Append(" thiz"); @@ -12470,7 +12303,7 @@ static void AppendCsharpFunctionBeginning( && enclosingTypeKind != TypeKind.FullStruct) { output.Append("var thiz = ("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( enclosingType, output); output.Append(')'); @@ -12494,7 +12327,7 @@ static void AppendCsharpFunctionBeginning( if (paramType != typeof(object)) { output.Append('('); - AppendCsharpTypeName(paramType, output); + AppendCsharpTypeFullName(paramType, output); output.Append(')'); } AppendHandleStoreTypeName(paramType, output); @@ -12518,7 +12351,7 @@ static void AppendCsharpFunctionCallSubject( { if (isStatic) { - AppendCsharpTypeName( + AppendCsharpTypeFullName( enclosingType, output); } @@ -12693,7 +12526,7 @@ static void AppendCsharpCatchException( StringBuilder output) { output.Append("\t\t\tcatch ("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( exceptionType, output); output.Append(" ex)\n"); @@ -12718,7 +12551,7 @@ static void AppendCsharpCatchException( else { output.Append(" = default("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( param.DereferencedParameterType, output); output.Append(");\n"); @@ -12730,7 +12563,7 @@ static void AppendCsharpCatchException( output.Append("\t\t\t\treturn default("); if (IsFullValueType(returnType)) { - AppendCsharpTypeName( + AppendCsharpTypeFullName( returnType, output); } @@ -12801,7 +12634,7 @@ static void AppendCsharpBindingParameterDeclaration( output.Append("int"); break; default: - AppendCsharpTypeName( + AppendCsharpTypeFullName( param.DereferencedParameterType, output); break; @@ -12848,7 +12681,7 @@ static void AppendCppParameterDeclaration( } else { - AppendCppTypeName( + AppendCppTypeFullName( paramType, output); } @@ -12912,7 +12745,7 @@ static void AppendCppParameterDeclaration( Type type = param.DefaultValue.GetType(); if (type.IsEnum) { - AppendCppTypeName( + AppendCppTypeFullName( type, output); output.Append("::"); @@ -12922,7 +12755,7 @@ static void AppendCppParameterDeclaration( { StringBuilder error = new StringBuilder(); error.Append("Default parameter type ("); - AppendCsharpTypeName( + AppendCsharpTypeFullName( param.DefaultValue.GetType(), error); error.Append(") not supported"); @@ -12964,7 +12797,7 @@ static void AppendCppInitBody( } static void AppendCppMethodDefinitionBegin( - string enclosingTypeName, + TypeName enclosingTypeTypeName, Type returnType, string methodName, Type[] enclosingTypeTypeParams, @@ -12987,15 +12820,15 @@ static void AppendCppMethodDefinitionBegin( // Return type if (returnType != null) { - AppendCppTypeName( + AppendCppTypeFullName( returnType, output); output.Append(' '); } - + // Type name - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, + AppendCppTypeFullName( + enclosingTypeTypeName, output); AppendCppTypeParameters( enclosingTypeTypeParams, @@ -13040,7 +12873,7 @@ static void AppendCppMethodReturn( output.Append("returnValue"); break; default: - AppendCppTypeName( + AppendCppTypeFullName( returnType, output); output.Append("(Plugin::InternalUse::Only, returnValue)"); @@ -13052,8 +12885,7 @@ static void AppendCppMethodReturn( static void AppendCppPluginFunctionCall( bool isStatic, - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, Type[] enclosingTypeParams, Type returnType, @@ -13156,8 +12988,7 @@ static void AppendCppPluginFunctionCall( && (param.IsOut || param.IsRef)) { AppendSetHandle( - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, enclosingTypeParams, indent, @@ -13191,8 +13022,7 @@ static void AppendCppUnhandledExceptionHandling( static void AppendCppInitParam( string funcName, bool isStatic, - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, ParameterInfo[] parameters, Type returnType, @@ -13203,8 +13033,7 @@ StringBuilder output AppendCppFunctionPointer( funcName, isStatic, - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, parameters, returnType, @@ -13217,8 +13046,7 @@ StringBuilder output static void AppendCppFunctionPointerDefinition( string funcName, bool isStatic, - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, ParameterInfo[] parameters, Type returnType, @@ -13229,8 +13057,7 @@ StringBuilder output AppendCppFunctionPointer( funcName, isStatic, - enclosingTypeName, - enclosingTypeNamespace, + enclosingTypeTypeName, enclosingTypeKind, parameters, returnType, @@ -13243,8 +13070,7 @@ StringBuilder output static void AppendCppFunctionPointer( string funcName, bool isStatic, - string enclosingTypeName, - string enclosingTypeNamespace, + TypeName enclosingTypeTypeName, TypeKind enclosingTypeKind, ParameterInfo[] parameters, Type returnType, @@ -13264,7 +13090,7 @@ static void AppendCppFunctionPointer( } else if (IsFullValueType(returnType)) { - AppendCppTypeName(returnType, output); + AppendCppTypeFullName(returnType, output); } else { @@ -13280,9 +13106,8 @@ static void AppendCppFunctionPointer( { case TypeKind.FullStruct: case TypeKind.Primitive: - AppendCppTypeName( - enclosingTypeNamespace, - enclosingTypeName, + AppendCppTypeFullName( + enclosingTypeTypeName, output); output.Append("* thiz"); break; @@ -13310,7 +13135,7 @@ static void AppendCppFunctionPointer( } break; case TypeKind.Enum: - AppendCppTypeName( + AppendCppTypeFullName( param.DereferencedParameterType, output); if (param.IsOut || param.IsRef) @@ -13319,7 +13144,7 @@ static void AppendCppFunctionPointer( } break; case TypeKind.FullStruct: - AppendCppTypeName( + AppendCppTypeFullName( param.DereferencedParameterType, output); if (param.IsOut || param.IsRef) @@ -13417,7 +13242,7 @@ static void AppendCppMethodDeclaration( } else { - AppendCppTypeName( + AppendCppTypeFullName( returnType, output); } @@ -13442,7 +13267,7 @@ static void AppendCppMethodDeclaration( output.Append(";\n"); } - static void AppendCsharpTypeName( + static void AppendCsharpTypeFullName( Type type, StringBuilder output) { @@ -13508,7 +13333,7 @@ static void AppendCsharpTypeName( } else if (type.IsArray) { - AppendCsharpTypeName( + AppendCsharpTypeFullName( type.GetElementType(), output); output.Append('['); @@ -13517,7 +13342,7 @@ static void AppendCsharpTypeName( } else { - AppendCsharpTypeName(type.Namespace, type.Name, output); + AppendCsharpTypeFullName(GetTypeName(type), output); Type[] genTypes = type.GetGenericArguments(); AppendCSharpTypeParameters( genTypes, @@ -13525,20 +13350,19 @@ static void AppendCsharpTypeName( } } - static void AppendCsharpTypeName( - string namespaceName, - string name, + static void AppendCsharpTypeFullName( + TypeName typeName, StringBuilder output) { - if (!string.IsNullOrEmpty(namespaceName)) + if (!string.IsNullOrEmpty(typeName.Namespace)) { - output.Append(namespaceName); + output.Append(typeName.Namespace); output.Append('.'); } - AppendTypeNameWithoutGenericSuffix(name, output); + AppendTypeNameWithoutGenericSuffix(typeName.Name, output); } - static void AppendCppTypeName( + static void AppendCppTypeFullName( Type type, StringBuilder output) { @@ -13611,7 +13435,7 @@ static void AppendCppTypeName( Type elementType = type.GetElementType(); for (int i = 0; i < rank; ++i) { - AppendCppTypeName( + AppendCppTypeFullName( elementType, output); if (i != rank -1) @@ -13623,48 +13447,45 @@ static void AppendCppTypeName( } else if (IsDelegate(type)) { - AppendCppTypeName( - type.Namespace, - type.Name, + AppendCppTypeFullName( + GetTypeName(type), output); Type[] genTypes = type.GetGenericArguments(); - if (genTypes.Length > 0) - { - output.Append(genTypes.Length); - } AppendCppTypeParameters( genTypes, output); } else { - AppendCppTypeName( - type.Namespace, - type.Name, - output); + TypeName typeName = GetTypeName(type); + AppendCppTypeFullName(typeName, output); Type[] genTypes = type.GetGenericArguments(); - AppendCppTypeParameters( - genTypes, - output); + AppendCppTypeParameters(genTypes, output); } } - static void AppendCppTypeName( - string namespaceName, - string name, + static void AppendCppTypeFullName( + TypeName typeName, StringBuilder output) { - AppendNamespace( - namespaceName, - "::", - output); - if (!string.IsNullOrEmpty(namespaceName)) + AppendNamespace(typeName.Namespace, "::", output); + if (!string.IsNullOrEmpty(typeName.Namespace)) { output.Append("::"); } - AppendTypeNameWithoutGenericSuffix( - name, - output); + AppendCppTypeName(typeName, output); + } + + static void AppendCppTypeName( + TypeName typeName, + StringBuilder output) + { + AppendTypeNameWithoutGenericSuffix(typeName.Name, output); + if (typeName.NumTypeParams > 0) + { + output.Append('_'); + output.Append(typeName.NumTypeParams); + } } static void AppendCppPrimitiveTypeName( diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index f04e9f5..26511b8 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -11,6 +11,161 @@ { "Name": " System.IComparable" }, + { + "Name": "System.IEquatable`1", + "GenericParams": [ + { + "Types": [ + "System.Boolean" + ] + }, + { + "Types": [ + "System.Char" + ] + }, + { + "Types": [ + "System.SByte" + ] + }, + { + "Types": [ + "System.Byte" + ] + }, + { + "Types": [ + "System.Int16" + ] + }, + { + "Types": [ + "System.UInt16" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.UInt32" + ] + }, + { + "Types": [ + "System.Int64" + ] + }, + { + "Types": [ + "System.UInt64" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "System.Double" + ] + }, + { + "Types": [ + "System.Decimal" + ] + } + ] + }, + { + "Name": "System.IComparable`1", + "GenericParams": [ + { + "Types": [ + "System.Boolean" + ] + }, + { + "Types": [ + "System.Char" + ] + }, + { + "Types": [ + "System.SByte" + ] + }, + { + "Types": [ + "System.Byte" + ] + }, + { + "Types": [ + "System.Int16" + ] + }, + { + "Types": [ + "System.UInt16" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.UInt32" + ] + }, + { + "Types": [ + "System.Int64" + ] + }, + { + "Types": [ + "System.UInt64" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "System.Double" + ] + }, + { + "Types": [ + "System.Decimal" + ] + } + ] + }, + { + "Name": "System.Decimal", + "Constructors": [ + { + "ParamTypes": [ + "System.Double" + ] + }, + { + "ParamTypes": [ + "System.UInt64" + ] + } + ] + }, { "Name": "UnityEngine.Vector3", "Constructors": [ diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index e9f1568..23820f9 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -53,6 +53,11 @@ namespace Plugin int32_t (*EnumerableGetEnumerator)(int32_t handle); /*BEGIN FUNCTION POINTERS*/ + void (*ReleaseSystemDecimal)(int32_t handle); + int32_t (*SystemDecimalConstructorSystemDouble)(double value); + int32_t (*SystemDecimalConstructorSystemUInt64)(uint64_t value); + int32_t (*BoxDecimal)(int32_t valHandle); + int32_t (*UnboxDecimal)(int32_t valHandle); UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b); int32_t (*BoxVector3)(UnityEngine::Vector3& val); @@ -198,6 +203,16 @@ namespace System return IConvertible(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); } + Boolean::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); + } + + Boolean::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxBoolean(Value)); + } + Char::Char() : Value(0) { @@ -242,6 +257,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); } + + Char::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); + } + + Char::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxChar(Value)); + } SByte::SByte() : Value(0) @@ -282,6 +307,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); } + + SByte::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); + } + + SByte::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxSByte(Value)); + } Byte::Byte() : Value(0) @@ -322,6 +357,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); } + + Byte::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); + } + + Byte::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxByte(Value)); + } Int16::Int16() : Value(0) @@ -362,6 +407,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); } + + Int16::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); + } + + Int16::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxInt16(Value)); + } UInt16::UInt16() : Value(0) @@ -402,6 +457,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); } + + UInt16::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); + } + + UInt16::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxUInt16(Value)); + } Int32::Int32() : Value(0) @@ -442,6 +507,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); } + + Int32::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); + } + + Int32::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxInt32(Value)); + } UInt32::UInt32() : Value(0) @@ -482,6 +557,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); } + + UInt32::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); + } + + UInt32::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxUInt32(Value)); + } Int64::Int64() : Value(0) @@ -522,6 +607,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); } + + Int64::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); + } + + Int64::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxInt64(Value)); + } UInt64::UInt64() : Value(0) @@ -562,6 +657,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); } + + UInt64::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); + } + + UInt64::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxUInt64(Value)); + } Single::Single() : Value(0.0f) @@ -602,6 +707,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); } + + Single::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); + } + + Single::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxSingle(Value)); + } Double::Double() : Value(0.0) @@ -642,6 +757,16 @@ namespace System { return IConvertible(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); } + + Double::operator IComparable_1() const + { + return IComparable_1(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); + } + + Double::operator IEquatable_1() const + { + return IEquatable_1(Plugin::InternalUse::Only, Plugin::BoxDouble(Value)); + } } //////////////////////////////////////////////////////////////// @@ -682,6 +807,20 @@ namespace Plugin } } +//////////////////////////////////////////////////////////////// +// User-defined literals for creating decimals (System.Decimal) +//////////////////////////////////////////////////////////////// + +System::Decimal operator"" _m(long double x) +{ + return System::Decimal((System::Double)x); +} + +System::Decimal operator"" _m(unsigned long long x) +{ + return System::Decimal((System::UInt64)x); +} + //////////////////////////////////////////////////////////////// // Reference counting of managed objects //////////////////////////////////////////////////////////////// @@ -728,6 +867,31 @@ namespace Plugin } /*BEGIN GLOBAL STATE AND FUNCTIONS*/ + int32_t RefCountsLenSystemDecimal; + int32_t* RefCountsSystemDecimal; + + void ReferenceManagedSystemDecimal(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenSystemDecimal); + if (handle != 0) + { + RefCountsSystemDecimal[handle]++; + } + } + + void DereferenceManagedSystemDecimal(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenSystemDecimal); + if (handle != 0) + { + int32_t numRemain = --RefCountsSystemDecimal[handle]; + if (numRemain == 0) + { + ReleaseSystemDecimal(handle); + } + } + } + // Free list for MyGame::BaseBallScript pointers int32_t BaseBallScriptFreeListSize; @@ -1272,13 +1436,2376 @@ namespace System } } +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + IComparable_1::IComparable_1(decltype(nullptr)) + { + } + + IComparable_1::IComparable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IComparable_1::IComparable_1(const IComparable_1& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IComparable_1::IComparable_1(IComparable_1&& other) + : IComparable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IComparable_1::~IComparable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IComparable_1& IComparable_1::operator=(const IComparable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IComparable_1& IComparable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IComparable_1& IComparable_1::operator=(IComparable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IComparable_1::operator==(const IComparable_1& other) const + { + return Handle == other.Handle; + } + + bool IComparable_1::operator!=(const IComparable_1& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + Decimal::Decimal(decltype(nullptr)) + { + } + + Decimal::Decimal(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedSystemDecimal(Handle); + } + } + + Decimal::Decimal(const Decimal& other) + : Decimal(Plugin::InternalUse::Only, other.Handle) + { + } + + Decimal::Decimal(Decimal&& other) + : Decimal(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Decimal::~Decimal() + { + if (Handle) + { + Plugin::DereferenceManagedSystemDecimal(Handle); + Handle = 0; + } + } + + Decimal& Decimal::operator=(const Decimal& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedSystemDecimal(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedSystemDecimal(Handle); + } + return *this; + } + + Decimal& Decimal::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedSystemDecimal(Handle); + Handle = 0; + } + return *this; + } + + Decimal& Decimal::operator=(Decimal&& other) + { + if (Handle) + { + Plugin::DereferenceManagedSystemDecimal(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Decimal::operator==(const Decimal& other) const + { + return Handle == other.Handle; + } + + bool Decimal::operator!=(const Decimal& other) const + { + return Handle != other.Handle; + } + + System::Decimal::Decimal(System::Double value) + { + auto returnValue = Plugin::SystemDecimalConstructorSystemDouble(value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedSystemDecimal(Handle); + } + } + + System::Decimal::Decimal(System::UInt64 value) + { + auto returnValue = Plugin::SystemDecimalConstructorSystemUInt64(value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedSystemDecimal(Handle); + } + } + + System::Decimal::operator System::ValueType() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::ValueType(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::Object() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::Object(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::IFormattable() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::IConvertible() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IConvertible(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::IComparable() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::IComparable_1() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable_1(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::IEquatable_1() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IEquatable_1(Plugin::InternalUse::Only, handle); + } + return nullptr; + } +} + +namespace System +{ + System::Object::operator System::Decimal() + { + System::Decimal returnVal(Plugin::InternalUse::Only, Plugin::UnboxDecimal(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + namespace UnityEngine { Vector3::Vector3() { } - Vector3::Vector3(System::Single x, System::Single y, System::Single z) + UnityEngine::Vector3::Vector3(System::Single x, System::Single y, System::Single z) { auto returnValue = Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(x, y, z); if (Plugin::unhandledCsharpException) @@ -1291,7 +3818,7 @@ namespace UnityEngine *this = returnValue; } - UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a) + UnityEngine::Vector3 UnityEngine::Vector3::operator+(UnityEngine::Vector3& a) { auto returnValue = Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(*this, a); if (Plugin::unhandledCsharpException) @@ -1304,7 +3831,7 @@ namespace UnityEngine return returnValue; } - Vector3::operator System::ValueType() + UnityEngine::Vector3::operator System::ValueType() { int32_t handle = Plugin::BoxVector3(*this); if (Plugin::unhandledCsharpException) @@ -1322,7 +3849,7 @@ namespace UnityEngine return nullptr; } - Vector3::operator System::Object() + UnityEngine::Vector3::operator System::Object() { int32_t handle = Plugin::BoxVector3(*this); if (Plugin::unhandledCsharpException) @@ -1343,7 +3870,7 @@ namespace UnityEngine namespace System { - Object::operator UnityEngine::Vector3() + System::Object::operator UnityEngine::Vector3() { UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); if (Plugin::unhandledCsharpException) @@ -1437,7 +3964,7 @@ namespace UnityEngine return Handle != other.Handle; } - System::String Object::GetName() + System::String UnityEngine::Object::GetName() { auto returnValue = Plugin::UnityEngineObjectPropertyGetName(Handle); if (Plugin::unhandledCsharpException) @@ -1450,7 +3977,7 @@ namespace UnityEngine return System::String(Plugin::InternalUse::Only, returnValue); } - void Object::SetName(System::String& value) + void UnityEngine::Object::SetName(System::String& value) { Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -1545,7 +4072,7 @@ namespace UnityEngine return Handle != other.Handle; } - UnityEngine::Transform Component::GetTransform() + UnityEngine::Transform UnityEngine::Component::GetTransform() { auto returnValue = Plugin::UnityEngineComponentPropertyGetTransform(Handle); if (Plugin::unhandledCsharpException) @@ -1645,7 +4172,7 @@ namespace UnityEngine return Handle != other.Handle; } - UnityEngine::Vector3 Transform::GetPosition() + UnityEngine::Vector3 UnityEngine::Transform::GetPosition() { auto returnValue = Plugin::UnityEngineTransformPropertyGetPosition(Handle); if (Plugin::unhandledCsharpException) @@ -1658,7 +4185,7 @@ namespace UnityEngine return returnValue; } - void Transform::SetPosition(UnityEngine::Vector3& value) + void UnityEngine::Transform::SetPosition(UnityEngine::Vector3& value) { Plugin::UnityEngineTransformPropertySetPosition(Handle, value); if (Plugin::unhandledCsharpException) @@ -1753,7 +4280,7 @@ namespace System return Handle != other.Handle; } - System::Object IEnumerator::GetCurrent() + System::Object System::Collections::IEnumerator::GetCurrent() { auto returnValue = Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent(Handle); if (Plugin::unhandledCsharpException) @@ -1766,7 +4293,7 @@ namespace System return System::Object(Plugin::InternalUse::Only, returnValue); } - System::Boolean IEnumerator::MoveNext() + System::Boolean System::Collections::IEnumerator::MoveNext() { auto returnValue = Plugin::SystemCollectionsIEnumeratorMethodMoveNext(Handle); if (Plugin::unhandledCsharpException) @@ -2037,7 +4564,7 @@ namespace UnityEngine return Handle != other.Handle; } - template<> MyGame::BaseBallScript GameObject::AddComponent() + template<> MyGame::BaseBallScript UnityEngine::GameObject::AddComponent() { auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript(Handle); if (Plugin::unhandledCsharpException) @@ -2050,7 +4577,7 @@ namespace UnityEngine return MyGame::BaseBallScript(Plugin::InternalUse::Only, returnValue); } - UnityEngine::GameObject GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) + UnityEngine::GameObject UnityEngine::GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) { auto returnValue = Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(type); if (Plugin::unhandledCsharpException) @@ -2144,7 +4671,7 @@ namespace UnityEngine return Handle != other.Handle; } - void Debug::Log(System::Object& message) + void UnityEngine::Debug::Log(System::Object& message) { Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle); if (Plugin::unhandledCsharpException) @@ -2328,7 +4855,7 @@ namespace UnityEngine return Handle != other.Handle; } - UnityEngine::Transform MonoBehaviour::GetTransform() + UnityEngine::Transform UnityEngine::MonoBehaviour::GetTransform() { auto returnValue = Plugin::UnityEngineMonoBehaviourPropertyGetTransform(Handle); if (Plugin::unhandledCsharpException) @@ -2426,7 +4953,7 @@ namespace System return Handle != other.Handle; } - Exception::Exception(System::String& message) + System::Exception::Exception(System::String& message) : System::Runtime::InteropServices::_Exception(nullptr) , System::Runtime::Serialization::ISerializable(nullptr) { @@ -2644,7 +5171,7 @@ namespace UnityEngine return Value != other.Value; } - PrimitiveType::operator System::Enum() + UnityEngine::PrimitiveType::operator System::Enum() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -2662,7 +5189,7 @@ namespace UnityEngine return nullptr; } - PrimitiveType::operator System::ValueType() + UnityEngine::PrimitiveType::operator System::ValueType() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -2680,7 +5207,7 @@ namespace UnityEngine return nullptr; } - PrimitiveType::operator System::Object() + UnityEngine::PrimitiveType::operator System::Object() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -2698,7 +5225,7 @@ namespace UnityEngine return nullptr; } - PrimitiveType::operator System::IFormattable() + UnityEngine::PrimitiveType::operator System::IFormattable() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -2716,7 +5243,7 @@ namespace UnityEngine return nullptr; } - PrimitiveType::operator System::IConvertible() + UnityEngine::PrimitiveType::operator System::IConvertible() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -2734,7 +5261,7 @@ namespace UnityEngine return nullptr; } - PrimitiveType::operator System::IComparable() + UnityEngine::PrimitiveType::operator System::IComparable() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -2762,7 +5289,7 @@ const UnityEngine::PrimitiveType UnityEngine::PrimitiveType::Quad(5); namespace System { - Object::operator UnityEngine::PrimitiveType() + System::Object::operator UnityEngine::PrimitiveType() { UnityEngine::PrimitiveType returnVal(Plugin::UnboxPrimitiveType(Handle)); if (Plugin::unhandledCsharpException) @@ -2856,7 +5383,7 @@ namespace UnityEngine return Handle != other.Handle; } - System::Single Time::GetDeltaTime() + System::Single UnityEngine::Time::GetDeltaTime() { auto returnValue = Plugin::UnityEngineTimePropertyGetDeltaTime(); if (Plugin::unhandledCsharpException) @@ -2961,7 +5488,7 @@ namespace MyGame namespace MyGame { - BaseBallScript::BaseBallScript() + MyGame::BaseBallScript::BaseBallScript() : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -3007,7 +5534,7 @@ namespace MyGame CppHandle = Plugin::StoreBaseBallScript(this); } - BaseBallScript::BaseBallScript(const BaseBallScript& other) + MyGame::BaseBallScript::BaseBallScript(const MyGame::BaseBallScript& other) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -3022,7 +5549,7 @@ namespace MyGame } } - BaseBallScript::BaseBallScript(BaseBallScript&& other) + MyGame::BaseBallScript::BaseBallScript(MyGame::BaseBallScript&& other) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -3035,7 +5562,7 @@ namespace MyGame other.CppHandle = 0; } - BaseBallScript::BaseBallScript(Plugin::InternalUse, int32_t handle) + MyGame::BaseBallScript::BaseBallScript(Plugin::InternalUse, int32_t handle) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -3050,7 +5577,7 @@ namespace MyGame } } - BaseBallScript::~BaseBallScript() + MyGame::BaseBallScript::~BaseBallScript() { Plugin::RemoveWholeBaseBallScript(this); Plugin::RemoveBaseBallScript(CppHandle); @@ -3073,7 +5600,7 @@ namespace MyGame } } - BaseBallScript& BaseBallScript::operator=(const BaseBallScript& other) + MyGame::BaseBallScript& MyGame::BaseBallScript::operator=(const MyGame::BaseBallScript& other) { if (this->Handle) { @@ -3087,7 +5614,7 @@ namespace MyGame return *this; } - BaseBallScript& BaseBallScript::operator=(decltype(nullptr)) + MyGame::BaseBallScript& MyGame::BaseBallScript::operator=(decltype(nullptr)) { if (Handle) { @@ -3109,7 +5636,7 @@ namespace MyGame return *this; } - BaseBallScript& BaseBallScript::operator=(BaseBallScript&& other) + MyGame::BaseBallScript& MyGame::BaseBallScript::operator=(MyGame::BaseBallScript&& other) { Plugin::RemoveBaseBallScript(CppHandle); CppHandle = 0; @@ -3134,12 +5661,12 @@ namespace MyGame return *this; } - bool BaseBallScript::operator==(const BaseBallScript& other) const + bool MyGame::BaseBallScript::operator==(const MyGame::BaseBallScript& other) const { return Handle == other.Handle; } - bool BaseBallScript::operator!=(const BaseBallScript& other) const + bool MyGame::BaseBallScript::operator!=(const MyGame::BaseBallScript& other) const { return Handle != other.Handle; } @@ -3153,11 +5680,11 @@ namespace MyGame DLLEXPORT void DestroyBaseBallScript(int32_t cppHandle) { - BaseBallScript* instance = Plugin::GetBaseBallScript(cppHandle); + MyGame::BaseBallScript* instance = Plugin::GetBaseBallScript(cppHandle); instance->~BaseBallScript(); } - void BaseBallScript::Update() + void MyGame::BaseBallScript::Update() { } @@ -3182,7 +5709,7 @@ namespace MyGame namespace System { - Object::operator System::Boolean() + System::Object::operator System::Boolean() { System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); if (Plugin::unhandledCsharpException) @@ -3198,7 +5725,7 @@ namespace System namespace System { - Object::operator System::SByte() + System::Object::operator System::SByte() { System::SByte returnVal(Plugin::UnboxSByte(Handle)); if (Plugin::unhandledCsharpException) @@ -3214,7 +5741,7 @@ namespace System namespace System { - Object::operator System::Byte() + System::Object::operator System::Byte() { System::Byte returnVal(Plugin::UnboxByte(Handle)); if (Plugin::unhandledCsharpException) @@ -3230,7 +5757,7 @@ namespace System namespace System { - Object::operator System::Int16() + System::Object::operator System::Int16() { System::Int16 returnVal(Plugin::UnboxInt16(Handle)); if (Plugin::unhandledCsharpException) @@ -3246,7 +5773,7 @@ namespace System namespace System { - Object::operator System::UInt16() + System::Object::operator System::UInt16() { System::UInt16 returnVal(Plugin::UnboxUInt16(Handle)); if (Plugin::unhandledCsharpException) @@ -3262,7 +5789,7 @@ namespace System namespace System { - Object::operator System::Int32() + System::Object::operator System::Int32() { System::Int32 returnVal(Plugin::UnboxInt32(Handle)); if (Plugin::unhandledCsharpException) @@ -3278,7 +5805,7 @@ namespace System namespace System { - Object::operator System::UInt32() + System::Object::operator System::UInt32() { System::UInt32 returnVal(Plugin::UnboxUInt32(Handle)); if (Plugin::unhandledCsharpException) @@ -3294,7 +5821,7 @@ namespace System namespace System { - Object::operator System::Int64() + System::Object::operator System::Int64() { System::Int64 returnVal(Plugin::UnboxInt64(Handle)); if (Plugin::unhandledCsharpException) @@ -3310,7 +5837,7 @@ namespace System namespace System { - Object::operator System::UInt64() + System::Object::operator System::UInt64() { System::UInt64 returnVal(Plugin::UnboxUInt64(Handle)); if (Plugin::unhandledCsharpException) @@ -3326,7 +5853,7 @@ namespace System namespace System { - Object::operator System::Char() + System::Object::operator System::Char() { System::Char returnVal(Plugin::UnboxChar(Handle)); if (Plugin::unhandledCsharpException) @@ -3342,7 +5869,7 @@ namespace System namespace System { - Object::operator System::Single() + System::Object::operator System::Single() { System::Single returnVal(Plugin::UnboxSingle(Handle)); if (Plugin::unhandledCsharpException) @@ -3358,7 +5885,7 @@ namespace System namespace System { - Object::operator System::Double() + System::Object::operator System::Double() { System::Double returnVal(Plugin::UnboxDouble(Handle)); if (Plugin::unhandledCsharpException) @@ -3431,6 +5958,11 @@ DLLEXPORT void Init( int32_t (*enumerableGetEnumerator)(int32_t handle), /*BEGIN INIT PARAMS*/ int32_t maxManagedObjects, + void (*releaseSystemDecimal)(int32_t handle), + int32_t (*systemDecimalConstructorSystemDouble)(double value), + int32_t (*systemDecimalConstructorSystemUInt64)(uint64_t value), + int32_t (*boxDecimal)(int32_t valHandle), + int32_t (*unboxDecimal)(int32_t valHandle), UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b), int32_t (*boxVector3)(UnityEngine::Vector3& val), @@ -3492,6 +6024,14 @@ DLLEXPORT void Init( Plugin::ArrayGetLength = arrayGetLength; Plugin::EnumerableGetEnumerator = enumerableGetEnumerator; /*BEGIN INIT BODY*/ + Plugin::ReleaseSystemDecimal = releaseSystemDecimal; + Plugin::RefCountsSystemDecimal = (int32_t*)curMemory; + curMemory += 1000 * sizeof(int32_t); + Plugin::RefCountsLenSystemDecimal = 1000; + Plugin::SystemDecimalConstructorSystemDouble = systemDecimalConstructorSystemDouble; + Plugin::SystemDecimalConstructorSystemUInt64 = systemDecimalConstructorSystemUInt64; + Plugin::BoxDecimal = boxDecimal; + Plugin::UnboxDecimal = unboxDecimal; Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle = unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle; Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3 = unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3; Plugin::BoxVector3 = boxVector3; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 04e0e99..e7a25bb 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -77,6 +77,8 @@ namespace System template struct Array4; template struct Array5; struct IComparable; + template struct IComparable_1; + template struct IEquatable_1; struct IFormattable; struct IConvertible; @@ -98,6 +100,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; // .NET chars are two bytes long @@ -115,6 +119,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct SByte @@ -129,6 +135,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct Byte @@ -143,6 +151,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct Int16 @@ -157,6 +167,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct UInt16 @@ -171,6 +183,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct Int32 @@ -185,6 +199,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct UInt32 @@ -199,6 +215,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct Int64 @@ -213,6 +231,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct UInt64 @@ -227,6 +247,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct Single @@ -241,6 +263,8 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; struct Double @@ -255,11 +279,21 @@ namespace System explicit operator IComparable() const; explicit operator IFormattable() const; explicit operator IConvertible() const; + explicit operator IComparable_1() const; + explicit operator IEquatable_1() const; }; } /*BEGIN TEMPLATE DECLARATIONS*/ +namespace System +{ + template struct IEquatable_1; +} +namespace System +{ + template struct IComparable_1; +} /*END TEMPLATE DECLARATIONS*/ /*BEGIN TYPE DECLARATIONS*/ @@ -278,6 +312,11 @@ namespace System struct IComparable; } +namespace System +{ + struct Decimal; +} + namespace UnityEngine { struct Vector3; @@ -385,7 +424,135 @@ namespace MyGame /*END TYPE DECLARATIONS*/ /*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/ +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IEquatable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} + +namespace System +{ + template<> struct IComparable_1; +} /*END TEMPLATE SPECIALIZATION DECLARATIONS*/ //////////////////////////////////////////////////////////////// @@ -405,6 +572,7 @@ namespace System virtual void ThrowReferenceToThis(); /*BEGIN UNBOXING METHOD DECLARATIONS*/ + explicit operator System::Decimal(); explicit operator UnityEngine::Vector3(); explicit operator UnityEngine::PrimitiveType(); explicit operator System::Boolean(); @@ -545,6 +713,474 @@ namespace System }; } +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + template<> struct IComparable_1 : virtual System::Object + { + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); + IComparable_1& operator=(const IComparable_1& other); + IComparable_1& operator=(decltype(nullptr)); + IComparable_1& operator=(IComparable_1&& other); + bool operator==(const IComparable_1& other) const; + bool operator!=(const IComparable_1& other) const; + }; +} + +namespace System +{ + struct Decimal : Plugin::ManagedType + { + Decimal(decltype(nullptr)); + Decimal(Plugin::InternalUse, int32_t handle); + Decimal(const Decimal& other); + Decimal(Decimal&& other); + virtual ~Decimal(); + Decimal& operator=(const Decimal& other); + Decimal& operator=(decltype(nullptr)); + Decimal& operator=(Decimal&& other); + bool operator==(const Decimal& other) const; + bool operator!=(const Decimal& other) const; + Decimal(System::Double value); + Decimal(System::UInt64 value); + explicit operator System::ValueType(); + explicit operator System::Object(); + explicit operator System::IFormattable(); + explicit operator System::IConvertible(); + explicit operator System::IComparable(); + explicit operator System::IComparable_1(); + explicit operator System::IEquatable_1(); + }; +} + namespace UnityEngine { struct Vector3 @@ -938,3 +1574,10 @@ namespace System Plugin::EnumerableIterator end(IEnumerable& enumerable); } } + +//////////////////////////////////////////////////////////////// +// User-defined literals for creating decimals (System.Decimal) +//////////////////////////////////////////////////////////////// + +System::Decimal operator"" _m(long double x); +System::Decimal operator"" _m(unsigned long long x); From 4af035161a3ba682124eda3a47ab9697e6068557 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Mon, 26 Mar 2018 19:09:25 -0700 Subject: [PATCH 05/41] Fix issue #6 by ref counting System::String objects created from string literals --- Unity/CppSource/NativeScript/Bindings.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 23820f9..a828a47 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -1093,6 +1093,7 @@ namespace System String::String(const char* chars) : Object(Plugin::InternalUse::Only, Plugin::StringNew(chars)) { + Plugin::ReferenceManagedClass(Handle); } ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle) From 97421db1ada4818fd8a496958125bbade14bc143 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Tue, 1 May 2018 09:11:18 -0700 Subject: [PATCH 06/41] Fix compiler errors for non-editor builds (thanks, @hanbim520!) Upgrade to 2017.4.1f1 --- Unity/Assets/NativeScript/Bindings.cs | 26 +++--- .../NativeScript/Editor/GenerateBindings.cs | 19 +++-- Unity/Assets/NativeScriptConstants.cs | 5 ++ Unity/ProjectSettings/GraphicsSettings.asset | 3 +- Unity/ProjectSettings/ProjectSettings.asset | 84 +++++++++++++++---- Unity/ProjectSettings/ProjectVersion.txt | 2 +- 6 files changed, 105 insertions(+), 34 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 4d182da..286d480 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -491,11 +491,11 @@ static T GetDelegate( typeof(T)) as T; } #else - [DllImport(PluginName)] + [DllImport(NativeScriptConstants.PluginName)] static extern void Init( IntPtr memory, int memorySize, - initMode initMode, + InitMode initMode, IntPtr releaseObject, IntPtr stringNew, IntPtr setException, @@ -555,21 +555,21 @@ static extern void Init( IntPtr unboxDouble /*END INIT PARAMS*/); - [DllImport(PluginName)] + [DllImport(NativeScriptConstants.PluginName)] static extern void SetCsharpException(int handle); /*BEGIN IMPORTS*/ - [DllImport(Constants.PluginName)] - public static extern void NewBaseBallScript(int thisHandle, int param0); + [DllImport(NativeScriptConstants.PluginName)] + public static extern int NewBaseBallScript(int thisHandle); - [DllImport(Constants.PluginName)] - public static extern void DestroyBaseBallScript(int thisHandle, int param0); + [DllImport(NativeScriptConstants.PluginName)] + public static extern void DestroyBaseBallScript(int thisHandle); - [DllImport(Constants.PluginName)] + [DllImport(NativeScriptConstants.PluginName)] public static extern void MyGameAbstractBaseBallScriptUpdate(int thisHandle); - [DllImport(Constants.PluginName)] - public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle, int param0); + [DllImport(NativeScriptConstants.PluginName)] + public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle); /*END IMPORTS*/ #endif @@ -631,13 +631,15 @@ IntPtr unboxDouble delegate int BoxDoubleDelegate(double val); delegate double UnboxDoubleDelegate(int valHandle); /*END DELEGATE TYPES*/ - - private static readonly string pluginPath = Application.dataPath + PLUGIN_PATH; + #if UNITY_EDITOR_WIN private static readonly string pluginTempPath = Application.dataPath + PLUGIN_TEMP_PATH; #endif public static Exception UnhandledCppException; +#if UNITY_EDITOR + private static readonly string pluginPath = Application.dataPath + PLUGIN_PATH; public static SetCsharpExceptionDelegate SetCsharpException; +#endif static IntPtr memory; static int memorySize; static DestroyEntry[] destroyQueue; diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 7bd5513..0b810fd 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -7550,7 +7550,8 @@ static void AppendBaseType( GetTypeName(string.Empty, string.Empty), null, cppDefaultConstructorBindingFunctionName, - cppDefaultConstructorBindingFunctionParams, + ConvertParameters(Type.EmptyTypes), + typeof(int), builders.CsharpImports); AppendCsharpGetDelegateCall( GetTypeName(string.Empty, string.Empty), @@ -7607,11 +7608,14 @@ static void AppendBaseType( typeof(void), TypeKind.None, builders.CsharpDelegates); + ParameterInfo[] cppDestroyImportFunctionParams = ConvertParameters( + new Type[0]); AppendCsharpImport( GetTypeName(string.Empty, string.Empty), null, cppDestroyBindingFunctionName, - cppDestroyBindingFunctionParams, + cppDestroyImportFunctionParams, + typeof(void), builders.CsharpImports); AppendCsharpGetDelegateCall( GetTypeName(string.Empty, string.Empty), @@ -8685,6 +8689,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( typeParams, funcName, invokeParams, + typeof(void), builders.CsharpImports); return invokeParams; @@ -10639,11 +10644,14 @@ static void AppendCsharpImport( Type[] typeParams, string funcName, ParameterInfo[] parameters, + Type returnType, StringBuilder output ) { - output.Append("\t\t[DllImport(Constants.PluginName)]\n"); - output.Append("\t\tpublic static extern void "); + output.Append("\t\t[DllImport(NativeScriptConstants.PluginName)]\n"); + output.Append("\t\tpublic static extern "); + AppendCsharpTypeFullName(returnType, output); + output.Append(' '); AppendCsharpDelegateName( typeTypeName, typeParams, @@ -10857,7 +10865,8 @@ static void AppendExceptions( GetTypeName(string.Empty, string.Empty), null, funcName, - parameters, + ConvertParameters(Type.EmptyTypes), + typeof(void), builders.CsharpImports); // C# delegate diff --git a/Unity/Assets/NativeScriptConstants.cs b/Unity/Assets/NativeScriptConstants.cs index 54e6923..7e91c65 100644 --- a/Unity/Assets/NativeScriptConstants.cs +++ b/Unity/Assets/NativeScriptConstants.cs @@ -10,6 +10,11 @@ /// public static class NativeScriptConstants { + /// + /// Name of the plugin used by [DllImport] when running outside the editor + /// + public const string PluginName = "NativeScript"; + /// /// Path within the Unity project to the exposed types JSON file /// diff --git a/Unity/ProjectSettings/GraphicsSettings.asset b/Unity/ProjectSettings/GraphicsSettings.asset index a847871..d8b1468 100644 --- a/Unity/ProjectSettings/GraphicsSettings.asset +++ b/Unity/ProjectSettings/GraphicsSettings.asset @@ -36,7 +36,8 @@ GraphicsSettings: - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/Unity/ProjectSettings/ProjectSettings.asset b/Unity/ProjectSettings/ProjectSettings.asset index 52eead6..2a82354 100644 --- a/Unity/ProjectSettings/ProjectSettings.asset +++ b/Unity/ProjectSettings/ProjectSettings.asset @@ -3,9 +3,10 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 + serializedVersion: 14 productGUID: 435980e4cf9ff4aa8b71e496e8163063 AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 defaultScreenOrientation: 4 targetDevice: 2 useOnDemandResources: 0 @@ -38,8 +39,6 @@ PlayerSettings: width: 1 height: 1 m_SplashScreenLogos: [] - m_SplashScreenBackgroundLandscape: {fileID: 0} - m_SplashScreenBackgroundPortrait: {fileID: 0} m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0} defaultScreenWidth: 1024 @@ -49,7 +48,6 @@ PlayerSettings: m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 m_MTRendering: 1 - m_MobileMTRendering: 0 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 @@ -63,14 +61,19 @@ PlayerSettings: allowedAutorotateToLandscapeLeft: 1 useOSAutorotation: 1 use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 disableDepthAndStencilBuffers: 0 + androidBlitType: 0 defaultIsFullScreen: 1 defaultIsNativeResolution: 1 + macRetinaSupport: 1 runInBackground: 0 captureSingleScreen: 0 muteOtherAudioSources: 0 Prepare IOS For Recording: 0 Force IOS Speakers When Recording: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 bakeCollisionMeshes: 0 @@ -89,20 +92,22 @@ PlayerSettings: allowFullscreenSwitch: 1 graphicsJobMode: 0 macFullscreenMode: 2 - d3d9FullscreenMode: 1 d3d11FullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 n3dsDisableStereoscopicView: 0 n3dsEnableSharedListOpt: 1 n3dsEnableVSync: 0 - ignoreAlphaClear: 0 xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 xboxOneMonoLoggingLevel: 0 xboxOneLoggingLevel: 1 xboxOneDisableEsram: 0 + xboxOnePresentImmediateThreshold: 0 videoMemoryForVertexBuffers: 0 psp2PowerMode: 0 psp2AcquireBGM: 1 @@ -124,6 +129,7 @@ PlayerSettings: bundleVersion: 1.0 preloadedAssets: [] metroInputSource: 0 + wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 0 xboxOneEnable7thCore: 0 @@ -134,12 +140,23 @@ PlayerSettings: daydream: depthFormat: 0 useSustainedPerformanceMode: 0 + enableVideoLayer: 0 + useProtectedVideoMemory: 0 + minimumSupportedHeadTracking: 0 + maximumSupportedHeadTracking: 1 hololens: depthFormat: 1 + depthBufferSharingEnabled: 0 + oculus: + sharedDepthBuffer: 0 + dashSupport: 0 protectGraphicsMemory: 0 useHDRDisplay: 0 - targetPixelDensity: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 30 resolutionScalingMode: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 applicationIdentifier: Android: com.jacksondunstan.unityplayground Standalone: unity.DefaultCompany.UnityPlayground @@ -166,7 +183,7 @@ PlayerSettings: serializedVersion: 2 m_Bits: 238 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 6.0 + iOSTargetOSVersionString: 7.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 9.0 @@ -182,15 +199,21 @@ PlayerSettings: iPhone47inSplashScreen: {fileID: 0} iPhone55inPortraitSplashScreen: {fileID: 0} iPhone55inLandscapeSplashScreen: {fileID: 0} + iPhone58inPortraitSplashScreen: {fileID: 0} + iPhone58inLandscapeSplashScreen: {fileID: 0} iPadPortraitSplashScreen: {fileID: 0} iPadHighResPortraitSplashScreen: {fileID: 0} iPadLandscapeSplashScreen: {fileID: 0} iPadHighResLandscapeSplashScreen: {fileID: 0} appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] tvOSLargeIconLayers: [] tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] iOSLaunchScreenType: 0 iOSLaunchScreenPortrait: {fileID: 0} iOSLaunchScreenLandscape: {fileID: 0} @@ -208,6 +231,8 @@ PlayerSettings: iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 iOSLaunchScreeniPadCustomXibPath: + iOSUseLaunchScreenStoryboard: 0 + iOSLaunchScreenCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] iOSBackgroundModes: 0 @@ -219,6 +244,7 @@ PlayerSettings: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: appleEnableAutomaticSigning: 0 + clonedFromGUID: 00000000000000000000000000000000 AndroidTargetDevice: 3 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} @@ -226,7 +252,9 @@ PlayerSettings: AndroidKeyaliasName: AndroidTVCompatibility: 1 AndroidIsGame: 1 + AndroidEnableTango: 0 androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 m_AndroidBanners: - width: 320 height: 180 @@ -240,6 +268,7 @@ PlayerSettings: m_Icon: {fileID: 0} m_Width: 128 m_Height: 128 + m_Kind: 0 m_BuildTargetBatching: [] m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer @@ -300,10 +329,21 @@ PlayerSettings: - m_BuildTarget: tvOS m_Enabled: 0 m_Devices: [] + m_BuildTargetEnableVuforiaSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 - webPlayerTemplate: APPLICATION:Default m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: + - m_BuildTarget: Standalone + m_EncodingQuality: 1 + - m_BuildTarget: XboxOne + m_EncodingQuality: 1 + - m_BuildTarget: PS4 + m_EncodingQuality: 1 wiiUTitleID: 0005000011000000 wiiUGroupID: 00010000 wiiUCommonSaveSize: 4096 @@ -350,6 +390,9 @@ PlayerSettings: switchTitleNames_9: switchTitleNames_10: switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: switchPublisherNames_0: switchPublisherNames_1: switchPublisherNames_2: @@ -362,6 +405,9 @@ PlayerSettings: switchPublisherNames_9: switchPublisherNames_10: switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: switchIcons_0: {fileID: 0} switchIcons_1: {fileID: 0} switchIcons_2: {fileID: 0} @@ -374,6 +420,9 @@ PlayerSettings: switchIcons_9: {fileID: 0} switchIcons_10: {fileID: 0} switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} switchSmallIcons_0: {fileID: 0} switchSmallIcons_1: {fileID: 0} switchSmallIcons_2: {fileID: 0} @@ -386,6 +435,9 @@ PlayerSettings: switchSmallIcons_9: {fileID: 0} switchSmallIcons_10: {fileID: 0} switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} switchManualHTML: switchAccessibleURLs: switchLegalInformation: @@ -427,6 +479,8 @@ PlayerSettings: switchLocalCommunicationIds_7: switchParentalControl: 0 switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 switchDataLossConfirmation: 0 switchSupportedNpadStyles: 3 switchSocketConfigEnabled: 0 @@ -437,6 +491,9 @@ PlayerSettings: switchUdpSendBufferSize: 9 switchUdpReceiveBufferSize: 42 switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -455,6 +512,8 @@ PlayerSettings: ps4PronunciationSIGPath: ps4BackgroundImagePath: ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: ps4SaveDataImagePath: ps4SdkOverride: ps4BGMPath: @@ -625,12 +684,6 @@ PlayerSettings: n3dsTitle: GameName n3dsProductCode: n3dsApplicationId: 0xFF3FF - stvDeviceAddress: - stvProductDescription: - stvProductAuthor: - stvProductAuthorEmail: - stvProductLink: - stvProductCategory: 0 XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -653,6 +706,7 @@ PlayerSettings: XboxOneSplashScreen: {fileID: 0} XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 xboxOneScriptCompiler: 0 vrEditorSettings: daydream: diff --git a/Unity/ProjectSettings/ProjectVersion.txt b/Unity/ProjectSettings/ProjectVersion.txt index e6cd1f9..e3618f1 100644 --- a/Unity/ProjectSettings/ProjectVersion.txt +++ b/Unity/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2017.3.0f3 +m_EditorVersion: 2017.4.1f1 From 0f3e137a60dfd78f73894bc0170cfa9d288d9f4a Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 5 May 2018 10:23:59 -0700 Subject: [PATCH 07/41] Move CppSource into Assets Rename platform preprocessor symbols to TARGET_OS_NAME Disable bitcode in iOS builds Use static linking for iOS (i.e. [DllImport("__Internal")]) Build iOS into a hidden directory so it's ignored by Unity Remove NativeScriptConstants.PluginName Update Unity project and company name Update README.md Update .gitignore --- .gitignore | 6 +-- README.md | 2 +- Unity/Assets/CppSource.meta | 10 ++++ Unity/{ => Assets}/CppSource/CMakeLists.txt | 47 ++++++++++--------- Unity/Assets/CppSource/CMakeLists.txt.meta | 9 ++++ Unity/Assets/CppSource/Game.meta | 10 ++++ Unity/{ => Assets}/CppSource/Game/Game.cpp | 0 Unity/Assets/CppSource/Game/Game.cpp.meta | 26 ++++++++++ Unity/{ => Assets}/CppSource/Game/Game.h | 0 Unity/Assets/CppSource/Game/Game.h.meta | 26 ++++++++++ Unity/Assets/CppSource/NativeScript.meta | 10 ++++ .../CppSource/NativeScript/Bindings.cpp | 0 .../CppSource/NativeScript/Bindings.cpp.meta | 26 ++++++++++ .../CppSource/NativeScript/Bindings.h | 0 .../CppSource/NativeScript/Bindings.h.meta | 26 ++++++++++ Unity/{ => Assets}/CppSource/iOS.cmake | 0 Unity/Assets/CppSource/iOS.cmake.meta | 9 ++++ Unity/Assets/NativeScript/Bindings.cs | 16 ++++--- Unity/Assets/NativeScriptConstants.cs | 5 -- Unity/CppSource/Game.cpp.meta | 27 ----------- Unity/ProjectSettings/GraphicsSettings.asset | 1 - Unity/ProjectSettings/ProjectSettings.asset | 4 +- 22 files changed, 192 insertions(+), 68 deletions(-) create mode 100644 Unity/Assets/CppSource.meta rename Unity/{ => Assets}/CppSource/CMakeLists.txt (70%) create mode 100644 Unity/Assets/CppSource/CMakeLists.txt.meta create mode 100644 Unity/Assets/CppSource/Game.meta rename Unity/{ => Assets}/CppSource/Game/Game.cpp (100%) create mode 100644 Unity/Assets/CppSource/Game/Game.cpp.meta rename Unity/{ => Assets}/CppSource/Game/Game.h (100%) create mode 100644 Unity/Assets/CppSource/Game/Game.h.meta create mode 100644 Unity/Assets/CppSource/NativeScript.meta rename Unity/{ => Assets}/CppSource/NativeScript/Bindings.cpp (100%) create mode 100644 Unity/Assets/CppSource/NativeScript/Bindings.cpp.meta rename Unity/{ => Assets}/CppSource/NativeScript/Bindings.h (100%) create mode 100644 Unity/Assets/CppSource/NativeScript/Bindings.h.meta rename Unity/{ => Assets}/CppSource/iOS.cmake (100%) create mode 100644 Unity/Assets/CppSource/iOS.cmake.meta delete mode 100644 Unity/CppSource/Game.cpp.meta diff --git a/.gitignore b/.gitignore index aa955b9..7f3848a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -# Typical location for CMake build files and Visual Studio 2017 generated directories -/cmake -/NativeScript.dir -/x64 +# Rider IDE +.idea \ No newline at end of file diff --git a/README.md b/README.md index d07f917..6302ab5 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ C++ is the standard language for video games as well as many other fields. By pr Debug::Log(message); } -* Platform-dependent compilation via the [usual flags](https://docs.unity3d.com/Manual/PlatformDependentCompilation.html) (e.g. `#if UNITY_EDITOR`) +* Platform-dependent compilation (e.g. `#if TARGET_OS_ANDROID`) * [CMake](https://cmake.org/) build system sets up any IDE project or command-line build # Code Generator diff --git a/Unity/Assets/CppSource.meta b/Unity/Assets/CppSource.meta new file mode 100644 index 0000000..a8346ff --- /dev/null +++ b/Unity/Assets/CppSource.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ec1b3d1da421646d781f3ccc6960a558 +folderAsset: yes +timeCreated: 1525538114 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/CppSource/CMakeLists.txt b/Unity/Assets/CppSource/CMakeLists.txt similarity index 70% rename from Unity/CppSource/CMakeLists.txt rename to Unity/Assets/CppSource/CMakeLists.txt index 73a28d6..306ae25 100644 --- a/Unity/CppSource/CMakeLists.txt +++ b/Unity/Assets/CppSource/CMakeLists.txt @@ -3,29 +3,29 @@ project(NativeScript CXX) # Set platform-dependent compilation defines matching C# if (EDITOR) - add_definitions(-DUNITY_EDITOR) + add_definitions(-DTARGET_OS_EDITOR) if (WIN32) - add_definitions(-DUNITY_EDITOR_WIN) + add_definitions(-DTARGET_OS_EDITOR_WIN) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - add_definitions(-DUNITY_EDITOR_OSX) + add_definitions(-DTARGET_OS_EDITOR_OSX) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - add_definitions(-DUNITY_EDITOR_LINUX) + add_definitions(-DTARGET_OS_EDITOR_LINUX) endif() else() - add_definitions(-DUNITY_STANDALONE) + add_definitions(-DTARGET_OS_STANDALONE) if (WIN32) - add_definitions(-DUNITY_STANDALONE_WIN) + add_definitions(-DTARGET_OS_WIN) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - add_definitions(-DUNITY_STANDALONE_OSX) + add_definitions(-DTARGET_OS_OSX) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - add_definitions(-DUNITY_STANDALONE_LINUX) + add_definitions(-DTARGET_OS_LINUX) endif() endif() if (IOS) - add_definitions(-DUNITY_IOS) + add_definitions(-DTARGET_OS_IPHONE) endif() if (ANDROID_NDK) - add_definitions(-DUNITY_ANDROID) + add_definitions(-DTARGET_OS_ANDROID) endif() # Use NDK on Android @@ -36,22 +36,22 @@ endif() # Set output path if (ANDROID_NDK) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Assets/Plugins/Android) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Assets/Plugins/Android) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Assets/Plugins/Android) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Plugins/Android) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Plugins/Android) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Plugins/Android) elseif (IOS) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Assets/Plugins/iOS) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Assets/Plugins/iOS) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Assets/Plugins/iOS) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Plugins/.iOS) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Plugins/.iOS) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Plugins/.iOS) elseif (WIN32 OR (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) if (EDITOR) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Assets/Plugins/Editor) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Assets/Plugins/Editor) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Assets/Plugins/Editor) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Plugins/Editor) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Plugins/Editor) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Plugins/Editor) else() - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Assets/Plugins) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Assets/Plugins) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Assets/Plugins) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Plugins) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../Plugins) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/../Plugins) endif() endif() @@ -75,6 +75,9 @@ set( # Build a library. If on an Apple platform, build it in a bundle. add_library(${PROJECT_NAME} MODULE ${SOURCES}) set_target_properties(${PROJECT_NAME} PROPERTIES BUNDLE TRUE) +if (IOS) + set_xcode_property(${PROJECT_NAME} ENABLE_BITCODE "NO") +endif() # Enable C++11 set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) \ No newline at end of file diff --git a/Unity/Assets/CppSource/CMakeLists.txt.meta b/Unity/Assets/CppSource/CMakeLists.txt.meta new file mode 100644 index 0000000..3ecd08d --- /dev/null +++ b/Unity/Assets/CppSource/CMakeLists.txt.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ff824f6dad1204438ac5993f133fa551 +timeCreated: 1525538114 +licenseType: Free +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/CppSource/Game.meta b/Unity/Assets/CppSource/Game.meta new file mode 100644 index 0000000..7121431 --- /dev/null +++ b/Unity/Assets/CppSource/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5097e8d235bbf426abeae3e4fc76859f +folderAsset: yes +timeCreated: 1525538114 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/Assets/CppSource/Game/Game.cpp similarity index 100% rename from Unity/CppSource/Game/Game.cpp rename to Unity/Assets/CppSource/Game/Game.cpp diff --git a/Unity/Assets/CppSource/Game/Game.cpp.meta b/Unity/Assets/CppSource/Game/Game.cpp.meta new file mode 100644 index 0000000..6bcf89c --- /dev/null +++ b/Unity/Assets/CppSource/Game/Game.cpp.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: cd5ee8d1b4f5748ed98f1f7cd17c386d +timeCreated: 1525538114 +licenseType: Free +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/CppSource/Game/Game.h b/Unity/Assets/CppSource/Game/Game.h similarity index 100% rename from Unity/CppSource/Game/Game.h rename to Unity/Assets/CppSource/Game/Game.h diff --git a/Unity/Assets/CppSource/Game/Game.h.meta b/Unity/Assets/CppSource/Game/Game.h.meta new file mode 100644 index 0000000..c81ed01 --- /dev/null +++ b/Unity/Assets/CppSource/Game/Game.h.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: 568849c22711c4c4aaaf09df05a1d812 +timeCreated: 1525538114 +licenseType: Free +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/CppSource/NativeScript.meta b/Unity/Assets/CppSource/NativeScript.meta new file mode 100644 index 0000000..a82c5d8 --- /dev/null +++ b/Unity/Assets/CppSource/NativeScript.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c48669dd52f8e49b890586dd9a417de5 +folderAsset: yes +timeCreated: 1525538114 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/Assets/CppSource/NativeScript/Bindings.cpp similarity index 100% rename from Unity/CppSource/NativeScript/Bindings.cpp rename to Unity/Assets/CppSource/NativeScript/Bindings.cpp diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.cpp.meta b/Unity/Assets/CppSource/NativeScript/Bindings.cpp.meta new file mode 100644 index 0000000..1b1a472 --- /dev/null +++ b/Unity/Assets/CppSource/NativeScript/Bindings.cpp.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: 6b6c5fe253c434b7db04a6d5165c1001 +timeCreated: 1525538114 +licenseType: Free +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/Assets/CppSource/NativeScript/Bindings.h similarity index 100% rename from Unity/CppSource/NativeScript/Bindings.h rename to Unity/Assets/CppSource/NativeScript/Bindings.h diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.h.meta b/Unity/Assets/CppSource/NativeScript/Bindings.h.meta new file mode 100644 index 0000000..615fc4b --- /dev/null +++ b/Unity/Assets/CppSource/NativeScript/Bindings.h.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: 2fa6cfa70e93c4d59a7f05e21c18d56b +timeCreated: 1525538114 +licenseType: Free +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/CppSource/iOS.cmake b/Unity/Assets/CppSource/iOS.cmake similarity index 100% rename from Unity/CppSource/iOS.cmake rename to Unity/Assets/CppSource/iOS.cmake diff --git a/Unity/Assets/CppSource/iOS.cmake.meta b/Unity/Assets/CppSource/iOS.cmake.meta new file mode 100644 index 0000000..f706a0b --- /dev/null +++ b/Unity/Assets/CppSource/iOS.cmake.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4d9a55f92979e442396f99d94a5e9ec5 +timeCreated: 1525538114 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 286d480..248ee00 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -301,7 +301,11 @@ public DestroyEntry(DestroyFunction function, int cppHandle) } // Name of the plugin when using [DllImport] +#if !UNITY_EDITOR && UNITY_IOS + const string PLUGIN_NAME = "__Internal"; +#else const string PLUGIN_NAME = "NativeScript"; +#endif // Path to load the plugin from when running inside the editor #if UNITY_EDITOR_OSX @@ -491,7 +495,7 @@ static T GetDelegate( typeof(T)) as T; } #else - [DllImport(NativeScriptConstants.PluginName)] + [DllImport(PLUGIN_NAME)] static extern void Init( IntPtr memory, int memorySize, @@ -555,20 +559,20 @@ static extern void Init( IntPtr unboxDouble /*END INIT PARAMS*/); - [DllImport(NativeScriptConstants.PluginName)] + [DllImport(PLUGIN_NAME)] static extern void SetCsharpException(int handle); /*BEGIN IMPORTS*/ - [DllImport(NativeScriptConstants.PluginName)] + [DllImport(PLUGIN_NAME)] public static extern int NewBaseBallScript(int thisHandle); - [DllImport(NativeScriptConstants.PluginName)] + [DllImport(PLUGIN_NAME)] public static extern void DestroyBaseBallScript(int thisHandle); - [DllImport(NativeScriptConstants.PluginName)] + [DllImport(PLUGIN_NAME)] public static extern void MyGameAbstractBaseBallScriptUpdate(int thisHandle); - [DllImport(NativeScriptConstants.PluginName)] + [DllImport(PLUGIN_NAME)] public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle); /*END IMPORTS*/ #endif diff --git a/Unity/Assets/NativeScriptConstants.cs b/Unity/Assets/NativeScriptConstants.cs index 7e91c65..54e6923 100644 --- a/Unity/Assets/NativeScriptConstants.cs +++ b/Unity/Assets/NativeScriptConstants.cs @@ -10,11 +10,6 @@ /// public static class NativeScriptConstants { - /// - /// Name of the plugin used by [DllImport] when running outside the editor - /// - public const string PluginName = "NativeScript"; - /// /// Path within the Unity project to the exposed types JSON file /// diff --git a/Unity/CppSource/Game.cpp.meta b/Unity/CppSource/Game.cpp.meta deleted file mode 100644 index bf03a81..0000000 --- a/Unity/CppSource/Game.cpp.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: 5189acf91e865474290ba468798fb338 -timeCreated: 1501907744 -licenseType: Free -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - Any: - second: - enabled: 1 - settings: {} - data: - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Unity/ProjectSettings/GraphicsSettings.asset b/Unity/ProjectSettings/GraphicsSettings.asset index d8b1468..77bf2f1 100644 --- a/Unity/ProjectSettings/GraphicsSettings.asset +++ b/Unity/ProjectSettings/GraphicsSettings.asset @@ -37,7 +37,6 @@ GraphicsSettings: - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/Unity/ProjectSettings/ProjectSettings.asset b/Unity/ProjectSettings/ProjectSettings.asset index 2a82354..b6955bb 100644 --- a/Unity/ProjectSettings/ProjectSettings.asset +++ b/Unity/ProjectSettings/ProjectSettings.asset @@ -11,8 +11,8 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: DefaultCompany - productName: UnityPlayground + companyName: JacksonDunstan + productName: UnityNativeScripting defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} From 6e23b68d36e415b9c48151f7fb570832e93d1e5d Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 5 May 2018 14:19:54 -0700 Subject: [PATCH 08/41] Updated README to use Android as a build time example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6302ab5..ed009f0 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ This project aims to give you a viable alternative to C#. Scripting in C++ isn't ## Fast Device Build Times -Changing one line of C# code requires you to make a new build of the game. Typical iOS build times tend to be at least 10 minutes because IL2CPP has to run and then Xcode has to compile a huge amount of C++. +Changing one line of C# code requires you to make a new build of the game. Typical Android build times tend to be at least 10 minutes because IL2CPP has to run and then a huge amount of C++ must be compiled. -By using C++, we can compile the game as a C++ plugin in about 1 second, swap the plugin into the Xcode project, and then immediately run the game. That's a huge productivity boost! +By using C++, we can compile the game as a C++ plugin in about 1 second, swap the plugin into the APK, and then immediately install and run the game. That's a huge productivity boost! ## Fast Compile Times From 40b66d8e371d3fb3d6215338ba018ed6f81295c7 Mon Sep 17 00:00:00 2001 From: jb Date: Mon, 14 May 2018 19:21:55 +0200 Subject: [PATCH 09/41] Fix incorrect path when generating bindings. Fix broken pragma causing warnings --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 0b810fd..83d4726 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -24,7 +24,7 @@ public static class GenerateBindings { // Disable unused field types. JsonUtility actually uses them, but it // does so with reflection. - #pragma warning disable CS0649 + #pragma warning disable 649 [Serializable] class JsonConstructor @@ -289,7 +289,9 @@ struct TypeName static readonly string CppDirPath = Path.Combine( Path.Combine( - ProjectDirPath, + Path.Combine( + ProjectDirPath, + "Assets"), "CppSource"), "NativeScript"); static readonly string CsharpPath = Path.Combine( @@ -308,7 +310,7 @@ static readonly FieldOrderComparer DefaultFieldOrderComparer = new FieldOrderComparer(); // Restore unused field types - #pragma warning restore CS0649 + #pragma warning restore 649 public static void Generate() { From aae2a8320ead9cb7ffaa908801d97cd07c31afa4 Mon Sep 17 00:00:00 2001 From: jb Date: Mon, 14 May 2018 19:26:52 +0200 Subject: [PATCH 10/41] Update the readme to correct path to CppSource --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ed009f0..14f12cc 100644 --- a/README.md +++ b/README.md @@ -161,9 +161,8 @@ With C++, the workflow looks like this: 1. Download or clone this repo 2. Copy everything in `Unity/Assets` directory to your Unity project's `Assets` directory -3. Copy the `Unity/CppSource` directory to your Unity project directory -4. Edit `NativeScriptTypes.json` and specify what parts of the Unity, .NET, and custom DLL APIs you want access to from C++. -5. Edit `Unity/CppSource/Game/Game.cpp` and `Unity/CppSource/Game/Game.h` to create your game. Some example code is provided, but feel free to delete it. You can add more C++ source (`.cpp`) and header (`.h`) files here as your game grows. +3. Edit `NativeScriptTypes.json` and specify what parts of the Unity, .NET, and custom DLL APIs you want access to from C++. +4. Edit `Unity/Assets/CppSource/Game/Game.cpp` and `Unity/Assets/CppSource/Game/Game.h` to create your game. Some example code is provided, but feel free to delete it. You can add more C++ source (`.cpp`) and header (`.h`) files here as your game grows. # Building the C++ Plugin From 800e0cd027c57da62f04b5357436667b16414d65 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Thu, 17 May 2018 08:54:33 -0700 Subject: [PATCH 11/41] Fix generated plugin name in some cases --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 83d4726..9e04575 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -10650,7 +10650,7 @@ static void AppendCsharpImport( StringBuilder output ) { - output.Append("\t\t[DllImport(NativeScriptConstants.PluginName)]\n"); + output.Append("\t\t[DllImport(PLUGIN_NAME)]\n"); output.Append("\t\tpublic static extern "); AppendCsharpTypeFullName(returnType, output); output.Append(' '); From 2180b3edfea9d58da5242d9c5752b344d9a0b84c Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Thu, 7 Jun 2018 21:04:08 -0700 Subject: [PATCH 12/41] Generate correct return type for non-void base type methods. Thanks, @JmgrArt! --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 9e04575..8d84312 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -8691,7 +8691,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( typeParams, funcName, invokeParams, - typeof(void), + invokeMethod.ReturnType, builders.CsharpImports); return invokeParams; From 60450d4a58f623bf39770cf9e70da6c9932dd78e Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 10 Jun 2018 22:43:59 -0700 Subject: [PATCH 13/41] Pass Init parameters in 'memory' Never release exposed function delegates Fix miscellaneous Rider warnings --- .../CppSource/NativeScript/Bindings.cpp | 241 ++--- Unity/Assets/NativeScript/Bindings.cs | 626 +++++++------ Unity/Assets/NativeScript/BootScene.unity | 14 +- .../Assets/NativeScript/Editor/EditorMenus.cs | 3 +- .../NativeScript/Editor/GenerateBindings.cs | 871 +++++++----------- .../manifest.json | 0 Unity/ProjectSettings/GraphicsSettings.asset | 1 + Unity/ProjectSettings/PresetManager.asset | 6 + Unity/ProjectSettings/ProjectVersion.txt | 2 +- 9 files changed, 769 insertions(+), 995 deletions(-) rename Unity/{UnityPackageManager => Packages}/manifest.json (100%) create mode 100644 Unity/ProjectSettings/PresetManager.asset diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.cpp b/Unity/Assets/CppSource/NativeScript/Bindings.cpp index a828a47..8e36cbb 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.cpp +++ b/Unity/Assets/CppSource/NativeScript/Bindings.cpp @@ -5951,142 +5951,146 @@ enum class InitMode : uint8_t DLLEXPORT void Init( uint8_t* memory, int32_t memorySize, - InitMode initMode, - void (*releaseObject)(int32_t handle), - int32_t (*stringNew)(const char* chars), - void (*setException)(int32_t handle), - int32_t (*arrayGetLength)(int32_t handle), - int32_t (*enumerableGetEnumerator)(int32_t handle), - /*BEGIN INIT PARAMS*/ - int32_t maxManagedObjects, - void (*releaseSystemDecimal)(int32_t handle), - int32_t (*systemDecimalConstructorSystemDouble)(double value), - int32_t (*systemDecimalConstructorSystemUInt64)(uint64_t value), - int32_t (*boxDecimal)(int32_t valHandle), - int32_t (*unboxDecimal)(int32_t valHandle), - UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), - UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b), - int32_t (*boxVector3)(UnityEngine::Vector3& val), - UnityEngine::Vector3 (*unboxVector3)(int32_t valHandle), - int32_t (*unityEngineObjectPropertyGetName)(int32_t thisHandle), - void (*unityEngineObjectPropertySetName)(int32_t thisHandle, int32_t valueHandle), - int32_t (*unityEngineComponentPropertyGetTransform)(int32_t thisHandle), - UnityEngine::Vector3 (*unityEngineTransformPropertyGetPosition)(int32_t thisHandle), - void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value), - int32_t (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), - int32_t (*systemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle), - int32_t (*unityEngineGameObjectMethodAddComponentMyGameBaseBallScript)(int32_t thisHandle), - int32_t (*unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type), - void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), - int32_t (*unityEngineMonoBehaviourPropertyGetTransform)(int32_t thisHandle), - int32_t (*systemExceptionConstructorSystemString)(int32_t messageHandle), - int32_t (*boxPrimitiveType)(UnityEngine::PrimitiveType val), - UnityEngine::PrimitiveType (*unboxPrimitiveType)(int32_t valHandle), - System::Single (*unityEngineTimePropertyGetDeltaTime)(), - void (*releaseBaseBallScript)(int32_t handle), - void (*baseBallScriptConstructor)(int32_t cppHandle, int32_t* handle), - int32_t (*boxBoolean)(uint32_t val), - int32_t (*unboxBoolean)(int32_t valHandle), - int32_t (*boxSByte)(int8_t val), - System::SByte (*unboxSByte)(int32_t valHandle), - int32_t (*boxByte)(uint8_t val), - System::Byte (*unboxByte)(int32_t valHandle), - int32_t (*boxInt16)(int16_t val), - System::Int16 (*unboxInt16)(int32_t valHandle), - int32_t (*boxUInt16)(uint16_t val), - System::UInt16 (*unboxUInt16)(int32_t valHandle), - int32_t (*boxInt32)(int32_t val), - System::Int32 (*unboxInt32)(int32_t valHandle), - int32_t (*boxUInt32)(uint32_t val), - System::UInt32 (*unboxUInt32)(int32_t valHandle), - int32_t (*boxInt64)(int64_t val), - System::Int64 (*unboxInt64)(int32_t valHandle), - int32_t (*boxUInt64)(uint64_t val), - System::UInt64 (*unboxUInt64)(int32_t valHandle), - int32_t (*boxChar)(uint16_t val), - int16_t (*unboxChar)(int32_t valHandle), - int32_t (*boxSingle)(float val), - System::Single (*unboxSingle)(int32_t valHandle), - int32_t (*boxDouble)(double val), - System::Double (*unboxDouble)(int32_t valHandle) - /*END INIT PARAMS*/) + InitMode initMode) { uint8_t* curMemory = memory; + // Read fixed parameters + Plugin::ReleaseObject = *(void (**)(int32_t handle))curMemory; + curMemory += sizeof(Plugin::ReleaseObject); + Plugin::StringNew = *(int32_t (**)(const char*))curMemory; + curMemory += sizeof(Plugin::StringNew); + Plugin::SetException = *(void (**)(int32_t))curMemory; + curMemory += sizeof(Plugin::SetException); + Plugin::ArrayGetLength = *(int32_t (**)(int32_t))curMemory; + curMemory += sizeof(Plugin::ArrayGetLength); + Plugin::EnumerableGetEnumerator = *(int32_t (**)(int32_t))curMemory; + curMemory += sizeof(Plugin::EnumerableGetEnumerator); + + // Read generated parameters + int32_t maxManagedObjects = *(int32_t*)curMemory; + curMemory += sizeof(int32_t); + /*BEGIN INIT BODY PARAMETER READS*/ + Plugin::ReleaseSystemDecimal = *(void (**)(int32_t handle))curMemory; + curMemory += sizeof(Plugin::ReleaseSystemDecimal); + Plugin::SystemDecimalConstructorSystemDouble = *(int32_t (**)(double value))curMemory; + curMemory += sizeof(Plugin::SystemDecimalConstructorSystemDouble); + Plugin::SystemDecimalConstructorSystemUInt64 = *(int32_t (**)(uint64_t value))curMemory; + curMemory += sizeof(Plugin::SystemDecimalConstructorSystemUInt64); + Plugin::BoxDecimal = *(int32_t (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::BoxDecimal); + Plugin::UnboxDecimal = *(int32_t (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxDecimal); + Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle = *(UnityEngine::Vector3 (**)(float x, float y, float z))curMemory; + curMemory += sizeof(Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle); + Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3 = *(UnityEngine::Vector3 (**)(UnityEngine::Vector3& a, UnityEngine::Vector3& b))curMemory; + curMemory += sizeof(Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3); + Plugin::BoxVector3 = *(int32_t (**)(UnityEngine::Vector3& val))curMemory; + curMemory += sizeof(Plugin::BoxVector3); + Plugin::UnboxVector3 = *(UnityEngine::Vector3 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxVector3); + Plugin::UnityEngineObjectPropertyGetName = *(int32_t (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineObjectPropertyGetName); + Plugin::UnityEngineObjectPropertySetName = *(void (**)(int32_t thisHandle, int32_t valueHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineObjectPropertySetName); + Plugin::UnityEngineComponentPropertyGetTransform = *(int32_t (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineComponentPropertyGetTransform); + Plugin::UnityEngineTransformPropertyGetPosition = *(UnityEngine::Vector3 (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineTransformPropertyGetPosition); + Plugin::UnityEngineTransformPropertySetPosition = *(void (**)(int32_t thisHandle, UnityEngine::Vector3& value))curMemory; + curMemory += sizeof(Plugin::UnityEngineTransformPropertySetPosition); + Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = *(int32_t (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent); + Plugin::SystemCollectionsIEnumeratorMethodMoveNext = *(int32_t (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::SystemCollectionsIEnumeratorMethodMoveNext); + Plugin::UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript = *(int32_t (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript); + Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType = *(int32_t (**)(UnityEngine::PrimitiveType type))curMemory; + curMemory += sizeof(Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType); + Plugin::UnityEngineDebugMethodLogSystemObject = *(void (**)(int32_t messageHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineDebugMethodLogSystemObject); + Plugin::UnityEngineMonoBehaviourPropertyGetTransform = *(int32_t (**)(int32_t thisHandle))curMemory; + curMemory += sizeof(Plugin::UnityEngineMonoBehaviourPropertyGetTransform); + Plugin::SystemExceptionConstructorSystemString = *(int32_t (**)(int32_t messageHandle))curMemory; + curMemory += sizeof(Plugin::SystemExceptionConstructorSystemString); + Plugin::BoxPrimitiveType = *(int32_t (**)(UnityEngine::PrimitiveType val))curMemory; + curMemory += sizeof(Plugin::BoxPrimitiveType); + Plugin::UnboxPrimitiveType = *(UnityEngine::PrimitiveType (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxPrimitiveType); + Plugin::UnityEngineTimePropertyGetDeltaTime = *(System::Single (**)())curMemory; + curMemory += sizeof(Plugin::UnityEngineTimePropertyGetDeltaTime); + Plugin::ReleaseBaseBallScript = *(void (**)(int32_t handle))curMemory; + curMemory += sizeof(Plugin::ReleaseBaseBallScript); + Plugin::BaseBallScriptConstructor = *(void (**)(int32_t cppHandle, int32_t* handle))curMemory; + curMemory += sizeof(Plugin::BaseBallScriptConstructor); + Plugin::BoxBoolean = *(int32_t (**)(uint32_t val))curMemory; + curMemory += sizeof(Plugin::BoxBoolean); + Plugin::UnboxBoolean = *(int32_t (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxBoolean); + Plugin::BoxSByte = *(int32_t (**)(int8_t val))curMemory; + curMemory += sizeof(Plugin::BoxSByte); + Plugin::UnboxSByte = *(System::SByte (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxSByte); + Plugin::BoxByte = *(int32_t (**)(uint8_t val))curMemory; + curMemory += sizeof(Plugin::BoxByte); + Plugin::UnboxByte = *(System::Byte (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxByte); + Plugin::BoxInt16 = *(int32_t (**)(int16_t val))curMemory; + curMemory += sizeof(Plugin::BoxInt16); + Plugin::UnboxInt16 = *(System::Int16 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxInt16); + Plugin::BoxUInt16 = *(int32_t (**)(uint16_t val))curMemory; + curMemory += sizeof(Plugin::BoxUInt16); + Plugin::UnboxUInt16 = *(System::UInt16 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxUInt16); + Plugin::BoxInt32 = *(int32_t (**)(int32_t val))curMemory; + curMemory += sizeof(Plugin::BoxInt32); + Plugin::UnboxInt32 = *(System::Int32 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxInt32); + Plugin::BoxUInt32 = *(int32_t (**)(uint32_t val))curMemory; + curMemory += sizeof(Plugin::BoxUInt32); + Plugin::UnboxUInt32 = *(System::UInt32 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxUInt32); + Plugin::BoxInt64 = *(int32_t (**)(int64_t val))curMemory; + curMemory += sizeof(Plugin::BoxInt64); + Plugin::UnboxInt64 = *(System::Int64 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxInt64); + Plugin::BoxUInt64 = *(int32_t (**)(uint64_t val))curMemory; + curMemory += sizeof(Plugin::BoxUInt64); + Plugin::UnboxUInt64 = *(System::UInt64 (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxUInt64); + Plugin::BoxChar = *(int32_t (**)(uint16_t val))curMemory; + curMemory += sizeof(Plugin::BoxChar); + Plugin::UnboxChar = *(int16_t (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxChar); + Plugin::BoxSingle = *(int32_t (**)(float val))curMemory; + curMemory += sizeof(Plugin::BoxSingle); + Plugin::UnboxSingle = *(System::Single (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxSingle); + Plugin::BoxDouble = *(int32_t (**)(double val))curMemory; + curMemory += sizeof(Plugin::BoxDouble); + Plugin::UnboxDouble = *(System::Double (**)(int32_t valHandle))curMemory; + curMemory += sizeof(Plugin::UnboxDouble); + /*END INIT BODY PARAMETER READS*/ + // Init managed object ref counting Plugin::RefCountsLenClass = maxManagedObjects; Plugin::RefCountsClass = (int32_t*)curMemory; curMemory += maxManagedObjects * sizeof(int32_t); - // Init pointers to C# functions - Plugin::StringNew = stringNew; - Plugin::ReleaseObject = releaseObject; - Plugin::SetException = setException; - Plugin::ArrayGetLength = arrayGetLength; - Plugin::EnumerableGetEnumerator = enumerableGetEnumerator; - /*BEGIN INIT BODY*/ - Plugin::ReleaseSystemDecimal = releaseSystemDecimal; + /*BEGIN INIT BODY ARRAYS*/ Plugin::RefCountsSystemDecimal = (int32_t*)curMemory; curMemory += 1000 * sizeof(int32_t); Plugin::RefCountsLenSystemDecimal = 1000; - Plugin::SystemDecimalConstructorSystemDouble = systemDecimalConstructorSystemDouble; - Plugin::SystemDecimalConstructorSystemUInt64 = systemDecimalConstructorSystemUInt64; - Plugin::BoxDecimal = boxDecimal; - Plugin::UnboxDecimal = unboxDecimal; - Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle = unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle; - Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3 = unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3; - Plugin::BoxVector3 = boxVector3; - Plugin::UnboxVector3 = unboxVector3; - Plugin::UnityEngineObjectPropertyGetName = unityEngineObjectPropertyGetName; - Plugin::UnityEngineObjectPropertySetName = unityEngineObjectPropertySetName; - Plugin::UnityEngineComponentPropertyGetTransform = unityEngineComponentPropertyGetTransform; - Plugin::UnityEngineTransformPropertyGetPosition = unityEngineTransformPropertyGetPosition; - Plugin::UnityEngineTransformPropertySetPosition = unityEngineTransformPropertySetPosition; - Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = systemCollectionsIEnumeratorPropertyGetCurrent; - Plugin::SystemCollectionsIEnumeratorMethodMoveNext = systemCollectionsIEnumeratorMethodMoveNext; - Plugin::UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript = unityEngineGameObjectMethodAddComponentMyGameBaseBallScript; - Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType = unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType; - Plugin::UnityEngineDebugMethodLogSystemObject = unityEngineDebugMethodLogSystemObject; - Plugin::UnityEngineMonoBehaviourPropertyGetTransform = unityEngineMonoBehaviourPropertyGetTransform; - Plugin::SystemExceptionConstructorSystemString = systemExceptionConstructorSystemString; - Plugin::BoxPrimitiveType = boxPrimitiveType; - Plugin::UnboxPrimitiveType = unboxPrimitiveType; - Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; + Plugin::BaseBallScriptFreeListSize = 1000; Plugin::BaseBallScriptFreeList = (MyGame::BaseBallScript**)curMemory; curMemory += 1000 * sizeof(MyGame::BaseBallScript*); - Plugin::ReleaseBaseBallScript = releaseBaseBallScript; - Plugin::BaseBallScriptConstructor = baseBallScriptConstructor; Plugin::BaseBallScriptFreeWholeListSize = 1000; Plugin::BaseBallScriptFreeWholeList = (Plugin::BaseBallScriptFreeWholeListEntry*)curMemory; curMemory += 1000 * sizeof(Plugin::BaseBallScriptFreeWholeListEntry); - - Plugin::BoxBoolean = boxBoolean; - Plugin::UnboxBoolean = unboxBoolean; - Plugin::BoxSByte = boxSByte; - Plugin::UnboxSByte = unboxSByte; - Plugin::BoxByte = boxByte; - Plugin::UnboxByte = unboxByte; - Plugin::BoxInt16 = boxInt16; - Plugin::UnboxInt16 = unboxInt16; - Plugin::BoxUInt16 = boxUInt16; - Plugin::UnboxUInt16 = unboxUInt16; - Plugin::BoxInt32 = boxInt32; - Plugin::UnboxInt32 = unboxInt32; - Plugin::BoxUInt32 = boxUInt32; - Plugin::UnboxUInt32 = unboxUInt32; - Plugin::BoxInt64 = boxInt64; - Plugin::UnboxInt64 = unboxInt64; - Plugin::BoxUInt64 = boxUInt64; - Plugin::UnboxUInt64 = unboxUInt64; - Plugin::BoxChar = boxChar; - Plugin::UnboxChar = unboxChar; - Plugin::BoxSingle = boxSingle; - Plugin::UnboxSingle = unboxSingle; - Plugin::BoxDouble = boxDouble; - Plugin::UnboxDouble = unboxDouble; - /*END INIT BODY*/ + /*END INIT BODY ARRAYS*/ // Make sure there was enough memory int32_t usedMemory = (int32_t)(curMemory - (uint8_t*)memory); @@ -6100,6 +6104,7 @@ DLLEXPORT void Init( if (initMode == InitMode::FirstBoot) { + // Clear memory memset(memory, 0, memorySize); /*BEGIN INIT BODY FIRST BOOT*/ diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 248ee00..c2a00a6 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -330,81 +330,23 @@ enum InitMode : byte delegate void InitDelegate( IntPtr memory, int memorySize, - InitMode initMode, - IntPtr releaseObject, - IntPtr stringNew, - IntPtr setException, - IntPtr arrayGetLength, - IntPtr enumerableGetEnumerator, - /*BEGIN INIT PARAMS*/ - int maxManagedObjects, - IntPtr releaseSystemDecimal, - IntPtr systemDecimalConstructorSystemDouble, - IntPtr systemDecimalConstructorSystemUInt64, - IntPtr boxDecimal, - IntPtr unboxDecimal, - IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, - IntPtr boxVector3, - IntPtr unboxVector3, - IntPtr unityEngineObjectPropertyGetName, - IntPtr unityEngineObjectPropertySetName, - IntPtr unityEngineComponentPropertyGetTransform, - IntPtr unityEngineTransformPropertyGetPosition, - IntPtr unityEngineTransformPropertySetPosition, - IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, - IntPtr systemCollectionsIEnumeratorMethodMoveNext, - IntPtr unityEngineGameObjectMethodAddComponentMyGameBaseBallScript, - IntPtr unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, - IntPtr unityEngineDebugMethodLogSystemObject, - IntPtr unityEngineMonoBehaviourPropertyGetTransform, - IntPtr systemExceptionConstructorSystemString, - IntPtr boxPrimitiveType, - IntPtr unboxPrimitiveType, - IntPtr unityEngineTimePropertyGetDeltaTime, - IntPtr releaseBaseBallScript, - IntPtr baseBallScriptConstructor, - IntPtr boxBoolean, - IntPtr unboxBoolean, - IntPtr boxSByte, - IntPtr unboxSByte, - IntPtr boxByte, - IntPtr unboxByte, - IntPtr boxInt16, - IntPtr unboxInt16, - IntPtr boxUInt16, - IntPtr unboxUInt16, - IntPtr boxInt32, - IntPtr unboxInt32, - IntPtr boxUInt32, - IntPtr unboxUInt32, - IntPtr boxInt64, - IntPtr unboxInt64, - IntPtr boxUInt64, - IntPtr unboxUInt64, - IntPtr boxChar, - IntPtr unboxChar, - IntPtr boxSingle, - IntPtr unboxSingle, - IntPtr boxDouble, - IntPtr unboxDouble - /*END INIT PARAMS*/); + InitMode initMode); public delegate void SetCsharpExceptionDelegate(int handle); - /*BEGIN DELEGATES*/ - public delegate int NewBaseBallScriptDelegate(int param0); - public static NewBaseBallScriptDelegate NewBaseBallScript; + /*BEGIN CPP DELEGATES*/ + public delegate int NewBaseBallScriptDelegateType(int param0); + public static NewBaseBallScriptDelegateType NewBaseBallScript; - public delegate void DestroyBaseBallScriptDelegate(int param0); - public static DestroyBaseBallScriptDelegate DestroyBaseBallScript; + public delegate void DestroyBaseBallScriptDelegateType(int param0); + public static DestroyBaseBallScriptDelegateType DestroyBaseBallScript; - public delegate void MyGameAbstractBaseBallScriptUpdateDelegate(int thisHandle); - public static MyGameAbstractBaseBallScriptUpdateDelegate MyGameAbstractBaseBallScriptUpdate; + public delegate void MyGameAbstractBaseBallScriptUpdateDelegateType(int thisHandle); + public static MyGameAbstractBaseBallScriptUpdateDelegateType MyGameAbstractBaseBallScriptUpdate; - public delegate void SetCsharpExceptionSystemNullReferenceExceptionDelegate(int param0); - public static SetCsharpExceptionSystemNullReferenceExceptionDelegate SetCsharpExceptionSystemNullReferenceException; - /*END DELEGATES*/ + public delegate void SetCsharpExceptionSystemNullReferenceExceptionDelegateType(int param0); + public static SetCsharpExceptionSystemNullReferenceExceptionDelegateType SetCsharpExceptionSystemNullReferenceException; + /*END CPP DELEGATES*/ #endif #if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX @@ -499,65 +441,7 @@ static T GetDelegate( static extern void Init( IntPtr memory, int memorySize, - InitMode initMode, - IntPtr releaseObject, - IntPtr stringNew, - IntPtr setException, - IntPtr arrayGetLength, - IntPtr enumerableGetEnumerator, - /*BEGIN INIT PARAMS*/ - int maxManagedObjects, - IntPtr releaseSystemDecimal, - IntPtr systemDecimalConstructorSystemDouble, - IntPtr systemDecimalConstructorSystemUInt64, - IntPtr boxDecimal, - IntPtr unboxDecimal, - IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, - IntPtr boxVector3, - IntPtr unboxVector3, - IntPtr unityEngineObjectPropertyGetName, - IntPtr unityEngineObjectPropertySetName, - IntPtr unityEngineComponentPropertyGetTransform, - IntPtr unityEngineTransformPropertyGetPosition, - IntPtr unityEngineTransformPropertySetPosition, - IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, - IntPtr systemCollectionsIEnumeratorMethodMoveNext, - IntPtr unityEngineGameObjectMethodAddComponentMyGameBaseBallScript, - IntPtr unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, - IntPtr unityEngineDebugMethodLogSystemObject, - IntPtr unityEngineMonoBehaviourPropertyGetTransform, - IntPtr systemExceptionConstructorSystemString, - IntPtr boxPrimitiveType, - IntPtr unboxPrimitiveType, - IntPtr unityEngineTimePropertyGetDeltaTime, - IntPtr releaseBaseBallScript, - IntPtr baseBallScriptConstructor, - IntPtr boxBoolean, - IntPtr unboxBoolean, - IntPtr boxSByte, - IntPtr unboxSByte, - IntPtr boxByte, - IntPtr unboxByte, - IntPtr boxInt16, - IntPtr unboxInt16, - IntPtr boxUInt16, - IntPtr unboxUInt16, - IntPtr boxInt32, - IntPtr unboxInt32, - IntPtr boxUInt32, - IntPtr unboxUInt32, - IntPtr boxInt64, - IntPtr unboxInt64, - IntPtr boxUInt64, - IntPtr unboxUInt64, - IntPtr boxChar, - IntPtr unboxChar, - IntPtr boxSingle, - IntPtr unboxSingle, - IntPtr boxDouble, - IntPtr unboxDouble - /*END INIT PARAMS*/); + InitMode initMode); [DllImport(PLUGIN_NAME)] static extern void SetCsharpException(int handle); @@ -577,63 +461,63 @@ IntPtr unboxDouble /*END IMPORTS*/ #endif - delegate void ReleaseObjectDelegate(int handle); - delegate int StringNewDelegate(string chars); - delegate void SetExceptionDelegate(int handle); - delegate int ArrayGetLengthDelegate(int handle); - delegate int EnumerableGetEnumeratorDelegate(int handle); + delegate void ReleaseObjectDelegateType(int handle); + delegate int StringNewDelegateType(string chars); + delegate void SetExceptionDelegateType(int handle); + delegate int ArrayGetLengthDelegateType(int handle); + delegate int EnumerableGetEnumeratorDelegateType(int handle); /*BEGIN DELEGATE TYPES*/ - delegate void ReleaseSystemDecimalDelegate(int handle); - delegate int SystemDecimalConstructorSystemDoubleDelegate(double value); - delegate int SystemDecimalConstructorSystemUInt64Delegate(ulong value); - delegate int BoxDecimalDelegate(int valHandle); - delegate int UnboxDecimalDelegate(int valHandle); - delegate UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(float x, float y, float z); - delegate UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b); - delegate int BoxVector3Delegate(ref UnityEngine.Vector3 val); - delegate UnityEngine.Vector3 UnboxVector3Delegate(int valHandle); - delegate int UnityEngineObjectPropertyGetNameDelegate(int thisHandle); - delegate void UnityEngineObjectPropertySetNameDelegate(int thisHandle, int valueHandle); - delegate int UnityEngineComponentPropertyGetTransformDelegate(int thisHandle); - delegate UnityEngine.Vector3 UnityEngineTransformPropertyGetPositionDelegate(int thisHandle); - delegate void UnityEngineTransformPropertySetPositionDelegate(int thisHandle, ref UnityEngine.Vector3 value); - delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); - delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngine.PrimitiveType type); - delegate void UnityEngineDebugMethodLogSystemObjectDelegate(int messageHandle); - delegate int UnityEngineMonoBehaviourPropertyGetTransformDelegate(int thisHandle); - delegate int SystemExceptionConstructorSystemStringDelegate(int messageHandle); - delegate int BoxPrimitiveTypeDelegate(UnityEngine.PrimitiveType val); - delegate UnityEngine.PrimitiveType UnboxPrimitiveTypeDelegate(int valHandle); - delegate float UnityEngineTimePropertyGetDeltaTimeDelegate(); - delegate void BaseBallScriptConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseBaseBallScriptDelegate(int handle); - delegate int BoxBooleanDelegate(bool val); - delegate bool UnboxBooleanDelegate(int valHandle); - delegate int BoxSByteDelegate(sbyte val); - delegate sbyte UnboxSByteDelegate(int valHandle); - delegate int BoxByteDelegate(byte val); - delegate byte UnboxByteDelegate(int valHandle); - delegate int BoxInt16Delegate(short val); - delegate short UnboxInt16Delegate(int valHandle); - delegate int BoxUInt16Delegate(ushort val); - delegate ushort UnboxUInt16Delegate(int valHandle); - delegate int BoxInt32Delegate(int val); - delegate int UnboxInt32Delegate(int valHandle); - delegate int BoxUInt32Delegate(uint val); - delegate uint UnboxUInt32Delegate(int valHandle); - delegate int BoxInt64Delegate(long val); - delegate long UnboxInt64Delegate(int valHandle); - delegate int BoxUInt64Delegate(ulong val); - delegate ulong UnboxUInt64Delegate(int valHandle); - delegate int BoxCharDelegate(char val); - delegate char UnboxCharDelegate(int valHandle); - delegate int BoxSingleDelegate(float val); - delegate float UnboxSingleDelegate(int valHandle); - delegate int BoxDoubleDelegate(double val); - delegate double UnboxDoubleDelegate(int valHandle); + delegate void ReleaseSystemDecimalDelegateType(int handle); + delegate int SystemDecimalConstructorSystemDoubleDelegateType(double value); + delegate int SystemDecimalConstructorSystemUInt64DelegateType(ulong value); + delegate int BoxDecimalDelegateType(int valHandle); + delegate int UnboxDecimalDelegateType(int valHandle); + delegate UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegateType(float x, float y, float z); + delegate UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3DelegateType(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b); + delegate int BoxVector3DelegateType(ref UnityEngine.Vector3 val); + delegate UnityEngine.Vector3 UnboxVector3DelegateType(int valHandle); + delegate int UnityEngineObjectPropertyGetNameDelegateType(int thisHandle); + delegate void UnityEngineObjectPropertySetNameDelegateType(int thisHandle, int valueHandle); + delegate int UnityEngineComponentPropertyGetTransformDelegateType(int thisHandle); + delegate UnityEngine.Vector3 UnityEngineTransformPropertyGetPositionDelegateType(int thisHandle); + delegate void UnityEngineTransformPropertySetPositionDelegateType(int thisHandle, ref UnityEngine.Vector3 value); + delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegateType(int thisHandle); + delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegateType(int thisHandle); + delegate int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegateType(int thisHandle); + delegate int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegateType(UnityEngine.PrimitiveType type); + delegate void UnityEngineDebugMethodLogSystemObjectDelegateType(int messageHandle); + delegate int UnityEngineMonoBehaviourPropertyGetTransformDelegateType(int thisHandle); + delegate int SystemExceptionConstructorSystemStringDelegateType(int messageHandle); + delegate int BoxPrimitiveTypeDelegateType(UnityEngine.PrimitiveType val); + delegate UnityEngine.PrimitiveType UnboxPrimitiveTypeDelegateType(int valHandle); + delegate float UnityEngineTimePropertyGetDeltaTimeDelegateType(); + delegate void BaseBallScriptConstructorDelegateType(int cppHandle, ref int handle); + delegate void ReleaseBaseBallScriptDelegateType(int handle); + delegate int BoxBooleanDelegateType(bool val); + delegate bool UnboxBooleanDelegateType(int valHandle); + delegate int BoxSByteDelegateType(sbyte val); + delegate sbyte UnboxSByteDelegateType(int valHandle); + delegate int BoxByteDelegateType(byte val); + delegate byte UnboxByteDelegateType(int valHandle); + delegate int BoxInt16DelegateType(short val); + delegate short UnboxInt16DelegateType(int valHandle); + delegate int BoxUInt16DelegateType(ushort val); + delegate ushort UnboxUInt16DelegateType(int valHandle); + delegate int BoxInt32DelegateType(int val); + delegate int UnboxInt32DelegateType(int valHandle); + delegate int BoxUInt32DelegateType(uint val); + delegate uint UnboxUInt32DelegateType(int valHandle); + delegate int BoxInt64DelegateType(long val); + delegate long UnboxInt64DelegateType(int valHandle); + delegate int BoxUInt64DelegateType(ulong val); + delegate ulong UnboxUInt64DelegateType(int valHandle); + delegate int BoxCharDelegateType(char val); + delegate char UnboxCharDelegateType(int valHandle); + delegate int BoxSingleDelegateType(float val); + delegate float UnboxSingleDelegateType(int valHandle); + delegate int BoxDoubleDelegateType(double val); + delegate double UnboxDoubleDelegateType(int valHandle); /*END DELEGATE TYPES*/ #if UNITY_EDITOR_WIN @@ -651,6 +535,67 @@ IntPtr unboxDouble static int destroyQueueCapacity; static object destroyQueueLockObj; + // Fixed delegates + static readonly ReleaseObjectDelegateType ReleaseObjectDelegate = new ReleaseObjectDelegateType(ReleaseObject); + static readonly StringNewDelegateType StringNewDelegate = new StringNewDelegateType(StringNew); + static readonly SetExceptionDelegateType SetExceptionDelegate = new SetExceptionDelegateType(SetException); + static readonly ArrayGetLengthDelegateType ArrayGetLengthDelegate = new ArrayGetLengthDelegateType(ArrayGetLength); + static readonly EnumerableGetEnumeratorDelegateType EnumerableGetEnumeratorDelegate = new EnumerableGetEnumeratorDelegateType(EnumerableGetEnumerator); + + // Generated delegates + /*BEGIN CSHARP DELEGATES*/ + static readonly ReleaseSystemDecimalDelegateType ReleaseSystemDecimalDelegate = new ReleaseSystemDecimalDelegateType(ReleaseSystemDecimal); + static readonly SystemDecimalConstructorSystemDoubleDelegateType SystemDecimalConstructorSystemDoubleDelegate = new SystemDecimalConstructorSystemDoubleDelegateType(SystemDecimalConstructorSystemDouble); + static readonly SystemDecimalConstructorSystemUInt64DelegateType SystemDecimalConstructorSystemUInt64Delegate = new SystemDecimalConstructorSystemUInt64DelegateType(SystemDecimalConstructorSystemUInt64); + static readonly BoxDecimalDelegateType BoxDecimalDelegate = new BoxDecimalDelegateType(BoxDecimal); + static readonly UnboxDecimalDelegateType UnboxDecimalDelegate = new UnboxDecimalDelegateType(UnboxDecimal); + static readonly UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegateType UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate = new UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegateType(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle); + static readonly UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3DelegateType UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate = new UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3DelegateType(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3); + static readonly BoxVector3DelegateType BoxVector3Delegate = new BoxVector3DelegateType(BoxVector3); + static readonly UnboxVector3DelegateType UnboxVector3Delegate = new UnboxVector3DelegateType(UnboxVector3); + static readonly UnityEngineObjectPropertyGetNameDelegateType UnityEngineObjectPropertyGetNameDelegate = new UnityEngineObjectPropertyGetNameDelegateType(UnityEngineObjectPropertyGetName); + static readonly UnityEngineObjectPropertySetNameDelegateType UnityEngineObjectPropertySetNameDelegate = new UnityEngineObjectPropertySetNameDelegateType(UnityEngineObjectPropertySetName); + static readonly UnityEngineComponentPropertyGetTransformDelegateType UnityEngineComponentPropertyGetTransformDelegate = new UnityEngineComponentPropertyGetTransformDelegateType(UnityEngineComponentPropertyGetTransform); + static readonly UnityEngineTransformPropertyGetPositionDelegateType UnityEngineTransformPropertyGetPositionDelegate = new UnityEngineTransformPropertyGetPositionDelegateType(UnityEngineTransformPropertyGetPosition); + static readonly UnityEngineTransformPropertySetPositionDelegateType UnityEngineTransformPropertySetPositionDelegate = new UnityEngineTransformPropertySetPositionDelegateType(UnityEngineTransformPropertySetPosition); + static readonly SystemCollectionsIEnumeratorPropertyGetCurrentDelegateType SystemCollectionsIEnumeratorPropertyGetCurrentDelegate = new SystemCollectionsIEnumeratorPropertyGetCurrentDelegateType(SystemCollectionsIEnumeratorPropertyGetCurrent); + static readonly SystemCollectionsIEnumeratorMethodMoveNextDelegateType SystemCollectionsIEnumeratorMethodMoveNextDelegate = new SystemCollectionsIEnumeratorMethodMoveNextDelegateType(SystemCollectionsIEnumeratorMethodMoveNext); + static readonly UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegateType UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate = new UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegateType(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript); + static readonly UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegateType UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate = new UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegateType(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType); + static readonly UnityEngineDebugMethodLogSystemObjectDelegateType UnityEngineDebugMethodLogSystemObjectDelegate = new UnityEngineDebugMethodLogSystemObjectDelegateType(UnityEngineDebugMethodLogSystemObject); + static readonly UnityEngineMonoBehaviourPropertyGetTransformDelegateType UnityEngineMonoBehaviourPropertyGetTransformDelegate = new UnityEngineMonoBehaviourPropertyGetTransformDelegateType(UnityEngineMonoBehaviourPropertyGetTransform); + static readonly SystemExceptionConstructorSystemStringDelegateType SystemExceptionConstructorSystemStringDelegate = new SystemExceptionConstructorSystemStringDelegateType(SystemExceptionConstructorSystemString); + static readonly BoxPrimitiveTypeDelegateType BoxPrimitiveTypeDelegate = new BoxPrimitiveTypeDelegateType(BoxPrimitiveType); + static readonly UnboxPrimitiveTypeDelegateType UnboxPrimitiveTypeDelegate = new UnboxPrimitiveTypeDelegateType(UnboxPrimitiveType); + static readonly UnityEngineTimePropertyGetDeltaTimeDelegateType UnityEngineTimePropertyGetDeltaTimeDelegate = new UnityEngineTimePropertyGetDeltaTimeDelegateType(UnityEngineTimePropertyGetDeltaTime); + static readonly ReleaseBaseBallScriptDelegateType ReleaseBaseBallScriptDelegate = new ReleaseBaseBallScriptDelegateType(ReleaseBaseBallScript); + static readonly BaseBallScriptConstructorDelegateType BaseBallScriptConstructorDelegate = new BaseBallScriptConstructorDelegateType(BaseBallScriptConstructor); + static readonly BoxBooleanDelegateType BoxBooleanDelegate = new BoxBooleanDelegateType(BoxBoolean); + static readonly UnboxBooleanDelegateType UnboxBooleanDelegate = new UnboxBooleanDelegateType(UnboxBoolean); + static readonly BoxSByteDelegateType BoxSByteDelegate = new BoxSByteDelegateType(BoxSByte); + static readonly UnboxSByteDelegateType UnboxSByteDelegate = new UnboxSByteDelegateType(UnboxSByte); + static readonly BoxByteDelegateType BoxByteDelegate = new BoxByteDelegateType(BoxByte); + static readonly UnboxByteDelegateType UnboxByteDelegate = new UnboxByteDelegateType(UnboxByte); + static readonly BoxInt16DelegateType BoxInt16Delegate = new BoxInt16DelegateType(BoxInt16); + static readonly UnboxInt16DelegateType UnboxInt16Delegate = new UnboxInt16DelegateType(UnboxInt16); + static readonly BoxUInt16DelegateType BoxUInt16Delegate = new BoxUInt16DelegateType(BoxUInt16); + static readonly UnboxUInt16DelegateType UnboxUInt16Delegate = new UnboxUInt16DelegateType(UnboxUInt16); + static readonly BoxInt32DelegateType BoxInt32Delegate = new BoxInt32DelegateType(BoxInt32); + static readonly UnboxInt32DelegateType UnboxInt32Delegate = new UnboxInt32DelegateType(UnboxInt32); + static readonly BoxUInt32DelegateType BoxUInt32Delegate = new BoxUInt32DelegateType(BoxUInt32); + static readonly UnboxUInt32DelegateType UnboxUInt32Delegate = new UnboxUInt32DelegateType(UnboxUInt32); + static readonly BoxInt64DelegateType BoxInt64Delegate = new BoxInt64DelegateType(BoxInt64); + static readonly UnboxInt64DelegateType UnboxInt64Delegate = new UnboxInt64DelegateType(UnboxInt64); + static readonly BoxUInt64DelegateType BoxUInt64Delegate = new BoxUInt64DelegateType(BoxUInt64); + static readonly UnboxUInt64DelegateType UnboxUInt64Delegate = new UnboxUInt64DelegateType(UnboxUInt64); + static readonly BoxCharDelegateType BoxCharDelegate = new BoxCharDelegateType(BoxChar); + static readonly UnboxCharDelegateType UnboxCharDelegate = new UnboxCharDelegateType(UnboxChar); + static readonly BoxSingleDelegateType BoxSingleDelegate = new BoxSingleDelegateType(BoxSingle); + static readonly UnboxSingleDelegateType UnboxSingleDelegate = new UnboxSingleDelegateType(UnboxSingle); + static readonly BoxDoubleDelegateType BoxDoubleDelegate = new BoxDoubleDelegateType(BoxDouble); + static readonly UnboxDoubleDelegateType UnboxDoubleDelegate = new UnboxDoubleDelegateType(UnboxDouble); + /*END CSHARP DELEGATES*/ + /// /// Open the C++ plugin and call its PluginMain() /// @@ -748,76 +693,147 @@ private static void OpenPlugin(InitMode initMode) libraryHandle, "SetCsharpException"); /*BEGIN GETDELEGATE CALLS*/ - NewBaseBallScript = GetDelegate(libraryHandle, "NewBaseBallScript"); - DestroyBaseBallScript = GetDelegate(libraryHandle, "DestroyBaseBallScript"); - MyGameAbstractBaseBallScriptUpdate = GetDelegate(libraryHandle, "MyGameAbstractBaseBallScriptUpdate"); - SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); + NewBaseBallScript = GetDelegate(libraryHandle, "NewBaseBallScript"); + DestroyBaseBallScript = GetDelegate(libraryHandle, "DestroyBaseBallScript"); + MyGameAbstractBaseBallScriptUpdate = GetDelegate(libraryHandle, "MyGameAbstractBaseBallScriptUpdate"); + SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); /*END GETDELEGATE CALLS*/ #endif - // Init C++ library - Init( + // Pass parameters through 'memory' + int curMemory = 0; + Marshal.WriteIntPtr( + memory, + curMemory, + Marshal.GetFunctionPointerForDelegate(ReleaseObjectDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr( + memory, + curMemory, + Marshal.GetFunctionPointerForDelegate(StringNewDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr( + memory, + curMemory, + Marshal.GetFunctionPointerForDelegate(SetExceptionDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr( memory, - memorySize, - initMode, - Marshal.GetFunctionPointerForDelegate(new ReleaseObjectDelegate(ReleaseObject)), - Marshal.GetFunctionPointerForDelegate(new StringNewDelegate(StringNew)), - Marshal.GetFunctionPointerForDelegate(new SetExceptionDelegate(SetException)), - Marshal.GetFunctionPointerForDelegate(new ArrayGetLengthDelegate(ArrayGetLength)), - Marshal.GetFunctionPointerForDelegate(new EnumerableGetEnumeratorDelegate(EnumerableGetEnumerator)), - /*BEGIN INIT CALL*/ - 1000, - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemDecimalDelegate(ReleaseSystemDecimal)), - Marshal.GetFunctionPointerForDelegate(new SystemDecimalConstructorSystemDoubleDelegate(SystemDecimalConstructorSystemDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemDecimalConstructorSystemUInt64Delegate(SystemDecimalConstructorSystemUInt64)), - Marshal.GetFunctionPointerForDelegate(new BoxDecimalDelegate(BoxDecimal)), - Marshal.GetFunctionPointerForDelegate(new UnboxDecimalDelegate(UnboxDecimal)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)), - Marshal.GetFunctionPointerForDelegate(new BoxVector3Delegate(BoxVector3)), - Marshal.GetFunctionPointerForDelegate(new UnboxVector3Delegate(UnboxVector3)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineObjectPropertyGetNameDelegate(UnityEngineObjectPropertyGetName)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineObjectPropertySetNameDelegate(UnityEngineObjectPropertySetName)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineComponentPropertyGetTransformDelegate(UnityEngineComponentPropertyGetTransform)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertyGetPositionDelegate(UnityEngineTransformPropertyGetPosition)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertySetPositionDelegate(UnityEngineTransformPropertySetPosition)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(SystemCollectionsIEnumeratorPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorMethodMoveNextDelegate(SystemCollectionsIEnumeratorMethodMoveNext)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineDebugMethodLogSystemObjectDelegate(UnityEngineDebugMethodLogSystemObject)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineMonoBehaviourPropertyGetTransformDelegate(UnityEngineMonoBehaviourPropertyGetTransform)), - Marshal.GetFunctionPointerForDelegate(new SystemExceptionConstructorSystemStringDelegate(SystemExceptionConstructorSystemString)), - Marshal.GetFunctionPointerForDelegate(new BoxPrimitiveTypeDelegate(BoxPrimitiveType)), - Marshal.GetFunctionPointerForDelegate(new UnboxPrimitiveTypeDelegate(UnboxPrimitiveType)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineTimePropertyGetDeltaTimeDelegate(UnityEngineTimePropertyGetDeltaTime)), - Marshal.GetFunctionPointerForDelegate(new ReleaseBaseBallScriptDelegate(ReleaseBaseBallScript)), - Marshal.GetFunctionPointerForDelegate(new BaseBallScriptConstructorDelegate(BaseBallScriptConstructor)), - Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), - Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), - Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), - Marshal.GetFunctionPointerForDelegate(new UnboxSByteDelegate(UnboxSByte)), - Marshal.GetFunctionPointerForDelegate(new BoxByteDelegate(BoxByte)), - Marshal.GetFunctionPointerForDelegate(new UnboxByteDelegate(UnboxByte)), - Marshal.GetFunctionPointerForDelegate(new BoxInt16Delegate(BoxInt16)), - Marshal.GetFunctionPointerForDelegate(new UnboxInt16Delegate(UnboxInt16)), - Marshal.GetFunctionPointerForDelegate(new BoxUInt16Delegate(BoxUInt16)), - Marshal.GetFunctionPointerForDelegate(new UnboxUInt16Delegate(UnboxUInt16)), - Marshal.GetFunctionPointerForDelegate(new BoxInt32Delegate(BoxInt32)), - Marshal.GetFunctionPointerForDelegate(new UnboxInt32Delegate(UnboxInt32)), - Marshal.GetFunctionPointerForDelegate(new BoxUInt32Delegate(BoxUInt32)), - Marshal.GetFunctionPointerForDelegate(new UnboxUInt32Delegate(UnboxUInt32)), - Marshal.GetFunctionPointerForDelegate(new BoxInt64Delegate(BoxInt64)), - Marshal.GetFunctionPointerForDelegate(new UnboxInt64Delegate(UnboxInt64)), - Marshal.GetFunctionPointerForDelegate(new BoxUInt64Delegate(BoxUInt64)), - Marshal.GetFunctionPointerForDelegate(new UnboxUInt64Delegate(UnboxUInt64)), - Marshal.GetFunctionPointerForDelegate(new BoxCharDelegate(BoxChar)), - Marshal.GetFunctionPointerForDelegate(new UnboxCharDelegate(UnboxChar)), - Marshal.GetFunctionPointerForDelegate(new BoxSingleDelegate(BoxSingle)), - Marshal.GetFunctionPointerForDelegate(new UnboxSingleDelegate(UnboxSingle)), - Marshal.GetFunctionPointerForDelegate(new BoxDoubleDelegate(BoxDouble)), - Marshal.GetFunctionPointerForDelegate(new UnboxDoubleDelegate(UnboxDouble)) - /*END INIT CALL*/ - ); + curMemory, + Marshal.GetFunctionPointerForDelegate(ArrayGetLengthDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr( + memory, + curMemory, + Marshal.GetFunctionPointerForDelegate(EnumerableGetEnumeratorDelegate)); + curMemory += IntPtr.Size; + + /*BEGIN INIT CALL*/ + Marshal.WriteInt32(memory, curMemory, 1000); // max managed objects + curMemory += sizeof(int); + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(ReleaseSystemDecimalDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(SystemDecimalConstructorSystemDoubleDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(SystemDecimalConstructorSystemUInt64Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxDecimalDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxDecimalDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxVector3Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxVector3Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineObjectPropertyGetNameDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineObjectPropertySetNameDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineComponentPropertyGetTransformDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineTransformPropertyGetPositionDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineTransformPropertySetPositionDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(SystemCollectionsIEnumeratorPropertyGetCurrentDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(SystemCollectionsIEnumeratorMethodMoveNextDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineDebugMethodLogSystemObjectDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineMonoBehaviourPropertyGetTransformDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(SystemExceptionConstructorSystemStringDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxPrimitiveTypeDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxPrimitiveTypeDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnityEngineTimePropertyGetDeltaTimeDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(ReleaseBaseBallScriptDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BaseBallScriptConstructorDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxBooleanDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxBooleanDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxSByteDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxSByteDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxByteDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxByteDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxInt16Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxInt16Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxUInt16Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxUInt16Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxInt32Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxInt32Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxUInt32Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxUInt32Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxInt64Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxInt64Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxUInt64Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxUInt64Delegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxCharDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxCharDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxSingleDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxSingleDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(BoxDoubleDelegate)); + curMemory += IntPtr.Size; + Marshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate(UnboxDoubleDelegate)); + curMemory += IntPtr.Size; + /*END INIT CALL*/ + + // Init C++ library + Init(memory, memorySize, initMode); if (UnhandledCppException != null) { Exception ex = UnhandledCppException; @@ -908,7 +924,7 @@ static void DestroyAll() // C# functions for C++ to call //////////////////////////////////////////////////////////////// - [MonoPInvokeCallback(typeof(ReleaseObjectDelegate))] + [MonoPInvokeCallback(typeof(ReleaseObjectDelegateType))] static void ReleaseObject( int handle) { @@ -918,7 +934,7 @@ static void ReleaseObject( } } - [MonoPInvokeCallback(typeof(StringNewDelegate))] + [MonoPInvokeCallback(typeof(StringNewDelegateType))] static int StringNew( string chars) { @@ -926,26 +942,26 @@ static int StringNew( return handle; } - [MonoPInvokeCallback(typeof(SetExceptionDelegate))] + [MonoPInvokeCallback(typeof(SetExceptionDelegateType))] static void SetException(int handle) { UnhandledCppException = ObjectStore.Get(handle) as Exception; } - [MonoPInvokeCallback(typeof(ArrayGetLengthDelegate))] + [MonoPInvokeCallback(typeof(ArrayGetLengthDelegateType))] static int ArrayGetLength(int handle) { return ((Array)ObjectStore.Get(handle)).Length; } - [MonoPInvokeCallback(typeof(EnumerableGetEnumeratorDelegate))] + [MonoPInvokeCallback(typeof(EnumerableGetEnumeratorDelegateType))] static int EnumerableGetEnumerator(int handle) { return ObjectStore.Store(((IEnumerable)ObjectStore.Get(handle)).GetEnumerator()); } /*BEGIN FUNCTIONS*/ - [MonoPInvokeCallback(typeof(ReleaseSystemDecimalDelegate))] + [MonoPInvokeCallback(typeof(ReleaseSystemDecimalDelegateType))] static void ReleaseSystemDecimal(int handle) { try @@ -967,7 +983,7 @@ static void ReleaseSystemDecimal(int handle) } } - [MonoPInvokeCallback(typeof(SystemDecimalConstructorSystemDoubleDelegate))] + [MonoPInvokeCallback(typeof(SystemDecimalConstructorSystemDoubleDelegateType))] static int SystemDecimalConstructorSystemDouble(double value) { try @@ -989,7 +1005,7 @@ static int SystemDecimalConstructorSystemDouble(double value) } } - [MonoPInvokeCallback(typeof(SystemDecimalConstructorSystemUInt64Delegate))] + [MonoPInvokeCallback(typeof(SystemDecimalConstructorSystemUInt64DelegateType))] static int SystemDecimalConstructorSystemUInt64(ulong value) { try @@ -1011,7 +1027,7 @@ static int SystemDecimalConstructorSystemUInt64(ulong value) } } - [MonoPInvokeCallback(typeof(BoxDecimalDelegate))] + [MonoPInvokeCallback(typeof(BoxDecimalDelegateType))] static int BoxDecimal(int valHandle) { try @@ -1034,7 +1050,7 @@ static int BoxDecimal(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxDecimalDelegate))] + [MonoPInvokeCallback(typeof(UnboxDecimalDelegateType))] static int UnboxDecimal(int valHandle) { try @@ -1057,7 +1073,7 @@ static int UnboxDecimal(int valHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegateType))] static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(float x, float y, float z) { try @@ -1079,7 +1095,7 @@ static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingl } } - [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] + [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3DelegateType))] static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) { try @@ -1101,7 +1117,7 @@ static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3 } } - [MonoPInvokeCallback(typeof(BoxVector3Delegate))] + [MonoPInvokeCallback(typeof(BoxVector3DelegateType))] static int BoxVector3(ref UnityEngine.Vector3 val) { try @@ -1123,7 +1139,7 @@ static int BoxVector3(ref UnityEngine.Vector3 val) } } - [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] + [MonoPInvokeCallback(typeof(UnboxVector3DelegateType))] static UnityEngine.Vector3 UnboxVector3(int valHandle) { try @@ -1146,7 +1162,7 @@ static UnityEngine.Vector3 UnboxVector3(int valHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineObjectPropertyGetNameDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineObjectPropertyGetNameDelegateType))] static int UnityEngineObjectPropertyGetName(int thisHandle) { try @@ -1169,7 +1185,7 @@ static int UnityEngineObjectPropertyGetName(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineObjectPropertySetNameDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineObjectPropertySetNameDelegateType))] static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) { try @@ -1190,7 +1206,7 @@ static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegateType))] static int UnityEngineComponentPropertyGetTransform(int thisHandle) { try @@ -1213,7 +1229,7 @@ static int UnityEngineComponentPropertyGetTransform(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegateType))] static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) { try @@ -1236,7 +1252,7 @@ static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandl } } - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegateType))] static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEngine.Vector3 value) { try @@ -1256,7 +1272,7 @@ static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEng } } - [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorPropertyGetCurrentDelegate))] + [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorPropertyGetCurrentDelegateType))] static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) { try @@ -1279,7 +1295,7 @@ static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorMethodMoveNextDelegate))] + [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorMethodMoveNextDelegateType))] static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) { try @@ -1302,7 +1318,7 @@ static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegateType))] static int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript(int thisHandle) { try @@ -1325,7 +1341,7 @@ static int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScript(int thisH } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegateType))] static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) { try @@ -1347,7 +1363,7 @@ static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(Un } } - [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegateType))] static void UnityEngineDebugMethodLogSystemObject(int messageHandle) { try @@ -1367,7 +1383,7 @@ static void UnityEngineDebugMethodLogSystemObject(int messageHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegateType))] static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) { try @@ -1390,7 +1406,7 @@ static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] + [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegateType))] static int SystemExceptionConstructorSystemString(int messageHandle) { try @@ -1413,7 +1429,7 @@ static int SystemExceptionConstructorSystemString(int messageHandle) } } - [MonoPInvokeCallback(typeof(BoxPrimitiveTypeDelegate))] + [MonoPInvokeCallback(typeof(BoxPrimitiveTypeDelegateType))] static int BoxPrimitiveType(UnityEngine.PrimitiveType val) { try @@ -1435,7 +1451,7 @@ static int BoxPrimitiveType(UnityEngine.PrimitiveType val) } } - [MonoPInvokeCallback(typeof(UnboxPrimitiveTypeDelegate))] + [MonoPInvokeCallback(typeof(UnboxPrimitiveTypeDelegateType))] static UnityEngine.PrimitiveType UnboxPrimitiveType(int valHandle) { try @@ -1458,7 +1474,7 @@ static UnityEngine.PrimitiveType UnboxPrimitiveType(int valHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineTimePropertyGetDeltaTimeDelegate))] + [MonoPInvokeCallback(typeof(UnityEngineTimePropertyGetDeltaTimeDelegateType))] static float UnityEngineTimePropertyGetDeltaTime() { try @@ -1480,7 +1496,7 @@ static float UnityEngineTimePropertyGetDeltaTime() } } - [MonoPInvokeCallback(typeof(BaseBallScriptConstructorDelegate))] + [MonoPInvokeCallback(typeof(BaseBallScriptConstructorDelegateType))] static void BaseBallScriptConstructor(int cppHandle, ref int handle) { try @@ -1502,7 +1518,7 @@ static void BaseBallScriptConstructor(int cppHandle, ref int handle) } } - [MonoPInvokeCallback(typeof(ReleaseBaseBallScriptDelegate))] + [MonoPInvokeCallback(typeof(ReleaseBaseBallScriptDelegateType))] static void ReleaseBaseBallScript(int handle) { try @@ -1526,7 +1542,7 @@ static void ReleaseBaseBallScript(int handle) } } - [MonoPInvokeCallback(typeof(BoxBooleanDelegate))] + [MonoPInvokeCallback(typeof(BoxBooleanDelegateType))] static int BoxBoolean(bool val) { try @@ -1548,7 +1564,7 @@ static int BoxBoolean(bool val) } } - [MonoPInvokeCallback(typeof(UnboxBooleanDelegate))] + [MonoPInvokeCallback(typeof(UnboxBooleanDelegateType))] static bool UnboxBoolean(int valHandle) { try @@ -1571,7 +1587,7 @@ static bool UnboxBoolean(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxSByteDelegate))] + [MonoPInvokeCallback(typeof(BoxSByteDelegateType))] static int BoxSByte(sbyte val) { try @@ -1593,7 +1609,7 @@ static int BoxSByte(sbyte val) } } - [MonoPInvokeCallback(typeof(UnboxSByteDelegate))] + [MonoPInvokeCallback(typeof(UnboxSByteDelegateType))] static sbyte UnboxSByte(int valHandle) { try @@ -1616,7 +1632,7 @@ static sbyte UnboxSByte(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxByteDelegate))] + [MonoPInvokeCallback(typeof(BoxByteDelegateType))] static int BoxByte(byte val) { try @@ -1638,7 +1654,7 @@ static int BoxByte(byte val) } } - [MonoPInvokeCallback(typeof(UnboxByteDelegate))] + [MonoPInvokeCallback(typeof(UnboxByteDelegateType))] static byte UnboxByte(int valHandle) { try @@ -1661,7 +1677,7 @@ static byte UnboxByte(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxInt16Delegate))] + [MonoPInvokeCallback(typeof(BoxInt16DelegateType))] static int BoxInt16(short val) { try @@ -1683,7 +1699,7 @@ static int BoxInt16(short val) } } - [MonoPInvokeCallback(typeof(UnboxInt16Delegate))] + [MonoPInvokeCallback(typeof(UnboxInt16DelegateType))] static short UnboxInt16(int valHandle) { try @@ -1706,7 +1722,7 @@ static short UnboxInt16(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxUInt16Delegate))] + [MonoPInvokeCallback(typeof(BoxUInt16DelegateType))] static int BoxUInt16(ushort val) { try @@ -1728,7 +1744,7 @@ static int BoxUInt16(ushort val) } } - [MonoPInvokeCallback(typeof(UnboxUInt16Delegate))] + [MonoPInvokeCallback(typeof(UnboxUInt16DelegateType))] static ushort UnboxUInt16(int valHandle) { try @@ -1751,7 +1767,7 @@ static ushort UnboxUInt16(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxInt32Delegate))] + [MonoPInvokeCallback(typeof(BoxInt32DelegateType))] static int BoxInt32(int val) { try @@ -1773,7 +1789,7 @@ static int BoxInt32(int val) } } - [MonoPInvokeCallback(typeof(UnboxInt32Delegate))] + [MonoPInvokeCallback(typeof(UnboxInt32DelegateType))] static int UnboxInt32(int valHandle) { try @@ -1796,7 +1812,7 @@ static int UnboxInt32(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxUInt32Delegate))] + [MonoPInvokeCallback(typeof(BoxUInt32DelegateType))] static int BoxUInt32(uint val) { try @@ -1818,7 +1834,7 @@ static int BoxUInt32(uint val) } } - [MonoPInvokeCallback(typeof(UnboxUInt32Delegate))] + [MonoPInvokeCallback(typeof(UnboxUInt32DelegateType))] static uint UnboxUInt32(int valHandle) { try @@ -1841,7 +1857,7 @@ static uint UnboxUInt32(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxInt64Delegate))] + [MonoPInvokeCallback(typeof(BoxInt64DelegateType))] static int BoxInt64(long val) { try @@ -1863,7 +1879,7 @@ static int BoxInt64(long val) } } - [MonoPInvokeCallback(typeof(UnboxInt64Delegate))] + [MonoPInvokeCallback(typeof(UnboxInt64DelegateType))] static long UnboxInt64(int valHandle) { try @@ -1886,7 +1902,7 @@ static long UnboxInt64(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxUInt64Delegate))] + [MonoPInvokeCallback(typeof(BoxUInt64DelegateType))] static int BoxUInt64(ulong val) { try @@ -1908,7 +1924,7 @@ static int BoxUInt64(ulong val) } } - [MonoPInvokeCallback(typeof(UnboxUInt64Delegate))] + [MonoPInvokeCallback(typeof(UnboxUInt64DelegateType))] static ulong UnboxUInt64(int valHandle) { try @@ -1931,7 +1947,7 @@ static ulong UnboxUInt64(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxCharDelegate))] + [MonoPInvokeCallback(typeof(BoxCharDelegateType))] static int BoxChar(char val) { try @@ -1953,7 +1969,7 @@ static int BoxChar(char val) } } - [MonoPInvokeCallback(typeof(UnboxCharDelegate))] + [MonoPInvokeCallback(typeof(UnboxCharDelegateType))] static char UnboxChar(int valHandle) { try @@ -1976,7 +1992,7 @@ static char UnboxChar(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxSingleDelegate))] + [MonoPInvokeCallback(typeof(BoxSingleDelegateType))] static int BoxSingle(float val) { try @@ -1998,7 +2014,7 @@ static int BoxSingle(float val) } } - [MonoPInvokeCallback(typeof(UnboxSingleDelegate))] + [MonoPInvokeCallback(typeof(UnboxSingleDelegateType))] static float UnboxSingle(int valHandle) { try @@ -2021,7 +2037,7 @@ static float UnboxSingle(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxDoubleDelegate))] + [MonoPInvokeCallback(typeof(BoxDoubleDelegateType))] static int BoxDouble(double val) { try @@ -2043,7 +2059,7 @@ static int BoxDouble(double val) } } - [MonoPInvokeCallback(typeof(UnboxDoubleDelegate))] + [MonoPInvokeCallback(typeof(UnboxDoubleDelegateType))] static double UnboxDouble(int valHandle) { try diff --git a/Unity/Assets/NativeScript/BootScene.unity b/Unity/Assets/NativeScript/BootScene.unity index 4c9bb79..8a205bf 100644 --- a/Unity/Assets/NativeScript/BootScene.unity +++ b/Unity/Assets/NativeScript/BootScene.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -38,7 +38,8 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.37311992, g: 0.38074034, b: 0.35872716, a: 1} + m_IndirectSpecularColor: {r: 0.3731316, g: 0.38074902, b: 0.3587254, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -88,6 +88,7 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 @@ -139,7 +140,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6b5575a60b7c04c7a87ff4e161573c66, type: 3} m_Name: m_EditorClassIdentifier: - MemorySize: 16777216 + MemorySize: 1048576 AutoReload: 1 AutoReloadPollTime: 1 --- !u!4 &643357610 @@ -218,6 +219,7 @@ Camera: m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 diff --git a/Unity/Assets/NativeScript/Editor/EditorMenus.cs b/Unity/Assets/NativeScript/Editor/EditorMenus.cs index 12866f1..a444732 100644 --- a/Unity/Assets/NativeScript/Editor/EditorMenus.cs +++ b/Unity/Assets/NativeScript/Editor/EditorMenus.cs @@ -1,7 +1,6 @@ -using UnityEngine; using UnityEditor; -namespace NativeScript +namespace NativeScript.Editor { /// /// Menus for the Unity Editor diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 8d84312..013fa39 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -8,7 +8,7 @@ using UnityEditor; using UnityEngine; -namespace NativeScript +namespace NativeScript.Editor { /// /// Code generator that reads a JSON file and outputs C# and C++ code @@ -137,8 +137,6 @@ class JsonDocument class StringBuilders { - public readonly StringBuilder CsharpInitParams = - new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpDelegateTypes = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpStoreInitCalls = @@ -149,7 +147,9 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpFunctions = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CsharpDelegates = + public readonly StringBuilder CsharpCppDelegates = + new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CsharpCsharpDelegates = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpImports = new StringBuilder(InitialStringBuilderCapacity); @@ -171,9 +171,9 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppMethodDefinitions = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CppInitParams = + public readonly StringBuilder CppInitBodyParameterReads = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CppInitBody = + public readonly StringBuilder CppInitBodyArrays = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppInitBodyFirstBoot = new StringBuilder(InitialStringBuilderCapacity); @@ -240,11 +240,17 @@ int IComparer.Compare(object x, object y) { FieldInfo xField = (FieldInfo)x; FieldInfo yField = (FieldInfo)y; - return xField.MetadataToken < yField.MetadataToken - ? -1 - : xField.MetadataToken > yField.MetadataToken + return xField == null + ? yField == null + ? 0 + : -1 + : yField == null ? 1 - : 0; + : xField.MetadataToken < yField.MetadataToken + ? -1 + : xField.MetadataToken > yField.MetadataToken + ? 1 + : 0; } } @@ -255,10 +261,9 @@ struct TypeName public int NumTypeParams; } - const int DEFAULT_MAX_SIMULTANEOUS = 1000; - const int DEFAULT_MAX_SIMULTANEOUS_OBJECTS = 1000; - - static readonly Type[] PRIMITIVE_TYPES = { + const int BaseMaxSimultaneous = 1000; + + static readonly Type[] PrimitiveTypes = { typeof(bool), typeof(sbyte), typeof(byte), @@ -270,7 +275,7 @@ struct TypeName typeof(ulong), typeof(char), typeof(float), - typeof(double), + typeof(double) }; const string PostCompileWorkPref = "NativeScriptGenerateBindingsPostCompileWork"; @@ -282,10 +287,9 @@ struct TypeName new Uri(typeof(GameObject).Assembly.CodeBase).LocalPath ).DirectoryName; static readonly string AssetsDirPath = Application.dataPath; - static readonly string ProjectDirPath = - new DirectoryInfo(AssetsDirPath) - .Parent - .FullName; + private static readonly DirectoryInfo ProjectDir = + new DirectoryInfo(AssetsDirPath).Parent; + static readonly string ProjectDirPath = ProjectDir.FullName; static readonly string CppDirPath = Path.Combine( Path.Combine( @@ -308,7 +312,7 @@ struct TypeName static readonly FieldOrderComparer DefaultFieldOrderComparer = new FieldOrderComparer(); - + // Restore unused field types #pragma warning restore 649 @@ -343,7 +347,7 @@ public static void Generate() } } } - determinedNeedStubs:; + determinedNeedStubs: if (needStubs) { @@ -403,10 +407,6 @@ static void AppendStubs( } } } - - // Need at least one init param - builders.CsharpInitParams.Append("object stub"); - builders.CsharpInitCall.Append("null // stub"); } static void AppendStubBaseType( @@ -448,7 +448,7 @@ static void AppendStubBaseType( { output.Append('\n'); ConstructorInfo[] constructors = type.GetConstructors(); - if (constructors != null && constructors.Length > 0) + if (constructors.Length > 0) { foreach (ConstructorInfo ctor in constructors) { @@ -507,14 +507,14 @@ static void DoPostCompileWork(bool canRefreshAssetDb) // it's not specified for a specific type int defaultMaxSimultaneous = doc.DefaultMaxSimultaneous != 0 ? doc.DefaultMaxSimultaneous - : DEFAULT_MAX_SIMULTANEOUS; + : BaseMaxSimultaneous; // Init param for max managed Objects - builders.CppInitParams.Append("\tint32_t maxManagedObjects,\n"); - builders.CsharpInitParams.Append("\t\t\tint maxManagedObjects,\n"); - builders.CsharpInitCall.Append("\t\t\t\t"); + builders.CsharpInitCall.Append("\t\t\tMarshal.WriteInt32(memory, curMemory, "); builders.CsharpInitCall.Append(defaultMaxSimultaneous); - builders.CsharpInitCall.Append(",\n"); + builders.CsharpInitCall.Append("); // max managed objects\n"); + builders.CsharpInitCall.Append("\t\t\tcurMemory += sizeof(int);\n"); + builders.CsharpInitCall.Append(' '); // C# ObjectStore Init call builders.CsharpStoreInitCalls.Append( @@ -560,7 +560,7 @@ static void DoPostCompileWork(bool canRefreshAssetDb) } // Generate boxing and unboxing for primitive types - foreach (Type type in PRIMITIVE_TYPES) + foreach (Type type in PrimitiveTypes) { string dummyString; ParameterInfo[] dummyParams; @@ -685,38 +685,38 @@ static Assembly[] GetAssemblies(string[] assemblyNames) assemblies[8] = typeof(UnityEngine.AI.NavMesh).Assembly; // Unity AI module assemblies[9] = typeof(UnityEngine.Animations.AnimationClipPlayable).Assembly; // Unity animation module assemblies[10] = typeof(UnityEngine.XR.ARRenderMode).Assembly; // Unity AR module - assemblies[11] = typeof(UnityEngine.AudioSettings).Assembly; // Unity audio module - assemblies[12] = typeof(UnityEngine.Cloth).Assembly; // Unity cloth module - assemblies[13] = typeof(UnityEngine.ClusterInput).Assembly; // Unity cluster input module - assemblies[14] = typeof(UnityEngine.ClusterNetwork).Assembly; // Unity custer renderer module + assemblies[11] = typeof(AudioSettings).Assembly; // Unity audio module + assemblies[12] = typeof(Cloth).Assembly; // Unity cloth module + assemblies[13] = typeof(ClusterInput).Assembly; // Unity cluster input module + assemblies[14] = typeof(ClusterNetwork).Assembly; // Unity custer renderer module assemblies[15] = typeof(UnityEngine.CrashReportHandler.CrashReportHandler).Assembly; // Unity crash reporting module assemblies[16] = typeof(UnityEngine.Playables.PlayableDirector).Assembly; // Unity director module assemblies[17] = typeof(UnityEngine.SocialPlatforms.IAchievement).Assembly; // Unity game center module - assemblies[18] = typeof(UnityEngine.ImageConversion).Assembly; // Unity image conversion module - assemblies[19] = typeof(UnityEngine.GUI).Assembly; // Unity IMGUI module - assemblies[20] = typeof(UnityEngine.JsonUtility).Assembly; // Unity JSON serialize module - assemblies[21] = typeof(UnityEngine.ParticleSystem).Assembly; // Unity particle system module + assemblies[18] = typeof(ImageConversion).Assembly; // Unity image conversion module + assemblies[19] = typeof(GUI).Assembly; // Unity IMGUI module + assemblies[20] = typeof(JsonUtility).Assembly; // Unity JSON serialize module + assemblies[21] = typeof(ParticleSystem).Assembly; // Unity particle system module assemblies[22] = typeof(UnityEngine.Analytics.PerformanceReporting).Assembly; // Unity performance reporting module - assemblies[23] = typeof(UnityEngine.Physics2D).Assembly; // Unity physics 2D module - assemblies[24] = typeof(UnityEngine.Physics).Assembly; // Unity physics module - assemblies[25] = typeof(UnityEngine.ScreenCapture).Assembly; // Unity screen capture module - assemblies[26] = typeof(UnityEngine.Terrain).Assembly; // Unity terrain module - assemblies[27] = typeof(UnityEngine.TerrainCollider).Assembly; // Unity terrain physics module - assemblies[28] = typeof(UnityEngine.Font).Assembly; // Unity text rendering module + assemblies[23] = typeof(Physics2D).Assembly; // Unity physics 2D module + assemblies[24] = typeof(Physics).Assembly; // Unity physics module + assemblies[25] = typeof(ScreenCapture).Assembly; // Unity screen capture module + assemblies[26] = typeof(Terrain).Assembly; // Unity terrain module + assemblies[27] = typeof(TerrainCollider).Assembly; // Unity terrain physics module + assemblies[28] = typeof(Font).Assembly; // Unity text rendering module assemblies[29] = typeof(UnityEngine.Tilemaps.Tile).Assembly; // Unity tilemap module assemblies[30] = typeof(UnityEngine.Experimental.UIElements.Button).Assembly; // Unity UI elements module - assemblies[31] = typeof(UnityEngine.Canvas).Assembly; // Unity UI module + assemblies[31] = typeof(Canvas).Assembly; // Unity UI module assemblies[32] = typeof(UnityEngine.Networking.NetworkTransport).Assembly; // Unity cloth module assemblies[33] = typeof(UnityEngine.Analytics.Analytics).Assembly; // Unity analytics module - assemblies[34] = typeof(UnityEngine.RemoteSettings).Assembly; // Unity Unity connect module + assemblies[34] = typeof(RemoteSettings).Assembly; // Unity Unity connect module assemblies[35] = typeof(UnityEngine.Networking.DownloadHandlerAudioClip).Assembly; // Unity web request audio module - assemblies[36] = typeof(UnityEngine.WWWForm).Assembly; // Unity web request module + assemblies[36] = typeof(WWWForm).Assembly; // Unity web request module assemblies[37] = typeof(UnityEngine.Networking.DownloadHandlerTexture).Assembly; // Unity web request texture module - assemblies[38] = typeof(UnityEngine.WWW).Assembly; // Unity web request WWW module - assemblies[39] = typeof(UnityEngine.WheelCollider).Assembly; // Unity vehicles module + assemblies[38] = typeof(WWW).Assembly; // Unity web request WWW module + assemblies[39] = typeof(WheelCollider).Assembly; // Unity vehicles module assemblies[40] = typeof(UnityEngine.Video.VideoClip).Assembly; // Unity video module assemblies[41] = typeof(UnityEngine.XR.InputTracking).Assembly; // Unity VR module - assemblies[42] = typeof(UnityEngine.WindZone).Assembly; // Unity wind module + assemblies[42] = typeof(WindZone).Assembly; // Unity wind module #endif return assemblies; } @@ -920,7 +920,11 @@ static Type[] GetDirectInterfaces(Type type) minimalInterfaces.Add(iType); } } - minimalInterfaces.Sort((x, y) => x.Name.CompareTo(y.Name)); + minimalInterfaces.Sort( + (x, y) => string.Compare( + x.Name, + y.Name, + StringComparison.InvariantCulture)); return minimalInterfaces.ToArray(); } @@ -960,16 +964,11 @@ static void AppendCppConstructorInitializerList( string newline = "\n") { string separator = ": "; - for (int i = 0; i < interfaceTypes.Length; ++i) + foreach (Type interfaceType in interfaceTypes) { - Type interfaceType = interfaceTypes[i]; - AppendIndent( - indent, - output); + AppendIndent(indent, output); output.Append(separator); - AppendCppTypeFullName( - interfaceType, - output); + AppendCppTypeFullName( interfaceType, output); output.Append("(nullptr)"); output.Append(newline); separator = ", "; @@ -1429,7 +1428,7 @@ static void AppendTypeNameWithoutSuffixes( } } - static int AppendType( + static void AppendType( JsonType jsonType, Type type, TypeKind typeKind, @@ -1447,11 +1446,9 @@ static int AppendType( typeKind, null, builders); - return 0; } else { - int totalMaxSimultaneous = 0; Type[] genericArgTypes = type.GetGenericArguments(); if (jsonType.GenericParams != null) { @@ -1474,7 +1471,6 @@ static int AppendType( : jsonType.MaxSimultaneous != 0 ? jsonType.MaxSimultaneous : defaultMaxSimultaneous; - totalMaxSimultaneous += maxSimultaneous; AppendType( jsonType, genericArgTypes, @@ -1499,7 +1495,6 @@ static int AppendType( int maxSimultaneous = jsonType.MaxSimultaneous != 0 ? jsonType.MaxSimultaneous : defaultMaxSimultaneous; - totalMaxSimultaneous += maxSimultaneous; AppendType( jsonType, genericArgTypes, @@ -1518,7 +1513,6 @@ static int AppendType( builders); } } - return totalMaxSimultaneous; } } @@ -1562,11 +1556,6 @@ static void AppendType( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - // Build lowercase function name - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - // Build ReleaseX parameters ParameterInfo paramInfo = new ParameterInfo(); paramInfo.Name = "handle"; @@ -1621,44 +1610,35 @@ static void AppendType( typeof(void), builders.CppFunctionPointers); - // C++ init param for ReleaseX - AppendCppInitParam( - funcNameLower, + // C++ init body for ReleaseX + AppendCppInitBodyFunctionPointerParameterRead( + funcName, true, default(TypeName), TypeKind.None, parameters, typeof(void), - builders.CppInitParams); - - // C++ init body for ReleaseX - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); - - // C# init param for ReleaseX - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); + builders.CppInitBodyParameterReads); // C# init call arg for ReleaseX - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C++ init body for handle array length - builders.CppInitBody.Append("\tPlugin::RefCounts"); - builders.CppInitBody.Append(funcNameSuffix); - builders.CppInitBody.Append(" = (int32_t*)curMemory;\n"); - builders.CppInitBody.Append("\tcurMemory += "); - builders.CppInitBody.Append(maxSimultaneous); - builders.CppInitBody.Append(" * sizeof(int32_t);\n"); - builders.CppInitBody.Append("\tPlugin::RefCountsLen"); - builders.CppInitBody.Append(funcNameSuffix); - builders.CppInitBody.Append(" = "); - builders.CppInitBody.Append(maxSimultaneous); - builders.CppInitBody.Append(";\n"); + builders.CppInitBodyArrays.Append("\tPlugin::RefCounts"); + builders.CppInitBodyArrays.Append(funcNameSuffix); + builders.CppInitBodyArrays.Append(" = (int32_t*)curMemory;\n"); + builders.CppInitBodyArrays.Append("\tcurMemory += "); + builders.CppInitBodyArrays.Append(maxSimultaneous); + builders.CppInitBodyArrays.Append(" * sizeof(int32_t);\n"); + builders.CppInitBodyArrays.Append("\tPlugin::RefCountsLen"); + builders.CppInitBodyArrays.Append(funcNameSuffix); + builders.CppInitBodyArrays.Append(" = "); + builders.CppInitBodyArrays.Append(maxSimultaneous); + builders.CppInitBodyArrays.Append(";\n"); + builders.CppInitBodyArrays.Append("\t\n"); // C++ ref count state and functions builders.CppGlobalStateAndFunctions.Append("\tint32_t RefCountsLen"); @@ -2044,9 +2024,8 @@ static void AppendEnum( FieldInfo[] fields = type.GetFields( BindingFlags.Static | BindingFlags.Public); - for (int i = 0; i < fields.Length; ++i) + foreach (FieldInfo field in fields) { - FieldInfo field = fields[i]; AppendIndent( indent + 1, builders.CppTypeDefinitions); @@ -2235,9 +2214,8 @@ static void AppendEnum( builders.CppTypeDefinitions.Append('\n'); // Static initialization - for (int i = 0; i < fields.Length; ++i) + foreach (FieldInfo field in fields) { - FieldInfo field = fields[i]; builders.CppMethodDefinitions.Append("const "); AppendCppTypeFullName( type, @@ -2345,10 +2323,6 @@ static void AppendBoxingBindings( builders.TempStrBuilder); boxFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string boxFuncNameLower = builders.TempStrBuilder.ToString(); - ParameterInfo[] boxParams = { new ParameterInfo { @@ -2363,11 +2337,6 @@ static void AppendBoxingBindings( boxCppParams = new ParameterInfo[0]; - // C# init params - AppendCsharpInitParam( - boxFuncNameLower, - builders.CsharpInitParams); - // C# delegate types AppendCsharpDelegateType( boxFuncName, @@ -2379,9 +2348,10 @@ static void AppendBoxingBindings( builders.CsharpDelegateTypes); // C# init call args - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( boxFuncName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# box function AppendCsharpFunctionBeginning( @@ -2412,21 +2382,15 @@ static void AppendBoxingBindings( typeof(object), builders.CppFunctionPointers); - // C++ init params - AppendCppInitParam( - boxFuncNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + boxFuncName, true, GetTypeName(type), typeKind, boxParams, typeof(object), - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - boxFuncName, - boxFuncNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendUnboxing( @@ -2445,10 +2409,6 @@ static void AppendUnboxing( builders.TempStrBuilder); string unboxFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string unboxFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("operator "); AppendCppTypeFullName( @@ -2476,10 +2436,7 @@ static void AppendUnboxing( ParameterInfo[] unboxCppParams = new ParameterInfo[0]; // C# init params - AppendCsharpInitParam( - unboxFuncNameLower, - builders.CsharpInitParams); - + // C# delegate types AppendCsharpDelegateType( unboxFuncName, @@ -2491,9 +2448,10 @@ static void AppendUnboxing( builders.CsharpDelegateTypes); // C# init call args - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( unboxFuncName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# unbox function AppendCsharpFunctionBeginning( @@ -2603,21 +2561,15 @@ static void AppendUnboxing( indent, builders.CppMethodDefinitions); - // C++ init params - AppendCppInitParam( - unboxFuncNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + unboxFuncName, true, GetTypeName(type), typeKind, unboxParams, type, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - unboxFuncName, - unboxFuncNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendCppBoxingMethodNames( @@ -2830,11 +2782,6 @@ static void AppendConstructor( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - // Build lowercase function name - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - TypeName enclosingTypeTypeName = GetTypeName(enclosingType); // Build C++ constructor method name @@ -2845,9 +2792,6 @@ static void AppendConstructor( string cppMethodName = builders.TempStrBuilder.ToString(); // C# init param declaration - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); // C# delegate type Type delegateReturnType; @@ -2869,7 +2813,10 @@ static void AppendConstructor( builders.CsharpDelegateTypes); // C# init call param - AppendCsharpInitCallArg(funcName, builders.CsharpInitCall); + AppendCsharpCsharpDelegate( + funcName, + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# function if (enclosingTypeKind == TypeKind.FullStruct) @@ -3035,22 +2982,16 @@ static void AppendConstructor( indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); - - // C++ init params - AppendCppInitParam( - funcNameLower, + + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, true, GetTypeName(enclosingType), enclosingTypeKind, parameters, enclosingType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendProperty( @@ -3421,20 +3362,13 @@ static void AppendEventAddRemoveMethod( builders.TempStrBuilder.Append(uppercaseEventName); string funcName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(operation); builders.TempStrBuilder.Append(uppercaseEventName); string methodName = builders.TempStrBuilder.ToString(); // C# init param - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# delegate type AppendCsharpDelegateType( funcName, @@ -3446,9 +3380,10 @@ static void AppendEventAddRemoveMethod( builders.CsharpDelegateTypes); // C# init call arg - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# function AppendCsharpFunctionBeginning( @@ -3530,21 +3465,15 @@ static void AppendEventAddRemoveMethod( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n\t\n"); - // C++ init params - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, methodIsStatic, GetTypeName(enclosingType), enclosingTypeKind, methodParams, typeof(void), - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static MethodInfo GetMethod( @@ -3847,16 +3776,8 @@ static void AppendMethod( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - // Build lowercase function name - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - // C# init param declaration - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# delegate type AppendCsharpDelegateType( funcName, @@ -3868,9 +3789,10 @@ static void AppendMethod( builders.CsharpDelegateTypes); // C# init call param - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# function AppendCsharpFunctionBeginning( @@ -4247,27 +4169,20 @@ static void AppendMethod( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n\t\n"); - // C++ init params - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, methodIsStatic, GetTypeName(enclosingType), enclosingTypeKind, parameters, returnType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendCSharpTypeParameters( Type[] typeParams, - StringBuilder output - ) + StringBuilder output) { if (typeParams != null && typeParams.Length > 0) { @@ -4514,9 +4429,7 @@ static void AppendArray( GetTypeName(cppArrayTypeName, "System"), false, cppTypeParams, - cppTypeParams != null ? - builders.CppTemplateSpecializationDeclarations : - builders.CppTypeDeclarations); + builders.CppTemplateSpecializationDeclarations); // C++ type definition (beginning) Type[] interfaceTypes = GetDirectInterfaces(arrayType); @@ -4535,6 +4448,7 @@ static void AppendArray( Type[] cppCtorInitTypes = GetCppCtorInitTypes( arrayType, false); + int localRank = rank; int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( GetTypeName(cppArrayTypeName, "System"), TypeKind.Class, @@ -4548,9 +4462,9 @@ static void AppendArray( builders.CppMethodDefinitions.Append(subject); builders.CppMethodDefinitions.Append( "InternalLength = 0;\n"); - if (rank > 1) + if (localRank > 1) { - for (int i = 0; i < rank; ++i) + for (int i = 0; i < localRank; ++i) { AppendIndent( extraIndent, @@ -4573,9 +4487,9 @@ static void AppendArray( builders.CppMethodDefinitions.Append(subject); builders.CppMethodDefinitions.Append( "InternalLength;\n"); - if (rank > 1) + if (localRank > 1) { - for (int i = 0; i < rank; ++i) + for (int i = 0; i < localRank; ++i) { AppendIndent( extraIndent, @@ -5538,10 +5452,6 @@ static void AppendArrayConstructor( builders.TempStrBuilder.Append(rank); string funcName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - ParameterInfo[] parameters = new ParameterInfo[rank]; for (int i = 0; i < rank; ++i) { @@ -5570,15 +5480,13 @@ static void AppendArrayConstructor( builders.CsharpDelegateTypes); // C# Init Call - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# Init Param - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# function AppendCsharpFunctionBeginning( arrayType, @@ -5624,21 +5532,15 @@ static void AppendArrayConstructor( arrayType, builders.CppFunctionPointers); - // C++ init param - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, true, cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); // C++ method declaration AppendIndent( @@ -5919,10 +5821,6 @@ static void AppendArrayMultidimensionalGetLength( builders.TempStrBuilder.Append(rank); string funcName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - ParameterInfo[] parameters = { new ParameterInfo { Name = "dimension", @@ -5949,15 +5847,13 @@ static void AppendArrayMultidimensionalGetLength( builders.CsharpDelegateTypes); // C# Init Call - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# Init Param - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# function AppendCsharpFunctionBeginning( arrayType, @@ -5987,21 +5883,15 @@ static void AppendArrayMultidimensionalGetLength( arrayType, builders.CppFunctionPointers); - // C++ init param - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, false, cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); // C++ method declaration AppendIndent( @@ -6106,10 +5996,6 @@ static void AppendArrayGetItem( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - ParameterInfo[] parameters = BuildArrayGetItemsParams( rank, "index"); @@ -6125,15 +6011,13 @@ static void AppendArrayGetItem( builders.CsharpDelegateTypes); // C# Init Call - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# Init Param - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# function AppendCsharpFunctionBeginning( arrayType, @@ -6176,21 +6060,15 @@ static void AppendArrayGetItem( elementType, builders.CppFunctionPointers); - // C++ init param - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, false, cppArrayTypeTypeName, TypeKind.Class, parameters, elementType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendArraySetItem( @@ -6208,10 +6086,6 @@ static void AppendArraySetItem( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - // Build parameters as indexes then element ParameterInfo[] parameters = BuildArraySetItemsParams( rank, @@ -6229,15 +6103,13 @@ static void AppendArraySetItem( builders.CsharpDelegateTypes); // C# Init Call - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# Init Param - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# function AppendCsharpFunctionBeginning( arrayType, @@ -6280,21 +6152,15 @@ static void AppendArraySetItem( arrayType, builders.CppFunctionPointers); - // C++ init param - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, false, cppArrayTypeTypeName, TypeKind.Class, parameters, arrayType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendDelegate( @@ -6308,15 +6174,14 @@ static void AppendDelegate( assemblies); if (jsonDelegate.GenericParams != null) { - foreach (JsonGenericParams jsonGenericParams - in jsonDelegate.GenericParams) + for (int i = 0; i < jsonDelegate.GenericParams.Length; ++i) { // C++ template declaration AppendCppTemplateDeclaration( GetTypeName(type), builders.CppTemplateDeclarations); } - + foreach (JsonGenericParams jsonGenericParams in jsonDelegate.GenericParams) { @@ -6389,37 +6254,21 @@ static void AppendDelegate( builders.TempStrBuilder.Append(bindingTypeName); string releaseFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string releaseFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(bindingTypeName); builders.TempStrBuilder.Append("Constructor"); string constructorFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string constructorFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(bindingTypeName); builders.TempStrBuilder.Append("Add"); string addFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string addFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(bindingTypeName); builders.TempStrBuilder.Append("Remove"); string removeFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string removeFuncNameLower = builders.TempStrBuilder.ToString(); - TypeName typeTypeName = GetTypeName(type); // C++ type declaration @@ -6503,7 +6352,7 @@ static void AppendDelegate( GetTypeName(cppTypeName, type.Namespace), maxSimultaneous, bindingTypeName, - builders.CppInitBody, + builders.CppInitBodyArrays, builders.CppInitBodyFirstBoot); // C++ type definition (begin) @@ -6600,81 +6449,55 @@ static void AppendDelegate( typeof(void), builders.CppFunctionPointers); - // C++ init params - AppendCppInitParam( - releaseFuncNameLower, + // C++ and C# init params + AppendCppInitBodyFunctionPointerParameterRead( + releaseFuncName, true, default(TypeName), TypeKind.None, releaseParams, typeof(void), - builders.CppInitParams); - AppendCppInitParam( - constructorFuncNameLower, + builders.CppInitBodyParameterReads); + AppendCppInitBodyFunctionPointerParameterRead( + constructorFuncName, true, default(TypeName), TypeKind.None, constructorParams, typeof(void), - builders.CppInitParams); - AppendCppInitParam( - addFuncNameLower, + builders.CppInitBodyParameterReads); + AppendCppInitBodyFunctionPointerParameterRead( + addFuncName, false, default(TypeName), TypeKind.None, addRemoveParams, typeof(void), - builders.CppInitParams); - AppendCppInitParam( - removeFuncNameLower, + builders.CppInitBodyParameterReads); + AppendCppInitBodyFunctionPointerParameterRead( + removeFuncName, false, default(TypeName), TypeKind.None, addRemoveParams, typeof(void), - builders.CppInitParams); - - // C++ and C# init params - AppendCppInitBody( - releaseFuncName, - releaseFuncNameLower, - builders.CppInitBody); - AppendCppInitBody( - constructorFuncName, - constructorFuncNameLower, - builders.CppInitBody); - AppendCppInitBody( - addFuncName, - addFuncNameLower, - builders.CppInitBody); - AppendCppInitBody( - removeFuncName, - removeFuncNameLower, - builders.CppInitBody); - AppendCsharpInitParam( - releaseFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - constructorFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - addFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - removeFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitCallArg( + builders.CppInitBodyParameterReads); + AppendCsharpCsharpDelegate( releaseFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); + AppendCsharpCsharpDelegate( constructorFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); + AppendCsharpCsharpDelegate( addFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); + AppendCsharpCsharpDelegate( removeFuncName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C++ method definitions (end) int cppMethodDefinitionsIndent = AppendNamespaceBeginning( @@ -7039,10 +6862,6 @@ static void AppendBaseType( builders.TempStrBuilder.Append(baseTypeTypeName.Name); string releaseFuncName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string releaseFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; AppendCppTypeName( baseTypeTypeName, @@ -7073,7 +6892,7 @@ static void AppendBaseType( throw new Exception(errorBuilder.ToString()); } - jsonConstructors = new JsonConstructor[] + jsonConstructors = new[] { new JsonConstructor { @@ -7155,7 +6974,7 @@ static void AppendBaseType( { cppBaseClass = typeof(object); cppBaseClassTypeParams = null; - cppInterfaceTypes = new Type[] { type }; + cppInterfaceTypes = new [] { type }; } else { @@ -7175,7 +6994,7 @@ static void AppendBaseType( baseTypeTypeName, maxSimultaneous, baseTypeTypeName.Name, - builders.CppInitBody, + builders.CppInitBodyArrays, builders.CppInitBodyFirstBoot); // C++ type declaration @@ -7324,52 +7143,34 @@ static void AppendBaseType( builders.CppFunctionPointers); } - // C++ init params - AppendCppInitParam( - releaseFuncNameLower, + // C++ and C# init params + AppendCppInitBodyFunctionPointerParameterRead( + releaseFuncName, true, default(TypeName), TypeKind.None, releaseParams, typeof(void), - builders.CppInitParams); + builders.CppInitBodyParameterReads); + AppendCsharpCsharpDelegate( + releaseFuncName, + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); for (int i = 0; i < numConstructors; ++i) { - AppendCppInitParam( - constructorFuncNameLowers[i], + string funcName = constructorFuncNames[i]; + AppendCppInitBodyFunctionPointerParameterRead( + funcName, true, default(TypeName), TypeKind.None, constructorParams[i], typeof(void), - builders.CppInitParams); - } - - // C++ and C# init params - AppendCppInitBody( - releaseFuncName, - releaseFuncNameLower, - builders.CppInitBody); - AppendCsharpInitParam( - releaseFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitCallArg( - releaseFuncName, - builders.CsharpInitCall); - for (int i = 0; i < numConstructors; ++i) - { - string funcName = constructorFuncNames[i]; - string funcNameLower = constructorFuncNameLowers[i]; - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - AppendCsharpInitCallArg( + builders.CppInitBodyParameterReads); + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); } // C++ method definitions (end) @@ -7489,7 +7290,7 @@ static void AppendBaseType( AppendCppWholeObjectFreeListInit( maxSimultaneous, baseTypeTypeName.Name, - builders.CppInitBody, + builders.CppInitBodyArrays, builders.CppInitBodyFirstBoot); // C++ binding function to create the base class @@ -7538,7 +7339,7 @@ static void AppendBaseType( // C# usage of the C++ binding function to create from C# default constructor ParameterInfo[] cppDefaultConstructorBindingFunctionParams = ConvertParameters( - new Type[] { typeof(int) }); + new[] { typeof(int) }); AppendCsharpDelegate( true, GetTypeName(string.Empty, string.Empty), @@ -7547,7 +7348,7 @@ static void AppendBaseType( cppDefaultConstructorBindingFunctionParams, typeof(int), TypeKind.None, - builders.CsharpDelegates); + builders.CsharpCppDelegates); AppendCsharpImport( GetTypeName(string.Empty, string.Empty), null, @@ -7600,7 +7401,7 @@ static void AppendBaseType( // C# usage of the C++ binding function to destroy from C# default constructor ParameterInfo[] cppDestroyBindingFunctionParams = ConvertParameters( - new Type[] { typeof(int) }); + new [] { typeof(int) }); AppendCsharpDelegate( true, GetTypeName(string.Empty, string.Empty), @@ -7609,7 +7410,7 @@ static void AppendBaseType( cppDestroyBindingFunctionParams, typeof(void), TypeKind.None, - builders.CsharpDelegates); + builders.CsharpCppDelegates); ParameterInfo[] cppDestroyImportFunctionParams = ConvertParameters( new Type[0]); AppendCsharpImport( @@ -8383,10 +8184,6 @@ static void AppendBaseTypeMethodCallsCsharpMethod( builders.TempStrBuilder.Append(methodName); string funcName = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - // C++ method declaration for the method ParameterInfo[] invokeParams = ConvertParameters( methodInfo.GetParameters()); @@ -8414,24 +8211,18 @@ static void AppendBaseTypeMethodCallsCsharpMethod( builders.CppFunctionPointers); // C++ and C# Init parameter and body for the C# binding function - AppendCppInitParam( - funcNameLower, + AppendCppInitBodyFunctionPointerParameterRead( + funcName, false, default(TypeName), TypeKind.None, invokeParams, methodInfo.ReturnType, - builders.CppInitParams); - AppendCppInitBody( + builders.CppInitBodyParameterReads); + AppendCsharpCsharpDelegate( funcName, - funcNameLower, - builders.CppInitBody); - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - AppendCsharpInitCallArg( - funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C++ method definition for the method TypeKind returnTypeKind = GetTypeKind( @@ -8683,7 +8474,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( invokeParams, invokeMethod.ReturnType, invokeReturnTypeKind, - builders.CsharpDelegates); + builders.CsharpCppDelegates); // C# import for the C++ binding function AppendCsharpImport( @@ -9040,9 +8831,8 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( indent + 1, output); output.Append("{\n"); - for (int i = 0; i < methodParams.Length; ++i) + foreach (ParameterInfo parameter in methodParams) { - ParameterInfo parameter = methodParams[i]; if (parameter.Kind == TypeKind.Class || parameter.Kind == TypeKind.ManagedStruct) { @@ -10546,7 +10336,7 @@ static void AppendCsharpDelegate( typeParams, funcName, output); - output.Append("Delegate("); + output.Append("DelegateType("); if (!isStatic) { output.Append("int thisHandle"); @@ -10586,7 +10376,7 @@ static void AppendCsharpDelegate( typeParams, funcName, output); - output.Append("Delegate "); + output.Append("DelegateType "); AppendCsharpDelegateName( typeTypeName, typeParams, @@ -10632,7 +10422,7 @@ static void AppendCsharpGetDelegateCall( typeParams, funcName, output); - output.Append("Delegate>(libraryHandle, \""); + output.Append("DelegateType>(libraryHandle, \""); AppendCsharpDelegateName( typeTypeName, typeParams, @@ -10880,7 +10670,7 @@ static void AppendExceptions( parameters, typeof(void), TypeKind.None, - builders.CsharpDelegates + builders.CsharpCppDelegates ); // C# GetDelegate call @@ -10947,11 +10737,6 @@ static void AppendGetter( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - // Build lowercase function name - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - // Build method name builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Get"); @@ -10959,9 +10744,6 @@ static void AppendGetter( string methodName = builders.TempStrBuilder.ToString(); // C# init param declaration - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); // C# delegate type AppendCsharpDelegateType( @@ -10974,9 +10756,10 @@ static void AppendGetter( builders.CsharpDelegateTypes); // C# init call param - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# function AppendCsharpFunctionBeginning( @@ -11081,22 +10864,16 @@ static void AppendGetter( builders.CppMethodDefinitions.Append("}\n"); AppendIndent(indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); - - // C++ init params - AppendCppInitParam( - funcNameLower, + + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, methodIsStatic, GetTypeName(enclosingType), enclosingTypeKind, parameters, fieldType, - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendSetter( @@ -11135,11 +10912,6 @@ static void AppendSetter( builders.TempStrBuilder); string funcName = builders.TempStrBuilder.ToString(); - // Build lowercase function name - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string funcNameLower = builders.TempStrBuilder.ToString(); - // Build method name builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Set"); @@ -11147,10 +10919,7 @@ static void AppendSetter( string methodName = builders.TempStrBuilder.ToString(); // C# init param declaration - AppendCsharpInitParam( - funcNameLower, - builders.CsharpInitParams); - + // C# delegate type AppendCsharpDelegateType( funcName, @@ -11162,9 +10931,10 @@ static void AppendSetter( builders.CsharpDelegateTypes); // C# init call param - AppendCsharpInitCallArg( + AppendCsharpCsharpDelegate( funcName, - builders.CsharpInitCall); + builders.CsharpInitCall, + builders.CsharpCsharpDelegates); // C# function AppendCsharpFunctionBeginning( @@ -11268,21 +11038,15 @@ static void AppendSetter( AppendIndent(indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); - // C++ init params - AppendCppInitParam( - funcNameLower, + // C++ init body + AppendCppInitBodyFunctionPointerParameterRead( + funcName, methodIsStatic, enclosingTypeTypeName, enclosingTypeKind, parameters, typeof(void), - builders.CppInitParams); - - // C++ init body - AppendCppInitBody( - funcName, - funcNameLower, - builders.CppInitBody); + builders.CppInitBodyParameterReads); } static void AppendFieldPropertyFuncName( @@ -12175,26 +11939,28 @@ static void AppendIndent( { output.Append('\t', indent); } - - static void AppendCsharpInitParam( - string funcName, - StringBuilder output) - { - output.Append("\t\t\tIntPtr "); - output.Append(funcName); - output.Append(",\n"); - } - - static void AppendCsharpInitCallArg( + + static void AppendCsharpCsharpDelegate( string funcName, - StringBuilder output) - { - output.Append( - "\t\t\t\tMarshal.GetFunctionPointerForDelegate(new "); - output.Append(funcName); - output.Append("Delegate("); - output.Append(funcName); - output.Append(")),\n"); + StringBuilder initCallOutput, + StringBuilder delegateOutput) + { + initCallOutput.Append( + "\t\t\tMarshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate("); + initCallOutput.Append(funcName); + initCallOutput.Append("Delegate"); + initCallOutput.Append("));\n"); + initCallOutput.Append("\t\t\tcurMemory += IntPtr.Size;\n"); + + delegateOutput.Append("\t\tstatic readonly "); + delegateOutput.Append(funcName); + delegateOutput.Append("DelegateType "); + delegateOutput.Append(funcName); + delegateOutput.Append("Delegate = new "); + delegateOutput.Append(funcName); + delegateOutput.Append("DelegateType("); + delegateOutput.Append(funcName); + delegateOutput.Append(");\n"); } static void AppendCsharpDelegateType( @@ -12222,7 +11988,7 @@ static void AppendCsharpDelegateType( output.Append(' '); output.Append(funcName); - output.Append("Delegate("); + output.Append("DelegateType("); if (!isStatic) { if (enclosingTypeKind == TypeKind.FullStruct) @@ -12259,7 +12025,7 @@ static void AppendCsharpFunctionBeginning( { output.Append("\t\t[MonoPInvokeCallback(typeof("); output.Append(funcName); - output.Append("Delegate))]\n\t\tstatic "); + output.Append("DelegateType))]\n\t\tstatic "); // Return type if (returnType != null) @@ -12781,30 +12547,32 @@ static void AppendCppParameterDeclaration( } } } - - static void AppendDefaultStringParamName( - string str, - StringBuilder output) - { - foreach (char c in str) - { - if (char.IsLetterOrDigit(c)) - { - output.Append(c); - } - } - } - static void AppendCppInitBody( + static void AppendCppInitBodyFunctionPointerParameterRead( string globalVariableName, - string paramName, + bool isStatic, + TypeName enclosingTypeTypeName, + TypeKind enclosingTypeKind, + ParameterInfo[] parameters, + Type returnType, StringBuilder output) { output.Append("\tPlugin::"); output.Append(globalVariableName); - output.Append(" = "); - output.Append(paramName); - output.Append(";\n"); + output.Append(" = *("); + AppendCppFunctionPointer( + string.Empty, // function name + isStatic, + enclosingTypeTypeName, + enclosingTypeKind, + parameters, + returnType, + 2, + output); + output.Append(")curMemory;\n"); + output.Append("\tcurMemory += sizeof(Plugin::"); + output.Append(globalVariableName); + output.Append(");\n"); } static void AppendCppMethodDefinitionBegin( @@ -13029,31 +12797,7 @@ static void AppendCppUnhandledExceptionHandling( AppendIndent(indent, output); output.Append("}\n"); } - - static void AppendCppInitParam( - string funcName, - bool isStatic, - TypeName enclosingTypeTypeName, - TypeKind enclosingTypeKind, - ParameterInfo[] parameters, - Type returnType, - StringBuilder output - ) - { - output.Append('\t'); - AppendCppFunctionPointer( - funcName, - isStatic, - enclosingTypeTypeName, - enclosingTypeKind, - parameters, - returnType, - ',', - output - ); - output.Append('\n'); - } - + static void AppendCppFunctionPointerDefinition( string funcName, bool isStatic, @@ -13072,9 +12816,10 @@ StringBuilder output enclosingTypeKind, parameters, returnType, - ';', + 1, output ); + output.Append(';'); output.Append('\n'); } @@ -13085,7 +12830,7 @@ static void AppendCppFunctionPointer( TypeKind enclosingTypeKind, ParameterInfo[] parameters, Type returnType, - char separator, + int numIndirectionLevels, StringBuilder output) { // Return type @@ -13108,7 +12853,8 @@ static void AppendCppFunctionPointer( output.Append("int32_t"); } - output.Append(" (*"); + output.Append(" ("); + output.Append('*', numIndirectionLevels); output.Append(funcName); output.Append(")("); if (!isStatic) @@ -13189,7 +12935,6 @@ static void AppendCppFunctionPointer( } } output.Append(')'); - output.Append(separator); } static void AppendCppTemplateTypenames( @@ -13568,13 +13313,13 @@ static void AppendCppPrimitiveTypeName( static void RemoveTrailingChars( StringBuilders builders) { - RemoveTrailingChars(builders.CsharpInitParams); RemoveTrailingChars(builders.CsharpDelegateTypes); RemoveTrailingChars(builders.CsharpStoreInitCalls); RemoveTrailingChars(builders.CsharpInitCall); RemoveTrailingChars(builders.CsharpBaseTypes); RemoveTrailingChars(builders.CsharpFunctions); - RemoveTrailingChars(builders.CsharpDelegates); + RemoveTrailingChars(builders.CsharpCppDelegates); + RemoveTrailingChars(builders.CsharpCsharpDelegates); RemoveTrailingChars(builders.CsharpImports); RemoveTrailingChars(builders.CsharpGetDelegateCalls); RemoveTrailingChars(builders.CsharpDestroyFunctionEnumerators); @@ -13585,8 +13330,8 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CppTemplateSpecializationDeclarations); RemoveTrailingChars(builders.CppTypeDefinitions); RemoveTrailingChars(builders.CppMethodDefinitions); - RemoveTrailingChars(builders.CppInitParams); - RemoveTrailingChars(builders.CppInitBody); + RemoveTrailingChars(builders.CppInitBodyParameterReads); + RemoveTrailingChars(builders.CppInitBodyArrays); RemoveTrailingChars(builders.CppInitBodyFirstBoot); RemoveTrailingChars(builders.CppGlobalStateAndFunctions); RemoveTrailingChars(builders.CppUnboxingMethodDeclarations); @@ -13627,11 +13372,6 @@ static void InjectBuilders( string csharpContents = File.ReadAllText(CsharpPath); string cppHeaderContents = File.ReadAllText(CppHeaderPath); string cppSourceContents = File.ReadAllText(CppSourcePath); - csharpContents = InjectIntoString( - csharpContents, - "/*BEGIN INIT PARAMS*/\n", - "\n\t\t\t/*END INIT PARAMS*/", - builders.CsharpInitParams.ToString()); csharpContents = InjectIntoString( csharpContents, "/*BEGIN DELEGATE TYPES*/\n", @@ -13645,7 +13385,7 @@ static void InjectBuilders( csharpContents = InjectIntoString( csharpContents, "/*BEGIN INIT CALL*/\n", - "\n\t\t\t\t/*END INIT CALL*/", + "\n\t\t\t/*END INIT CALL*/", builders.CsharpInitCall.ToString()); csharpContents = InjectIntoString( csharpContents, @@ -13659,9 +13399,14 @@ static void InjectBuilders( builders.CsharpFunctions.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DELEGATES*/\n", - "\n\t\t/*END DELEGATES*/", - builders.CsharpDelegates.ToString()); + "/*BEGIN CPP DELEGATES*/\n", + "\n\t\t/*END CPP DELEGATES*/", + builders.CsharpCppDelegates.ToString()); + csharpContents = InjectIntoString( + csharpContents, + "/*BEGIN CSHARP DELEGATES*/\n", + "\n\t\t/*END CSHARP DELEGATES*/", + builders.CsharpCsharpDelegates.ToString()); csharpContents = InjectIntoString( csharpContents, "/*BEGIN IMPORTS*/\n", @@ -13714,14 +13459,14 @@ static void InjectBuilders( builders.CppMethodDefinitions.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT PARAMS*/\n", - "\n\t/*END INIT PARAMS*/", - builders.CppInitParams.ToString()); + "/*BEGIN INIT BODY PARAMETER READS*/\n", + "\n\t/*END INIT BODY PARAMETER READS*/", + builders.CppInitBodyParameterReads.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY*/\n", - "\n\t/*END INIT BODY*/", - builders.CppInitBody.ToString()); + "/*BEGIN INIT BODY ARRAYS*/\n", + "\n\t/*END INIT BODY ARRAYS*/", + builders.CppInitBodyArrays.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, "/*BEGIN INIT BODY FIRST BOOT*/\n", diff --git a/Unity/UnityPackageManager/manifest.json b/Unity/Packages/manifest.json similarity index 100% rename from Unity/UnityPackageManager/manifest.json rename to Unity/Packages/manifest.json diff --git a/Unity/ProjectSettings/GraphicsSettings.asset b/Unity/ProjectSettings/GraphicsSettings.asset index 77bf2f1..d8b1468 100644 --- a/Unity/ProjectSettings/GraphicsSettings.asset +++ b/Unity/ProjectSettings/GraphicsSettings.asset @@ -37,6 +37,7 @@ GraphicsSettings: - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/Unity/ProjectSettings/PresetManager.asset b/Unity/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..636a595 --- /dev/null +++ b/Unity/ProjectSettings/PresetManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + m_DefaultList: [] diff --git a/Unity/ProjectSettings/ProjectVersion.txt b/Unity/ProjectSettings/ProjectVersion.txt index e3618f1..22977b3 100644 --- a/Unity/ProjectSettings/ProjectVersion.txt +++ b/Unity/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2017.4.1f1 +m_EditorVersion: 2018.1.0f2 From 1cb1135e19576bb3a01205b9c1bc61fd304db746 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 28 Jul 2018 17:16:52 -0700 Subject: [PATCH 14/41] Fix GitHub Issue #19 regarding whole object free list initialization (thanks to JmgrArt!) Update Unity project to 2018.2.0f2 and fix an error by generating IEquatable --- .../CppSource/NativeScript/Bindings.cpp | 101 +++++++++++++++++- .../Assets/CppSource/NativeScript/Bindings.h | 23 ++++ .../NativeScript/Editor/GenerateBindings.cs | 2 +- Unity/Assets/NativeScriptTypes.json | 5 + Unity/Packages/manifest.json | 39 ++++++- Unity/ProjectSettings/ProjectVersion.txt | 2 +- 6 files changed, 167 insertions(+), 5 deletions(-) diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.cpp b/Unity/Assets/CppSource/NativeScript/Bindings.cpp index 8e36cbb..0903692 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.cpp +++ b/Unity/Assets/CppSource/NativeScript/Bindings.cpp @@ -2490,6 +2490,87 @@ namespace System } } +namespace System +{ + IEquatable_1::IEquatable_1(decltype(nullptr)) + { + } + + IEquatable_1::IEquatable_1(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IEquatable_1::IEquatable_1(const IEquatable_1& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + } + + IEquatable_1::IEquatable_1(IEquatable_1&& other) + : IEquatable_1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IEquatable_1::~IEquatable_1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IEquatable_1& IEquatable_1::operator=(const IEquatable_1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IEquatable_1& IEquatable_1::operator=(IEquatable_1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IEquatable_1::operator==(const IEquatable_1& other) const + { + return Handle == other.Handle; + } + + bool IEquatable_1::operator!=(const IEquatable_1& other) const + { + return Handle != other.Handle; + } +} + namespace System { IComparable_1::IComparable_1(decltype(nullptr)) @@ -3867,6 +3948,24 @@ namespace UnityEngine } return nullptr; } + + UnityEngine::Vector3::operator System::IEquatable_1() + { + int32_t handle = Plugin::BoxVector3(*this); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IEquatable_1(Plugin::InternalUse::Only, handle); + } + return nullptr; + } } namespace System @@ -6117,7 +6216,7 @@ DLLEXPORT void Init( for (int32_t i = 0, end = Plugin::BaseBallScriptFreeWholeListSize - 1; i < end; ++i) { - Plugin::BaseBallScriptFreeWholeList[i].Next = Plugin::BaseBallScriptFreeWholeList[i + 1].Next; + Plugin::BaseBallScriptFreeWholeList[i].Next = Plugin::BaseBallScriptFreeWholeList + i + 1; } Plugin::BaseBallScriptFreeWholeList[Plugin::BaseBallScriptFreeWholeListSize - 1].Next = nullptr; Plugin::NextFreeWholeBaseBallScript = Plugin::BaseBallScriptFreeWholeList + 1; diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.h b/Unity/Assets/CppSource/NativeScript/Bindings.h index e7a25bb..13aa459 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.h +++ b/Unity/Assets/CppSource/NativeScript/Bindings.h @@ -489,6 +489,11 @@ namespace System template<> struct IEquatable_1; } +namespace System +{ + template<> struct IEquatable_1; +} + namespace System { template<> struct IComparable_1; @@ -934,6 +939,23 @@ namespace System }; } +namespace System +{ + template<> struct IEquatable_1 : virtual System::Object + { + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); + IEquatable_1& operator=(const IEquatable_1& other); + IEquatable_1& operator=(decltype(nullptr)); + IEquatable_1& operator=(IEquatable_1&& other); + bool operator==(const IEquatable_1& other) const; + bool operator!=(const IEquatable_1& other) const; + }; +} + namespace System { template<> struct IComparable_1 : virtual System::Object @@ -1193,6 +1215,7 @@ namespace UnityEngine UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); explicit operator System::ValueType(); explicit operator System::Object(); + explicit operator System::IEquatable_1(); }; } diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 013fa39..9966308 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -10164,7 +10164,7 @@ static void AppendCppWholeObjectFreeListInit( outputFirstBoot.Append(bindingTypeName); outputFirstBoot.Append("FreeWholeList[i].Next = Plugin::"); outputFirstBoot.Append(bindingTypeName); - outputFirstBoot.Append("FreeWholeList[i + 1].Next;\n"); + outputFirstBoot.Append("FreeWholeList + i + 1;\n"); outputFirstBoot.Append("\t\t}\n"); outputFirstBoot.Append("\t\tPlugin::"); diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 26511b8..b933795 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -78,6 +78,11 @@ "Types": [ "System.Decimal" ] + }, + { + "Types": [ + "UnityEngine.Vector3" + ] } ] }, diff --git a/Unity/Packages/manifest.json b/Unity/Packages/manifest.json index 526aca6..1342d0a 100644 --- a/Unity/Packages/manifest.json +++ b/Unity/Packages/manifest.json @@ -1,4 +1,39 @@ { - "dependencies": { - } + "dependencies": { + "com.unity.ads": "2.0.8", + "com.unity.analytics": "2.0.16", + "com.unity.package-manager-ui": "1.9.11", + "com.unity.purchasing": "2.0.3", + "com.unity.textmeshpro": "1.2.4", + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "com.unity.modules.video": "1.0.0", + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.wind": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } } diff --git a/Unity/ProjectSettings/ProjectVersion.txt b/Unity/ProjectSettings/ProjectVersion.txt index 22977b3..0498f4d 100644 --- a/Unity/ProjectSettings/ProjectVersion.txt +++ b/Unity/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 2018.1.0f2 +m_EditorVersion: 2018.2.0f2 From ba3cf0d3e1f3c3eb6e8c05dbe18318d4b0361168 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Tue, 5 Mar 2019 22:17:47 -0800 Subject: [PATCH 15/41] Fix a bug generating the base type constructor function for delegates --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 9966308..4e25e7a 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -6751,7 +6751,7 @@ static void AppendDelegate( AppendCsharpBaseTypeConstructorFunction( type, GetTypeName(bindingTypeName, string.Empty), - false, + true, constructorFuncName, constructorParams, new ParameterInfo[0], From 7b3d95ec3ca559a543262b2dcc36daf4808c113f Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Thu, 4 Jul 2019 10:39:27 -0700 Subject: [PATCH 16/41] Use non-experimental namespace for UI Elements in Unity 2019.1+ --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 4e25e7a..16da323 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -704,7 +704,11 @@ static Assembly[] GetAssemblies(string[] assemblyNames) assemblies[27] = typeof(TerrainCollider).Assembly; // Unity terrain physics module assemblies[28] = typeof(Font).Assembly; // Unity text rendering module assemblies[29] = typeof(UnityEngine.Tilemaps.Tile).Assembly; // Unity tilemap module +#if UNITY_2019_1_OR_NEWER + assemblies[30] = typeof(UnityEngine.UIElements.Button).Assembly; // Unity UI elements module +#else assemblies[30] = typeof(UnityEngine.Experimental.UIElements.Button).Assembly; // Unity UI elements module +#endif assemblies[31] = typeof(Canvas).Assembly; // Unity UI module assemblies[32] = typeof(UnityEngine.Networking.NetworkTransport).Assembly; // Unity cloth module assemblies[33] = typeof(UnityEngine.Analytics.Analytics).Assembly; // Unity analytics module From d67249bde28778803d894eb336cac50be9f40b87 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Fri, 2 Aug 2019 17:36:29 -0700 Subject: [PATCH 17/41] Made BootScript only run on Start, not Awake, so that it can be disabled. --- Unity/Assets/NativeScript/BootScript.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/BootScript.cs b/Unity/Assets/NativeScript/BootScript.cs index 1fe063f..9296ee7 100644 --- a/Unity/Assets/NativeScript/BootScript.cs +++ b/Unity/Assets/NativeScript/BootScript.cs @@ -27,7 +27,7 @@ public class BootScript : MonoBehaviour private Coroutine autoReloadCoroutine; #endif - void Awake() + void Start() { #if UNITY_EDITOR lastAutoReloadPollTime = AutoReloadPollTime; From 7107c69e0e0aad14ba22778b20c86ba0b7b32119 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Tue, 6 Aug 2019 21:39:37 -0700 Subject: [PATCH 18/41] - Remove global placement new operator - Add macros for defining placement new within derived classes (and use them in the example) - Fix copy errors on Windows when the temp DLL existed - Fix Bindings.h being included by Bindings.cpp on behalf of Game.h - Git-ignore Unity upgrade logs - Upgrade project to Unity 2019.2.0f1 and change the JSON config to add a newly-required type --- .gitignore | 5 +- Unity/Assets/CppSource/Game/Game.h | 1 + .../CppSource/NativeScript/Bindings.cpp | 147 +++++++++--- .../Assets/CppSource/NativeScript/Bindings.h | 75 +++++- Unity/Assets/NativeScript/Bindings.cs | 2 +- .../NativeScript/Editor/GenerateBindings.cs | 85 ++++++- Unity/Assets/NativeScriptTypes.json | 3 + Unity/Packages/manifest.json | 20 +- Unity/ProjectSettings/EditorSettings.asset | 16 +- Unity/ProjectSettings/GraphicsSettings.asset | 1 + Unity/ProjectSettings/ProjectSettings.asset | 227 ++++++++---------- Unity/ProjectSettings/ProjectVersion.txt | 3 +- .../UnityConnectSettings.asset | 16 +- Unity/ProjectSettings/VFXManager.asset | 11 + Unity/ProjectSettings/XRSettings.asset | 10 + 15 files changed, 444 insertions(+), 178 deletions(-) create mode 100644 Unity/ProjectSettings/VFXManager.asset create mode 100644 Unity/ProjectSettings/XRSettings.asset diff --git a/.gitignore b/.gitignore index 7f3848a..eaec275 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ # Rider IDE -.idea \ No newline at end of file +.idea + +# Unity upgrade logs +Unity/Logs \ No newline at end of file diff --git a/Unity/Assets/CppSource/Game/Game.h b/Unity/Assets/CppSource/Game/Game.h index a8e6e5b..79d31ad 100644 --- a/Unity/Assets/CppSource/Game/Game.h +++ b/Unity/Assets/CppSource/Game/Game.h @@ -16,6 +16,7 @@ namespace MyGame { struct BallScript : MyGame::BaseBallScript { + MY_GAME_BALL_SCRIPT_DEFAULT_CONTENTS MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR void Update() override; }; diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.cpp b/Unity/Assets/CppSource/NativeScript/Bindings.cpp index 0903692..b8246ad 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.cpp +++ b/Unity/Assets/CppSource/NativeScript/Bindings.cpp @@ -9,30 +9,18 @@ /// MIT /// -// Type definitions -#include "Bindings.h" - // Game type definitions #include "Game.h" +// Type definitions +#include "Bindings.h" + // For assert() #include -// For int32_t, etc. -#include - -// For malloc(), etc. -#include - // For memset(), etc. #include -// Support placement new -void* operator new(size_t, void* p) -{ - return p; -} - // Macro to put before functions that need to be exposed to C# #ifdef _WIN32 #define DLLEXPORT extern "C" __declspec(dllexport) @@ -3624,6 +3612,93 @@ namespace System } } +namespace System +{ + namespace Runtime + { + namespace Serialization + { + IDeserializationCallback::IDeserializationCallback(decltype(nullptr)) + { + } + + IDeserializationCallback::IDeserializationCallback(Plugin::InternalUse, int32_t handle) + { + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + IDeserializationCallback::IDeserializationCallback(const IDeserializationCallback& other) + : IDeserializationCallback(Plugin::InternalUse::Only, other.Handle) + { + } + + IDeserializationCallback::IDeserializationCallback(IDeserializationCallback&& other) + : IDeserializationCallback(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + IDeserializationCallback::~IDeserializationCallback() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + IDeserializationCallback& IDeserializationCallback::operator=(const IDeserializationCallback& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + IDeserializationCallback& IDeserializationCallback::operator=(decltype(nullptr)) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + IDeserializationCallback& IDeserializationCallback::operator=(IDeserializationCallback&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool IDeserializationCallback::operator==(const IDeserializationCallback& other) const + { + return Handle == other.Handle; + } + + bool IDeserializationCallback::operator!=(const IDeserializationCallback& other) const + { + return Handle != other.Handle; + } + } + } +} + namespace System { Decimal::Decimal(decltype(nullptr)) @@ -3774,7 +3849,7 @@ namespace System return nullptr; } - System::Decimal::operator System::IFormattable() + System::Decimal::operator System::IComparable() { int32_t handle = Plugin::BoxDecimal(Handle); if (Plugin::unhandledCsharpException) @@ -3787,7 +3862,25 @@ namespace System if (handle) { Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); + return System::IComparable(Plugin::InternalUse::Only, handle); + } + return nullptr; + } + + System::Decimal::operator System::IComparable_1() + { + int32_t handle = Plugin::BoxDecimal(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + return System::IComparable_1(Plugin::InternalUse::Only, handle); } return nullptr; } @@ -3810,7 +3903,7 @@ namespace System return nullptr; } - System::Decimal::operator System::IComparable() + System::Decimal::operator System::IEquatable_1() { int32_t handle = Plugin::BoxDecimal(Handle); if (Plugin::unhandledCsharpException) @@ -3823,12 +3916,12 @@ namespace System if (handle) { Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); + return System::IEquatable_1(Plugin::InternalUse::Only, handle); } return nullptr; } - System::Decimal::operator System::IComparable_1() + System::Decimal::operator System::Runtime::Serialization::IDeserializationCallback() { int32_t handle = Plugin::BoxDecimal(Handle); if (Plugin::unhandledCsharpException) @@ -3841,12 +3934,12 @@ namespace System if (handle) { Plugin::ReferenceManagedClass(handle); - return System::IComparable_1(Plugin::InternalUse::Only, handle); + return System::Runtime::Serialization::IDeserializationCallback(Plugin::InternalUse::Only, handle); } return nullptr; } - System::Decimal::operator System::IEquatable_1() + System::Decimal::operator System::IFormattable() { int32_t handle = Plugin::BoxDecimal(Handle); if (Plugin::unhandledCsharpException) @@ -3859,7 +3952,7 @@ namespace System if (handle) { Plugin::ReferenceManagedClass(handle); - return System::IEquatable_1(Plugin::InternalUse::Only, handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); } return nullptr; } @@ -5325,7 +5418,7 @@ namespace UnityEngine return nullptr; } - UnityEngine::PrimitiveType::operator System::IFormattable() + UnityEngine::PrimitiveType::operator System::IComparable() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -5338,7 +5431,7 @@ namespace UnityEngine if (handle) { Plugin::ReferenceManagedClass(handle); - return System::IFormattable(Plugin::InternalUse::Only, handle); + return System::IComparable(Plugin::InternalUse::Only, handle); } return nullptr; } @@ -5361,7 +5454,7 @@ namespace UnityEngine return nullptr; } - UnityEngine::PrimitiveType::operator System::IComparable() + UnityEngine::PrimitiveType::operator System::IFormattable() { int32_t handle = Plugin::BoxPrimitiveType(*this); if (Plugin::unhandledCsharpException) @@ -5374,7 +5467,7 @@ namespace UnityEngine if (handle) { Plugin::ReferenceManagedClass(handle); - return System::IComparable(Plugin::InternalUse::Only, handle); + return System::IFormattable(Plugin::InternalUse::Only, handle); } return nullptr; } diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.h b/Unity/Assets/CppSource/NativeScript/Bindings.h index 13aa459..6835b61 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.h +++ b/Unity/Assets/CppSource/NativeScript/Bindings.h @@ -13,6 +13,9 @@ // For int32_t, etc. #include +// For size_t to support placement new and delete +#include + //////////////////////////////////////////////////////////////// // Plugin internals. Do not name these in game code as they may // change without warning. For example: @@ -312,6 +315,17 @@ namespace System struct IComparable; } +namespace System +{ + namespace Runtime + { + namespace Serialization + { + struct IDeserializationCallback; + } + } +} + namespace System { struct Decimal; @@ -1177,6 +1191,29 @@ namespace System }; } +namespace System +{ + namespace Runtime + { + namespace Serialization + { + struct IDeserializationCallback : virtual System::Object + { + IDeserializationCallback(decltype(nullptr)); + IDeserializationCallback(Plugin::InternalUse, int32_t handle); + IDeserializationCallback(const IDeserializationCallback& other); + IDeserializationCallback(IDeserializationCallback&& other); + virtual ~IDeserializationCallback(); + IDeserializationCallback& operator=(const IDeserializationCallback& other); + IDeserializationCallback& operator=(decltype(nullptr)); + IDeserializationCallback& operator=(IDeserializationCallback&& other); + bool operator==(const IDeserializationCallback& other) const; + bool operator!=(const IDeserializationCallback& other) const; + }; + } + } +} + namespace System { struct Decimal : Plugin::ManagedType @@ -1195,11 +1232,12 @@ namespace System Decimal(System::UInt64 value); explicit operator System::ValueType(); explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); explicit operator System::IComparable(); explicit operator System::IComparable_1(); + explicit operator System::IConvertible(); explicit operator System::IEquatable_1(); + explicit operator System::Runtime::Serialization::IDeserializationCallback(); + explicit operator System::IFormattable(); }; } @@ -1485,9 +1523,9 @@ namespace UnityEngine explicit operator System::Enum(); explicit operator System::ValueType(); explicit operator System::Object(); - explicit operator System::IFormattable(); - explicit operator System::IConvertible(); explicit operator System::IComparable(); + explicit operator System::IConvertible(); + explicit operator System::IFormattable(); }; } @@ -1550,7 +1588,7 @@ namespace MyGame /*BEGIN MACROS*/ #define MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR_DECLARATION \ BallScript(Plugin::InternalUse iu, int32_t handle); - + #define MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR_DEFINITION \ BallScript::BallScript(Plugin::InternalUse iu, int32_t handle) \ : UnityEngine::Object(nullptr) \ @@ -1558,7 +1596,10 @@ namespace MyGame , UnityEngine::Behaviour(nullptr) \ , UnityEngine::MonoBehaviour(nullptr) \ , MyGame::AbstractBaseBallScript(nullptr) \ - , MyGame::BaseBallScript(iu, handle) + , MyGame::BaseBallScript(iu, handle) \ + { \ + } + #define MY_GAME_BALL_SCRIPT_DEFAULT_CONSTRUCTOR \ BallScript(Plugin::InternalUse iu, int32_t handle) \ : UnityEngine::Object(nullptr) \ @@ -1568,7 +1609,29 @@ namespace MyGame , MyGame::AbstractBaseBallScript(nullptr) \ , MyGame::BaseBallScript(iu, handle) \ { \ + } + +#define MY_GAME_BALL_SCRIPT_DEFAULT_CONTENTS_DECLARATION \ + void* operator new(size_t, void* p) noexcept; \ + void operator delete(void*, size_t) noexcept; \ + +#define MY_GAME_BALL_SCRIPT_DEFAULT_CONTENTS_DEFINITION \ + void* BallScript::operator new(size_t, void* p) noexcept\ + { \ + return p; \ + } \ + void BallScript::operator delete(void*, size_t) noexcept \ + { \ + } + +#define MY_GAME_BALL_SCRIPT_DEFAULT_CONTENTS\ + void* operator new(size_t, void* p) noexcept \ + { \ + return p; \ } \ + void operator delete(void*, size_t) noexcept \ + { \ + } /*END MACROS*/ //////////////////////////////////////////////////////////////// diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index c2a00a6..bb6745d 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -679,7 +679,7 @@ private static void OpenPlugin(InitMode initMode) string loadPath; #if UNITY_EDITOR_WIN // Copy native library to temporary file - File.Copy(pluginPath, pluginTempPath); + File.Copy(pluginPath, pluginTempPath, true); loadPath = pluginTempPath; #else loadPath = pluginPath; diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 16da323..0855981 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -7067,6 +7067,7 @@ static void AppendBaseType( AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append(derivedTypeTypeName.Name); builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle);\n"); + AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append('\n'); // C++ constructor definition macro @@ -7094,7 +7095,13 @@ static void AppendBaseType( AppendCppTypeFullName( baseTypeTypeName, builders.CppMacros); - builders.CppMacros.Append("(iu, handle)\n"); + builders.CppMacros.Append("(iu, handle) \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("{ \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("}\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append('\n'); // C++ constructor inline definition macro builders.CppMacros.Append("#define "); @@ -7123,7 +7130,83 @@ static void AppendBaseType( AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append("{ \\\n"); AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("}\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append('\n'); + + // C++ default contents declaration macro + builders.CppMacros.Append("#define "); + AppendUppercaseWithUnderscores( + derivedTypeTypeName.Namespace, + builders.CppMacros); + builders.CppMacros.Append('_'); + AppendUppercaseWithUnderscores( + derivedTypeTypeName.Name, + builders.CppMacros); + builders.CppMacros.Append("_DEFAULT_CONTENTS_DECLARATION \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("void* operator new(size_t, void* p) noexcept; \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("void operator delete(void*, size_t) noexcept; \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append('\n'); + + // C++ default contents definition macro + builders.CppMacros.Append("#define "); + AppendUppercaseWithUnderscores( + derivedTypeTypeName.Namespace, + builders.CppMacros); + builders.CppMacros.Append('_'); + AppendUppercaseWithUnderscores( + derivedTypeTypeName.Name, + builders.CppMacros); + builders.CppMacros.Append("_DEFAULT_CONTENTS_DEFINITION \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("void* "); + builders.CppMacros.Append(derivedTypeTypeName.Name); + builders.CppMacros.Append("::operator new(size_t, void* p) noexcept\\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("{ \\\n"); + AppendIndent(indent + 1, builders.CppMacros); + builders.CppMacros.Append("return p; \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("} \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("void "); + builders.CppMacros.Append(derivedTypeTypeName.Name); + builders.CppMacros.Append("::operator delete(void*, size_t) noexcept \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("{ \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("}\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append('\n'); + + // C++ default contents inline definition macro + builders.CppMacros.Append("#define "); + AppendUppercaseWithUnderscores( + derivedTypeTypeName.Namespace, + builders.CppMacros); + builders.CppMacros.Append('_'); + AppendUppercaseWithUnderscores( + derivedTypeTypeName.Name, + builders.CppMacros); + builders.CppMacros.Append("_DEFAULT_CONTENTS\\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("void* operator new(size_t, void* p) noexcept \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("{ \\\n"); + AppendIndent(indent + 1, builders.CppMacros); + builders.CppMacros.Append("return p; \\\n"); + AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append("} \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("void operator delete(void*, size_t) noexcept \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("{ \\\n"); + AppendIndent(indent, builders.CppMacros); + builders.CppMacros.Append("}\n"); + AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append('\n'); // C++ function pointers diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index b933795..c507547 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -156,6 +156,9 @@ } ] }, + { + "Name": " System.Runtime.Serialization.IDeserializationCallback" + }, { "Name": "System.Decimal", "Constructors": [ diff --git a/Unity/Packages/manifest.json b/Unity/Packages/manifest.json index 1342d0a..bc19e66 100644 --- a/Unity/Packages/manifest.json +++ b/Unity/Packages/manifest.json @@ -1,11 +1,23 @@ { "dependencies": { + "com.unity.2d.sprite": "1.0.0", + "com.unity.2d.tilemap": "1.0.0", "com.unity.ads": "2.0.8", - "com.unity.analytics": "2.0.16", - "com.unity.package-manager-ui": "1.9.11", - "com.unity.purchasing": "2.0.3", - "com.unity.textmeshpro": "1.2.4", + "com.unity.analytics": "3.3.2", + "com.unity.collab-proxy": "1.2.16", + "com.unity.ext.nunit": "1.0.0", + "com.unity.ide.rider": "1.0.8", + "com.unity.ide.vscode": "1.0.7", + "com.unity.multiplayer-hlapi": "1.0.2", + "com.unity.package-manager-ui": "2.2.0", + "com.unity.purchasing": "2.0.6", + "com.unity.test-framework": "1.0.13", + "com.unity.textmeshpro": "2.0.1", + "com.unity.timeline": "1.1.0", + "com.unity.ugui": "1.0.0", + "com.unity.xr.legacyinputhelpers": "2.0.2", "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", diff --git a/Unity/ProjectSettings/EditorSettings.asset b/Unity/ProjectSettings/EditorSettings.asset index f33b6fb..4b908a6 100644 --- a/Unity/ProjectSettings/EditorSettings.asset +++ b/Unity/ProjectSettings/EditorSettings.asset @@ -3,14 +3,24 @@ --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 - serializedVersion: 4 + serializedVersion: 8 m_ExternalVersionControlSupport: Visible Meta Files m_SerializationMode: 2 + m_LineEndingsForNewScripts: 1 m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} m_SpritePackerMode: 0 m_SpritePackerPaddingPower: 1 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd + m_EtcTextureCompressorBehavior: 0 + m_EtcTextureFastCompressor: 2 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 5 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref;asmdef m_ProjectGenerationRootNamespace: - m_UserGeneratedProjectSuffix: m_CollabEditorSettings: inProgressEnabled: 1 + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_ShowLightmapResolutionOverlay: 1 diff --git a/Unity/ProjectSettings/GraphicsSettings.asset b/Unity/ProjectSettings/GraphicsSettings.asset index d8b1468..646b92e 100644 --- a/Unity/ProjectSettings/GraphicsSettings.asset +++ b/Unity/ProjectSettings/GraphicsSettings.asset @@ -38,6 +38,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/Unity/ProjectSettings/ProjectSettings.asset b/Unity/ProjectSettings/ProjectSettings.asset index b6955bb..d724f15 100644 --- a/Unity/ProjectSettings/ProjectSettings.asset +++ b/Unity/ProjectSettings/ProjectSettings.asset @@ -3,10 +3,11 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 14 + serializedVersion: 18 productGUID: 435980e4cf9ff4aa8b71e496e8163063 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 defaultScreenOrientation: 4 targetDevice: 2 useOnDemandResources: 0 @@ -51,9 +52,8 @@ PlayerSettings: m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 - tizenShowActivityIndicatorOnLoading: -1 - iosAppInBackgroundBehavior: 0 displayResolutionDialog: 1 + iosUseCustomAppBackgroundBehavior: 0 iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 @@ -63,8 +63,10 @@ PlayerSettings: use32BitDisplayBuffer: 1 preserveFramebufferAlpha: 0 disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 1 + androidUseSwappy: 0 androidBlitType: 0 - defaultIsFullScreen: 1 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 0 @@ -78,6 +80,7 @@ PlayerSettings: usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 + useFlipModelSwapchain: 1 resizableWindow: 0 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games @@ -91,16 +94,12 @@ PlayerSettings: visibleInBackground: 0 allowFullscreenSwitch: 1 graphicsJobMode: 0 - macFullscreenMode: 2 - d3d11FullscreenMode: 1 + fullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 xboxEnablePIXSampling: 0 metalFramebufferOnly: 0 - n3dsDisableStereoscopicView: 0 - n3dsEnableSharedListOpt: 1 - n3dsEnableVSync: 0 xboxOneResolution: 0 xboxOneSResolution: 0 xboxOneXResolution: 3 @@ -108,18 +107,13 @@ PlayerSettings: xboxOneLoggingLevel: 1 xboxOneDisableEsram: 0 xboxOnePresentImmediateThreshold: 0 - videoMemoryForVertexBuffers: 0 - psp2PowerMode: 0 - psp2AcquireBGM: 1 - wiiUTVResolution: 0 - wiiUGamePadMSAA: 1 - wiiUSupportsNunchuk: 0 - wiiUSupportsClassicController: 0 - wiiUSupportsBalanceBoard: 0 - wiiUSupportsMotionPlus: 0 - wiiUSupportsProController: 0 - wiiUAllowScreenCapture: 1 - wiiUControllerCount: 0 + switchQueueCommandMemory: 1048576 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + vulkanEnableSetSRGBWrite: 0 m_SupportedAspectRatios: 4:3: 1 5:4: 1 @@ -147,10 +141,20 @@ PlayerSettings: hololens: depthFormat: 1 depthBufferSharingEnabled: 0 + lumin: + depthFormat: 0 + frameTiming: 2 + enableGLCache: 0 + glCacheMaxBlobSize: 524288 + glCacheMaxFileSize: 8388608 oculus: sharedDepthBuffer: 0 dashSupport: 0 + lowOverheadMode: 0 + enable360StereoCapture: 0 + isWsaHolographicRemotingEnabled: 0 protectGraphicsMemory: 0 + enableFrameTimingStats: 0 useHDRDisplay: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 @@ -161,10 +165,10 @@ PlayerSettings: Android: com.jacksondunstan.unityplayground Standalone: unity.DefaultCompany.UnityPlayground Tizen: com.jacksondunstan.unityplayground - iOS: com.jacksondunstan.unityplayground + iPhone: com.jacksondunstan.unityplayground tvOS: com.jacksondunstan.unityplayground buildNumber: - iOS: 0 + iPhone: 0 AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 16 AndroidTargetSdkVersion: 0 @@ -179,11 +183,9 @@ PlayerSettings: APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 - VertexChannelCompressionMask: - serializedVersion: 2 - m_Bits: 238 + VertexChannelCompressionMask: 214 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 7.0 + iOSTargetOSVersionString: 9.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 9.0 @@ -205,11 +207,16 @@ PlayerSettings: iPadHighResPortraitSplashScreen: {fileID: 0} iPadLandscapeSplashScreen: {fileID: 0} iPadHighResLandscapeSplashScreen: {fileID: 0} + iPhone65inPortraitSplashScreen: {fileID: 0} + iPhone65inLandscapeSplashScreen: {fileID: 0} + iPhone61inPortraitSplashScreen: {fileID: 0} + iPhone61inLandscapeSplashScreen: {fileID: 0} appleTVSplashScreen: {fileID: 0} appleTVSplashScreen2x: {fileID: 0} tvOSSmallIconLayers: [] tvOSSmallIconLayers2x: [] tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] tvOSTopShelfImageLayers: [] tvOSTopShelfImageLayers2x: [] tvOSTopShelfImageWideLayers: [] @@ -243,23 +250,34 @@ PlayerSettings: appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 clonedFromGUID: 00000000000000000000000000000000 - AndroidTargetDevice: 3 + templatePackageId: + templateDefaultScene: + AndroidTargetArchitectures: 1 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} - AndroidKeystoreName: + AndroidKeystoreName: '{inproject}: ' AndroidKeyaliasName: + AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 1 AndroidIsGame: 1 AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 m_AndroidBanners: - width: 320 height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: - m_BuildTarget: @@ -269,6 +287,7 @@ PlayerSettings: m_Width: 128 m_Height: 128 m_Kind: 0 + m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: [] m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer @@ -279,7 +298,7 @@ PlayerSettings: m_Enabled: 0 m_Devices: - Oculus - - m_BuildTarget: Metro + - m_BuildTarget: Windows Store Apps m_Enabled: 0 m_Devices: [] - m_BuildTarget: N3DS @@ -323,15 +342,16 @@ PlayerSettings: - m_BuildTarget: XboxOne m_Enabled: 0 m_Devices: [] - - m_BuildTarget: iOS + - m_BuildTarget: iPhone m_Enabled: 0 m_Devices: [] - m_BuildTarget: tvOS m_Enabled: 0 m_Devices: [] - m_BuildTargetEnableVuforiaSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 + openGLRequireES32: 0 + vuforiaEnabled: 0 m_TemplateCustomTags: {} mobileMTRendering: Android: 1 @@ -344,25 +364,9 @@ PlayerSettings: m_EncodingQuality: 1 - m_BuildTarget: PS4 m_EncodingQuality: 1 - wiiUTitleID: 0005000011000000 - wiiUGroupID: 00010000 - wiiUCommonSaveSize: 4096 - wiiUAccountSaveSize: 2048 - wiiUOlvAccessKey: 0 - wiiUTinCode: 0 - wiiUJoinGameId: 0 - wiiUJoinGameModeMask: 0000000000000000 - wiiUCommonBossSize: 0 - wiiUAccountBossSize: 0 - wiiUAddOnUniqueIDs: [] - wiiUMainThreadStackSize: 3072 - wiiULoaderThreadStackSize: 1024 - wiiUSystemHeapSize: 128 - wiiUTVStartupScreen: {fileID: 0} - wiiUGamePadStartupScreen: {fileID: 0} - wiiUDrcBufferDisabled: 0 - wiiUProfilerLibPath: + m_BuildTargetGroupLightmapSettings: [] playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 @@ -482,7 +486,12 @@ PlayerSettings: switchAllowsVideoCapturing: 1 switchAllowsRuntimeAddOnContentInstall: 0 switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 switchSupportedNpadStyles: 3 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 0 + switchSupportedNpadCount: 8 switchSocketConfigEnabled: 0 switchTcpInitialSendBufferSize: 32 switchTcpInitialReceiveBufferSize: 64 @@ -532,12 +541,15 @@ PlayerSettings: ps4DownloadDataSize: 0 ps4GarlicHeapSize: 2048 ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE ps4pnSessions: 1 ps4pnPresence: 1 ps4pnFriends: 1 ps4pnGameCustomData: 1 playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 restrictedAudioUsageRights: 0 ps4UseResolutionFallback: 0 ps4ReprojectionSupport: 0 @@ -561,56 +573,9 @@ PlayerSettings: ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] monoEnv: - psp2Splashimage: {fileID: 0} - psp2NPTrophyPackPath: - psp2NPSupportGBMorGJP: 0 - psp2NPAgeRating: 12 - psp2NPTitleDatPath: - psp2NPCommsID: - psp2NPCommunicationsID: - psp2NPCommsPassphrase: - psp2NPCommsSig: - psp2ParamSfxPath: - psp2ManualPath: - psp2LiveAreaGatePath: - psp2LiveAreaBackroundPath: - psp2LiveAreaPath: - psp2LiveAreaTrialPath: - psp2PatchChangeInfoPath: - psp2PatchOriginalPackage: - psp2PackagePassword: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE - psp2KeystoneFile: - psp2MemoryExpansionMode: 0 - psp2DRMType: 0 - psp2StorageType: 0 - psp2MediaCapacity: 0 - psp2DLCConfigPath: - psp2ThumbnailPath: - psp2BackgroundPath: - psp2SoundPath: - psp2TrophyCommId: - psp2TrophyPackagePath: - psp2PackagedResourcesPath: - psp2SaveDataQuota: 10240 - psp2ParentalLevel: 1 - psp2ShortTitle: Not Set - psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF - psp2Category: 0 - psp2MasterVersion: 01.00 - psp2AppVersion: 01.00 - psp2TVBootMode: 0 - psp2EnterButtonAssignment: 2 - psp2TVDisableEmu: 0 - psp2AllowTwitterDialog: 1 - psp2Upgradable: 0 - psp2HealthWarning: 0 - psp2UseLibLocation: 0 - psp2InfoBarOnStartup: 0 - psp2InfoBarColor: 0 - psp2ScriptOptimizationLevel: 0 - psmSplashimage: {fileID: 0} splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 spritePackerPolicy: webGLMemorySize: 256 webGLExceptionSupport: 0 @@ -622,21 +587,28 @@ PlayerSettings: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 - webGLUseWasm: 0 webGLCompressionFormat: 1 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLWasmStreaming: 0 scriptingDefineSymbols: 1: platformArchitecture: - iOS: 0 + iPhone: 0 scriptingBackend: Android: 1 Standalone: 0 WebGL: 1 - iOS: 1 + iPhone: 1 + il2cppCompilerConfiguration: {} + managedStrippingLevel: {} incrementalIl2cppBuild: - iOS: 0 + iPhone: 0 + allowUnsafeCode: 0 additionalIl2CppArgs: - scriptingRuntimeVersion: 0 + scriptingRuntimeVersion: 1 + gcIncremental: 0 + gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: {} m_RenderingPath: 1 m_MobileRenderingPath: 1 @@ -650,40 +622,22 @@ PlayerSettings: metroApplicationDescription: UnityPlayground wsaImages: {} metroTileShortName: - metroCommandLineArgsFile: metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 metroDefaultTileSize: 1 metroTileForegroundText: 1 metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} metroSplashScreenUseBackgroundColor: 0 platformCapabilities: {} + metroTargetDeviceFamilies: {} metroFTAName: metroFTAFileTypes: [] metroProtocolName: - metroCompilationOverrides: 1 - tizenProductDescription: - tizenProductURL: - tizenSigningProfileName: - tizenGPSPermissions: 0 - tizenMicrophonePermissions: 0 - tizenDeploymentTarget: - tizenDeploymentTargetType: -1579033 - tizenMinOSVersion: 1 - n3dsUseExtSaveData: 0 - n3dsCompressStaticMem: 1 - n3dsExtSaveDataNumber: 0x12345 - n3dsStackSize: 131072 - n3dsTargetPlatform: 2 - n3dsRegion: 7 - n3dsMediaSize: 0 - n3dsLogoStyle: 3 - n3dsTitle: GameName - n3dsProductCode: - n3dsApplicationId: 0xFF3FF XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -693,6 +647,7 @@ PlayerSettings: XboxOneGameOsOverridePath: XboxOnePackagingOverridePath: XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 XboxOnePackageEncryption: 0 XboxOnePackageUpdateGranularity: 2 XboxOneDescription: @@ -707,7 +662,8 @@ PlayerSettings: XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 XboxOneXTitleMemory: 8 - xboxOneScriptCompiler: 0 + xboxOneScriptCompiler: 1 + XboxOneOverrideIdentityName: vrEditorSettings: daydream: daydreamIconForeground: {fileID: 0} @@ -722,11 +678,30 @@ PlayerSettings: Purchasing: 0 UNet: 0 Unity_Ads: 0 + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_SignPackage: 1 + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: facebookSdkVersion: 7.9.1 - apiCompatibilityLevel: 2 + facebookAppId: + facebookCookies: 1 + facebookLogging: 1 + facebookStatus: 1 + facebookXfbml: 0 + facebookFrictionlessRequests: 1 + apiCompatibilityLevel: 6 cloudProjectId: + framebufferDepthMemorylessMode: 0 projectName: organizationId: cloudEnabled: 0 enableNativePlatformBackendsForNewInputSystem: 0 disableOldInputManagerSupport: 0 + legacyClampBlendShapeWeights: 1 diff --git a/Unity/ProjectSettings/ProjectVersion.txt b/Unity/ProjectSettings/ProjectVersion.txt index 0498f4d..7e64146 100644 --- a/Unity/ProjectSettings/ProjectVersion.txt +++ b/Unity/ProjectSettings/ProjectVersion.txt @@ -1 +1,2 @@ -m_EditorVersion: 2018.2.0f2 +m_EditorVersion: 2019.2.0f1 +m_EditorVersionWithRevision: 2019.2.0f1 (20c1667945cf) diff --git a/Unity/ProjectSettings/UnityConnectSettings.asset b/Unity/ProjectSettings/UnityConnectSettings.asset index 1cc5485..c3ae9a0 100644 --- a/Unity/ProjectSettings/UnityConnectSettings.asset +++ b/Unity/ProjectSettings/UnityConnectSettings.asset @@ -3,29 +3,29 @@ --- !u!310 &1 UnityConnectSettings: m_ObjectHideFlags: 0 - m_Enabled: 0 + serializedVersion: 1 + m_Enabled: 1 m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com m_TestInitMode: 0 CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes + m_EventUrl: https://perf-events.cloud.unity3d.com m_Enabled: 0 + m_LogBufferSize: 10 m_CaptureEditorExceptions: 1 UnityPurchasingSettings: m_Enabled: 0 m_TestMode: 0 UnityAnalyticsSettings: m_Enabled: 0 - m_InitializeOnStartup: 1 m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: + m_InitializeOnStartup: 1 UnityAdsSettings: m_Enabled: 0 m_InitializeOnStartup: 1 m_TestMode: 0 - m_EnabledPlatforms: 4294967295 m_IosGameId: m_AndroidGameId: m_GameIds: {} diff --git a/Unity/ProjectSettings/VFXManager.asset b/Unity/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..6e0eaca --- /dev/null +++ b/Unity/ProjectSettings/VFXManager.asset @@ -0,0 +1,11 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 diff --git a/Unity/ProjectSettings/XRSettings.asset b/Unity/ProjectSettings/XRSettings.asset new file mode 100644 index 0000000..482590c --- /dev/null +++ b/Unity/ProjectSettings/XRSettings.asset @@ -0,0 +1,10 @@ +{ + "m_SettingKeys": [ + "VR Device Disabled", + "VR Device User Alert" + ], + "m_SettingValues": [ + "False", + "False" + ] +} \ No newline at end of file From 5785e672b7e39448cbef9abfa425919add6969d0 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Thu, 8 Aug 2019 22:37:56 -0700 Subject: [PATCH 19/41] Use IL2CPP in standalone builds --- Unity/ProjectSettings/ProjectSettings.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/ProjectSettings/ProjectSettings.asset b/Unity/ProjectSettings/ProjectSettings.asset index d724f15..8602e2b 100644 --- a/Unity/ProjectSettings/ProjectSettings.asset +++ b/Unity/ProjectSettings/ProjectSettings.asset @@ -597,7 +597,7 @@ PlayerSettings: iPhone: 0 scriptingBackend: Android: 1 - Standalone: 0 + Standalone: 1 WebGL: 1 iPhone: 1 il2cppCompilerConfiguration: {} From 7f61e75a460358b0cfc1b7f1c931f45204a33697 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Thu, 8 Aug 2019 22:39:19 -0700 Subject: [PATCH 20/41] Omit type parameters in C++ constructor and destructor declarations. --- .../Assets/CppSource/NativeScript/Bindings.h | 270 +++++++++--------- .../NativeScript/Editor/GenerateBindings.cs | 15 - 2 files changed, 135 insertions(+), 150 deletions(-) diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.h b/Unity/Assets/CppSource/NativeScript/Bindings.h index 6835b61..093dc3b 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.h +++ b/Unity/Assets/CppSource/NativeScript/Bindings.h @@ -736,11 +736,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -753,11 +753,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -770,11 +770,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -787,11 +787,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -804,11 +804,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -821,11 +821,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -838,11 +838,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -855,11 +855,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -872,11 +872,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -889,11 +889,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -906,11 +906,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -923,11 +923,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -940,11 +940,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -957,11 +957,11 @@ namespace System { template<> struct IEquatable_1 : virtual System::Object { - IEquatable_1(decltype(nullptr)); - IEquatable_1(Plugin::InternalUse, int32_t handle); - IEquatable_1(const IEquatable_1& other); - IEquatable_1(IEquatable_1&& other); - virtual ~IEquatable_1(); + IEquatable_1(decltype(nullptr)); + IEquatable_1(Plugin::InternalUse, int32_t handle); + IEquatable_1(const IEquatable_1& other); + IEquatable_1(IEquatable_1&& other); + virtual ~IEquatable_1(); IEquatable_1& operator=(const IEquatable_1& other); IEquatable_1& operator=(decltype(nullptr)); IEquatable_1& operator=(IEquatable_1&& other); @@ -974,11 +974,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -991,11 +991,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1008,11 +1008,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1025,11 +1025,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1042,11 +1042,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1059,11 +1059,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1076,11 +1076,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1093,11 +1093,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1110,11 +1110,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1127,11 +1127,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1144,11 +1144,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1161,11 +1161,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); @@ -1178,11 +1178,11 @@ namespace System { template<> struct IComparable_1 : virtual System::Object { - IComparable_1(decltype(nullptr)); - IComparable_1(Plugin::InternalUse, int32_t handle); - IComparable_1(const IComparable_1& other); - IComparable_1(IComparable_1&& other); - virtual ~IComparable_1(); + IComparable_1(decltype(nullptr)); + IComparable_1(Plugin::InternalUse, int32_t handle); + IComparable_1(const IComparable_1& other); + IComparable_1(IComparable_1&& other); + virtual ~IComparable_1(); IComparable_1& operator=(const IComparable_1& other); IComparable_1& operator=(decltype(nullptr)); IComparable_1& operator=(IComparable_1&& other); diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 0855981..b3bdfd5 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -11327,9 +11327,6 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - AppendCppTypeParameters( - typeParams, - output); output.Append("(decltype(nullptr));\n"); // Constructor from handle @@ -11337,9 +11334,6 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - AppendCppTypeParameters( - typeParams, - output); output.Append( "(Plugin::InternalUse, int32_t handle);\n"); @@ -11348,9 +11342,6 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - AppendCppTypeParameters( - typeParams, - output); output.Append("(const "); AppendCppTypeName( typeTypeName, @@ -11365,9 +11356,6 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - AppendCppTypeParameters( - typeParams, - output); output.Append('('); AppendCppTypeName( typeTypeName, @@ -11383,9 +11371,6 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - AppendCppTypeParameters( - typeParams, - output); output.Append("();\n"); // Assignment operator to same type From efcc9491a1d9bf1296b315a2263eb8ddcade56f9 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Thu, 8 Aug 2019 22:40:33 -0700 Subject: [PATCH 21/41] Use Cdecl calling convention for all [DllImport] Add [UnmanagedFunctionPointer] to all binding function delegates with Cdecl calling convention --- Unity/Assets/NativeScript/Bindings.cs | 89 ++++++++++++++++--- .../NativeScript/Editor/GenerateBindings.cs | 4 +- 2 files changed, 80 insertions(+), 13 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index bb6745d..07fbb24 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -327,40 +327,46 @@ enum InitMode : byte // Handle to the C++ DLL static IntPtr libraryHandle; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void InitDelegate( IntPtr memory, int memorySize, InitMode initMode); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void SetCsharpExceptionDelegate(int handle); /*BEGIN CPP DELEGATES*/ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int NewBaseBallScriptDelegateType(int param0); public static NewBaseBallScriptDelegateType NewBaseBallScript; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void DestroyBaseBallScriptDelegateType(int param0); public static DestroyBaseBallScriptDelegateType DestroyBaseBallScript; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void MyGameAbstractBaseBallScriptUpdateDelegateType(int thisHandle); public static MyGameAbstractBaseBallScriptUpdateDelegateType MyGameAbstractBaseBallScriptUpdate; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void SetCsharpExceptionSystemNullReferenceExceptionDelegateType(int param0); public static SetCsharpExceptionSystemNullReferenceExceptionDelegateType SetCsharpExceptionSystemNullReferenceException; /*END CPP DELEGATES*/ #endif #if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX - [DllImport("__Internal")] + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr dlopen( string path, int flag); - [DllImport("__Internal")] + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr dlsym( IntPtr handle, string symbolName); - [DllImport("__Internal")] + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] static extern int dlclose( IntPtr handle); @@ -395,16 +401,16 @@ static T GetDelegate( typeof(T)) as T; } #elif UNITY_EDITOR_WIN - [DllImport("kernel32")] + [DllImport("kernel32", SetLastError=true, CharSet = CharSet.Ansi)] static extern IntPtr LoadLibrary( string path); - [DllImport("kernel32")] + [DllImport("kernel32", CharSet=CharSet.Ansi, ExactSpelling=true, SetLastError=true)] static extern IntPtr GetProcAddress( IntPtr libraryHandle, string symbolName); - [DllImport("kernel32")] + [DllImport("kernel32.dll", SetLastError=true)] static extern bool FreeLibrary( IntPtr libraryHandle); @@ -437,86 +443,145 @@ static T GetDelegate( typeof(T)) as T; } #else - [DllImport(PLUGIN_NAME)] + [DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)] static extern void Init( IntPtr memory, int memorySize, InitMode initMode); - [DllImport(PLUGIN_NAME)] + [DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)] static extern void SetCsharpException(int handle); /*BEGIN IMPORTS*/ - [DllImport(PLUGIN_NAME)] + [DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern int NewBaseBallScript(int thisHandle); - [DllImport(PLUGIN_NAME)] + [DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern void DestroyBaseBallScript(int thisHandle); - [DllImport(PLUGIN_NAME)] + [DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern void MyGameAbstractBaseBallScriptUpdate(int thisHandle); - [DllImport(PLUGIN_NAME)] + [DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle); /*END IMPORTS*/ #endif + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void ReleaseObjectDelegateType(int handle); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int StringNewDelegateType(string chars); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void SetExceptionDelegateType(int handle); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int ArrayGetLengthDelegateType(int handle); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int EnumerableGetEnumeratorDelegateType(int handle); /*BEGIN DELEGATE TYPES*/ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void ReleaseSystemDecimalDelegateType(int handle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int SystemDecimalConstructorSystemDoubleDelegateType(double value); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int SystemDecimalConstructorSystemUInt64DelegateType(ulong value); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxDecimalDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnboxDecimalDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegateType(float x, float y, float z); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3DelegateType(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxVector3DelegateType(ref UnityEngine.Vector3 val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate UnityEngine.Vector3 UnboxVector3DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnityEngineObjectPropertyGetNameDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void UnityEngineObjectPropertySetNameDelegateType(int thisHandle, int valueHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnityEngineComponentPropertyGetTransformDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate UnityEngine.Vector3 UnityEngineTransformPropertyGetPositionDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void UnityEngineTransformPropertySetPositionDelegateType(int thisHandle, ref UnityEngine.Vector3 value); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnityEngineGameObjectMethodAddComponentMyGameBaseBallScriptDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegateType(UnityEngine.PrimitiveType type); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void UnityEngineDebugMethodLogSystemObjectDelegateType(int messageHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnityEngineMonoBehaviourPropertyGetTransformDelegateType(int thisHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int SystemExceptionConstructorSystemStringDelegateType(int messageHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxPrimitiveTypeDelegateType(UnityEngine.PrimitiveType val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate UnityEngine.PrimitiveType UnboxPrimitiveTypeDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate float UnityEngineTimePropertyGetDeltaTimeDelegateType(); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void BaseBallScriptConstructorDelegateType(int cppHandle, ref int handle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate void ReleaseBaseBallScriptDelegateType(int handle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxBooleanDelegateType(bool val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate bool UnboxBooleanDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxSByteDelegateType(sbyte val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate sbyte UnboxSByteDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxByteDelegateType(byte val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate byte UnboxByteDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxInt16DelegateType(short val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate short UnboxInt16DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxUInt16DelegateType(ushort val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate ushort UnboxUInt16DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxInt32DelegateType(int val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int UnboxInt32DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxUInt32DelegateType(uint val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate uint UnboxUInt32DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxInt64DelegateType(long val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate long UnboxInt64DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxUInt64DelegateType(ulong val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate ulong UnboxUInt64DelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxCharDelegateType(char val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate char UnboxCharDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxSingleDelegateType(float val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate float UnboxSingleDelegateType(int valHandle); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate int BoxDoubleDelegateType(double val); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] delegate double UnboxDoubleDelegateType(int valHandle); /*END DELEGATE TYPES*/ diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index b3bdfd5..bc971d4 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -10397,6 +10397,7 @@ static void AppendCsharpDelegate( TypeKind returnTypeKind, StringBuilder output) { + output.Append("\t\t[UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n"); output.Append("\t\tpublic delegate "); if (returnType == typeof(void)) { @@ -10527,7 +10528,7 @@ static void AppendCsharpImport( StringBuilder output ) { - output.Append("\t\t[DllImport(PLUGIN_NAME)]\n"); + output.Append("\t\t[DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)]\n"); output.Append("\t\tpublic static extern "); AppendCsharpTypeFullName(returnType, output); output.Append(' '); @@ -12044,6 +12045,7 @@ static void AppendCsharpDelegateType( ParameterInfo[] parameters, StringBuilder output) { + output.Append("\t\t[UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n"); output.Append("\t\tdelegate "); // Return type From 74d7d4a93c1d63c029fdff3bb522da779a98e402 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 10 Aug 2019 17:49:51 -0700 Subject: [PATCH 22/41] Close the native library when the editor state changes back to edit mode rather than in OnApplicationQuit, which can be called before other MonoBehaviour messages like OnDestroy. --- Unity/Assets/NativeScript/BootScript.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Unity/Assets/NativeScript/BootScript.cs b/Unity/Assets/NativeScript/BootScript.cs index 9296ee7..74c8268 100644 --- a/Unity/Assets/NativeScript/BootScript.cs +++ b/Unity/Assets/NativeScript/BootScript.cs @@ -1,3 +1,5 @@ +using System; +using UnityEditor; using UnityEngine; namespace NativeScript @@ -25,6 +27,7 @@ public class BootScript : MonoBehaviour public float AutoReloadPollTime = 1.0f; private float lastAutoReloadPollTime; private Coroutine autoReloadCoroutine; + private Action onPlayModeStateChange; #endif void Start() @@ -34,6 +37,10 @@ void Start() #endif DontDestroyOnLoad(gameObject); Bindings.Open(MemorySize); +#if UNITY_EDITOR + onPlayModeStateChange = OnEditorStateChanged; + EditorApplication.playModeStateChanged += onPlayModeStateChange; +#endif } #if UNITY_EDITOR @@ -74,11 +81,15 @@ void Update() } } } -#endif - - void OnApplicationQuit() + + private void OnEditorStateChanged(PlayModeStateChange state) { - Bindings.Close(); + if (state == PlayModeStateChange.EnteredEditMode) + { + EditorApplication.playModeStateChanged -= onPlayModeStateChange; + Bindings.Close(); + } } +#endif } } \ No newline at end of file From b508933669b0c6de493996bce9d52470ba5b699c Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Fri, 23 Aug 2019 18:54:33 -0700 Subject: [PATCH 23/41] Fix issue #29 by returning primitive types in binding functions rather than struct types (e.g. int32_t instead of System::Int32). --- .../CppSource/NativeScript/Bindings.cpp | 44 +++++++++---------- .../NativeScript/Editor/GenerateBindings.cs | 4 ++ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.cpp b/Unity/Assets/CppSource/NativeScript/Bindings.cpp index b8246ad..cd62a88 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.cpp +++ b/Unity/Assets/CppSource/NativeScript/Bindings.cpp @@ -64,33 +64,33 @@ namespace Plugin int32_t (*SystemExceptionConstructorSystemString)(int32_t messageHandle); int32_t (*BoxPrimitiveType)(UnityEngine::PrimitiveType val); UnityEngine::PrimitiveType (*UnboxPrimitiveType)(int32_t valHandle); - System::Single (*UnityEngineTimePropertyGetDeltaTime)(); + float (*UnityEngineTimePropertyGetDeltaTime)(); void (*ReleaseBaseBallScript)(int32_t handle); void (*BaseBallScriptConstructor)(int32_t cppHandle, int32_t* handle); int32_t (*BoxBoolean)(uint32_t val); int32_t (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); - System::SByte (*UnboxSByte)(int32_t valHandle); + int8_t (*UnboxSByte)(int32_t valHandle); int32_t (*BoxByte)(uint8_t val); - System::Byte (*UnboxByte)(int32_t valHandle); + uint8_t (*UnboxByte)(int32_t valHandle); int32_t (*BoxInt16)(int16_t val); - System::Int16 (*UnboxInt16)(int32_t valHandle); + int16_t (*UnboxInt16)(int32_t valHandle); int32_t (*BoxUInt16)(uint16_t val); - System::UInt16 (*UnboxUInt16)(int32_t valHandle); + uint16_t (*UnboxUInt16)(int32_t valHandle); int32_t (*BoxInt32)(int32_t val); - System::Int32 (*UnboxInt32)(int32_t valHandle); + int32_t (*UnboxInt32)(int32_t valHandle); int32_t (*BoxUInt32)(uint32_t val); - System::UInt32 (*UnboxUInt32)(int32_t valHandle); + uint32_t (*UnboxUInt32)(int32_t valHandle); int32_t (*BoxInt64)(int64_t val); - System::Int64 (*UnboxInt64)(int32_t valHandle); + int64_t (*UnboxInt64)(int32_t valHandle); int32_t (*BoxUInt64)(uint64_t val); - System::UInt64 (*UnboxUInt64)(int32_t valHandle); + uint64_t (*UnboxUInt64)(int32_t valHandle); int32_t (*BoxChar)(uint16_t val); int16_t (*UnboxChar)(int32_t valHandle); int32_t (*BoxSingle)(float val); - System::Single (*UnboxSingle)(int32_t valHandle); + float (*UnboxSingle)(int32_t valHandle); int32_t (*BoxDouble)(double val); - System::Double (*UnboxDouble)(int32_t valHandle); + double (*UnboxDouble)(int32_t valHandle); /*END FUNCTION POINTERS*/ } @@ -6209,7 +6209,7 @@ DLLEXPORT void Init( curMemory += sizeof(Plugin::BoxPrimitiveType); Plugin::UnboxPrimitiveType = *(UnityEngine::PrimitiveType (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxPrimitiveType); - Plugin::UnityEngineTimePropertyGetDeltaTime = *(System::Single (**)())curMemory; + Plugin::UnityEngineTimePropertyGetDeltaTime = *(float (**)())curMemory; curMemory += sizeof(Plugin::UnityEngineTimePropertyGetDeltaTime); Plugin::ReleaseBaseBallScript = *(void (**)(int32_t handle))curMemory; curMemory += sizeof(Plugin::ReleaseBaseBallScript); @@ -6221,35 +6221,35 @@ DLLEXPORT void Init( curMemory += sizeof(Plugin::UnboxBoolean); Plugin::BoxSByte = *(int32_t (**)(int8_t val))curMemory; curMemory += sizeof(Plugin::BoxSByte); - Plugin::UnboxSByte = *(System::SByte (**)(int32_t valHandle))curMemory; + Plugin::UnboxSByte = *(int8_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxSByte); Plugin::BoxByte = *(int32_t (**)(uint8_t val))curMemory; curMemory += sizeof(Plugin::BoxByte); - Plugin::UnboxByte = *(System::Byte (**)(int32_t valHandle))curMemory; + Plugin::UnboxByte = *(uint8_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxByte); Plugin::BoxInt16 = *(int32_t (**)(int16_t val))curMemory; curMemory += sizeof(Plugin::BoxInt16); - Plugin::UnboxInt16 = *(System::Int16 (**)(int32_t valHandle))curMemory; + Plugin::UnboxInt16 = *(int16_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxInt16); Plugin::BoxUInt16 = *(int32_t (**)(uint16_t val))curMemory; curMemory += sizeof(Plugin::BoxUInt16); - Plugin::UnboxUInt16 = *(System::UInt16 (**)(int32_t valHandle))curMemory; + Plugin::UnboxUInt16 = *(uint16_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxUInt16); Plugin::BoxInt32 = *(int32_t (**)(int32_t val))curMemory; curMemory += sizeof(Plugin::BoxInt32); - Plugin::UnboxInt32 = *(System::Int32 (**)(int32_t valHandle))curMemory; + Plugin::UnboxInt32 = *(int32_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxInt32); Plugin::BoxUInt32 = *(int32_t (**)(uint32_t val))curMemory; curMemory += sizeof(Plugin::BoxUInt32); - Plugin::UnboxUInt32 = *(System::UInt32 (**)(int32_t valHandle))curMemory; + Plugin::UnboxUInt32 = *(uint32_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxUInt32); Plugin::BoxInt64 = *(int32_t (**)(int64_t val))curMemory; curMemory += sizeof(Plugin::BoxInt64); - Plugin::UnboxInt64 = *(System::Int64 (**)(int32_t valHandle))curMemory; + Plugin::UnboxInt64 = *(int64_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxInt64); Plugin::BoxUInt64 = *(int32_t (**)(uint64_t val))curMemory; curMemory += sizeof(Plugin::BoxUInt64); - Plugin::UnboxUInt64 = *(System::UInt64 (**)(int32_t valHandle))curMemory; + Plugin::UnboxUInt64 = *(uint64_t (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxUInt64); Plugin::BoxChar = *(int32_t (**)(uint16_t val))curMemory; curMemory += sizeof(Plugin::BoxChar); @@ -6257,11 +6257,11 @@ DLLEXPORT void Init( curMemory += sizeof(Plugin::UnboxChar); Plugin::BoxSingle = *(int32_t (**)(float val))curMemory; curMemory += sizeof(Plugin::BoxSingle); - Plugin::UnboxSingle = *(System::Single (**)(int32_t valHandle))curMemory; + Plugin::UnboxSingle = *(float (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxSingle); Plugin::BoxDouble = *(int32_t (**)(double val))curMemory; curMemory += sizeof(Plugin::BoxDouble); - Plugin::UnboxDouble = *(System::Double (**)(int32_t valHandle))curMemory; + Plugin::UnboxDouble = *(double (**)(int32_t valHandle))curMemory; curMemory += sizeof(Plugin::UnboxDouble); /*END INIT BODY PARAMETER READS*/ diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index bc971d4..7e56758 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -12918,6 +12918,10 @@ static void AppendCppFunctionPointer( // C linkage requires us to use primitive types output.Append("int16_t"); } + else if (returnType.IsPrimitive) + { + AppendCppPrimitiveTypeName(returnType, output); + } else if (IsFullValueType(returnType)) { AppendCppTypeFullName(returnType, output); From 2a28a2466ed7da1e5857959110d77eee89249a7b Mon Sep 17 00:00:00 2001 From: = Date: Mon, 13 Jan 2020 22:01:55 -0600 Subject: [PATCH 24/41] [#51] Fix performance issue with Object Store When BaseMaxSimultaneous was set to a large number the object-store was spending to much time finding the handle. This was fixed using a dictionary where the keys have the objects full hash. --- Unity/Assets/NativeScript/Bindings.cs | 85 +++++++-------------------- 1 file changed, 20 insertions(+), 65 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 07fbb24..4e694ee 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -4,6 +4,7 @@ using System.Collections; using System.IO; using System.Runtime.InteropServices; +using System.Collections.Generic; using UnityEngine; @@ -24,19 +25,13 @@ public static class Bindings // Holds objects and provides handles to them in the form of ints public static class ObjectStore { + static Dictionary handleLookupByHash; + static Dictionary hashLookupByHandle; + static Stack freeHandleStack; + // Stored objects. The first is never used so 0 can be "null". static object[] objects; - // Stack of available handles - static int[] handles; - - // Hash table of stored objects to their handles. - static object[] keys; - static int[] values; - - // Index of the next available handle - static int nextHandleIndex; - // The maximum number of objects to store. Must be positive. static int maxObjects; @@ -49,19 +44,13 @@ public static void Init(int maxObjects) objects = new object[maxObjects + 1]; // Initialize the handles stack as 1, 2, 3, ... - handles = new int[maxObjects]; for ( int i = 0, handle = maxObjects; i < maxObjects; ++i, --handle) { - handles[i] = handle; + freeHandleStack.Push(handle); } - nextHandleIndex = maxObjects - 1; - - // Initialize the hash table - keys = new object[maxObjects]; - values = new int[maxObjects]; } public static int Store(object obj) @@ -75,27 +64,15 @@ public static int Store(object obj) lock (objects) { // Pop a handle off the stack - int handle = handles[nextHandleIndex]; - nextHandleIndex--; + int handle = freeHandleStack.Pop(); // Store the object objects[handle] = obj; // Insert into the hash table - int initialIndex = (int)( - ((uint)obj.GetHashCode()) % maxObjects); - int index = initialIndex; - do - { - if (object.ReferenceEquals(keys[index], null)) - { - keys[index] = obj; - values[index] = handle; - break; - } - index = (index + 1) % maxObjects; - } - while (index != initialIndex); + uint hash = (uint)obj.GetHashCode(); + handleLookupByHash.Add(hash, handle); + hashLookupByHandle.Add(handle, hash); return handle; } @@ -108,6 +85,7 @@ public static object Get(int handle) public static int GetHandle(object obj) { + // Null is always zero if (object.ReferenceEquals(obj, null)) { @@ -116,19 +94,12 @@ public static int GetHandle(object obj) lock (objects) { - // Look up the object in the hash table - int initialIndex = (int)( - ((uint)obj.GetHashCode()) % maxObjects); - int index = initialIndex; - do + // Look up the handle in the hash table + uint hash = (uint)obj.GetHashCode(); + if (handleLookupByHash.ContainsKey(hash)) { - if (object.ReferenceEquals(keys[index], obj)) - { - return values[index]; - } - index = (index + 1) % maxObjects; + return handleLookupByHash[hash]; } - while (index != initialIndex); } // Object not found @@ -150,28 +121,12 @@ public static object Remove(int handle) objects[handle] = null; // Push the handle onto the stack - nextHandleIndex++; - handles[nextHandleIndex] = handle; + freeHandleStack.Push(handle); - // Remove the object from the hash table - int initialIndex = (int)( - ((uint)obj.GetHashCode()) % maxObjects); - int index = initialIndex; - do - { - if (object.ReferenceEquals(keys[index], obj)) - { - // Only the key needs to be removed (set to null) - // because values corresponding to null will never - // be read and the values are just integers, so - // we're not holding on to a managed reference that - // will prevent GC. - keys[index] = null; - break; - } - index = (index + 1) % maxObjects; - } - while (index != initialIndex); + // Remove the object from the hash dictionary's + var hash = hashLookupByHandle[handle]; + handleLookupByHash.Remove(hash); + hashLookupByHandle.Remove(handle); return obj; } From 42116abf8aac16be2df63c20f56aa0fb19a11b02 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 14 Jan 2020 00:50:14 -0600 Subject: [PATCH 25/41] [#51] add cache construction in the init method --- Unity/Assets/NativeScript/Bindings.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 4e694ee..8ea312b 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -38,6 +38,9 @@ public static class ObjectStore public static void Init(int maxObjects) { ObjectStore.maxObjects = maxObjects; + handleLookupByHash = new Dictionary (); + hashLookupByHandle = new Dictionary (); + freeHandleStack = new Stack (); // Initialize the objects as all null plus room for the // first to always be null. From afd3c8e2bdc992c4639eb42a475bf70aa95a6724 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 14 Jan 2020 23:48:48 -0600 Subject: [PATCH 26/41] [#51] Add collision handling for object store --- Unity/Assets/NativeScript/Bindings.cs | 73 ++++++++++++++++++++------- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 8ea312b..3310650 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -25,9 +25,10 @@ public static class Bindings // Holds objects and provides handles to them in the form of ints public static class ObjectStore { - static Dictionary handleLookupByHash; + static Dictionary> handleBucketByHash; static Dictionary hashLookupByHandle; - static Stack freeHandleStack; + static HashSet hash; + static Stack handles; // Stored objects. The first is never used so 0 can be "null". static object[] objects; @@ -38,9 +39,9 @@ public static class ObjectStore public static void Init(int maxObjects) { ObjectStore.maxObjects = maxObjects; - handleLookupByHash = new Dictionary (); + handleBucketByHash = new Dictionary> (); hashLookupByHandle = new Dictionary (); - freeHandleStack = new Stack (); + handles = new Stack (); // Initialize the objects as all null plus room for the // first to always be null. @@ -52,7 +53,7 @@ public static void Init(int maxObjects) i < maxObjects; ++i, --handle) { - freeHandleStack.Push(handle); + handles.Push(handle); } } @@ -66,16 +67,28 @@ public static int Store(object obj) lock (objects) { + // Get the hash of the object + uint hash = (uint)obj.GetHashCode(); + // Pop a handle off the stack - int handle = freeHandleStack.Pop(); + int handle = handles.Pop(); // Store the object objects[handle] = obj; - - // Insert into the hash table - uint hash = (uint)obj.GetHashCode(); - handleLookupByHash.Add(hash, handle); - hashLookupByHandle.Add(handle, hash); + + List handleBucket = null; + + // Create new handle bucket if it does not exist + if (!handleBucketByHash.TryGetValue(hash, out handleBucket)) + { + handleBucket = new List (); + handleBucketByHash[hash] = handleBucket; + } + + // Insert into hash table + handleBucket.Add(handle); + + hashLookupByHandle[handle] = hash; return handle; } @@ -88,7 +101,6 @@ public static object Get(int handle) public static int GetHandle(object obj) { - // Null is always zero if (object.ReferenceEquals(obj, null)) { @@ -99,9 +111,20 @@ public static int GetHandle(object obj) { // Look up the handle in the hash table uint hash = (uint)obj.GetHashCode(); - if (handleLookupByHash.ContainsKey(hash)) + List handleBucket = null; + + if (handleBucketByHash.TryGetValue(hash, out handleBucket)) { - return handleLookupByHash[hash]; + for (int i = 0; i < handleBucket.Count; i++) + { + int handleInBucket = handleBucket[i]; + object objectInBucket = objects[handleInBucket]; + + if (object.ReferenceEquals(objectInBucket, obj)) + { + return handleInBucket; + } + } } } @@ -124,12 +147,24 @@ public static object Remove(int handle) objects[handle] = null; // Push the handle onto the stack - freeHandleStack.Push(handle); - + handles.Push(handle); + + uint hash = hashLookupByHandle[handle]; + List handleBucket = null; + // Remove the object from the hash dictionary's - var hash = hashLookupByHandle[handle]; - handleLookupByHash.Remove(hash); - hashLookupByHandle.Remove(handle); + if (handleBucketByHash.TryGetValue(hash, out handleBucket)) + { + for (int i = 0; i < handleBucket.Count; i++) + { + int handleInBucket = handleBucket[i]; + if (handleInBucket == handle) + { + handleBucket.RemoveAt(i); + break; + } + } + } return obj; } From 3b519ac840c0a8eed9ca6acbc307d4cadb63ad08 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 15 Jan 2020 19:32:32 -0600 Subject: [PATCH 27/41] [#51] change object-store to use a dictionary to cache objects Dictionary will take care of hashing/collisions for us. --- Unity/Assets/NativeScript/Bindings.cs | 67 ++++++--------------------- 1 file changed, 14 insertions(+), 53 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 3310650..3f83a8e 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -25,9 +25,10 @@ public static class Bindings // Holds objects and provides handles to them in the form of ints public static class ObjectStore { - static Dictionary> handleBucketByHash; - static Dictionary hashLookupByHandle; - static HashSet hash; + // Lookup handles by object. + static Dictionary objectHandleCache; + + // Stack of available handles. static Stack handles; // Stored objects. The first is never used so 0 can be "null". @@ -39,9 +40,8 @@ public static class ObjectStore public static void Init(int maxObjects) { ObjectStore.maxObjects = maxObjects; - handleBucketByHash = new Dictionary> (); - hashLookupByHandle = new Dictionary (); - handles = new Stack (); + objectHandleCache = new Dictionary (maxObjects); + handles = new Stack (maxObjects); // Initialize the objects as all null plus room for the // first to always be null. @@ -67,28 +67,12 @@ public static int Store(object obj) lock (objects) { - // Get the hash of the object - uint hash = (uint)obj.GetHashCode(); - // Pop a handle off the stack int handle = handles.Pop(); // Store the object objects[handle] = obj; - - List handleBucket = null; - - // Create new handle bucket if it does not exist - if (!handleBucketByHash.TryGetValue(hash, out handleBucket)) - { - handleBucket = new List (); - handleBucketByHash[hash] = handleBucket; - } - - // Insert into hash table - handleBucket.Add(handle); - - hashLookupByHandle[handle] = hash; + objectHandleCache.Add(obj, handle); return handle; } @@ -109,22 +93,13 @@ public static int GetHandle(object obj) lock (objects) { - // Look up the handle in the hash table - uint hash = (uint)obj.GetHashCode(); - List handleBucket = null; + // A handle with a value of 0 is NULL + int handle = 0; - if (handleBucketByHash.TryGetValue(hash, out handleBucket)) + // Get handle from object cache + if (objectHandleCache.TryGetValue(obj, out handle)) { - for (int i = 0; i < handleBucket.Count; i++) - { - int handleInBucket = handleBucket[i]; - object objectInBucket = objects[handleInBucket]; - - if (object.ReferenceEquals(objectInBucket, obj)) - { - return handleInBucket; - } - } + return handle; } } @@ -149,22 +124,8 @@ public static object Remove(int handle) // Push the handle onto the stack handles.Push(handle); - uint hash = hashLookupByHandle[handle]; - List handleBucket = null; - - // Remove the object from the hash dictionary's - if (handleBucketByHash.TryGetValue(hash, out handleBucket)) - { - for (int i = 0; i < handleBucket.Count; i++) - { - int handleInBucket = handleBucket[i]; - if (handleInBucket == handle) - { - handleBucket.RemoveAt(i); - break; - } - } - } + // Remove the object from the cache + objectHandleCache.Remove(obj); return obj; } From bfaf5ee167308ce330c6a72b7a3614f31666a7b6 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 18 Jan 2020 16:05:23 -0600 Subject: [PATCH 28/41] [#51] fix formatting and remove unnecessary variable initialization --- Unity/Assets/NativeScript/Bindings.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 3f83a8e..72a594a 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -40,7 +40,7 @@ public static class ObjectStore public static void Init(int maxObjects) { ObjectStore.maxObjects = maxObjects; - objectHandleCache = new Dictionary (maxObjects); + objectHandleCache = new Dictionary(maxObjects); handles = new Stack (maxObjects); // Initialize the objects as all null plus room for the @@ -93,8 +93,7 @@ public static int GetHandle(object obj) lock (objects) { - // A handle with a value of 0 is NULL - int handle = 0; + int handle; // Get handle from object cache if (objectHandleCache.TryGetValue(obj, out handle)) From 0a6bdb00f5d6cd5d42c9fcfbce758bc5fcdcab6d Mon Sep 17 00:00:00 2001 From: = Date: Sat, 18 Jan 2020 16:26:34 -0600 Subject: [PATCH 29/41] [#51] Revert ObjectStore handles code to original implementation --- Unity/Assets/NativeScript/Bindings.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 72a594a..04aef29 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -28,11 +28,14 @@ public static class ObjectStore // Lookup handles by object. static Dictionary objectHandleCache; - // Stack of available handles. - static Stack handles; - // Stored objects. The first is never used so 0 can be "null". static object[] objects; + + // Stack of available handles. + static int[] handles; + + // Index of the next available handle + static int nextHandleIndex; // The maximum number of objects to store. Must be positive. static int maxObjects; @@ -41,20 +44,21 @@ public static void Init(int maxObjects) { ObjectStore.maxObjects = maxObjects; objectHandleCache = new Dictionary(maxObjects); - handles = new Stack (maxObjects); // Initialize the objects as all null plus room for the // first to always be null. objects = new object[maxObjects + 1]; // Initialize the handles stack as 1, 2, 3, ... + handles = new int[maxObjects]; for ( int i = 0, handle = maxObjects; i < maxObjects; ++i, --handle) { - handles.Push(handle); + handles[i] = handle; } + nextHandleIndex = maxObjects - 1; } public static int Store(object obj) @@ -68,7 +72,8 @@ public static int Store(object obj) lock (objects) { // Pop a handle off the stack - int handle = handles.Pop(); + int handle = handles[nextHandleIndex]; + nextHandleIndex--; // Store the object objects[handle] = obj; @@ -121,7 +126,8 @@ public static object Remove(int handle) objects[handle] = null; // Push the handle onto the stack - handles.Push(handle); + nextHandleIndex++; + handles[nextHandleIndex] = handle; // Remove the object from the cache objectHandleCache.Remove(obj); From 1c0b627801613a5ffc9c34d653ce5e9c43bfe802 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 18 Jan 2020 16:28:55 -0600 Subject: [PATCH 30/41] [#51] fix minor formatting error --- Unity/Assets/NativeScript/Bindings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 04aef29..72ac143 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -36,7 +36,7 @@ public static class ObjectStore // Index of the next available handle static int nextHandleIndex; - + // The maximum number of objects to store. Must be positive. static int maxObjects; From 5f0e56f7c48bdcc71f419740c22a744f0b4b7383 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 25 Jan 2020 15:43:44 -0800 Subject: [PATCH 31/41] Fix opening the native library on Linux --- Unity/Assets/NativeScript/Bindings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 72ac143..3ae570d 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -332,7 +332,7 @@ static extern int dlclose( static IntPtr OpenLibrary( string path) { - IntPtr handle = dlopen(path, 0); + IntPtr handle = dlopen(path, 1); // 1 = lazy, 2 = now if (handle == IntPtr.Zero) { throw new Exception("Couldn't open native library: " + path); From 65e70add52952098c5496ce91c4ef85b00c3895d Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Tue, 11 Aug 2020 20:31:02 -0700 Subject: [PATCH 32/41] Fix generating wrong C++ type name for multi-dimensional arrays --- .../Assets/NativeScript/Editor/GenerateBindings.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 7e56758..c36c2e6 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -13267,16 +13267,9 @@ static void AppendCppTypeFullName( output.Append(rank); output.Append('<'); Type elementType = type.GetElementType(); - for (int i = 0; i < rank; ++i) - { - AppendCppTypeFullName( - elementType, - output); - if (i != rank -1) - { - output.Append(", "); - } - } + AppendCppTypeFullName( + elementType, + output); output.Append('>'); } else if (IsDelegate(type)) From 0bac628fcd93c3274bbde8f42577f554191bb578 Mon Sep 17 00:00:00 2001 From: Yevhenii Vitiuk Date: Thu, 10 Dec 2020 09:55:24 +0200 Subject: [PATCH 33/41] Removed prefix "lib" after build C++ library --- Unity/Assets/CppSource/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity/Assets/CppSource/CMakeLists.txt b/Unity/Assets/CppSource/CMakeLists.txt index 306ae25..d668cf5 100644 --- a/Unity/Assets/CppSource/CMakeLists.txt +++ b/Unity/Assets/CppSource/CMakeLists.txt @@ -33,7 +33,6 @@ if (ANDROID_NDK) set(ANDROID_ABI armeabi-v7a) set(CMAKE_TOOLCHAIN_FILE ${ANDROID_NDK}/build/cmake/android.toolchain.cmake) endif() - # Set output path if (ANDROID_NDK) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Plugins/Android) @@ -79,5 +78,6 @@ if (IOS) set_xcode_property(${PROJECT_NAME} ENABLE_BITCODE "NO") endif() +set_property(TARGET ${PROJECT_NAME} PROPERTY PREFIX "") # Enable C++11 set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) \ No newline at end of file From 79c7c70b765e1286490cf0bdc1769deee1211498 Mon Sep 17 00:00:00 2001 From: Yevhenii Vitiuk Date: Thu, 10 Dec 2020 10:36:58 +0200 Subject: [PATCH 34/41] Fixed index of tags with Environment.NewLine "\r\n" --- .../NativeScript/Editor/GenerateBindings.cs | 115 ++++++++++-------- 1 file changed, 64 insertions(+), 51 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index c36c2e6..809d780 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -684,7 +684,12 @@ static Assembly[] GetAssemblies(string[] assemblyNames) assemblies[7] = typeof(UnityEngine.Accessibility.VisionUtility).Assembly; // Unity accessibility module assemblies[8] = typeof(UnityEngine.AI.NavMesh).Assembly; // Unity AI module assemblies[9] = typeof(UnityEngine.Animations.AnimationClipPlayable).Assembly; // Unity animation module +#if !UNITY_2020_1_OR_NEWER //This class migrate to package assemblies[10] = typeof(UnityEngine.XR.ARRenderMode).Assembly; // Unity AR module +#else + assemblies[10] = typeof(UnityEngine.XR.InputDevices).Assembly; // Unity AR module without package +#endif + assemblies[11] = typeof(AudioSettings).Assembly; // Unity audio module assemblies[12] = typeof(Cloth).Assembly; // Unity cloth module assemblies[13] = typeof(ClusterInput).Assembly; // Unity cluster input module @@ -710,13 +715,21 @@ static Assembly[] GetAssemblies(string[] assemblyNames) assemblies[30] = typeof(UnityEngine.Experimental.UIElements.Button).Assembly; // Unity UI elements module #endif assemblies[31] = typeof(Canvas).Assembly; // Unity UI module - assemblies[32] = typeof(UnityEngine.Networking.NetworkTransport).Assembly; // Unity cloth module +#if UNITY_2020_1_OR_NEWER + assemblies[32] = typeof(UnityEngine.Networking.Utility).Assembly; // Unity network module +#else + assemblies[32] = typeof(UnityEngine.Networking.NetworkTransport).Assembly; // Unity network module +#endif assemblies[33] = typeof(UnityEngine.Analytics.Analytics).Assembly; // Unity analytics module assemblies[34] = typeof(RemoteSettings).Assembly; // Unity Unity connect module assemblies[35] = typeof(UnityEngine.Networking.DownloadHandlerAudioClip).Assembly; // Unity web request audio module assemblies[36] = typeof(WWWForm).Assembly; // Unity web request module assemblies[37] = typeof(UnityEngine.Networking.DownloadHandlerTexture).Assembly; // Unity web request texture module +#if !UNITY_2020_1_OR_NEWER assemblies[38] = typeof(WWW).Assembly; // Unity web request WWW module +#else + assemblies[38] = typeof(UnityEngine.Networking.UnityWebRequest).Assembly; +#endif assemblies[39] = typeof(WheelCollider).Assembly; // Unity vehicles module assemblies[40] = typeof(UnityEngine.Video.VideoClip).Assembly; // Unity video module assemblies[41] = typeof(UnityEngine.XR.InputTracking).Assembly; // Unity VR module @@ -13445,123 +13458,123 @@ static void InjectBuilders( string cppSourceContents = File.ReadAllText(CppSourcePath); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DELEGATE TYPES*/\n", - "\n\t\t/*END DELEGATE TYPES*/", + "/*BEGIN DELEGATE TYPES*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END DELEGATE TYPES*/", builders.CsharpDelegateTypes.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN STORE INIT CALLS*/\n", - "\n\t\t\t/*END STORE INIT CALLS*/", + "/*BEGIN STORE INIT CALLS*/"+Environment.NewLine, + Environment.NewLine+"\t\t\t/*END STORE INIT CALLS*/", builders.CsharpStoreInitCalls.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN INIT CALL*/\n", - "\n\t\t\t/*END INIT CALL*/", + "/*BEGIN INIT CALL*/"+Environment.NewLine, + Environment.NewLine+"\t\t\t/*END INIT CALL*/", builders.CsharpInitCall.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN BASE TYPES*/\n", - "\n/*END BASE TYPES*/", + "/*BEGIN BASE TYPES*/"+Environment.NewLine, + Environment.NewLine+"/*END BASE TYPES*/", builders.CsharpBaseTypes.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN FUNCTIONS*/\n", - "\n\t\t/*END FUNCTIONS*/", + "/*BEGIN FUNCTIONS*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END FUNCTIONS*/", builders.CsharpFunctions.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN CPP DELEGATES*/\n", - "\n\t\t/*END CPP DELEGATES*/", + "/*BEGIN CPP DELEGATES*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END CPP DELEGATES*/", builders.CsharpCppDelegates.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN CSHARP DELEGATES*/\n", - "\n\t\t/*END CSHARP DELEGATES*/", + "/*BEGIN CSHARP DELEGATES*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END CSHARP DELEGATES*/", builders.CsharpCsharpDelegates.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN IMPORTS*/\n", - "\n\t\t/*END IMPORTS*/", + "/*BEGIN IMPORTS*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END IMPORTS*/", builders.CsharpImports.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN GETDELEGATE CALLS*/\n", - "\n\t\t\t/*END GETDELEGATE CALLS*/", + "/*BEGIN GETDELEGATE CALLS*/"+Environment.NewLine, + Environment.NewLine+"\t\t\t/*END GETDELEGATE CALLS*/", builders.CsharpGetDelegateCalls.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DESTROY FUNCTION ENUMERATORS*/\n", - "\n\t\t\t/*END DESTROY FUNCTION ENUMERATORS*/", + "/*BEGIN DESTROY FUNCTION ENUMERATORS*/"+Environment.NewLine, + Environment.NewLine+"\t\t\t/*END DESTROY FUNCTION ENUMERATORS*/", builders.CsharpDestroyFunctionEnumerators.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DESTROY QUEUE CASES*/\n", - "\n\t\t\t\t\t\t/*END DESTROY QUEUE CASES*/", + "/*BEGIN DESTROY QUEUE CASES*/"+Environment.NewLine, + Environment.NewLine+"\t\t\t\t\t\t/*END DESTROY QUEUE CASES*/", builders.CsharpDestroyQueueCases.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN FUNCTION POINTERS*/\n", - "\n\t/*END FUNCTION POINTERS*/", + "/*BEGIN FUNCTION POINTERS*/"+Environment.NewLine, + Environment.NewLine+"\t/*END FUNCTION POINTERS*/", builders.CppFunctionPointers.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TYPE DECLARATIONS*/\n", - "\n/*END TYPE DECLARATIONS*/", + "/*BEGIN TYPE DECLARATIONS*/"+Environment.NewLine, + Environment.NewLine+"/*END TYPE DECLARATIONS*/", builders.CppTypeDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TEMPLATE DECLARATIONS*/\n", - "\n/*END TEMPLATE DECLARATIONS*/", + "/*BEGIN TEMPLATE DECLARATIONS*/"+Environment.NewLine, + Environment.NewLine+"/*END TEMPLATE DECLARATIONS*/", builders.CppTemplateDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/\n", - "\n/*END TEMPLATE SPECIALIZATION DECLARATIONS*/", + "/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/"+Environment.NewLine, + Environment.NewLine+"/*END TEMPLATE SPECIALIZATION DECLARATIONS*/", builders.CppTemplateSpecializationDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TYPE DEFINITIONS*/\n", - "\n/*END TYPE DEFINITIONS*/", + "/*BEGIN TYPE DEFINITIONS*/"+Environment.NewLine, + Environment.NewLine+"/*END TYPE DEFINITIONS*/", builders.CppTypeDefinitions.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN METHOD DEFINITIONS*/\n", - "\n/*END METHOD DEFINITIONS*/", + "/*BEGIN METHOD DEFINITIONS*/"+Environment.NewLine, + Environment.NewLine+"/*END METHOD DEFINITIONS*/", builders.CppMethodDefinitions.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY PARAMETER READS*/\n", - "\n\t/*END INIT BODY PARAMETER READS*/", + "/*BEGIN INIT BODY PARAMETER READS*/"+Environment.NewLine, + Environment.NewLine+"\t/*END INIT BODY PARAMETER READS*/", builders.CppInitBodyParameterReads.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY ARRAYS*/\n", - "\n\t/*END INIT BODY ARRAYS*/", + "/*BEGIN INIT BODY ARRAYS*/"+Environment.NewLine, + Environment.NewLine+"\t/*END INIT BODY ARRAYS*/", builders.CppInitBodyArrays.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY FIRST BOOT*/\n", - "\n\t\t/*END INIT BODY FIRST BOOT*/", + "/*BEGIN INIT BODY FIRST BOOT*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END INIT BODY FIRST BOOT*/", builders.CppInitBodyFirstBoot.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN GLOBAL STATE AND FUNCTIONS*/\n", - "\n\t/*END GLOBAL STATE AND FUNCTIONS*/", + "/*BEGIN GLOBAL STATE AND FUNCTIONS*/"+Environment.NewLine, + Environment.NewLine+"\t/*END GLOBAL STATE AND FUNCTIONS*/", builders.CppGlobalStateAndFunctions.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN UNBOXING METHOD DECLARATIONS*/\n", - "\n\t\t/*END UNBOXING METHOD DECLARATIONS*/", + "/*BEGIN UNBOXING METHOD DECLARATIONS*/"+Environment.NewLine, + Environment.NewLine+"\t\t/*END UNBOXING METHOD DECLARATIONS*/", builders.CppUnboxingMethodDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN STRING DEFAULT PARAMETERS*/\n", - "\n\t/*END STRING DEFAULT PARAMETERS*/", + "/*BEGIN STRING DEFAULT PARAMETERS*/"+Environment.NewLine, + Environment.NewLine+"\t/*END STRING DEFAULT PARAMETERS*/", builders.CppStringDefaultParams.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN MACROS*/\n", - "\n/*END MACROS*/", + "/*BEGIN MACROS*/"+Environment.NewLine, + Environment.NewLine+"/*END MACROS*/", builders.CppMacros.ToString()); File.WriteAllText(CsharpPath, csharpContents); @@ -13577,13 +13590,13 @@ static string InjectIntoString( { for (int startIndex = 0; ; ) { - int beginIndex = contents.IndexOf(beginMarker, startIndex); + int beginIndex = contents.IndexOf(beginMarker, startIndex, StringComparison.OrdinalIgnoreCase); if (beginIndex < 0) { return contents; } int afterBeginIndex = beginIndex + beginMarker.Length; - int endIndex = contents.IndexOf(endMarker, afterBeginIndex); + int endIndex = contents.IndexOf(endMarker, afterBeginIndex, StringComparison.OrdinalIgnoreCase); if (endIndex < 0) { throw new Exception( From 7573b1a9d7dcf9916d15a0c25272c76c389b050d Mon Sep 17 00:00:00 2001 From: Yevhenii Vitiuk Date: Fri, 11 Dec 2020 12:32:27 +0200 Subject: [PATCH 35/41] Fix cmake lib prefix for mingw on win32 platform --- Unity/Assets/CppSource/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Unity/Assets/CppSource/CMakeLists.txt b/Unity/Assets/CppSource/CMakeLists.txt index d668cf5..2baa025 100644 --- a/Unity/Assets/CppSource/CMakeLists.txt +++ b/Unity/Assets/CppSource/CMakeLists.txt @@ -33,6 +33,7 @@ if (ANDROID_NDK) set(ANDROID_ABI armeabi-v7a) set(CMAKE_TOOLCHAIN_FILE ${ANDROID_NDK}/build/cmake/android.toolchain.cmake) endif() + # Set output path if (ANDROID_NDK) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Plugins/Android) @@ -78,6 +79,9 @@ if (IOS) set_xcode_property(${PROJECT_NAME} ENABLE_BITCODE "NO") endif() -set_property(TARGET ${PROJECT_NAME} PROPERTY PREFIX "") +if(WIN32 AND MINGW) + set_property(TARGET ${PROJECT_NAME} PROPERTY PREFIX "") +endif() + # Enable C++11 set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) \ No newline at end of file From faa5558ac836543c37f116e5ec636dcaf924a803 Mon Sep 17 00:00:00 2001 From: Yevhenii Vitiuk Date: Fri, 11 Dec 2020 12:36:03 +0200 Subject: [PATCH 36/41] Replace all "\n" symbol by Environment.NewLine --- .../NativeScript/Editor/GenerateBindings.cs | 1987 +++++++++-------- 1 file changed, 1006 insertions(+), 981 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 809d780..29fe4c7 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -437,16 +437,16 @@ static void AppendStubBaseType( AppendCSharpTypeParameters( typeParams, output); - output.Append('\n'); + output.AppendLine(); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); output.Append("// Stub version. GenerateBindings is still in progress. "); output.Append(timestamp); - output.Append('\n'); + output.AppendLine(); if (type.IsClass) { - output.Append('\n'); + output.AppendLine(); ConstructorInfo[] constructors = type.GetConstructors(); if (constructors.Length > 0) { @@ -463,22 +463,22 @@ static void AppendStubBaseType( AppendCsharpParams( ctorParams, output); - output.Append(")\n"); + output.AppendLine(")"); output.Append("\t\t\t: base("); AppendCsharpFunctionCallParameters( ctorParams, output); - output.Append(")\n"); - output.Append("\t\t{\n"); - output.Append("\t\t}\n"); - output.Append("\t\t\n"); + output.AppendLine(")"); + output.AppendLine("\t\t{"); + output.AppendLine("\t\t}"); + output.AppendLine("\t\t"); break; } } } } AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendNamespaceEnding(indent, output); } @@ -512,15 +512,15 @@ static void DoPostCompileWork(bool canRefreshAssetDb) // Init param for max managed Objects builders.CsharpInitCall.Append("\t\t\tMarshal.WriteInt32(memory, curMemory, "); builders.CsharpInitCall.Append(defaultMaxSimultaneous); - builders.CsharpInitCall.Append("); // max managed objects\n"); - builders.CsharpInitCall.Append("\t\t\tcurMemory += sizeof(int);\n"); + builders.CsharpInitCall.AppendLine("); // max managed objects"); + builders.CsharpInitCall.AppendLine("\t\t\tcurMemory += sizeof(int);"); builders.CsharpInitCall.Append(' '); // C# ObjectStore Init call builders.CsharpStoreInitCalls.Append( "\t\t\tNativeScript.Bindings.ObjectStore.Init("); builders.CsharpStoreInitCalls.Append(defaultMaxSimultaneous); - builders.CsharpStoreInitCalls.Append(");\n"); + builders.CsharpStoreInitCalls.AppendLine(");"); // Generate types if (doc.Types != null) @@ -978,8 +978,13 @@ static void AppendCppConstructorInitializerList( Type[] interfaceTypes, int indent, StringBuilder output, - string newline = "\n") + string newline = null) { + if (string.IsNullOrWhiteSpace(newline)) + { + newline = Environment.NewLine; + } + string separator = ": "; foreach (Type interfaceType in interfaceTypes) { @@ -1554,7 +1559,7 @@ static void AppendType( builders.CsharpStoreInitCalls); builders.CsharpStoreInitCalls.Append(">.Init("); builders.CsharpStoreInitCalls.Append(maxSimultaneous); - builders.CsharpStoreInitCalls.Append(");\n"); + builders.CsharpStoreInitCalls.AppendLine(");"); // Build function name suffix builders.TempStrBuilder.Length = 0; @@ -1602,15 +1607,15 @@ static void AppendType( typeof(void), parameters, builders.CsharpFunctions); - builders.CsharpFunctions.Append( - "if (handle != 0)\n\t\t\t{\n"); + builders.CsharpFunctions.AppendLine("if (handle != 0)"); + builders.CsharpFunctions.AppendLine("\t\t\t{"); builders.CsharpFunctions.Append( "\t\t\t\tNativeScript.Bindings.StructStore<"); AppendCsharpTypeFullName( type, builders.CsharpFunctions); - builders.CsharpFunctions.Append( - ">.Remove(handle);\n\t\t\t}"); + builders.CsharpFunctions.AppendLine(">.Remove(handle);"); + builders.CsharpFunctions.Append("\t\t\t}"); AppendCsharpFunctionEnd( typeof(void), new Type[0], @@ -1646,57 +1651,61 @@ static void AppendType( // C++ init body for handle array length builders.CppInitBodyArrays.Append("\tPlugin::RefCounts"); builders.CppInitBodyArrays.Append(funcNameSuffix); - builders.CppInitBodyArrays.Append(" = (int32_t*)curMemory;\n"); + builders.CppInitBodyArrays.AppendLine(" = (int32_t*)curMemory;"); builders.CppInitBodyArrays.Append("\tcurMemory += "); builders.CppInitBodyArrays.Append(maxSimultaneous); - builders.CppInitBodyArrays.Append(" * sizeof(int32_t);\n"); + builders.CppInitBodyArrays.AppendLine(" * sizeof(int32_t);"); builders.CppInitBodyArrays.Append("\tPlugin::RefCountsLen"); builders.CppInitBodyArrays.Append(funcNameSuffix); builders.CppInitBodyArrays.Append(" = "); builders.CppInitBodyArrays.Append(maxSimultaneous); - builders.CppInitBodyArrays.Append(";\n"); - builders.CppInitBodyArrays.Append("\t\n"); + builders.CppInitBodyArrays.AppendLine(";"); + builders.CppInitBodyArrays.AppendLine("\t"); // C++ ref count state and functions builders.CppGlobalStateAndFunctions.Append("\tint32_t RefCountsLen"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append(";\n\tint32_t* RefCounts"); + builders.CppGlobalStateAndFunctions.AppendLine(";"); + builders.CppGlobalStateAndFunctions.Append("\tint32_t* RefCounts"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append(";\n\t\n\tvoid ReferenceManaged"); + builders.CppGlobalStateAndFunctions.AppendLine(";"); + builders.CppGlobalStateAndFunctions.AppendLine("\t"); + builders.CppGlobalStateAndFunctions.Append("\tvoid ReferenceManaged"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append("(int32_t handle)\n"); - builders.CppGlobalStateAndFunctions.Append("\t{\n"); + builders.CppGlobalStateAndFunctions.AppendLine("(int32_t handle)"); + builders.CppGlobalStateAndFunctions.AppendLine("\t{"); builders.CppGlobalStateAndFunctions.Append("\t\tassert(handle >= 0 && handle < RefCountsLen"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append(");\n"); - builders.CppGlobalStateAndFunctions.Append("\t\tif (handle != 0)\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t{\n"); + builders.CppGlobalStateAndFunctions.AppendLine(");"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\tif (handle != 0)"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t{"); builders.CppGlobalStateAndFunctions.Append("\t\t\tRefCounts"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append("[handle]++;\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t}\n"); - builders.CppGlobalStateAndFunctions.Append("\t}\n"); - builders.CppGlobalStateAndFunctions.Append("\t\n"); + builders.CppGlobalStateAndFunctions.AppendLine("[handle]++;"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t}"); + builders.CppGlobalStateAndFunctions.AppendLine("\t}"); + builders.CppGlobalStateAndFunctions.AppendLine("\t"); builders.CppGlobalStateAndFunctions.Append("\tvoid DereferenceManaged"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append("(int32_t handle)\n"); - builders.CppGlobalStateAndFunctions.Append("\t{\n"); + builders.CppGlobalStateAndFunctions.AppendLine("(int32_t handle)"); + builders.CppGlobalStateAndFunctions.AppendLine("\t{"); builders.CppGlobalStateAndFunctions.Append("\t\tassert(handle >= 0 && handle < RefCountsLen"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append(");\n"); - builders.CppGlobalStateAndFunctions.Append("\t\tif (handle != 0)\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t{\n"); + builders.CppGlobalStateAndFunctions.AppendLine(");"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\tif (handle != 0)"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t{"); builders.CppGlobalStateAndFunctions.Append("\t\t\tint32_t numRemain = --RefCounts"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append("[handle];\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t\tif (numRemain == 0)\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t\t{\n"); + builders.CppGlobalStateAndFunctions.AppendLine("[handle];"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t\tif (numRemain == 0)"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t\t{"); builders.CppGlobalStateAndFunctions.Append("\t\t\t\tRelease"); builders.CppGlobalStateAndFunctions.Append(funcNameSuffix); - builders.CppGlobalStateAndFunctions.Append("(handle);\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t\t}\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t}\n"); - builders.CppGlobalStateAndFunctions.Append("\t}\n\t\n"); + builders.CppGlobalStateAndFunctions.AppendLine("(handle);"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t\t}"); + builders.CppGlobalStateAndFunctions.AppendLine("\t\t}"); + builders.CppGlobalStateAndFunctions.AppendLine("\t}"); + builders.CppGlobalStateAndFunctions.AppendLine("\t"); } // C++ type declaration @@ -2035,7 +2044,7 @@ static void AppendEnum( AppendCppPrimitiveTypeName( underlyingType, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append(" Value;\n"); + builders.CppTypeDefinitions.AppendLine(" Value;"); // Enumerator fields FieldInfo[] fields = type.GetFields( @@ -2052,7 +2061,7 @@ static void AppendEnum( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(' '); builders.CppTypeDefinitions.Append(field.Name); - builders.CppTypeDefinitions.Append(";\n"); + builders.CppTypeDefinitions.AppendLine(";"); } // Constructor from primitive type @@ -2065,7 +2074,7 @@ static void AppendEnum( AppendCppPrimitiveTypeName( underlyingType, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append(" value);\n"); + builders.CppTypeDefinitions.AppendLine(" value);"); // Conversion operator to primitive type AppendIndent( @@ -2075,7 +2084,7 @@ static void AppendEnum( AppendCppPrimitiveTypeName( underlyingType, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("() const;\n"); + builders.CppTypeDefinitions.AppendLine("() const;"); // Equality operator AppendIndent( @@ -2083,7 +2092,7 @@ static void AppendEnum( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("bool operator==("); builders.CppTypeDefinitions.Append(type.Name); - builders.CppTypeDefinitions.Append(" other);\n"); + builders.CppTypeDefinitions.AppendLine(" other);"); // Inequality operator AppendIndent( @@ -2091,7 +2100,7 @@ static void AppendEnum( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("bool operator!=("); builders.CppTypeDefinitions.Append(type.Name); - builders.CppTypeDefinitions.Append(" other);\n"); + builders.CppTypeDefinitions.AppendLine(" other);"); AppendNamespaceBeginning( type.Namespace, @@ -2108,23 +2117,23 @@ static void AppendEnum( AppendCppPrimitiveTypeName( underlyingType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(" value)\n"); + builders.CppMethodDefinitions.AppendLine(" value)"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(": Value(value)\n"); + builders.CppMethodDefinitions.AppendLine(": Value(value)"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine(); // Conversion operator to primitive type AppendIndent( @@ -2137,23 +2146,23 @@ static void AppendEnum( AppendCppPrimitiveTypeName( underlyingType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("() const\n"); + builders.CppMethodDefinitions.AppendLine("() const"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return Value;\n"); + builders.CppMethodDefinitions.AppendLine("return Value;"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // Equality operator AppendIndent( @@ -2165,23 +2174,23 @@ static void AppendEnum( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("::operator==("); builders.CppMethodDefinitions.Append(type.Name); - builders.CppMethodDefinitions.Append(" other)\n"); + builders.CppMethodDefinitions.AppendLine(" other)"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return Value == other.Value;\n"); + builders.CppMethodDefinitions.AppendLine("return Value == other.Value;"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // Inequality operator AppendIndent( @@ -2193,23 +2202,23 @@ static void AppendEnum( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("::operator!=("); builders.CppMethodDefinitions.Append(type.Name); - builders.CppMethodDefinitions.Append(" other)\n"); + builders.CppMethodDefinitions.AppendLine(" other)"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return Value != other.Value;\n"); + builders.CppMethodDefinitions.AppendLine("return Value != other.Value;"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; AppendBoxing( type, @@ -2224,11 +2233,11 @@ static void AppendEnum( AppendIndent( indent, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("};\n"); + builders.CppTypeDefinitions.AppendLine("};"); AppendNamespaceEnding( indent, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append('\n'); + builders.CppTypeDefinitions.AppendLine();; // Static initialization foreach (FieldInfo field in fields) @@ -2246,9 +2255,9 @@ static void AppendEnum( builders.CppMethodDefinitions.Append('('); builders.CppMethodDefinitions.Append( field.GetRawConstantValue()); - builders.CppMethodDefinitions.Append(");\n"); + builders.CppMethodDefinitions.AppendLine(");"); } - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; } static void AppendBoxing( @@ -2546,7 +2555,7 @@ static void AppendUnboxing( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -2560,18 +2569,19 @@ static void AppendUnboxing( } builders.CppMethodDefinitions.Append("Plugin::"); builders.CppMethodDefinitions.Append(unboxFuncName); - builders.CppMethodDefinitions.Append("(Handle));\n"); + builders.CppMethodDefinitions.AppendLine("(Handle));"); AppendCppUnhandledExceptionHandling( indent + 1, builders.CppMethodDefinitions); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return returnVal;\n"); + builders.CppMethodDefinitions.AppendLine("return returnVal;"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n\t\n"); + builders.CppMethodDefinitions.AppendLine("}"); + builders.CppMethodDefinitions.AppendLine("\t"); // C++ method definitions (end) AppendCppMethodDefinitionsEnd( @@ -2651,7 +2661,7 @@ static void AppendCppBoxingMethodDefinition( AppendIndent( indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 1, output); @@ -2666,20 +2676,20 @@ static void AppendCppBoxingMethodDefinition( { output.Append("*this"); } - output.Append(");\n"); + output.AppendLine(");"); AppendCppUnhandledExceptionHandling( indent + 1, output); AppendIndent( indent + 1, output); - output.Append( - "if (handle)\n"); + output.AppendLine( + "if (handle)"); AppendIndent( indent + 1, output); - output.Append( - "{\n"); + output.AppendLine( + "{"); AppendIndent( indent + 2, output); @@ -2689,7 +2699,7 @@ static void AppendCppBoxingMethodDefinition( null, "handle", output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent( indent + 2, output); @@ -2697,24 +2707,24 @@ static void AppendCppBoxingMethodDefinition( AppendCppTypeFullName( boxedType, output); - output.Append("(Plugin::InternalUse::Only, handle);\n"); + output.AppendLine("(Plugin::InternalUse::Only, handle);"); AppendIndent( indent + 1, output); - output.Append( - "}\n"); + output.AppendLine( + "}"); AppendIndent( indent + 1, output); - output.Append("return nullptr;\n"); + output.AppendLine("return nullptr;"); AppendIndent( indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( indent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendHandleStoreTypeName( @@ -2939,7 +2949,7 @@ static void AppendConstructor( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( true, GetTypeName(enclosingType), @@ -2955,26 +2965,26 @@ static void AppendConstructor( AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "*this = returnValue;\n"); + builders.CppMethodDefinitions.AppendLine( + "*this = returnValue;"); } else { AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Handle = returnValue;\n"); + builders.CppMethodDefinitions.AppendLine( + "Handle = returnValue;"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "if (returnValue)\n"); + builders.CppMethodDefinitions.AppendLine( + "if (returnValue)"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "{\n"); + builders.CppMethodDefinitions.AppendLine( + "{"); AppendIndent( indent + 2, builders.CppMethodDefinitions); @@ -2984,21 +2994,21 @@ static void AppendConstructor( enclosingTypeParams, "returnValue", builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.AppendLine(";"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "}\n"); + builders.CppMethodDefinitions.AppendLine( + "}"); } AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ init body AppendCppInitBodyFunctionPointerParameterRead( @@ -3189,7 +3199,7 @@ static void AppendFullValueTypeDefaultConstructor( AppendTypeNameWithoutGenericSuffix( enclosingType.Name, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("();\n"); + builders.CppTypeDefinitions.AppendLine("();"); AppendIndent( indent, @@ -3201,19 +3211,19 @@ static void AppendFullValueTypeDefaultConstructor( AppendTypeNameWithoutGenericSuffix( enclosingType.Name, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("()\n"); + builders.CppMethodDefinitions.AppendLine("()"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; } static void AppendFullValueTypeFields( @@ -3236,7 +3246,7 @@ static void AppendFullValueTypeFields( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(' '); builders.CppTypeDefinitions.Append(field.Name); - builders.CppTypeDefinitions.Append(";\n"); + builders.CppTypeDefinitions.AppendLine(";"); } } @@ -3466,7 +3476,7 @@ static void AppendEventAddRemoveMethod( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( methodIsStatic, GetTypeName(enclosingType), @@ -3480,7 +3490,8 @@ static void AppendEventAddRemoveMethod( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n\t\n"); + builders.CppMethodDefinitions.AppendLine("}"); + builders.CppMethodDefinitions.AppendLine("\t"); // C++ init body AppendCppInitBodyFunctionPointerParameterRead( @@ -4165,7 +4176,7 @@ static void AppendMethod( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( methodIsStatic, GetTypeName(enclosingType), @@ -4184,7 +4195,8 @@ static void AppendMethod( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n\t\n"); + builders.CppMethodDefinitions.AppendLine("}"); + builders.CppMethodDefinitions.AppendLine("\t"); // C++ init body AppendCppInitBodyFunctionPointerParameterRead( @@ -4270,7 +4282,7 @@ static void AppendCppFunctionCall( } output.Append('('); output.Append(param.Name); - output.Append(");\n"); + output.AppendLine(");"); } } if (!enclosingTypeIsStatic) @@ -4278,8 +4290,8 @@ static void AppendCppFunctionCall( AppendIndent( indent, output); - output.Append( - "int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this);\n"); + output.AppendLine( + "int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this);"); } AppendIndent( indent, @@ -4313,31 +4325,31 @@ static void AppendCppFunctionCall( output.Append(", "); } } - output.Append(");\n"); + output.AppendLine(");"); AppendIndent( indent, output); - output.Append("if (NativeScript.Bindings.UnhandledCppException != null)\n"); + output.AppendLine("if (NativeScript.Bindings.UnhandledCppException != null)"); AppendIndent( indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 1, output); - output.Append("Exception ex = NativeScript.Bindings.UnhandledCppException;\n"); + output.AppendLine("Exception ex = NativeScript.Bindings.UnhandledCppException;"); AppendIndent( indent + 1, output); - output.Append("NativeScript.Bindings.UnhandledCppException = null;\n"); + output.AppendLine("NativeScript.Bindings.UnhandledCppException = null;"); AppendIndent( indent + 1, output); - output.Append("throw ex;\n"); + output.AppendLine("throw ex;"); AppendIndent( indent, output); - output.Append("}\n"); + output.AppendLine("}"); } static void AppendArray( @@ -4477,8 +4489,8 @@ static void AppendArray( extraIndent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(subject); - builders.CppMethodDefinitions.Append( - "InternalLength = 0;\n"); + builders.CppMethodDefinitions.AppendLine( + "InternalLength = 0;"); if (localRank > 1) { for (int i = 0; i < localRank; ++i) @@ -4490,8 +4502,8 @@ static void AppendArray( builders.CppMethodDefinitions.Append( "InternalLengths["); builders.CppMethodDefinitions.Append(i); - builders.CppMethodDefinitions.Append( - "] = 0;\n"); + builders.CppMethodDefinitions.AppendLine( + "] = 0;"); } } }, @@ -4502,8 +4514,8 @@ static void AppendArray( builders.CppMethodDefinitions.Append( "InternalLength = "); builders.CppMethodDefinitions.Append(subject); - builders.CppMethodDefinitions.Append( - "InternalLength;\n"); + builders.CppMethodDefinitions.AppendLine( + "InternalLength;"); if (localRank > 1) { for (int i = 0; i < localRank; ++i) @@ -4520,8 +4532,8 @@ static void AppendArray( builders.CppMethodDefinitions.Append( "InternalLengths["); builders.CppMethodDefinitions.Append(i); - builders.CppMethodDefinitions.Append( - "];\n"); + builders.CppMethodDefinitions.AppendLine( + "];"); } } }, @@ -4532,8 +4544,8 @@ static void AppendArray( AppendIndent( indent + 1, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append( - "int32_t InternalLength;\n"); + builders.CppTypeDefinitions.AppendLine( + "int32_t InternalLength;"); if (rank > 1) { AppendIndent( @@ -4542,7 +4554,7 @@ static void AppendArray( builders.CppTypeDefinitions.Append( "int32_t InternalLengths["); builders.CppTypeDefinitions.Append(rank); - builders.CppTypeDefinitions.Append("];\n"); + builders.CppTypeDefinitions.AppendLine("];"); } AppendArrayConstructor( @@ -4611,7 +4623,7 @@ static void AppendArray( AppendTypeNameWithoutGenericSuffix( "operator[]", builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("(int32_t index);\n"); + builders.CppTypeDefinitions.AppendLine("(int32_t index);"); // C++ operator[] method definition AppendCppArrayIndexOperatorMethodDefinition( @@ -4652,88 +4664,88 @@ static void AppendArrayIterator( StringBuilder cppMethodDefinitions) { // Iterator type definition - cppTypeDefinitions.Append("namespace Plugin\n"); - cppTypeDefinitions.Append("{\n"); + cppTypeDefinitions.AppendLine("namespace Plugin"); + cppTypeDefinitions.AppendLine("{"); cppTypeDefinitions.Append("\tstruct "); cppTypeDefinitions.Append(bindingArrayTypeName); - cppTypeDefinitions.Append("Iterator\n"); - cppTypeDefinitions.Append("\t{\n"); + cppTypeDefinitions.AppendLine("Iterator"); + cppTypeDefinitions.AppendLine("\t{"); cppTypeDefinitions.Append("\t\tSystem::"); cppTypeDefinitions.Append(cppGenericArrayTypeName); - cppTypeDefinitions.Append("& array;\n"); - cppTypeDefinitions.Append("\t\tint index;\n"); + cppTypeDefinitions.AppendLine("& array;"); + cppTypeDefinitions.AppendLine("\t\tint index;"); cppTypeDefinitions.Append("\t\t"); cppTypeDefinitions.Append(bindingArrayTypeName); cppTypeDefinitions.Append("Iterator(System::"); cppTypeDefinitions.Append(cppGenericArrayTypeName); - cppTypeDefinitions.Append("& array, int32_t index);\n"); + cppTypeDefinitions.AppendLine("& array, int32_t index);"); cppTypeDefinitions.Append("\t\t"); cppTypeDefinitions.Append(bindingArrayTypeName); - cppTypeDefinitions.Append("Iterator& operator++();\n"); + cppTypeDefinitions.AppendLine("Iterator& operator++();"); cppTypeDefinitions.Append("\t\tbool operator!=(const "); cppTypeDefinitions.Append(bindingArrayTypeName); - cppTypeDefinitions.Append("Iterator& other);\n"); + cppTypeDefinitions.AppendLine("Iterator& other);"); cppTypeDefinitions.Append("\t\t"); AppendCppTypeFullName( elementType, cppTypeDefinitions); - cppTypeDefinitions.Append(" operator*();\n"); - cppTypeDefinitions.Append("\t};\n"); - cppTypeDefinitions.Append("}\n"); - cppTypeDefinitions.Append('\n'); + cppTypeDefinitions.AppendLine(" operator*();"); + cppTypeDefinitions.AppendLine("\t};"); + cppTypeDefinitions.AppendLine("}"); + cppTypeDefinitions.AppendLine();; // begin() and end() declarations - cppTypeDefinitions.Append("namespace System\n"); - cppTypeDefinitions.Append("{\n"); + cppTypeDefinitions.AppendLine("namespace System"); + cppTypeDefinitions.AppendLine("{"); cppTypeDefinitions.Append("\tPlugin::"); cppTypeDefinitions.Append(bindingArrayTypeName); cppTypeDefinitions.Append("Iterator begin(System::"); cppTypeDefinitions.Append(cppGenericArrayTypeName); - cppTypeDefinitions.Append("& array);\n"); + cppTypeDefinitions.AppendLine("& array);"); cppTypeDefinitions.Append("\tPlugin::"); cppTypeDefinitions.Append(bindingArrayTypeName); cppTypeDefinitions.Append("Iterator end(System::"); cppTypeDefinitions.Append(cppGenericArrayTypeName); - cppTypeDefinitions.Append("& array);\n"); - cppTypeDefinitions.Append("}\n"); - cppTypeDefinitions.Append('\n'); + cppTypeDefinitions.AppendLine("& array);"); + cppTypeDefinitions.AppendLine("}"); + cppTypeDefinitions.AppendLine();; // Iterator method definitions - cppMethodDefinitions.Append("namespace Plugin\n"); - cppMethodDefinitions.Append("{\n"); + cppMethodDefinitions.AppendLine("namespace Plugin"); + cppMethodDefinitions.AppendLine("{"); cppMethodDefinitions.Append('\t'); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator::"); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator(System::"); cppMethodDefinitions.Append(cppGenericArrayTypeName); - cppMethodDefinitions.Append("& array, int32_t index)\n"); - cppMethodDefinitions.Append("\t\t: array(array)\n"); - cppMethodDefinitions.Append("\t\t, index(index)\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("& array, int32_t index)"); + cppMethodDefinitions.AppendLine("\t\t: array(array)"); + cppMethodDefinitions.AppendLine("\t\t, index(index)"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append('\t'); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator& "); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator::"); - cppMethodDefinitions.Append("operator++()\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\tindex++;\n"); - cppMethodDefinitions.Append("\t\treturn *this;\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("operator++()"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\tindex++;"); + cppMethodDefinitions.AppendLine("\t\treturn *this;"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append("\tbool "); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator::"); cppMethodDefinitions.Append("operator!=(const "); cppMethodDefinitions.Append(bindingArrayTypeName); - cppMethodDefinitions.Append("Iterator& other)\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\treturn index != other.index;\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("Iterator& other)"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\treturn index != other.index;"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append('\t'); AppendCppTypeFullName( elementType, @@ -4741,39 +4753,39 @@ static void AppendArrayIterator( cppMethodDefinitions.Append(' '); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator::"); - cppMethodDefinitions.Append("operator*()\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\treturn array[index];\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("}\n"); - cppMethodDefinitions.Append('\n'); + cppMethodDefinitions.AppendLine("operator*()"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\treturn array[index];"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("}"); + cppMethodDefinitions.AppendLine();; // begin() and end() definitions - cppMethodDefinitions.Append("namespace System\n"); - cppMethodDefinitions.Append("{\n"); + cppMethodDefinitions.AppendLine("namespace System"); + cppMethodDefinitions.AppendLine("{"); cppMethodDefinitions.Append("\tPlugin::"); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator begin(System::"); cppMethodDefinitions.Append(cppGenericArrayTypeName); - cppMethodDefinitions.Append("& array)\n"); - cppMethodDefinitions.Append("\t{\n"); + cppMethodDefinitions.AppendLine("& array)"); + cppMethodDefinitions.AppendLine("\t{"); cppMethodDefinitions.Append("\t\treturn Plugin::"); cppMethodDefinitions.Append(bindingArrayTypeName); - cppMethodDefinitions.Append("Iterator(array, 0);\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("Iterator(array, 0);"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append("\tPlugin::"); cppMethodDefinitions.Append(bindingArrayTypeName); cppMethodDefinitions.Append("Iterator end(System::"); cppMethodDefinitions.Append(cppGenericArrayTypeName); - cppMethodDefinitions.Append("& array)\n"); - cppMethodDefinitions.Append("\t{\n"); + cppMethodDefinitions.AppendLine("& array)"); + cppMethodDefinitions.AppendLine("\t{"); cppMethodDefinitions.Append("\t\treturn Plugin::"); cppMethodDefinitions.Append(bindingArrayTypeName); - cppMethodDefinitions.Append("Iterator(array, array.GetLength() - 1);\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("}\n"); - cppMethodDefinitions.Append('\n'); + cppMethodDefinitions.AppendLine("Iterator(array, array.GetLength() - 1);"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("}"); + cppMethodDefinitions.AppendLine();; } static void AppendGenericEnumerableIterator( @@ -4785,45 +4797,45 @@ static void AppendGenericEnumerableIterator( StringBuilder cppMethodDefinitions) { // Iterator type definition - cppTypeDefinitions.Append("namespace Plugin\n"); - cppTypeDefinitions.Append("{\n"); + cppTypeDefinitions.AppendLine("namespace Plugin"); + cppTypeDefinitions.AppendLine("{"); cppTypeDefinitions.Append("\tstruct "); cppTypeDefinitions.Append(bindingEnumerableTypeName); - cppTypeDefinitions.Append("Iterator\n"); - cppTypeDefinitions.Append("\t{\n"); + cppTypeDefinitions.AppendLine("Iterator"); + cppTypeDefinitions.AppendLine("\t{"); cppTypeDefinitions.Append("\t\t"); AppendCppTypeFullName( enumeratorType, cppTypeDefinitions); - cppTypeDefinitions.Append(" enumerator;\n"); - cppTypeDefinitions.Append("\t\tbool hasMore;\n"); + cppTypeDefinitions.AppendLine(" enumerator;"); + cppTypeDefinitions.AppendLine("\t\tbool hasMore;"); cppTypeDefinitions.Append("\t\t"); cppTypeDefinitions.Append(bindingEnumerableTypeName); - cppTypeDefinitions.Append("Iterator(decltype(nullptr));\n"); + cppTypeDefinitions.AppendLine("Iterator(decltype(nullptr));"); cppTypeDefinitions.Append("\t\t"); cppTypeDefinitions.Append(bindingEnumerableTypeName); cppTypeDefinitions.Append("Iterator("); AppendCppTypeFullName( enumerableType, cppTypeDefinitions); - cppTypeDefinitions.Append("& enumerable);\n"); + cppTypeDefinitions.AppendLine("& enumerable);"); cppTypeDefinitions.Append("\t\t~"); cppTypeDefinitions.Append(bindingEnumerableTypeName); - cppTypeDefinitions.Append("Iterator();\n"); + cppTypeDefinitions.AppendLine("Iterator();"); cppTypeDefinitions.Append("\t\t"); cppTypeDefinitions.Append(bindingEnumerableTypeName); - cppTypeDefinitions.Append("Iterator& operator++();\n"); + cppTypeDefinitions.AppendLine("Iterator& operator++();"); cppTypeDefinitions.Append("\t\tbool operator!=(const "); cppTypeDefinitions.Append(bindingEnumerableTypeName); - cppTypeDefinitions.Append("Iterator& other);\n"); + cppTypeDefinitions.AppendLine("Iterator& other);"); cppTypeDefinitions.Append("\t\t"); AppendCppTypeFullName( elementType, cppTypeDefinitions); - cppTypeDefinitions.Append(" operator*();\n"); - cppTypeDefinitions.Append("\t};\n"); - cppTypeDefinitions.Append("}\n"); - cppTypeDefinitions.Append('\n'); + cppTypeDefinitions.AppendLine(" operator*();"); + cppTypeDefinitions.AppendLine("\t};"); + cppTypeDefinitions.AppendLine("}"); + cppTypeDefinitions.AppendLine();; // begin() and end() declarations int indent = AppendNamespaceBeginning( @@ -4838,7 +4850,7 @@ static void AppendGenericEnumerableIterator( AppendCppTypeFullName( enumerableType, cppTypeDefinitions); - cppTypeDefinitions.Append("& enumerable);\n"); + cppTypeDefinitions.AppendLine("& enumerable);"); AppendIndent( indent, cppTypeDefinitions); @@ -4848,25 +4860,25 @@ static void AppendGenericEnumerableIterator( AppendCppTypeFullName( enumerableType, cppTypeDefinitions); - cppTypeDefinitions.Append("& enumerable);\n"); + cppTypeDefinitions.AppendLine("& enumerable);"); AppendNamespaceEnding( indent, cppTypeDefinitions); - cppTypeDefinitions.Append('\n'); + cppTypeDefinitions.AppendLine();; // Iterator method definitions - cppMethodDefinitions.Append("namespace Plugin\n"); - cppMethodDefinitions.Append("{\n"); + cppMethodDefinitions.AppendLine("namespace Plugin"); + cppMethodDefinitions.AppendLine("{"); cppMethodDefinitions.Append('\t'); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator::"); cppMethodDefinitions.Append(bindingEnumerableTypeName); - cppMethodDefinitions.Append("Iterator(decltype(nullptr))\n"); - cppMethodDefinitions.Append("\t\t: enumerator(nullptr)\n"); - cppMethodDefinitions.Append("\t\t, hasMore(false)\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("Iterator(decltype(nullptr))"); + cppMethodDefinitions.AppendLine("\t\t: enumerator(nullptr)"); + cppMethodDefinitions.AppendLine("\t\t, hasMore(false)"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append('\t'); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator::"); @@ -4875,45 +4887,45 @@ static void AppendGenericEnumerableIterator( AppendCppTypeFullName( enumerableType, cppMethodDefinitions); - cppMethodDefinitions.Append("& enumerable)\n"); - cppMethodDefinitions.Append("\t\t: enumerator(enumerable.GetEnumerator())\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\thasMore = enumerator.MoveNext();\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("& enumerable)"); + cppMethodDefinitions.AppendLine("\t\t: enumerator(enumerable.GetEnumerator())"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\thasMore = enumerator.MoveNext();"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append('\t'); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator::~"); cppMethodDefinitions.Append(bindingEnumerableTypeName); - cppMethodDefinitions.Append("Iterator()\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\tif (enumerator != nullptr)\n"); - cppMethodDefinitions.Append("\t\t{\n"); - cppMethodDefinitions.Append("\t\t\tenumerator.Dispose();\n"); - cppMethodDefinitions.Append("\t\t}\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("Iterator()"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\tif (enumerator != nullptr)"); + cppMethodDefinitions.AppendLine("\t\t{"); + cppMethodDefinitions.AppendLine("\t\t\tenumerator.Dispose();"); + cppMethodDefinitions.AppendLine("\t\t}"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append('\t'); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator& "); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator::"); - cppMethodDefinitions.Append("operator++()\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\thasMore = enumerator.MoveNext();\n"); - cppMethodDefinitions.Append("\t\treturn *this;\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("operator++()"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\thasMore = enumerator.MoveNext();"); + cppMethodDefinitions.AppendLine("\t\treturn *this;"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append("\tbool "); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator::"); cppMethodDefinitions.Append("operator!=(const "); cppMethodDefinitions.Append(bindingEnumerableTypeName); - cppMethodDefinitions.Append("Iterator& other)\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\treturn hasMore;\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.AppendLine("Iterator& other)"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\treturn hasMore;"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("\t"); cppMethodDefinitions.Append('\t'); AppendCppTypeFullName( elementType, @@ -4921,12 +4933,12 @@ static void AppendGenericEnumerableIterator( cppMethodDefinitions.Append(' '); cppMethodDefinitions.Append(bindingEnumerableTypeName); cppMethodDefinitions.Append("Iterator::"); - cppMethodDefinitions.Append("operator*()\n"); - cppMethodDefinitions.Append("\t{\n"); - cppMethodDefinitions.Append("\t\treturn enumerator.GetCurrent();\n"); - cppMethodDefinitions.Append("\t}\n"); - cppMethodDefinitions.Append("}\n"); - cppMethodDefinitions.Append('\n'); + cppMethodDefinitions.AppendLine("operator*()"); + cppMethodDefinitions.AppendLine("\t{"); + cppMethodDefinitions.AppendLine("\t\treturn enumerator.GetCurrent();"); + cppMethodDefinitions.AppendLine("\t}"); + cppMethodDefinitions.AppendLine("}"); + cppMethodDefinitions.AppendLine();; // begin() and end() definitions indent = AppendNamespaceBeginning( @@ -4941,25 +4953,25 @@ static void AppendGenericEnumerableIterator( AppendCppTypeFullName( enumerableType, cppMethodDefinitions); - cppMethodDefinitions.Append("& enumerable)\n"); + cppMethodDefinitions.AppendLine("& enumerable)"); AppendIndent( indent, cppMethodDefinitions); - cppMethodDefinitions.Append("{\n"); + cppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, cppMethodDefinitions); cppMethodDefinitions.Append("return Plugin::"); cppMethodDefinitions.Append(bindingEnumerableTypeName); - cppMethodDefinitions.Append("Iterator(enumerable);\n"); + cppMethodDefinitions.AppendLine("Iterator(enumerable);"); AppendIndent( indent, cppMethodDefinitions); - cppMethodDefinitions.Append("}\n"); + cppMethodDefinitions.AppendLine("}"); AppendIndent( indent, cppMethodDefinitions); - cppMethodDefinitions.Append('\n'); + cppMethodDefinitions.AppendLine();; AppendIndent( indent, cppMethodDefinitions); @@ -4969,25 +4981,25 @@ static void AppendGenericEnumerableIterator( AppendCppTypeFullName( enumerableType, cppMethodDefinitions); - cppMethodDefinitions.Append("& enumerable)\n"); + cppMethodDefinitions.AppendLine("& enumerable)"); AppendIndent( indent, cppMethodDefinitions); - cppMethodDefinitions.Append("{\n"); + cppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, cppMethodDefinitions); cppMethodDefinitions.Append("return Plugin::"); cppMethodDefinitions.Append(bindingEnumerableTypeName); - cppMethodDefinitions.Append("Iterator(nullptr);\n"); + cppMethodDefinitions.AppendLine("Iterator(nullptr);"); AppendIndent( indent, cppMethodDefinitions); - cppMethodDefinitions.Append("}\n"); + cppMethodDefinitions.AppendLine("}"); AppendNamespaceEnding( indent, cppMethodDefinitions); - cppMethodDefinitions.Append('\n'); + cppMethodDefinitions.AppendLine();; } static void AppendCppArrayIndexOperatorMethodDefinition( @@ -5009,11 +5021,11 @@ static void AppendCppArrayIndexOperatorMethodDefinition( AppendTypeNameWithoutGenericSuffix( enclosingTypeTypeName.Name, output); - output.Append("::operator[](int32_t index)\n"); + output.AppendLine("::operator[](int32_t index)"); AppendIndent( indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 1, output); @@ -5026,15 +5038,15 @@ static void AppendCppArrayIndexOperatorMethodDefinition( output.Append(i); output.Append(", "); } - output.Append("index);\n"); + output.AppendLine("index);"); AppendIndent( indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( indent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppArrayTypeName( @@ -5215,11 +5227,11 @@ static void AppendArrayElementProxy( AppendTypeNameWithoutGenericSuffix( cppElementProxyTypeName, builders.CppTemplateSpecializationDeclarations); - builders.CppTemplateSpecializationDeclarations.Append(";\n"); + builders.CppTemplateSpecializationDeclarations.AppendLine(";"); AppendNamespaceEnding( indent, builders.CppTemplateSpecializationDeclarations); - builders.CppTemplateSpecializationDeclarations.Append('\n'); + builders.CppTemplateSpecializationDeclarations.AppendLine();; // C++ element proxy type definition AppendNamespaceBeginning( @@ -5230,15 +5242,15 @@ static void AppendArrayElementProxy( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("template<> struct "); builders.CppTypeDefinitions.Append(cppElementProxyTypeName); - builders.CppTypeDefinitions.Append('\n'); + builders.CppTypeDefinitions.AppendLine();; AppendIndent( indent, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("{\n"); + builders.CppTypeDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("int32_t Handle;\n"); + builders.CppTypeDefinitions.AppendLine("int32_t Handle;"); for (int i = 0; i < rank; ++i) { AppendIndent( @@ -5246,7 +5258,7 @@ static void AppendArrayElementProxy( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("int32_t Index"); builders.CppTypeDefinitions.Append(i); - builders.CppTypeDefinitions.Append(";\n"); + builders.CppTypeDefinitions.AppendLine(";"); } AppendIndent( indent + 1, @@ -5263,7 +5275,7 @@ static void AppendArrayElementProxy( builders.CppTypeDefinitions.Append(", "); } } - builders.CppTypeDefinitions.Append(");\n"); + builders.CppTypeDefinitions.AppendLine(");"); if (rank == maxRank) { AppendIndent( @@ -5273,7 +5285,7 @@ static void AppendArrayElementProxy( AppendCppTypeFullName( elementType, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append(" item);\n"); + builders.CppTypeDefinitions.AppendLine(" item);"); AppendIndent( indent + 1, builders.CppTypeDefinitions); @@ -5281,7 +5293,7 @@ static void AppendArrayElementProxy( AppendCppTypeFullName( elementType, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("();\n"); + builders.CppTypeDefinitions.AppendLine("();"); } else { @@ -5295,14 +5307,14 @@ static void AppendArrayElementProxy( elementType, builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append(" operator[]("); - builders.CppTypeDefinitions.Append("int32_t index);\n"); + builders.CppTypeDefinitions.AppendLine("int32_t index);"); } AppendIndent( indent, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("};\n"); - builders.CppTypeDefinitions.Append("}\n"); - builders.CppTypeDefinitions.Append('\n'); + builders.CppTypeDefinitions.AppendLine("};"); + builders.CppTypeDefinitions.AppendLine("}"); + builders.CppTypeDefinitions.AppendLine();; // C++ element proxy method definitions (beginning) int cppMethodDefinitionsIndent = AppendNamespaceBeginning( @@ -5330,15 +5342,15 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append(", "); } } - builders.CppMethodDefinitions.Append(")\n"); + builders.CppMethodDefinitions.AppendLine(")"); AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = handle;\n"); + builders.CppMethodDefinitions.AppendLine("Handle = handle;"); for (int i = 0; i < rank; ++i) { AppendIndent( @@ -5348,16 +5360,16 @@ static void AppendArrayElementProxy( builders.CppMethodDefinitions.Append(i); builders.CppMethodDefinitions.Append(" = index"); builders.CppMethodDefinitions.Append(i); - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.AppendLine(";"); } AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; if (rank == maxRank) { @@ -5372,11 +5384,11 @@ static void AppendArrayElementProxy( AppendCppTypeFullName( elementType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(" item)\n"); + builders.CppMethodDefinitions.AppendLine(" item)"); AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( false, GetTypeName(cppArrayTypeName, "System"), @@ -5390,11 +5402,11 @@ static void AppendArrayElementProxy( AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ element proxy type conversion operator definition AppendIndent( @@ -5406,11 +5418,11 @@ static void AppendArrayElementProxy( AppendCppTypeFullName( elementType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("()\n"); + builders.CppMethodDefinitions.AppendLine("()"); AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( false, GetTypeName(cppArrayTypeName, "System"), @@ -5429,7 +5441,7 @@ static void AppendArrayElementProxy( AppendIndent( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); } else { @@ -5594,13 +5606,13 @@ static void AppendArrayConstructor( AppendCppTypeFullName( interfaceType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(nullptr)\n"); + builders.CppMethodDefinitions.AppendLine("(nullptr)"); separator = ", "; } AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( true, cppArrayTypeTypeName, @@ -5614,18 +5626,18 @@ static void AppendArrayConstructor( AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Handle = returnValue;\n"); + builders.CppMethodDefinitions.AppendLine( + "Handle = returnValue;"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "if (returnValue)\n"); + builders.CppMethodDefinitions.AppendLine( + "if (returnValue)"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "{\n"); + builders.CppMethodDefinitions.AppendLine( + "{"); AppendIndent( indent + 2, builders.CppMethodDefinitions); @@ -5635,7 +5647,7 @@ static void AppendArrayConstructor( cppTypeParams, "returnValue", builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.AppendLine(";"); if (rank > 1) { AppendIndent( @@ -5651,7 +5663,7 @@ static void AppendArrayConstructor( builders.CppMethodDefinitions.Append(" * "); } } - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.AppendLine(";"); for (int i = 0; i < rank; ++i) { AppendIndent( @@ -5661,7 +5673,7 @@ static void AppendArrayConstructor( builders.CppMethodDefinitions.Append(i); builders.CppMethodDefinitions.Append("] = length"); builders.CppMethodDefinitions.Append(i); - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.AppendLine(";"); } } else @@ -5669,22 +5681,22 @@ static void AppendArrayConstructor( AppendIndent( indent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "InternalLength = length0;\n"); + builders.CppMethodDefinitions.AppendLine( + "InternalLength = length0;"); } AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "}\n"); + builders.CppMethodDefinitions.AppendLine( + "}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; } static void AppendArrayCppGetLengthFunction( @@ -5722,46 +5734,46 @@ static void AppendArrayCppGetLengthFunction( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "int32_t returnVal = InternalLength;\n"); + builders.CppMethodDefinitions.AppendLine( + "int32_t returnVal = InternalLength;"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (returnVal == 0)\n"); + builders.CppMethodDefinitions.AppendLine("if (returnVal == 0)"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "returnVal = Array::GetLength();\n"); + builders.CppMethodDefinitions.AppendLine( + "returnVal = Array::GetLength();"); AppendIndent( indent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "InternalLength = returnVal;\n"); + builders.CppMethodDefinitions.AppendLine( + "InternalLength = returnVal;"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("};\n"); + builders.CppMethodDefinitions.AppendLine("};"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return returnVal;\n"); + builders.CppMethodDefinitions.AppendLine("return returnVal;"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; } static void AppendArrayCppGetRankFunction( @@ -5800,21 +5812,21 @@ static void AppendArrayCppGetRankFunction( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("return "); builders.CppMethodDefinitions.Append(rank); - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.AppendLine(";"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; } static void AppendArrayMultidimensionalGetLength( @@ -5938,35 +5950,35 @@ static void AppendArrayMultidimensionalGetLength( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append( "assert(dimension >= 0 && dimension < "); builders.CppMethodDefinitions.Append(rank); - builders.CppMethodDefinitions.Append(");\n"); + builders.CppMethodDefinitions.AppendLine(");"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "int32_t length = InternalLengths[dimension];\n"); + builders.CppMethodDefinitions.AppendLine( + "int32_t length = InternalLengths[dimension];"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (length)\n"); + builders.CppMethodDefinitions.AppendLine("if (length)"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return length;\n"); + builders.CppMethodDefinitions.AppendLine("return length;"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendCppPluginFunctionCall( false, GetTypeName(cppArrayTypeName, "System"), @@ -5980,8 +5992,8 @@ static void AppendArrayMultidimensionalGetLength( AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "InternalLengths[dimension] = returnValue;\n"); + builders.CppMethodDefinitions.AppendLine( + "InternalLengths[dimension] = returnValue;"); AppendCppMethodReturn( typeof(int), TypeKind.Primitive, @@ -5990,11 +6002,11 @@ static void AppendArrayMultidimensionalGetLength( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; } static void AppendArrayGetItem( @@ -6388,11 +6400,11 @@ static void AppendDelegate( AppendIndent( indent + 1, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("int32_t CppHandle;\n"); + builders.CppTypeDefinitions.AppendLine("int32_t CppHandle;"); AppendIndent( indent + 1, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("int32_t ClassHandle;\n"); + builders.CppTypeDefinitions.AppendLine("int32_t ClassHandle;"); // C++ method declarations AppendIndent( @@ -6632,24 +6644,24 @@ static void AppendDelegate( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("Plugin::"); builders.CppMethodDefinitions.Append(addFuncName); - builders.CppMethodDefinitions.Append("(Handle, del.Handle);\n"); + builders.CppMethodDefinitions.AppendLine("(Handle, del.Handle);"); AppendCppUnhandledExceptionHandling( indent + 1, builders.CppMethodDefinitions); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ remove AppendCppMethodDefinitionBegin( @@ -6664,24 +6676,24 @@ static void AppendDelegate( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("Plugin::"); builders.CppMethodDefinitions.Append(removeFuncName); - builders.CppMethodDefinitions.Append("(Handle, del.Handle);\n"); + builders.CppMethodDefinitions.AppendLine("(Handle, del.Handle);"); AppendCppUnhandledExceptionHandling( indent + 1, builders.CppMethodDefinitions); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C# GetDelegate call AppendCsharpGetDelegateCall( @@ -6693,27 +6705,27 @@ static void AppendDelegate( // C# class (beginning) builders.CsharpBaseTypes.Append("class "); builders.CsharpBaseTypes.Append(bindingTypeName); - builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("{\n"); + builders.CsharpBaseTypes.AppendLine();; + builders.CsharpBaseTypes.AppendLine("{"); // C# class fields - builders.CsharpBaseTypes.Append("\tpublic int CppHandle;\n"); + builders.CsharpBaseTypes.AppendLine("\tpublic int CppHandle;"); builders.CsharpBaseTypes.Append("\tpublic "); AppendCsharpTypeFullName( type, builders.CsharpBaseTypes); - builders.CsharpBaseTypes.Append(" Delegate;\n"); - builders.CsharpBaseTypes.Append("\t\n"); + builders.CsharpBaseTypes.AppendLine(" Delegate;"); + builders.CsharpBaseTypes.AppendLine("\t"); // C# class constructor builders.CsharpBaseTypes.Append("\tpublic "); builders.CsharpBaseTypes.Append(bindingTypeName); - builders.CsharpBaseTypes.Append("(int cppHandle)\n"); - builders.CsharpBaseTypes.Append("\t{\n"); - builders.CsharpBaseTypes.Append("\t\tCppHandle = cppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\tDelegate = NativeInvoke;\n"); - builders.CsharpBaseTypes.Append("\t}\n"); - builders.CsharpBaseTypes.Append("\t\n"); + builders.CsharpBaseTypes.AppendLine("(int cppHandle)"); + builders.CsharpBaseTypes.AppendLine("\t{"); + builders.CsharpBaseTypes.AppendLine("\t\tCppHandle = cppHandle;"); + builders.CsharpBaseTypes.AppendLine("\t\tDelegate = NativeInvoke;"); + builders.CsharpBaseTypes.AppendLine("\t}"); + builders.CsharpBaseTypes.AppendLine("\t"); // Build the name of the C++ binding function that C# calls builders.TempStrBuilder.Length = 0; @@ -6741,8 +6753,8 @@ static void AppendDelegate( builders); // C# class (ending) - builders.CsharpBaseTypes.Append("}\n"); - builders.CsharpBaseTypes.Append('\n'); + builders.CsharpBaseTypes.AppendLine("}"); + builders.CsharpBaseTypes.AppendLine();; // Invoke() is how C++ invokes the delegate AppendBaseTypeMethodCallsCsharpMethod( @@ -7048,7 +7060,7 @@ static void AppendBaseType( AppendIndent( indent + 1, builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append("int32_t CppHandle;\n"); + builders.CppTypeDefinitions.AppendLine("int32_t CppHandle;"); // C++ constructor declarations for (int i = 0; i < numConstructors; ++i) @@ -7076,12 +7088,12 @@ static void AppendBaseType( AppendUppercaseWithUnderscores( derivedTypeTypeName.Name, builders.CppMacros); - builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR_DECLARATION \\\n"); + builders.CppMacros.AppendLine("_DEFAULT_CONSTRUCTOR_DECLARATION \\"); AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append(derivedTypeTypeName.Name); - builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle);\n"); + builders.CppMacros.AppendLine("(Plugin::InternalUse iu, int32_t handle);"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append('\n'); + builders.CppMacros.AppendLine();; // C++ constructor definition macro builders.CppMacros.Append("#define "); @@ -7092,12 +7104,12 @@ static void AppendBaseType( AppendUppercaseWithUnderscores( derivedTypeTypeName.Name, builders.CppMacros); - builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR_DEFINITION \\\n"); + builders.CppMacros.AppendLine("_DEFAULT_CONSTRUCTOR_DEFINITION \\"); AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append(derivedTypeTypeName.Name); builders.CppMacros.Append("::"); builders.CppMacros.Append(derivedTypeTypeName.Name); - builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle) \\\n"); + builders.CppMacros.AppendLine("(Plugin::InternalUse iu, int32_t handle) \\"); AppendCppConstructorInitializerList( cppCtorInitTypes, indent + 1, @@ -7108,13 +7120,13 @@ static void AppendBaseType( AppendCppTypeFullName( baseTypeTypeName, builders.CppMacros); - builders.CppMacros.Append("(iu, handle) \\\n"); + builders.CppMacros.AppendLine("(iu, handle) \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("{ \\\n"); + builders.CppMacros.AppendLine("{ \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("}\n"); + builders.CppMacros.AppendLine("}"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append('\n'); + builders.CppMacros.AppendLine();; // C++ constructor inline definition macro builders.CppMacros.Append("#define "); @@ -7125,10 +7137,10 @@ static void AppendBaseType( AppendUppercaseWithUnderscores( derivedTypeTypeName.Name, builders.CppMacros); - builders.CppMacros.Append("_DEFAULT_CONSTRUCTOR \\\n"); + builders.CppMacros.AppendLine("_DEFAULT_CONSTRUCTOR \\"); AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append(derivedTypeTypeName.Name); - builders.CppMacros.Append("(Plugin::InternalUse iu, int32_t handle) \\\n"); + builders.CppMacros.AppendLine("(Plugin::InternalUse iu, int32_t handle) \\"); AppendCppConstructorInitializerList( cppCtorInitTypes, indent + 1, @@ -7139,13 +7151,13 @@ static void AppendBaseType( AppendCppTypeFullName( baseTypeTypeName, builders.CppMacros); - builders.CppMacros.Append("(iu, handle) \\\n"); + builders.CppMacros.AppendLine("(iu, handle) \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("{ \\\n"); + builders.CppMacros.AppendLine("{ \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("}\n"); + builders.CppMacros.AppendLine("}"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append('\n'); + builders.CppMacros.AppendLine();; // C++ default contents declaration macro builders.CppMacros.Append("#define "); @@ -7156,13 +7168,13 @@ static void AppendBaseType( AppendUppercaseWithUnderscores( derivedTypeTypeName.Name, builders.CppMacros); - builders.CppMacros.Append("_DEFAULT_CONTENTS_DECLARATION \\\n"); + builders.CppMacros.AppendLine("_DEFAULT_CONTENTS_DECLARATION \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("void* operator new(size_t, void* p) noexcept; \\\n"); + builders.CppMacros.AppendLine("void* operator new(size_t, void* p) noexcept; \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("void operator delete(void*, size_t) noexcept; \\\n"); + builders.CppMacros.AppendLine("void operator delete(void*, size_t) noexcept; \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append('\n'); + builders.CppMacros.AppendLine();; // C++ default contents definition macro builders.CppMacros.Append("#define "); @@ -7173,27 +7185,27 @@ static void AppendBaseType( AppendUppercaseWithUnderscores( derivedTypeTypeName.Name, builders.CppMacros); - builders.CppMacros.Append("_DEFAULT_CONTENTS_DEFINITION \\\n"); + builders.CppMacros.AppendLine("_DEFAULT_CONTENTS_DEFINITION \\"); AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append("void* "); builders.CppMacros.Append(derivedTypeTypeName.Name); - builders.CppMacros.Append("::operator new(size_t, void* p) noexcept\\\n"); + builders.CppMacros.AppendLine("::operator new(size_t, void* p) noexcept\\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("{ \\\n"); + builders.CppMacros.AppendLine("{ \\"); AppendIndent(indent + 1, builders.CppMacros); - builders.CppMacros.Append("return p; \\\n"); + builders.CppMacros.AppendLine("return p; \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("} \\\n"); + builders.CppMacros.AppendLine("} \\"); AppendIndent(indent, builders.CppMacros); builders.CppMacros.Append("void "); builders.CppMacros.Append(derivedTypeTypeName.Name); - builders.CppMacros.Append("::operator delete(void*, size_t) noexcept \\\n"); + builders.CppMacros.AppendLine("::operator delete(void*, size_t) noexcept \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("{ \\\n"); + builders.CppMacros.AppendLine("{ \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("}\n"); + builders.CppMacros.AppendLine("}"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append('\n'); + builders.CppMacros.AppendLine();; // C++ default contents inline definition macro builders.CppMacros.Append("#define "); @@ -7204,23 +7216,23 @@ static void AppendBaseType( AppendUppercaseWithUnderscores( derivedTypeTypeName.Name, builders.CppMacros); - builders.CppMacros.Append("_DEFAULT_CONTENTS\\\n"); + builders.CppMacros.AppendLine("_DEFAULT_CONTENTS\\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("void* operator new(size_t, void* p) noexcept \\\n"); + builders.CppMacros.AppendLine("void* operator new(size_t, void* p) noexcept \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("{ \\\n"); + builders.CppMacros.AppendLine("{ \\"); AppendIndent(indent + 1, builders.CppMacros); - builders.CppMacros.Append("return p; \\\n"); + builders.CppMacros.AppendLine("return p; \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("} \\\n"); + builders.CppMacros.AppendLine("} \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("void operator delete(void*, size_t) noexcept \\\n"); + builders.CppMacros.AppendLine("void operator delete(void*, size_t) noexcept \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("{ \\\n"); + builders.CppMacros.AppendLine("{ \\"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append("}\n"); + builders.CppMacros.AppendLine("}"); AppendIndent(indent, builders.CppMacros); - builders.CppMacros.Append('\n'); + builders.CppMacros.AppendLine();; // C++ function pointers AppendCppFunctionPointerDefinition( @@ -7403,11 +7415,11 @@ static void AppendBaseType( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("DLLEXPORT int32_t "); builders.CppMethodDefinitions.Append(cppDefaultConstructorBindingFunctionName); - builders.CppMethodDefinitions.Append("(int32_t handle)\n"); + builders.CppMethodDefinitions.AppendLine("(int32_t handle)"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -7416,7 +7428,7 @@ static void AppendBaseType( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("* memory = Plugin::StoreWhole"); builders.CppMethodDefinitions.Append(baseTypeTypeName.Name); - builders.CppMethodDefinitions.Append("();\n"); + builders.CppMethodDefinitions.AppendLine("();"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -7427,15 +7439,16 @@ static void AppendBaseType( AppendCppTypeFullName( derivedTypeTypeName, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(Plugin::InternalUse::Only, handle);\n"); + builders.CppMethodDefinitions.AppendLine("(Plugin::InternalUse::Only, handle);"); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return thiz->CppHandle;\n"); + builders.CppMethodDefinitions.AppendLine("return thiz->CppHandle;"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n\n"); + builders.CppMethodDefinitions.AppendLine("}"); + builders.CppMethodDefinitions.AppendLine(); // C# usage of the C++ binding function to create from C# default constructor ParameterInfo[] cppDefaultConstructorBindingFunctionParams = ConvertParameters( @@ -7472,11 +7485,11 @@ static void AppendBaseType( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("DLLEXPORT void "); builders.CppMethodDefinitions.Append(cppDestroyBindingFunctionName); - builders.CppMethodDefinitions.Append("(int32_t cppHandle)\n"); + builders.CppMethodDefinitions.AppendLine("(int32_t cppHandle)"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -7485,7 +7498,7 @@ static void AppendBaseType( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("* instance = Plugin::Get"); builders.CppMethodDefinitions.Append(baseTypeTypeName.Name); - builders.CppMethodDefinitions.Append("(cppHandle);\n"); + builders.CppMethodDefinitions.AppendLine("(cppHandle);"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -7493,11 +7506,12 @@ static void AppendBaseType( AppendCppTypeName( baseTypeTypeName, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("();\n"); + builders.CppMethodDefinitions.AppendLine("();"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n\n"); + builders.CppMethodDefinitions.AppendLine("}"); + builders.CppMethodDefinitions.AppendLine(); // C# usage of the C++ binding function to destroy from C# default constructor ParameterInfo[] cppDestroyBindingFunctionParams = ConvertParameters( @@ -7529,23 +7543,23 @@ static void AppendBaseType( // C# DestroyFunction enumerator builders.CsharpDestroyFunctionEnumerators.Append("\t\t\t"); builders.CsharpDestroyFunctionEnumerators.Append(baseTypeTypeName.Name); - builders.CsharpDestroyFunctionEnumerators.Append(",\n"); + builders.CsharpDestroyFunctionEnumerators.AppendLine(","); // C# Destroy queue cases builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\tcase DestroyFunction."); builders.CsharpDestroyQueueCases.Append(baseTypeTypeName.Name); - builders.CsharpDestroyQueueCases.Append(":\n"); + builders.CsharpDestroyQueueCases.AppendLine(":"); builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\t\t"); builders.CsharpDestroyQueueCases.Append(cppDestroyBindingFunctionName); - builders.CsharpDestroyQueueCases.Append("(entry.CppHandle);\n"); - builders.CsharpDestroyQueueCases.Append("\t\t\t\t\t\t\tbreak;\n"); + builders.CsharpDestroyQueueCases.AppendLine("(entry.CppHandle);"); + builders.CsharpDestroyQueueCases.AppendLine("\t\t\t\t\t\t\tbreak;"); } // C# class (beginning) builders.CsharpBaseTypes.Append("namespace "); builders.CsharpBaseTypes.Append(baseTypeTypeName.Namespace); - builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("{\n"); + builders.CsharpBaseTypes.AppendLine();; + builders.CsharpBaseTypes.AppendLine("{"); builders.CsharpBaseTypes.Append("\tclass "); builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); if (jsonBaseType != null) @@ -7555,12 +7569,12 @@ static void AppendBaseType( type, builders.CsharpBaseTypes); } - builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t{\n"); + builders.CsharpBaseTypes.AppendLine();; + builders.CsharpBaseTypes.AppendLine("\t{"); // C# class fields - builders.CsharpBaseTypes.Append("\t\tpublic int CppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.AppendLine("\t\tpublic int CppHandle;"); + builders.CsharpBaseTypes.AppendLine("\t\t"); if (derivedTypeTypeName.Name != null) { @@ -7569,33 +7583,33 @@ static void AppendBaseType( { builders.CsharpBaseTypes.Append("\t\tpublic "); builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); - builders.CsharpBaseTypes.Append("()\n"); - builders.CsharpBaseTypes.Append("\t\t{\n"); - builders.CsharpBaseTypes.Append( - "\t\t\tint handle = NativeScript.Bindings.ObjectStore.Store(this);\n"); + builders.CsharpBaseTypes.AppendLine("()"); + builders.CsharpBaseTypes.AppendLine("\t\t{"); + builders.CsharpBaseTypes.AppendLine( + "\t\t\tint handle = NativeScript.Bindings.ObjectStore.Store(this);"); builders.CsharpBaseTypes.Append( "\t\t\tCppHandle = NativeScript.Bindings.New"); builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); - builders.CsharpBaseTypes.Append("(handle);\n"); - builders.CsharpBaseTypes.Append("\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.AppendLine("(handle);"); + builders.CsharpBaseTypes.AppendLine("\t\t}"); + builders.CsharpBaseTypes.AppendLine("\t\t"); } // C# finalizer/destructor builders.CsharpBaseTypes.Append("\t\t~"); builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); - builders.CsharpBaseTypes.Append("()\n"); - builders.CsharpBaseTypes.Append("\t\t{\n"); - builders.CsharpBaseTypes.Append("\t\t\tif (CppHandle != 0)\n"); - builders.CsharpBaseTypes.Append("\t\t\t{\n"); + builders.CsharpBaseTypes.AppendLine("()"); + builders.CsharpBaseTypes.AppendLine("\t\t{"); + builders.CsharpBaseTypes.AppendLine("\t\t\tif (CppHandle != 0)"); + builders.CsharpBaseTypes.AppendLine("\t\t\t{"); builders.CsharpBaseTypes.Append( "\t\t\t\tNativeScript.Bindings.QueueDestroy(NativeScript.Bindings.DestroyFunction."); builders.CsharpBaseTypes.Append(baseTypeTypeName.Name); - builders.CsharpBaseTypes.Append(", CppHandle);\n"); - builders.CsharpBaseTypes.Append("\t\t\t\tCppHandle = 0;\n"); - builders.CsharpBaseTypes.Append("\t\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.AppendLine(", CppHandle);"); + builders.CsharpBaseTypes.AppendLine("\t\t\t\tCppHandle = 0;"); + builders.CsharpBaseTypes.AppendLine("\t\t\t}"); + builders.CsharpBaseTypes.AppendLine("\t\t}"); + builders.CsharpBaseTypes.AppendLine("\t\t"); } // C# class constructors @@ -7612,16 +7626,16 @@ static void AppendBaseType( parameters, builders.CsharpBaseTypes); } - builders.CsharpBaseTypes.Append(")\n"); + builders.CsharpBaseTypes.AppendLine(")"); builders.CsharpBaseTypes.Append("\t\t\t: base("); AppendCsharpFunctionCallParameters( parameters, builders.CsharpBaseTypes); - builders.CsharpBaseTypes.Append(")\n"); - builders.CsharpBaseTypes.Append("\t\t{\n"); - builders.CsharpBaseTypes.Append("\t\t\tCppHandle = cppHandle;\n"); - builders.CsharpBaseTypes.Append("\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.AppendLine(")"); + builders.CsharpBaseTypes.AppendLine("\t\t{"); + builders.CsharpBaseTypes.AppendLine("\t\t\tCppHandle = cppHandle;"); + builders.CsharpBaseTypes.AppendLine("\t\t}"); + builders.CsharpBaseTypes.AppendLine("\t\t"); } // C# constructor delegate type @@ -7975,9 +7989,9 @@ static void AppendBaseType( } // C# class (ending) - builders.CsharpBaseTypes.Append("\t}\n"); - builders.CsharpBaseTypes.Append("}\n"); - builders.CsharpBaseTypes.Append("\n"); + builders.CsharpBaseTypes.AppendLine("\t}"); + builders.CsharpBaseTypes.AppendLine("}"); + builders.CsharpBaseTypes.AppendLine(); // C++ method definitions (end) AppendCppMethodDefinitionsEnd( @@ -8077,8 +8091,8 @@ static void AppendBaseTypeProperty( builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(']'); } - builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.AppendLine();; + builders.CsharpBaseTypes.AppendLine("\t\t{"); TypeKind propertyTypeKind = GetTypeKind( propertyInfo.PropertyType); @@ -8115,8 +8129,8 @@ static void AppendBaseTypeProperty( builders); } - builders.CsharpBaseTypes.Append("\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\n"); + builders.CsharpBaseTypes.AppendLine("\t\t}"); + builders.CsharpBaseTypes.AppendLine("\t\t"); } static void AppendBaseTypeEvent( @@ -8142,8 +8156,8 @@ static void AppendBaseTypeEvent( builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append(' '); builders.CsharpBaseTypes.Append(eventInfo.Name); - builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t{\n"); + builders.CsharpBaseTypes.AppendLine();; + builders.CsharpBaseTypes.AppendLine("\t\t{"); TypeKind eventHandlerTypeKind = GetTypeKind( eventInfo.EventHandlerType); @@ -8180,8 +8194,8 @@ static void AppendBaseTypeEvent( builders); } - builders.CsharpBaseTypes.Append("\t\t\t}\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); + builders.CsharpBaseTypes.AppendLine("\t\t\t}"); + builders.CsharpBaseTypes.AppendLine("\t\t\t"); } static void AppendBaseTypeNativePropertyOrEvent( @@ -8238,8 +8252,8 @@ static void AppendBaseTypeNativePropertyOrEvent( operationType, 1, operationType.Length - 1); - builders.CsharpBaseTypes.Append('\n'); - builders.CsharpBaseTypes.Append("\t\t\t{\n"); + builders.CsharpBaseTypes.AppendLine();; + builders.CsharpBaseTypes.AppendLine("\t\t\t{"); AppendCsharpBaseTypeCppMethodCallMethodBody( methodInfo, nativeInvokeFuncName, @@ -8247,7 +8261,7 @@ static void AppendBaseTypeNativePropertyOrEvent( propertyOrEventTypeKind, 4, builders.CsharpBaseTypes); - builders.CsharpBaseTypes.Append("\t\t\t}\n"); + builders.CsharpBaseTypes.AppendLine("\t\t\t}"); } static void AppendCsharpParams( @@ -8339,7 +8353,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( false, GetTypeName(type), @@ -8358,11 +8372,11 @@ static void AppendBaseTypeMethodCallsCsharpMethod( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C# delegate type for the binding function that C++ calls ParameterInfo[] invokeParamsWithThis = new ParameterInfo[ @@ -8524,7 +8538,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); if (invokeMethod.ReturnType != typeof(void)) { TypeKind returnTypeKind = GetTypeKind(invokeMethod.ReturnType); @@ -8534,21 +8548,21 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( if (returnTypeKind == TypeKind.Class || returnTypeKind == TypeKind.ManagedStruct) { - builders.CppMethodDefinitions.Append("return nullptr;\n"); + builders.CppMethodDefinitions.AppendLine("return nullptr;"); } else { - builders.CppMethodDefinitions.Append("return {};\n"); + builders.CppMethodDefinitions.AppendLine("return {};"); } } AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ binding function that C# calls. Calls the C++ method. TypeKind invokeReturnTypeKind = GetTypeKind( @@ -8630,20 +8644,20 @@ static void AppendCsharpBaseTypeReleaseFunction( AppendCsharpTypeFullName( bindingTypeTypeName, output); - output.Append(" thiz;\n"); + output.AppendLine(" thiz;"); } if (typeIsDelegate) { - output.Append("\t\t\t\tif (classHandle != 0)\n"); - output.Append("\t\t\t\t{\n"); + output.AppendLine("\t\t\t\tif (classHandle != 0)"); + output.AppendLine("\t\t\t\t{"); output.Append("\t\t\t\t\tthiz = ("); AppendCsharpTypeFullName( bindingTypeTypeName, output); - output.Append(")ObjectStore.Remove(classHandle);\n"); - output.Append("\t\t\t\t\tthiz.CppHandle = 0;\n"); - output.Append("\t\t\t\t}\n"); - output.Append("\t\t\t\t\n"); + output.AppendLine(")ObjectStore.Remove(classHandle);"); + output.AppendLine("\t\t\t\t\tthiz.CppHandle = 0;"); + output.AppendLine("\t\t\t\t}"); + output.AppendLine("\t\t\t\t"); } if (derivedName != null) { @@ -8651,12 +8665,12 @@ static void AppendCsharpBaseTypeReleaseFunction( AppendCsharpTypeFullName( bindingTypeTypeName, output); - output.Append(")ObjectStore.Get(handle);\n"); - output.Append("\t\t\t\tint cppHandle = thiz.CppHandle;\n"); - output.Append("\t\t\t\tthiz.CppHandle = 0;\n"); + output.AppendLine(")ObjectStore.Get(handle);"); + output.AppendLine("\t\t\t\tint cppHandle = thiz.CppHandle;"); + output.AppendLine("\t\t\t\tthiz.CppHandle = 0;"); output.Append("\t\t\t\tQueueDestroy(DestroyFunction."); output.Append(bindingTypeTypeName.Name); - output.Append(", cppHandle);\n"); + output.AppendLine(", cppHandle);"); } output.Append("\t\t\t\tObjectStore.Remove(handle);"); AppendCsharpFunctionReturn( @@ -8692,8 +8706,8 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( AppendCsharpParams( invokeParams, output); - output.Append(")\n"); - output.Append("\t\t{\n"); + output.AppendLine(")"); + output.AppendLine("\t\t{"); AppendCsharpBaseTypeCppMethodCallMethodBody( invokeMethod, nativeInvokeFuncName, @@ -8701,8 +8715,8 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( invokeReturnTypeKind, 3, output); - output.Append("\t\t}\n"); - output.Append("\t\n"); + output.AppendLine("\t\t}"); + output.AppendLine("\t"); } static void AppendCsharpBaseTypeCppMethodCallMethodBody( @@ -8716,15 +8730,15 @@ static void AppendCsharpBaseTypeCppMethodCallMethodBody( AppendIndent( indent, output); - output.Append("if (CppHandle != 0)\n"); + output.AppendLine("if (CppHandle != 0)"); AppendIndent( indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 1, output); - output.Append("int thisHandle = CppHandle;\n"); + output.AppendLine("int thisHandle = CppHandle;"); AppendCppFunctionCall( nativeInvokeFuncName, invokeParamsWithThis, @@ -8753,17 +8767,17 @@ static void AppendCsharpBaseTypeCppMethodCallMethodBody( AppendHandleStoreTypeName( invokeMethod.ReturnType, output); - output.Append(".Get(returnVal);\n"); + output.AppendLine(".Get(returnVal);"); break; default: - output.Append("returnVal;\n"); + output.AppendLine("returnVal;"); break; } } AppendIndent( indent, output); - output.Append("}\n"); + output.AppendLine("}"); if (invokeMethod.ReturnType != typeof(void)) { AppendIndent( @@ -8773,7 +8787,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethodBody( AppendCsharpTypeFullName( invokeMethod.ReturnType, output); - output.Append(");\n"); + output.AppendLine(");"); } } @@ -8804,11 +8818,11 @@ static void AppendCsharpBaseTypeConstructorFunction( cppConstructorParams, output); } - output.Append(");\n"); + output.AppendLine(");"); if (typeIsDelegate) { - output.Append( - "\t\t\t\tclassHandle = NativeScript.Bindings.ObjectStore.Store(thiz);\n"); + output.AppendLine( + "\t\t\t\tclassHandle = NativeScript.Bindings.ObjectStore.Store(thiz);"); output.Append( "\t\t\t\thandle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate);"); } @@ -8918,19 +8932,19 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output.Append(", "); } } - output.Append(")\n"); + output.AppendLine(")"); AppendIndent( indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 1, output); - output.Append("try\n"); + output.AppendLine("try"); AppendIndent( indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); foreach (ParameterInfo parameter in methodParams) { if (parameter.Kind == TypeKind.Class || @@ -8947,7 +8961,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( output); output.Append("(Plugin::InternalUse::Only, "); output.Append(parameter.Name); - output.Append("Handle);\n"); + output.AppendLine("Handle);"); } } AppendIndent( @@ -8987,45 +9001,45 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( { output.Append(".Handle"); } - output.Append(";\n"); + output.AppendLine(";"); AppendIndent( indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( indent + 1, output); - output.Append( - "catch (System::Exception ex)\n"); + output.AppendLine( + "catch (System::Exception ex)"); AppendIndent( indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 2, output); - output.Append( - "Plugin::SetException(ex.Handle);\n"); + output.AppendLine( + "Plugin::SetException(ex.Handle);"); if (method.ReturnType != typeof(void)) { AppendIndent( indent + 2, output); - output.Append( - "return {};\n"); + output.AppendLine( + "return {};"); } AppendIndent( indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( indent + 1, output); - output.Append("catch (...)\n"); + output.AppendLine("catch (...)"); AppendIndent( indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( indent + 2, output); @@ -9034,37 +9048,37 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( AppendCppTypeFullName( type, output); - output.Append("\";\n"); + output.AppendLine("\";"); AppendIndent( indent + 2, output); - output.Append( - "System::Exception ex(msg);\n"); + output.AppendLine( + "System::Exception ex(msg);"); AppendIndent( indent + 2, output); - output.Append( - "Plugin::SetException(ex.Handle);\n"); + output.AppendLine( + "Plugin::SetException(ex.Handle);"); if (method.ReturnType != typeof(void)) { AppendIndent( indent + 2, output); - output.Append( - "return {};\n"); + output.AppendLine( + "return {};"); } AppendIndent( indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( indent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeInequalityOperator( @@ -9091,24 +9105,24 @@ static void AppendCppBaseTypeInequalityOperator( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("& other) const\n"); + output.AppendLine("& other) const"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "return Handle != other.Handle;\n"); + output.AppendLine( + "return Handle != other.Handle;"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeEqualityOperator( @@ -9135,24 +9149,24 @@ static void AppendCppBaseTypeEqualityOperator( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("& other) const\n"); + output.AppendLine("& other) const"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "return Handle == other.Handle;\n"); + output.AppendLine( + "return Handle == other.Handle;"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeMoveAssignmentOperator( @@ -9187,60 +9201,60 @@ static void AppendCppBaseTypeMoveAssignmentOperator( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("&& other)\n"); + output.AppendLine("&& other)"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); output.Append("Plugin::Remove"); output.Append(bindingTypeName); - output.Append("(CppHandle);\n"); + output.AppendLine("(CppHandle);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("CppHandle = 0;\n"); + output.AppendLine("CppHandle = 0;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("int32_t handle = Handle;\n"); + output.AppendLine("int32_t handle = Handle;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("int32_t classHandle = ClassHandle;\n"); + output.AppendLine("int32_t classHandle = ClassHandle;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("Handle = 0;\n"); + output.AppendLine("Handle = 0;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("ClassHandle = 0;\n"); + output.AppendLine("ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append( - "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); + output.AppendLine( + "if (Plugin::DereferenceManagedClassNoRelease(handle))"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 3, output); @@ -9251,50 +9265,50 @@ static void AppendCppBaseTypeMoveAssignmentOperator( { output.Append(", classHandle"); } - output.Append(");\n"); + output.AppendLine(");"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 3, output); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "ClassHandle = other.ClassHandle;\n"); + output.AppendLine( + "ClassHandle = other.ClassHandle;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("other.ClassHandle = 0;\n"); + output.AppendLine("other.ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("Handle = other.Handle;\n"); + output.AppendLine("Handle = other.Handle;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("other.Handle = 0;\n"); + output.AppendLine("other.Handle = 0;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("return *this;\n"); + output.AppendLine("return *this;"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeAssignmentOperatorNullptr( @@ -9321,51 +9335,51 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append( - "::operator=(decltype(nullptr))\n"); + output.AppendLine( + "::operator=(decltype(nullptr))"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("int32_t handle = Handle;\n"); + output.AppendLine("int32_t handle = Handle;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("int32_t classHandle = ClassHandle;\n"); + output.AppendLine("int32_t classHandle = ClassHandle;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("Handle = 0;\n"); + output.AppendLine("Handle = 0;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("ClassHandle = 0;\n"); + output.AppendLine("ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append( - "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); + output.AppendLine( + "if (Plugin::DereferenceManagedClassNoRelease(handle))"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 3, output); @@ -9376,41 +9390,41 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( { output.Append(", classHandle"); } - output.Append(");\n"); + output.AppendLine(");"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 3, output); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("ClassHandle = 0;\n"); + output.AppendLine("ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("Handle = 0;\n"); + output.AppendLine("Handle = 0;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("return *this;\n"); + output.AppendLine("return *this;"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeAssignmentOperatorSameType( @@ -9443,11 +9457,11 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("& other)\n"); + output.AppendLine("& other)"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendSetHandle( typeTypeName, TypeKind.Class, @@ -9461,21 +9475,21 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "ClassHandle = other.ClassHandle;\n"); + output.AppendLine( + "ClassHandle = other.ClassHandle;"); } AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("return *this;\n"); + output.AppendLine("return *this;"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeDestructor( @@ -9505,11 +9519,11 @@ static void AppendCppBaseTypeDestructor( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("()\n"); + output.AppendLine("()"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); if (!string.IsNullOrEmpty(derivedTypeName)) { AppendIndent( @@ -9517,57 +9531,57 @@ static void AppendCppBaseTypeDestructor( output); output.Append("Plugin::RemoveWhole"); output.Append(bindingTypeName); - output.Append("(this);\n"); + output.AppendLine("(this);"); } AppendIndent( cppMethodDefinitionsIndent + 1, output); output.Append("Plugin::Remove"); output.Append(typeName); - output.Append("(CppHandle);\n"); + output.AppendLine("(CppHandle);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("CppHandle = 0;\n"); + output.AppendLine("CppHandle = 0;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("int32_t handle = Handle;\n"); + output.AppendLine("int32_t handle = Handle;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("int32_t classHandle = ClassHandle;\n"); + output.AppendLine("int32_t classHandle = ClassHandle;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("Handle = 0;\n"); + output.AppendLine("Handle = 0;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("ClassHandle = 0;\n"); + output.AppendLine("ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append( - "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); + output.AppendLine( + "if (Plugin::DereferenceManagedClassNoRelease(handle))"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 3, output); @@ -9578,26 +9592,26 @@ static void AppendCppBaseTypeDestructor( { output.Append(", classHandle"); } - output.Append(");\n"); + output.AppendLine(");"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 3, output); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeHandleConstructor( @@ -9622,8 +9636,8 @@ static void AppendCppBaseTypeHandleConstructor( AppendCppTypeName( typeTypeName, output); - output.Append( - "(Plugin::InternalUse, int32_t handle)\n"); + output.AppendLine( + "(Plugin::InternalUse, int32_t handle)"); AppendCppConstructorInitializerList( interfaceTypes, cppMethodDefinitionsIndent + 1, @@ -9631,50 +9645,50 @@ static void AppendCppBaseTypeHandleConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("Handle = handle;\n"); + output.AppendLine("Handle = handle;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); output.Append("CppHandle = Plugin::Store"); output.Append(bindingTypeName); - output.Append("(this);\n"); + output.AppendLine("(this);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append( - "Plugin::ReferenceManagedClass(Handle);\n"); + output.AppendLine( + "Plugin::ReferenceManagedClass(Handle);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "ClassHandle = 0;\n"); + output.AppendLine( + "ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeMoveConstructor( @@ -9705,7 +9719,7 @@ static void AppendCppBaseTypeMoveConstructor( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("&& other)\n"); + output.AppendLine("&& other)"); AppendCppConstructorInitializerList( interfaceTypes, cppMethodDefinitionsIndent + 1, @@ -9713,48 +9727,48 @@ static void AppendCppBaseTypeMoveConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "Handle = other.Handle;\n"); + output.AppendLine( + "Handle = other.Handle;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "CppHandle = other.CppHandle;\n"); + output.AppendLine( + "CppHandle = other.CppHandle;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "ClassHandle = other.ClassHandle;\n"); + output.AppendLine( + "ClassHandle = other.ClassHandle;"); } AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("other.Handle = 0;\n"); + output.AppendLine("other.Handle = 0;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("other.CppHandle = 0;\n"); + output.AppendLine("other.CppHandle = 0;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("other.ClassHandle = 0;\n"); + output.AppendLine("other.ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeCopyConstructor( @@ -9786,7 +9800,7 @@ static void AppendCppBaseTypeCopyConstructor( AppendCppTypeParameters( typeIsDelegate ? typeParams : null, output); - output.Append("& other)\n"); + output.AppendLine("& other)"); AppendCppConstructorInitializerList( interfaceTypes, cppMethodDefinitionsIndent + 1, @@ -9794,51 +9808,51 @@ static void AppendCppBaseTypeCopyConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "Handle = other.Handle;\n"); + output.AppendLine( + "Handle = other.Handle;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); output.Append("CppHandle = Plugin::Store"); output.Append(typeName); - output.Append("(this);\n"); + output.AppendLine("(this);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append( - "Plugin::ReferenceManagedClass(Handle);\n"); + output.AppendLine( + "Plugin::ReferenceManagedClass(Handle);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append( - "ClassHandle = other.ClassHandle;\n"); + output.AppendLine( + "ClassHandle = other.ClassHandle;"); } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeNullptrConstructor( @@ -9863,7 +9877,7 @@ static void AppendCppBaseTypeNullptrConstructor( AppendCppTypeName( cppTypeTypeName, output); - output.Append("(decltype(nullptr))\n"); + output.AppendLine("(decltype(nullptr))"); AppendCppConstructorInitializerList( interfaceTypes, cppMethodDefinitionsIndent + 1, @@ -9871,28 +9885,28 @@ static void AppendCppBaseTypeNullptrConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); output.Append("CppHandle = Plugin::Store"); output.Append(typeName); - output.Append("(this);\n"); + output.AppendLine("(this);"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("ClassHandle = 0;\n"); + output.AppendLine("ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppBaseTypeConstructor( @@ -9925,27 +9939,27 @@ static void AppendCppBaseTypeConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 1, output); output.Append("CppHandle = Plugin::Store"); output.Append(bindingTypeName); - output.Append("(this);\n"); + output.AppendLine("(this);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("System::Int32* handle = (System::Int32*)&Handle;\n"); + output.AppendLine("System::Int32* handle = (System::Int32*)&Handle;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("int32_t cppHandle = CppHandle;\n"); + output.AppendLine("int32_t cppHandle = CppHandle;"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("System::Int32* classHandle = (System::Int32*)&ClassHandle;\n"); + output.AppendLine("System::Int32* classHandle = (System::Int32*)&ClassHandle;"); } AppendCppPluginFunctionCall( true, @@ -9960,60 +9974,60 @@ static void AppendCppBaseTypeConstructor( AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append( - "Plugin::ReferenceManagedClass(Handle);\n"); + output.AppendLine( + "Plugin::ReferenceManagedClass(Handle);"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("else\n"); + output.AppendLine("else"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent( cppMethodDefinitionsIndent + 2, output); output.Append("Plugin::Remove"); output.Append(bindingTypeName); - output.Append("(CppHandle);\n"); + output.AppendLine("(CppHandle);"); if (typeIsDelegate) { AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("ClassHandle = 0;\n"); + output.AppendLine("ClassHandle = 0;"); } AppendIndent( cppMethodDefinitionsIndent + 2, output); - output.Append("CppHandle = 0;\n"); + output.AppendLine("CppHandle = 0;"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 1, output); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent( cppMethodDefinitionsIndent, output); - output.Append('\n'); + output.AppendLine();; } static void AppendCppPointerFreeListInit( @@ -10028,7 +10042,7 @@ static void AppendCppPointerFreeListInit( output.Append(typeName); output.Append("FreeListSize = "); output.Append(maxSimultaneous); - output.Append(";\n"); + output.AppendLine(";"); output.Append("\tPlugin::"); output.Append(typeName); @@ -10039,7 +10053,7 @@ static void AppendCppPointerFreeListInit( AppendCppTypeParameters( typeParams, output); - output.Append("**)curMemory;\n"); + output.AppendLine("**)curMemory;"); output.Append("\tcurMemory += "); output.Append(maxSimultaneous); @@ -10050,14 +10064,14 @@ static void AppendCppPointerFreeListInit( AppendCppTypeParameters( typeParams, output); - output.Append("*);\n"); + output.AppendLine("*);"); - output.Append("\t\n"); + output.AppendLine("\t"); outputFirstBoot.Append("\t\tfor (int32_t i = 0, end = Plugin::"); outputFirstBoot.Append(typeName); - outputFirstBoot.Append("FreeListSize - 1; i < end; ++i)\n"); - outputFirstBoot.Append("\t\t{\n"); + outputFirstBoot.AppendLine("FreeListSize - 1; i < end; ++i)"); + outputFirstBoot.AppendLine("\t\t{"); outputFirstBoot.Append("\t\t\tPlugin::"); outputFirstBoot.Append(typeName); outputFirstBoot.Append("FreeList[i] = ("); @@ -10069,22 +10083,22 @@ static void AppendCppPointerFreeListInit( outputFirstBoot); outputFirstBoot.Append("*)(Plugin::"); outputFirstBoot.Append(typeName); - outputFirstBoot.Append("FreeList + i + 1);\n"); - outputFirstBoot.Append("\t\t}\n"); + outputFirstBoot.AppendLine("FreeList + i + 1);"); + outputFirstBoot.AppendLine("\t\t}"); outputFirstBoot.Append("\t\tPlugin::"); outputFirstBoot.Append(typeName); outputFirstBoot.Append("FreeList[Plugin::"); outputFirstBoot.Append(typeName); - outputFirstBoot.Append("FreeListSize - 1] = nullptr;\n"); + outputFirstBoot.AppendLine("FreeListSize - 1] = nullptr;"); outputFirstBoot.Append("\t\tPlugin::NextFree"); outputFirstBoot.Append(typeName); outputFirstBoot.Append(" = Plugin::"); outputFirstBoot.Append(typeName); - outputFirstBoot.Append("FreeList + 1;\n"); + outputFirstBoot.AppendLine("FreeList + 1;"); - outputFirstBoot.Append("\t\t\n"); + outputFirstBoot.AppendLine("\t\t"); } static void AppendCppPointerFreeListStateAndFunctions( @@ -10101,13 +10115,13 @@ static void AppendCppPointerFreeListStateAndFunctions( AppendCppTypeParameters( typeParams, output); - output.Append(" pointers\n"); - output.Append("\t\n"); + output.AppendLine(" pointers"); + output.AppendLine("\t"); // Size variable output.Append("\tint32_t "); output.Append(bindingTypeName); - output.Append("FreeListSize;\n"); + output.AppendLine("FreeListSize;"); // Free list variable output.Append('\t'); @@ -10119,7 +10133,7 @@ static void AppendCppPointerFreeListStateAndFunctions( output); output.Append("** "); output.Append(bindingTypeName); - output.Append("FreeList;\n"); + output.AppendLine("FreeList;"); // Next free variable output.Append('\t'); @@ -10131,8 +10145,8 @@ static void AppendCppPointerFreeListStateAndFunctions( output); output.Append("** NextFree"); output.Append(bindingTypeName); - output.Append(";\n"); - output.Append("\t\n"); + output.AppendLine(";"); + output.AppendLine("\t"); // Store function output.Append("\tint32_t Store"); @@ -10144,11 +10158,11 @@ static void AppendCppPointerFreeListStateAndFunctions( AppendCppTypeParameters( typeParams, output); - output.Append("* del)\n"); - output.Append("\t{\n"); + output.AppendLine("* del)"); + output.AppendLine("\t{"); output.Append("\t\tassert(NextFree"); output.Append(bindingTypeName); - output.Append(" != nullptr);\n"); + output.AppendLine(" != nullptr);"); output.Append("\t\t"); AppendCppTypeFullName( cppTypeTypeName, @@ -10158,7 +10172,7 @@ static void AppendCppPointerFreeListStateAndFunctions( output); output.Append("** pNext = NextFree"); output.Append(bindingTypeName); - output.Append(";\n"); + output.AppendLine(";"); output.Append("\t\tNextFree"); output.Append(bindingTypeName); output.Append(" = ("); @@ -10168,13 +10182,13 @@ static void AppendCppPointerFreeListStateAndFunctions( AppendCppTypeParameters( typeParams, output); - output.Append("**)*pNext;\n"); - output.Append("\t\t*pNext = del;\n"); + output.AppendLine("**)*pNext;"); + output.AppendLine("\t\t*pNext = del;"); output.Append("\t\treturn (int32_t)(pNext - "); output.Append(bindingTypeName); - output.Append("FreeList);\n"); - output.Append("\t}\n"); - output.Append("\t\n"); + output.AppendLine("FreeList);"); + output.AppendLine("\t}"); + output.AppendLine("\t"); // Get function output.Append('\t'); @@ -10186,23 +10200,23 @@ static void AppendCppPointerFreeListStateAndFunctions( output); output.Append("* Get"); output.Append(bindingTypeName); - output.Append("(int32_t handle)\n"); - output.Append("\t{\n"); + output.AppendLine("(int32_t handle)"); + output.AppendLine("\t{"); output.Append( "\t\tassert(handle >= 0 && handle < "); output.Append(bindingTypeName); - output.Append("FreeListSize);\n"); + output.AppendLine("FreeListSize);"); output.Append("\t\treturn "); output.Append(bindingTypeName); - output.Append("FreeList[handle];\n"); - output.Append("\t}\n"); - output.Append("\t\n"); + output.AppendLine("FreeList[handle];"); + output.AppendLine("\t}"); + output.AppendLine("\t"); // Remove function output.Append("\tvoid Remove"); output.Append(bindingTypeName); - output.Append("(int32_t handle)\n"); - output.Append("\t{\n"); + output.AppendLine("(int32_t handle)"); + output.AppendLine("\t{"); output.Append("\t\t"); AppendCppTypeFullName( cppTypeTypeName, @@ -10212,7 +10226,7 @@ static void AppendCppPointerFreeListStateAndFunctions( output); output.Append("** pRelease = "); output.Append(bindingTypeName); - output.Append("FreeList + handle;\n"); + output.AppendLine("FreeList + handle;"); output.Append("\t\t*pRelease = ("); AppendCppTypeFullName( cppTypeTypeName, @@ -10222,12 +10236,12 @@ static void AppendCppPointerFreeListStateAndFunctions( output); output.Append("*)NextFree"); output.Append(bindingTypeName); - output.Append(";\n"); + output.AppendLine(";"); output.Append("\t\tNextFree"); output.Append(bindingTypeName); - output.Append(" = pRelease;\n"); - output.Append("\t}\n"); - output.Append("\t\n"); + output.AppendLine(" = pRelease;"); + output.AppendLine("\t}"); + output.AppendLine("\t"); } static void AppendCppWholeObjectFreeListInit( @@ -10240,46 +10254,46 @@ static void AppendCppWholeObjectFreeListInit( output.Append(bindingTypeName); output.Append("FreeWholeListSize = "); output.Append(maxSimultaneous); - output.Append(";\n"); + output.AppendLine(";"); output.Append("\tPlugin::"); output.Append(bindingTypeName); output.Append("FreeWholeList = (Plugin::"); output.Append(bindingTypeName); - output.Append("FreeWholeListEntry*)curMemory;\n"); + output.AppendLine("FreeWholeListEntry*)curMemory;"); output.Append("\tcurMemory += "); output.Append(maxSimultaneous); output.Append(" * sizeof(Plugin::"); output.Append(bindingTypeName); - output.Append("FreeWholeListEntry);\n"); + output.AppendLine("FreeWholeListEntry);"); - output.Append("\t\n"); + output.AppendLine("\t"); outputFirstBoot.Append("\t\tfor (int32_t i = 0, end = Plugin::"); outputFirstBoot.Append(bindingTypeName); - outputFirstBoot.Append("FreeWholeListSize - 1; i < end; ++i)\n"); - outputFirstBoot.Append("\t\t{\n"); + outputFirstBoot.AppendLine("FreeWholeListSize - 1; i < end; ++i)"); + outputFirstBoot.AppendLine("\t\t{"); outputFirstBoot.Append("\t\t\tPlugin::"); outputFirstBoot.Append(bindingTypeName); outputFirstBoot.Append("FreeWholeList[i].Next = Plugin::"); outputFirstBoot.Append(bindingTypeName); - outputFirstBoot.Append("FreeWholeList + i + 1;\n"); - outputFirstBoot.Append("\t\t}\n"); + outputFirstBoot.AppendLine("FreeWholeList + i + 1;"); + outputFirstBoot.AppendLine("\t\t}"); outputFirstBoot.Append("\t\tPlugin::"); outputFirstBoot.Append(bindingTypeName); outputFirstBoot.Append("FreeWholeList[Plugin::"); outputFirstBoot.Append(bindingTypeName); - outputFirstBoot.Append("FreeWholeListSize - 1].Next = nullptr;\n"); + outputFirstBoot.AppendLine("FreeWholeListSize - 1].Next = nullptr;"); outputFirstBoot.Append("\t\tPlugin::NextFreeWhole"); outputFirstBoot.Append(bindingTypeName); outputFirstBoot.Append(" = Plugin::"); outputFirstBoot.Append(bindingTypeName); - outputFirstBoot.Append("FreeWholeList + 1;\n"); + outputFirstBoot.AppendLine("FreeWholeList + 1;"); - outputFirstBoot.Append("\t\t\n"); + outputFirstBoot.AppendLine("\t\t"); } static void AppendCppWholeObjectFreeListStateAndFunctions( @@ -10296,17 +10310,17 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( AppendCppTypeParameters( typeParams, output); - output.Append(" objects\n"); - output.Append("\t\n"); + output.AppendLine(" objects"); + output.AppendLine("\t"); // Union with a pointer and a whole object output.Append("\tunion "); output.Append(bindingTypeName); - output.Append("FreeWholeListEntry\n"); - output.Append("\t{\n"); + output.AppendLine("FreeWholeListEntry"); + output.AppendLine("\t{"); output.Append("\t\t"); output.Append(bindingTypeName); - output.Append("FreeWholeListEntry* Next;\n"); + output.AppendLine("FreeWholeListEntry* Next;"); output.Append("\t\t"); AppendCppTypeFullName( cppTypeTypeName, @@ -10314,28 +10328,28 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( AppendCppTypeParameters( typeParams, output); - output.Append(" Value;\n"); - output.Append("\t};\n"); + output.AppendLine(" Value;"); + output.AppendLine("\t};"); // Size output.Append("\tint32_t "); output.Append(bindingTypeName); - output.Append("FreeWholeListSize;\n"); + output.AppendLine("FreeWholeListSize;"); // Free list entries output.Append('\t'); output.Append(bindingTypeName); output.Append("FreeWholeListEntry* "); output.Append(bindingTypeName); - output.Append("FreeWholeList;\n"); + output.AppendLine("FreeWholeList;"); // Pointer to next free entry output.Append('\t'); output.Append(bindingTypeName); output.Append("FreeWholeListEntry* NextFreeWhole"); output.Append(bindingTypeName); - output.Append(";\n"); - output.Append("\t\n"); + output.AppendLine(";"); + output.AppendLine("\t"); // Store function output.Append('\t'); @@ -10347,22 +10361,22 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( output); output.Append("* StoreWhole"); output.Append(bindingTypeName); - output.Append("()\n"); - output.Append("\t{\n"); + output.AppendLine("()"); + output.AppendLine("\t{"); output.Append("\t\tassert(NextFreeWhole"); output.Append(bindingTypeName); - output.Append(" != nullptr);\n"); + output.AppendLine(" != nullptr);"); output.Append("\t\t"); output.Append(bindingTypeName); output.Append("FreeWholeListEntry* pNext = NextFreeWhole"); output.Append(bindingTypeName); - output.Append(";\n"); + output.AppendLine(";"); output.Append("\t\tNextFreeWhole"); output.Append(bindingTypeName); - output.Append(" = pNext->Next;\n"); - output.Append("\t\treturn &pNext->Value;\n"); - output.Append("\t}\n"); - output.Append("\t\n"); + output.AppendLine(" = pNext->Next;"); + output.AppendLine("\t\treturn &pNext->Value;"); + output.AppendLine("\t}"); + output.AppendLine("\t"); // Remove function output.Append("\tvoid RemoveWhole"); @@ -10374,30 +10388,30 @@ static void AppendCppWholeObjectFreeListStateAndFunctions( AppendCppTypeParameters( typeParams, output); - output.Append("* instance)\n"); - output.Append("\t{\n"); + output.AppendLine("* instance)"); + output.AppendLine("\t{"); output.Append("\t\t"); output.Append(bindingTypeName); output.Append("FreeWholeListEntry* pRelease = ("); output.Append(bindingTypeName); - output.Append("FreeWholeListEntry*)instance;\n"); + output.AppendLine("FreeWholeListEntry*)instance;"); output.Append("\t\tif (pRelease >= "); output.Append(bindingTypeName); output.Append("FreeWholeList && pRelease < "); output.Append(bindingTypeName); output.Append("FreeWholeList + ("); output.Append(bindingTypeName); - output.Append("FreeWholeListSize - 1))\n"); - output.Append("\t\t{\n"); + output.AppendLine("FreeWholeListSize - 1))"); + output.AppendLine("\t\t{"); output.Append("\t\t\tpRelease->Next = NextFreeWhole"); output.Append(bindingTypeName); - output.Append(";\n"); + output.AppendLine(";"); output.Append("\t\t\tNextFreeWhole"); output.Append(bindingTypeName); - output.Append(" = pRelease->Next;\n"); - output.Append("\t\t}\n"); - output.Append("\t}\n"); - output.Append("\t\n"); + output.AppendLine(" = pRelease->Next;"); + output.AppendLine("\t\t}"); + output.AppendLine("\t}"); + output.AppendLine("\t"); } static void AppendCsharpDelegate( @@ -10410,7 +10424,7 @@ static void AppendCsharpDelegate( TypeKind returnTypeKind, StringBuilder output) { - output.Append("\t\t[UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n"); + output.AppendLine("\t\t[UnmanagedFunctionPointer(CallingConvention.Cdecl)]"); output.Append("\t\tpublic delegate "); if (returnType == typeof(void)) { @@ -10470,7 +10484,7 @@ static void AppendCsharpDelegate( output.Append(", "); } } - output.Append(");\n"); + output.AppendLine(");"); output.Append("\t\tpublic static "); AppendCsharpDelegateName( typeTypeName, @@ -10483,7 +10497,8 @@ static void AppendCsharpDelegate( typeParams, funcName, output); - output.Append(";\n\t\t\n"); + output.AppendLine(";"); + output.AppendLine("\t\t"); } static void AppendCsharpDelegateName( @@ -10529,7 +10544,7 @@ static void AppendCsharpGetDelegateCall( typeParams, funcName, output); - output.Append("\");\n"); + output.AppendLine("\");"); } static void AppendCsharpImport( @@ -10541,7 +10556,7 @@ static void AppendCsharpImport( StringBuilder output ) { - output.Append("\t\t[DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)]\n"); + output.AppendLine("\t\t[DllImport(PLUGIN_NAME, CallingConvention = CallingConvention.Cdecl)]"); output.Append("\t\tpublic static extern "); AppendCsharpTypeFullName(returnType, output); output.Append(' '); @@ -10576,7 +10591,8 @@ StringBuilder output output.Append(", "); } } - output.Append(");\n\t\t\n"); + output.AppendLine(");"); + output.AppendLine("\t\t"); } static void AppendExceptions( @@ -10665,32 +10681,32 @@ static void AppendExceptions( AppendCppTypeFullName( exceptionType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; AppendIndent( throwerIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(exceptionType.Name); - builders.CppMethodDefinitions.Append("Thrower(int32_t handle)\n"); + builders.CppMethodDefinitions.AppendLine("Thrower(int32_t handle)"); AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(": System::Runtime::InteropServices::_Exception(nullptr)\n"); + builders.CppMethodDefinitions.AppendLine(": System::Runtime::InteropServices::_Exception(nullptr)"); AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(", System::Runtime::Serialization::ISerializable(nullptr)\n"); + builders.CppMethodDefinitions.AppendLine(", System::Runtime::Serialization::ISerializable(nullptr)"); AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(", System::Exception(nullptr)\n"); + builders.CppMethodDefinitions.AppendLine(", System::Exception(nullptr)"); AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(", System::SystemException(nullptr)\n"); + builders.CppMethodDefinitions.AppendLine(", System::SystemException(nullptr)"); AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); @@ -10698,56 +10714,57 @@ static void AppendExceptions( AppendCppTypeFullName( exceptionType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(Plugin::InternalUse::Only, handle)\n"); + builders.CppMethodDefinitions.AppendLine("(Plugin::InternalUse::Only, handle)"); AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( throwerIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("virtual void ThrowReferenceToThis()\n"); + builders.CppMethodDefinitions.AppendLine("virtual void ThrowReferenceToThis()"); AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("throw *this;\n"); + builders.CppMethodDefinitions.AppendLine("throw *this;"); AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent( throwerIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("};\n"); + builders.CppMethodDefinitions.AppendLine("};"); AppendNamespaceEnding( throwerIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ function builders.CppMethodDefinitions.Append("DLLEXPORT void "); builders.CppMethodDefinitions.Append(funcName); - builders.CppMethodDefinitions.Append("(int32_t handle)\n"); - builders.CppMethodDefinitions.Append("{\n"); - builders.CppMethodDefinitions.Append("\tdelete Plugin::unhandledCsharpException;\n"); + builders.CppMethodDefinitions.AppendLine("(int32_t handle)"); + builders.CppMethodDefinitions.AppendLine("{"); + builders.CppMethodDefinitions.AppendLine("\tdelete Plugin::unhandledCsharpException;"); builders.CppMethodDefinitions.Append("\tPlugin::unhandledCsharpException = new "); AppendCppTypeFullName( exceptionType, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Thrower(handle);\n"); - builders.CppMethodDefinitions.Append("}\n\n"); + builders.CppMethodDefinitions.AppendLine("Thrower(handle);"); + builders.CppMethodDefinitions.AppendLine("}"); + builders.CppMethodDefinitions.AppendLine(); // Build parameters ParameterInfo[] parameters = ConvertParameters( @@ -10945,7 +10962,7 @@ static void AppendGetter( indent, builders.CppMethodDefinitions); AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( methodIsStatic, GetTypeName(enclosingType), @@ -10962,9 +10979,9 @@ static void AppendGetter( indent + 1, builders.CppMethodDefinitions); AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ init body AppendCppInitBodyFunctionPointerParameterRead( @@ -11123,7 +11140,7 @@ static void AppendSetter( indent, builders.CppMethodDefinitions); AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + builders.CppMethodDefinitions.AppendLine("{"); AppendCppPluginFunctionCall( methodIsStatic, enclosingTypeTypeName, @@ -11135,9 +11152,9 @@ static void AppendSetter( indent + 1, builders.CppMethodDefinitions); AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.AppendLine("}"); AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.AppendLine();; // C++ init body AppendCppInitBodyFunctionPointerParameterRead( @@ -11193,11 +11210,11 @@ static void AppendCppTemplateDeclaration( typeTypeName, output); output.Append(";"); - output.Append('\n'); + output.AppendLine();; AppendNamespaceEnding( indent, output); - output.Append('\n'); + output.AppendLine();; } static int AppendCppTypeDeclaration( @@ -11216,9 +11233,9 @@ static int AppendCppTypeDeclaration( AppendTypeNameWithoutGenericSuffix( typeTypeName.Name, output); - output.Append('\n'); + output.AppendLine();; AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent, output); output.Append('}'); } @@ -11237,11 +11254,11 @@ static int AppendCppTypeDeclaration( output); output.Append(";"); } - output.Append('\n'); + output.AppendLine();; AppendNamespaceEnding( indent, output); - output.Append('\n'); + output.AppendLine();; return indent; } @@ -11325,11 +11342,11 @@ static void AppendCppTypeDefinitionBegin( break; } } - output.Append('\n'); + output.AppendLine();; AppendIndent( indent, output); - output.Append("{\n"); + output.AppendLine("{"); if (!isStatic) { switch (typeKind) @@ -11341,15 +11358,15 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - output.Append("(decltype(nullptr));\n"); + output.AppendLine("(decltype(nullptr));"); // Constructor from handle AppendIndent(indent + 1, output); AppendCppTypeName( typeTypeName, output); - output.Append( - "(Plugin::InternalUse, int32_t handle);\n"); + output.AppendLine( + "(Plugin::InternalUse, int32_t handle);"); // Copy constructor AppendIndent(indent + 1, output); @@ -11363,7 +11380,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& other);\n"); + output.AppendLine("& other);"); // Move constructor AppendIndent(indent + 1, output); @@ -11377,7 +11394,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("&& other);\n"); + output.AppendLine("&& other);"); // Destructor AppendIndent(indent + 1, output); @@ -11385,7 +11402,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeName( typeTypeName, output); - output.Append("();\n"); + output.AppendLine("();"); // Assignment operator to same type AppendIndent(indent + 1, output); @@ -11402,7 +11419,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& other);\n"); + output.AppendLine("& other);"); // Assignment operator to nullptr AppendIndent(indent + 1, output); @@ -11412,7 +11429,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& operator=(decltype(nullptr));\n"); + output.AppendLine("& operator=(decltype(nullptr));"); // Move assignment operator to same type AppendIndent(indent + 1, output); @@ -11429,7 +11446,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("&& other);\n"); + output.AppendLine("&& other);"); // Equality operator with same type AppendIndent(indent + 1, output); @@ -11440,7 +11457,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& other) const;\n"); + output.AppendLine("& other) const;"); // Inequality operator with same type AppendIndent(indent + 1, output); @@ -11451,7 +11468,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& other) const;\n"); + output.AppendLine("& other) const;"); break; } } @@ -11470,11 +11487,11 @@ static void AppendCppTypeDefinitionEnd( { output.Append(';'); } - output.Append('\n'); + output.AppendLine();; AppendNamespaceEnding( indent, output); - output.Append('\n'); + output.AppendLine();; } static int AppendCppMethodDefinitionsBegin( @@ -11507,7 +11524,7 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeName( enclosingTypeTypeName, output); - output.Append("(decltype(nullptr))\n"); + output.AppendLine("(decltype(nullptr))"); if (enclosingTypeKind == TypeKind.Class) { AppendCppConstructorInitializerList( @@ -11516,12 +11533,12 @@ static int AppendCppMethodDefinitionsBegin( output); } AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); extraDefault(indent + 1, "this->"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Handle constructor AppendIndent(indent, output); @@ -11535,7 +11552,7 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeName( enclosingTypeTypeName, output); - output.Append("(Plugin::InternalUse, int32_t handle)\n"); + output.AppendLine("(Plugin::InternalUse, int32_t handle)"); if (enclosingTypeKind == TypeKind.Class) { AppendCppConstructorInitializerList( @@ -11544,13 +11561,13 @@ static int AppendCppMethodDefinitionsBegin( output); } AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("Handle = handle;\n"); + output.AppendLine("Handle = handle;"); AppendIndent(indent + 1, output); - output.Append("if (handle)\n"); + output.AppendLine("if (handle)"); AppendIndent(indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 2, output); AppendReferenceManagedHandleFunctionCall( enclosingTypeTypeName, @@ -11558,14 +11575,14 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeParams, "handle", output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); extraDefault(indent + 1, "this->"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Copy constructor AppendIndent(indent, output); @@ -11586,20 +11603,20 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("& other)\n"); + output.AppendLine("& other)"); AppendIndent(indent + 1, output); output.Append(": "); AppendCppTypeName( enclosingTypeTypeName, output); - output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); + output.AppendLine("(Plugin::InternalUse::Only, other.Handle)"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); extraCopy(indent + 1, "other."); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Move constructor AppendIndent(indent, output); @@ -11620,23 +11637,23 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("&& other)\n"); + output.AppendLine("&& other)"); AppendIndent(indent, output); output.Append("\t: "); AppendCppTypeName( enclosingTypeTypeName, output); - output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); + output.AppendLine("(Plugin::InternalUse::Only, other.Handle)"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("other.Handle = 0;\n"); + output.AppendLine("other.Handle = 0;"); extraCopy(indent + 1, "other."); extraDefault(indent + 1, "other."); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Destructor AppendIndent(indent, output); @@ -11653,13 +11670,13 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("()\n"); + output.AppendLine("()"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent(indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeTypeName, @@ -11667,15 +11684,15 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeParams, "Handle", output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent + 2, output); - output.Append("Handle = 0;\n"); + output.AppendLine("Handle = 0;"); AppendIndent(indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Assignment operator to same type AppendIndent(indent, output); @@ -11699,9 +11716,9 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("& other)\n"); + output.AppendLine("& other)"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendSetHandle( enclosingTypeTypeName, enclosingTypeKind, @@ -11712,11 +11729,11 @@ static int AppendCppMethodDefinitionsBegin( output); extraCopy(indent + 1, "other."); AppendIndent(indent + 1, output); - output.Append("return *this;\n"); + output.AppendLine("return *this;"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Assignment operator to nullptr AppendIndent(indent, output); @@ -11733,13 +11750,13 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("::operator=(decltype(nullptr))\n"); + output.AppendLine("::operator=(decltype(nullptr))"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent(indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeTypeName, @@ -11747,17 +11764,17 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeParams, "Handle", output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent + 2, output); - output.Append("Handle = 0;\n"); + output.AppendLine("Handle = 0;"); AppendIndent(indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent + 1, output); - output.Append("return *this;\n"); + output.AppendLine("return *this;"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Move assignment operator to same type AppendIndent(indent, output); @@ -11781,13 +11798,13 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("&& other)\n"); + output.AppendLine("&& other)"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("if (Handle)\n"); + output.AppendLine("if (Handle)"); AppendIndent(indent + 1, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeTypeName, @@ -11795,21 +11812,21 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeParams, "Handle", output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent + 1, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent + 1, output); - output.Append("Handle = other.Handle;\n"); + output.AppendLine("Handle = other.Handle;"); extraCopy(indent + 1, "other."); AppendIndent(indent + 1, output); - output.Append("other.Handle = 0;\n"); + output.AppendLine("other.Handle = 0;"); extraDefault(indent + 1, "other."); AppendIndent(indent + 1, output); - output.Append("return *this;\n"); + output.AppendLine("return *this;"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Equality operator with same type AppendIndent(indent, output); @@ -11827,15 +11844,15 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("& other) const\n"); + output.AppendLine("& other) const"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("return Handle == other.Handle;\n"); + output.AppendLine("return Handle == other.Handle;"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; // Inequality operator with same type AppendIndent(indent, output); @@ -11853,15 +11870,15 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("& other) const\n"); + output.AppendLine("& other) const"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("return Handle != other.Handle;\n"); + output.AppendLine("return Handle != other.Handle;"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); - output.Append('\n'); + output.AppendLine();; } return cppMethodDefinitionsIndent; } @@ -11879,9 +11896,9 @@ static void AppendSetHandle( AppendIndent(indent, output); output.Append("if ("); output.Append(thisHandleExpression); - output.Append(")\n"); + output.AppendLine(")"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeTypeName, @@ -11889,20 +11906,20 @@ static void AppendSetHandle( enclosingTypeParams, thisHandleExpression, output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); AppendIndent(indent, output); output.Append(thisHandleExpression); output.Append(" = "); output.Append(otherHandleExpression); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent, output); output.Append("if ("); output.Append(thisHandleExpression); - output.Append(")\n"); + output.AppendLine(")"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); AppendReferenceManagedHandleFunctionCall( enclosingTypeTypeName, @@ -11910,9 +11927,9 @@ static void AppendSetHandle( enclosingTypeParams, thisHandleExpression, output); - output.Append(";\n"); + output.AppendLine(";"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); } static void AppendReferenceManagedHandleFunctionCall( @@ -11968,11 +11985,11 @@ static void AppendCppMethodDefinitionsEnd( StringBuilder output) { RemoveTrailingChars(output); - output.Append('\n'); + output.AppendLine();; AppendNamespaceEnding( indent, output); - output.Append('\n'); + output.AppendLine();; } static int AppendNamespaceBeginning( @@ -11993,9 +12010,9 @@ static int AppendNamespaceBeginning( AppendIndent(indent, output); output.Append("namespace "); output.Append(namespaceName, startIndex, len); - output.Append('\n'); + output.AppendLine();; AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); if (separatorIndex < 0) { break; @@ -12015,7 +12032,7 @@ static void AppendNamespaceEnding( for (; indent >= 0; --indent) { AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); } } @@ -12035,8 +12052,8 @@ static void AppendCsharpCsharpDelegate( "\t\t\tMarshal.WriteIntPtr(memory, curMemory, Marshal.GetFunctionPointerForDelegate("); initCallOutput.Append(funcName); initCallOutput.Append("Delegate"); - initCallOutput.Append("));\n"); - initCallOutput.Append("\t\t\tcurMemory += IntPtr.Size;\n"); + initCallOutput.AppendLine("));"); + initCallOutput.AppendLine("\t\t\tcurMemory += IntPtr.Size;"); delegateOutput.Append("\t\tstatic readonly "); delegateOutput.Append(funcName); @@ -12046,7 +12063,7 @@ static void AppendCsharpCsharpDelegate( delegateOutput.Append(funcName); delegateOutput.Append("DelegateType("); delegateOutput.Append(funcName); - delegateOutput.Append(");\n"); + delegateOutput.AppendLine(");"); } static void AppendCsharpDelegateType( @@ -12058,7 +12075,7 @@ static void AppendCsharpDelegateType( ParameterInfo[] parameters, StringBuilder output) { - output.Append("\t\t[UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n"); + output.AppendLine("\t\t[UnmanagedFunctionPointer(CallingConvention.Cdecl)]"); output.Append("\t\tdelegate "); // Return type @@ -12098,7 +12115,7 @@ static void AppendCsharpDelegateType( AppendCsharpBindingParameterDeclaration( parameters, output); - output.Append(");\n"); + output.AppendLine(");"); } static void AppendCsharpFunctionBeginning( @@ -12112,7 +12129,8 @@ static void AppendCsharpFunctionBeginning( { output.Append("\t\t[MonoPInvokeCallback(typeof("); output.Append(funcName); - output.Append("DelegateType))]\n\t\tstatic "); + output.AppendLine("DelegateType))]"); + output.Append("\t\tstatic "); // Return type if (returnType != null) @@ -12157,10 +12175,14 @@ static void AppendCsharpFunctionBeginning( AppendCsharpBindingParameterDeclaration( parameters, output); - output.Append(")\n\t\t{\n\t\t\t"); + output.AppendLine(")"); + output.AppendLine("\t\t{"); + output.Append("\t\t\t"); // Start try/catch block - output.Append("try\n\t\t\t{\n\t\t\t\t"); + output.AppendLine("try"); + output.AppendLine("\t\t\t{"); + output.Append("\t\t\t\t"); // Get "this" if (!isStatic @@ -12174,8 +12196,10 @@ static void AppendCsharpFunctionBeginning( AppendHandleStoreTypeName( enclosingType, output); + output.AppendLine( + ".Get(thisHandle);"); output.Append( - ".Get(thisHandle);\n\t\t\t\t"); + "\t\t\t\t"); } // Get managed type params from ObjectStore @@ -12197,7 +12221,8 @@ static void AppendCsharpFunctionBeginning( AppendHandleStoreTypeName(paramType, output); output.Append(".Get("); output.Append(param.Name); - output.Append("Handle);\n\t\t\t\t"); + output.AppendLine("Handle);"); + output.Append("\t\t\t\t"); } } @@ -12254,7 +12279,8 @@ static void AppendStructStoreReplace( string structVariable, StringBuilder output) { - output.Append("\n\t\t\t\t"); + output.AppendLine(); + output.Append("\t\t\t\t"); AppendHandleStoreTypeName( enclosingType, output); @@ -12280,7 +12306,8 @@ static void AppendCsharpFunctionReturn( || param.Kind == TypeKind.ManagedStruct) && (param.IsOut || param.IsRef)) { - output.Append("\n\t\t\t\tint "); + output.AppendLine(); + output.Append("\t\t\t\tint "); output.Append(param.Name); output.Append("HandleNew = "); AppendHandleStoreTypeName( @@ -12297,7 +12324,8 @@ static void AppendCsharpFunctionReturn( } output.Append('('); output.Append(param.Name); - output.Append(");\n\t\t\t\t"); + output.AppendLine(");"); + output.Append("\t\t\t\t"); output.Append(param.Name); output.Append("Handle = "); output.Append(param.Name); @@ -12308,7 +12336,8 @@ static void AppendCsharpFunctionReturn( // Return if (returnType != typeof(void)) { - output.Append("\n\t\t\t\treturn "); + output.AppendLine(); + output.Append("\t\t\t\treturn "); if ( forceReturnReturnValue || returnTypeKind == TypeKind.Enum @@ -12350,8 +12379,8 @@ static void AppendCsharpFunctionEnd( ParameterInfo[] parameters, StringBuilder output) { - output.Append('\n'); - output.Append("\t\t\t}\n"); + output.AppendLine();; + output.AppendLine("\t\t\t}"); if (exceptionTypes == null || Array.IndexOf( exceptionTypes, @@ -12379,8 +12408,8 @@ static void AppendCsharpFunctionEnd( returnType, parameters, output); - output.Append("\t\t}\n"); - output.Append("\t\t\n"); + output.AppendLine("\t\t}"); + output.AppendLine("\t\t"); } static void AppendCsharpCatchException( @@ -12393,14 +12422,14 @@ static void AppendCsharpCatchException( AppendCsharpTypeFullName( exceptionType, output); - output.Append(" ex)\n"); - output.Append("\t\t\t{\n"); - output.Append("\t\t\t\tUnityEngine.Debug.LogException(ex);\n"); + output.AppendLine(" ex)"); + output.AppendLine("\t\t\t{"); + output.AppendLine("\t\t\t\tUnityEngine.Debug.LogException(ex);"); output.Append("\t\t\t\tNativeScript.Bindings."); AppendCsharpSetCsharpExceptionFunctionName( exceptionType, output); - output.Append("(NativeScript.Bindings.ObjectStore.Store(ex));\n"); + output.AppendLine("(NativeScript.Bindings.ObjectStore.Store(ex));"); foreach (ParameterInfo param in parameters) { if (param.IsOut) @@ -12410,7 +12439,7 @@ static void AppendCsharpCatchException( if (param.Kind == TypeKind.Class || param.Kind == TypeKind.ManagedStruct) { - output.Append("Handle = default(int);\n"); + output.AppendLine("Handle = default(int);"); } else { @@ -12418,7 +12447,7 @@ static void AppendCsharpCatchException( AppendCsharpTypeFullName( param.DereferencedParameterType, output); - output.Append(");\n"); + output.AppendLine(");"); } } } @@ -12435,9 +12464,9 @@ static void AppendCsharpCatchException( { output.Append("int"); } - output.Append(");\n"); + output.AppendLine(");"); } - output.Append("\t\t\t}\n"); + output.AppendLine("\t\t\t}"); } static void AppendCsharpSetCsharpExceptionFunctionName( @@ -12656,10 +12685,10 @@ static void AppendCppInitBodyFunctionPointerParameterRead( returnType, 2, output); - output.Append(")curMemory;\n"); + output.AppendLine(")curMemory;"); output.Append("\tcurMemory += sizeof(Plugin::"); output.Append(globalVariableName); - output.Append(");\n"); + output.AppendLine(");"); } static void AppendCppMethodDefinitionBegin( @@ -12718,7 +12747,7 @@ static void AppendCppMethodDefinitionBegin( null, // don't substitute method type params false, output); - output.Append(")\n"); + output.AppendLine(")"); } static void AppendCppMethodReturn( @@ -12745,7 +12774,7 @@ static void AppendCppMethodReturn( output.Append("(Plugin::InternalUse::Only, returnValue)"); break; } - output.Append(";\n"); + output.AppendLine(";"); } } @@ -12772,7 +12801,7 @@ static void AppendCppPluginFunctionCall( output.Append(param.Name); output.Append("Handle = "); output.Append(param.Name); - output.Append("->Handle;\n"); + output.AppendLine("->Handle;"); } } @@ -12840,7 +12869,7 @@ static void AppendCppPluginFunctionCall( output.Append(", "); } } - output.Append(");\n"); + output.AppendLine(");"); AppendCppUnhandledExceptionHandling( indent, @@ -12870,19 +12899,19 @@ static void AppendCppUnhandledExceptionHandling( StringBuilder output) { AppendIndent(indent, output); - output.Append("if (Plugin::unhandledCsharpException)\n"); + output.AppendLine("if (Plugin::unhandledCsharpException)"); AppendIndent(indent, output); - output.Append("{\n"); + output.AppendLine("{"); AppendIndent(indent + 1, output); - output.Append("System::Exception* ex = Plugin::unhandledCsharpException;\n"); + output.AppendLine("System::Exception* ex = Plugin::unhandledCsharpException;"); AppendIndent(indent + 1, output); - output.Append("Plugin::unhandledCsharpException = nullptr;\n"); + output.AppendLine("Plugin::unhandledCsharpException = nullptr;"); AppendIndent(indent + 1, output); - output.Append("ex->ThrowReferenceToThis();\n"); + output.AppendLine("ex->ThrowReferenceToThis();"); AppendIndent(indent + 1, output); - output.Append("delete ex;\n"); + output.AppendLine("delete ex;"); AppendIndent(indent, output); - output.Append("}\n"); + output.AppendLine("}"); } static void AppendCppFunctionPointerDefinition( @@ -12907,7 +12936,7 @@ StringBuilder output output ); output.Append(';'); - output.Append('\n'); + output.AppendLine();; } static void AppendCppFunctionPointer( @@ -13111,7 +13140,7 @@ static void AppendCppMethodDeclaration( output); output.Append(')'); - output.Append(";\n"); + output.AppendLine(";"); } static void AppendCsharpTypeFullName( @@ -13432,17 +13461,12 @@ static void RemoveTrailingChars( for (i = len - 1; i >= 0; --i) { char cur = builder[i]; - switch (cur) + if (!char.IsWhiteSpace(cur) && cur != ',') { - case '\n': - case '\t': - case ',': - break; - default: - goto after; + break; } } - after: + if (i < len - 1) { builder.Remove(i + 1, len - i - 1); @@ -13458,123 +13482,123 @@ static void InjectBuilders( string cppSourceContents = File.ReadAllText(CppSourcePath); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DELEGATE TYPES*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END DELEGATE TYPES*/", + "/*BEGIN DELEGATE TYPES*/", + "\t\t/*END DELEGATE TYPES*/", builders.CsharpDelegateTypes.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN STORE INIT CALLS*/"+Environment.NewLine, - Environment.NewLine+"\t\t\t/*END STORE INIT CALLS*/", + "/*BEGIN STORE INIT CALLS*/", + "\t\t\t/*END STORE INIT CALLS*/", builders.CsharpStoreInitCalls.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN INIT CALL*/"+Environment.NewLine, - Environment.NewLine+"\t\t\t/*END INIT CALL*/", + "/*BEGIN INIT CALL*/", + "\t\t\t/*END INIT CALL*/", builders.CsharpInitCall.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN BASE TYPES*/"+Environment.NewLine, - Environment.NewLine+"/*END BASE TYPES*/", + "/*BEGIN BASE TYPES*/", + "/*END BASE TYPES*/", builders.CsharpBaseTypes.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN FUNCTIONS*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END FUNCTIONS*/", + "/*BEGIN FUNCTIONS*/", + "\t\t/*END FUNCTIONS*/", builders.CsharpFunctions.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN CPP DELEGATES*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END CPP DELEGATES*/", + "/*BEGIN CPP DELEGATES*/", + "\t\t/*END CPP DELEGATES*/", builders.CsharpCppDelegates.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN CSHARP DELEGATES*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END CSHARP DELEGATES*/", + "/*BEGIN CSHARP DELEGATES*/", + "\t\t/*END CSHARP DELEGATES*/", builders.CsharpCsharpDelegates.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN IMPORTS*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END IMPORTS*/", + "/*BEGIN IMPORTS*/", + "\t\t/*END IMPORTS*/", builders.CsharpImports.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN GETDELEGATE CALLS*/"+Environment.NewLine, - Environment.NewLine+"\t\t\t/*END GETDELEGATE CALLS*/", + "/*BEGIN GETDELEGATE CALLS*/", + "\t\t\t/*END GETDELEGATE CALLS*/", builders.CsharpGetDelegateCalls.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DESTROY FUNCTION ENUMERATORS*/"+Environment.NewLine, - Environment.NewLine+"\t\t\t/*END DESTROY FUNCTION ENUMERATORS*/", + "/*BEGIN DESTROY FUNCTION ENUMERATORS*/", + "\t\t\t/*END DESTROY FUNCTION ENUMERATORS*/", builders.CsharpDestroyFunctionEnumerators.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN DESTROY QUEUE CASES*/"+Environment.NewLine, - Environment.NewLine+"\t\t\t\t\t\t/*END DESTROY QUEUE CASES*/", + "/*BEGIN DESTROY QUEUE CASES*/", + "\t\t\t\t\t\t/*END DESTROY QUEUE CASES*/", builders.CsharpDestroyQueueCases.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN FUNCTION POINTERS*/"+Environment.NewLine, - Environment.NewLine+"\t/*END FUNCTION POINTERS*/", + "/*BEGIN FUNCTION POINTERS*/", + "\t/*END FUNCTION POINTERS*/", builders.CppFunctionPointers.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TYPE DECLARATIONS*/"+Environment.NewLine, - Environment.NewLine+"/*END TYPE DECLARATIONS*/", + "/*BEGIN TYPE DECLARATIONS*/", + "/*END TYPE DECLARATIONS*/", builders.CppTypeDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TEMPLATE DECLARATIONS*/"+Environment.NewLine, - Environment.NewLine+"/*END TEMPLATE DECLARATIONS*/", + "/*BEGIN TEMPLATE DECLARATIONS*/", + "/*END TEMPLATE DECLARATIONS*/", builders.CppTemplateDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/"+Environment.NewLine, - Environment.NewLine+"/*END TEMPLATE SPECIALIZATION DECLARATIONS*/", + "/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/", + "/*END TEMPLATE SPECIALIZATION DECLARATIONS*/", builders.CppTemplateSpecializationDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN TYPE DEFINITIONS*/"+Environment.NewLine, - Environment.NewLine+"/*END TYPE DEFINITIONS*/", + "/*BEGIN TYPE DEFINITIONS*/", + "/*END TYPE DEFINITIONS*/", builders.CppTypeDefinitions.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN METHOD DEFINITIONS*/"+Environment.NewLine, - Environment.NewLine+"/*END METHOD DEFINITIONS*/", + "/*BEGIN METHOD DEFINITIONS*/", + "/*END METHOD DEFINITIONS*/", builders.CppMethodDefinitions.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY PARAMETER READS*/"+Environment.NewLine, - Environment.NewLine+"\t/*END INIT BODY PARAMETER READS*/", + "/*BEGIN INIT BODY PARAMETER READS*/", + "\t/*END INIT BODY PARAMETER READS*/", builders.CppInitBodyParameterReads.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY ARRAYS*/"+Environment.NewLine, - Environment.NewLine+"\t/*END INIT BODY ARRAYS*/", + "/*BEGIN INIT BODY ARRAYS*/", + "\t/*END INIT BODY ARRAYS*/", builders.CppInitBodyArrays.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN INIT BODY FIRST BOOT*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END INIT BODY FIRST BOOT*/", + "/*BEGIN INIT BODY FIRST BOOT*/", + "\t\t/*END INIT BODY FIRST BOOT*/", builders.CppInitBodyFirstBoot.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, - "/*BEGIN GLOBAL STATE AND FUNCTIONS*/"+Environment.NewLine, - Environment.NewLine+"\t/*END GLOBAL STATE AND FUNCTIONS*/", + "/*BEGIN GLOBAL STATE AND FUNCTIONS*/", + "\t/*END GLOBAL STATE AND FUNCTIONS*/", builders.CppGlobalStateAndFunctions.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN UNBOXING METHOD DECLARATIONS*/"+Environment.NewLine, - Environment.NewLine+"\t\t/*END UNBOXING METHOD DECLARATIONS*/", + "/*BEGIN UNBOXING METHOD DECLARATIONS*/", + "\t\t/*END UNBOXING METHOD DECLARATIONS*/", builders.CppUnboxingMethodDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN STRING DEFAULT PARAMETERS*/"+Environment.NewLine, - Environment.NewLine+"\t/*END STRING DEFAULT PARAMETERS*/", + "/*BEGIN STRING DEFAULT PARAMETERS*/", + "\t/*END STRING DEFAULT PARAMETERS*/", builders.CppStringDefaultParams.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "/*BEGIN MACROS*/"+Environment.NewLine, - Environment.NewLine+"/*END MACROS*/", + "/*BEGIN MACROS*/", + "/*END MACROS*/", builders.CppMacros.ToString()); File.WriteAllText(CsharpPath, csharpContents); @@ -13588,7 +13612,8 @@ static string InjectIntoString( string endMarker, string text) { - for (int startIndex = 0; ; ) + int startIndex = 0; + while(true) { int beginIndex = contents.IndexOf(beginMarker, startIndex, StringComparison.OrdinalIgnoreCase); if (beginIndex < 0) @@ -13609,7 +13634,7 @@ static string InjectIntoString( } string begin = contents.Substring(0, afterBeginIndex); string end = contents.Substring(endIndex); - contents = begin + text + end; + contents = begin + Environment.NewLine + text + Environment.NewLine + end; startIndex = beginIndex + 1; } } From a2afdbbbd2fd0248b838533babf8e249963361b1 Mon Sep 17 00:00:00 2001 From: "Youngkyoung, Lee" Date: Tue, 9 Feb 2021 00:10:31 +0900 Subject: [PATCH 37/41] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 14f12cc..8b108f6 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ With C++, the workflow looks like this: 2. Create a directory for build files. Anywhere is fine. 3. Open a Command Prompt by clicking the Start button, typing "Command Prompt", then clicking the app 4. Execute `cd /path/to/your/build/directory` -5. Execute `cmake -G "Visual Studio VERSION YEAR Win64" -DEDITOR=TRUE /path/to/your/project/CppSource`. Replace `VERSION` and `YEAR` with the version of Visual Studio you want to use. To see the options, execute `cmake --help` and look at the list at the bottom. For example, use `"Visual Studio 15 2017 Win64"` for Visual Studio 2017. Any version, including Community, works just fine. Remove `-DEDITOR=TRUE` for standalone builds. +5. Execute `cmake -G "Visual Studio VERSION YEAR Win64" -DEDITOR=TRUE /path/to/your/project/CppSource`. Replace `VERSION` and `YEAR` with the version of Visual Studio you want to use. To see the options, execute `cmake --help` and look at the list at the bottom. For example, use `"Visual Studio 15 2017 Win64"` for Visual Studio 2017. Any version, including Community, works just fine. Remove `-DEDITOR=TRUE` for standalone builds. If you are using Visual Studio 2019, execute `cmake -G "Visual Studio 16" -A "x64" -DEDITOR=TRUE /path/to/your/project/CppSource` instead. 6. The project files are now generated in your build directory 7. Open `NativeScript.sln` and click `Build > Build Solution`. From 00443ef39d5418f3c744654c0d3d4036c2a81634 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 21 Feb 2021 17:15:26 -0800 Subject: [PATCH 38/41] Don't use "= default" on the System.Object destructor so its "noexcept" matches derived classes --- Unity/Assets/CppSource/NativeScript/Bindings.cpp | 4 ++++ Unity/Assets/CppSource/NativeScript/Bindings.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.cpp b/Unity/Assets/CppSource/NativeScript/Bindings.cpp index cd62a88..8cb2e2e 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.cpp +++ b/Unity/Assets/CppSource/NativeScript/Bindings.cpp @@ -966,6 +966,10 @@ namespace System : ManagedType(nullptr) { } + + Object::~Object() + { + } bool Object::operator==(decltype(nullptr)) const { diff --git a/Unity/Assets/CppSource/NativeScript/Bindings.h b/Unity/Assets/CppSource/NativeScript/Bindings.h index 093dc3b..4da12a4 100644 --- a/Unity/Assets/CppSource/NativeScript/Bindings.h +++ b/Unity/Assets/CppSource/NativeScript/Bindings.h @@ -585,7 +585,7 @@ namespace System Object(); Object(Plugin::InternalUse iu, int32_t handle); Object(decltype(nullptr)); - virtual ~Object() = default; + virtual ~Object(); bool operator==(decltype(nullptr)) const; bool operator!=(decltype(nullptr)) const; virtual void ThrowReferenceToThis(); From e8c9b6b414e9ee406596f9428fe2b1d5d6aeb439 Mon Sep 17 00:00:00 2001 From: philipcass <244523+philipcass@users.noreply.github.com> Date: Mon, 22 Feb 2021 15:36:28 +0000 Subject: [PATCH 39/41] Fix for standalone builds defaulting to int parameters There was a mis-match in how types were specified in editor/build delegates. Changed so they both now use the same switch statement --- .../NativeScript/Editor/GenerateBindings.cs | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 29fe4c7..3b1bc12 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -10573,18 +10573,21 @@ StringBuilder output for (int i = 0; i < parameters.Length; ++i) { ParameterInfo param = parameters[i]; - if (param.Kind == TypeKind.FullStruct) - { - AppendCsharpTypeFullName( - param.ParameterType, - output); - output.Append(" param"); - output.Append(i); - } - else + switch (param.Kind) { - output.Append("int param"); - output.Append(i); + case TypeKind.FullStruct: + case TypeKind.Primitive: + case TypeKind.Enum: + AppendCsharpTypeFullName( + param.ParameterType, + output); + output.Append(" param"); + output.Append(i); + break; + default: + output.Append("int param"); + output.Append(i); + break; } if (i != parameters.Length-1) { @@ -13639,4 +13642,4 @@ static string InjectIntoString( } } } -} \ No newline at end of file +} From c53adea79b78cdd6ba5fc5505f66eddab73596ea Mon Sep 17 00:00:00 2001 From: philipcass <244523+philipcass@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:14:11 +0000 Subject: [PATCH 40/41] Fix CPP event accessors Added hacky fix to resolve event accessors both adding delegates --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 3b1bc12..61af988 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -3427,7 +3427,15 @@ static void AppendEventAddRemoveMethod( builders.CsharpFunctions); builders.CsharpFunctions.Append('.'); builders.CsharpFunctions.Append(eventName); - builders.CsharpFunctions.Append(" += del;"); + // TODO: More safely differenciate between add/removing event delegates + if (funcName.Contains("RemoveEvent")) + { + builders.CsharpFunctions.Append(" -= del;"); + } + else + { + builders.CsharpFunctions.Append(" += del;"); + } AppendCsharpFunctionEnd( typeof(void), null, From 2eb88245bec25c36fa83716f9016bd056cc33dff Mon Sep 17 00:00:00 2001 From: philipcass <244523+philipcass@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:20:36 +0000 Subject: [PATCH 41/41] Set abstract base method declarations as virtual The codegen would set all abstract base methods to be non-virtual, this allows derived classes to cleanly override abstract function implementations --- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 3b1bc12..f927d2e 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.IO; @@ -4155,7 +4155,8 @@ static void AppendMethod( AppendCppMethodDeclaration( cppMethodName, enclosingTypeIsStatic, - false, + // Mark as virtual if method/class is not static or generic + cppMethodIsStatic || enclosingTypeIsStatic || methodTypeParams != null? false : true, cppMethodIsStatic, cppReturnType, methodTypeParams,