From 765108e900bb54e89e85b734e325bbd42ade9567 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 21 Oct 2017 17:29:43 -0700 Subject: [PATCH 01/65] Add support for events Fix class ref counting not starting at zero Fix boilerplate functions (e.g. constructors) for delegates not dealing with handles Add try/catch around delegate invoke calls --- Unity/Assets/NativeScript/Bindings.cs | 422 ++- .../NativeScript/Editor/GenerateBindings.cs | 1336 ++++++-- Unity/Assets/NativeScriptTypes.json | 37 + Unity/CppSource/NativeScript/Bindings.cpp | 3046 +++++++++++------ Unity/CppSource/NativeScript/Bindings.h | 164 + 5 files changed, 3734 insertions(+), 1271 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index d186243..be02899 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -340,6 +340,10 @@ delegate void InitDelegate( IntPtr systemAppDomainSetupConstructor, IntPtr systemAppDomainSetupPropertyGetAppDomainInitializer, IntPtr systemAppDomainSetupPropertySetAppDomainInitializer, + IntPtr unityEngineApplicationAddEventOnBeforeRender, + IntPtr unityEngineApplicationRemoveEventOnBeforeRender, + IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, + IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, IntPtr systemInt32Array1Constructor1, IntPtr systemInt32Array1GetItem1, IntPtr systemInt32Array1SetItem1, @@ -395,7 +399,17 @@ delegate void InitDelegate( IntPtr systemAppDomainInitializerConstructor, IntPtr systemAppDomainInitializerInvoke, IntPtr systemAppDomainInitializerAdd, - IntPtr systemAppDomainInitializerRemove + IntPtr systemAppDomainInitializerRemove, + IntPtr releaseUnityEngineEventsUnityAction, + IntPtr unityEngineEventsUnityActionConstructor, + IntPtr unityEngineEventsUnityActionInvoke, + IntPtr unityEngineEventsUnityActionAdd, + IntPtr unityEngineEventsUnityActionRemove, + IntPtr releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove /*END INIT PARAMS*/); public delegate void SetCsharpExceptionDelegate(int handle); @@ -431,6 +445,12 @@ IntPtr systemAppDomainInitializerRemove public delegate void SystemAppDomainInitializerCppInvokeDelegate(int thisHandle, int param0); public static SystemAppDomainInitializerCppInvokeDelegate SystemAppDomainInitializerCppInvoke; + public delegate void UnityEngineEventsUnityActionCppInvokeDelegate(int thisHandle); + public static UnityEngineEventsUnityActionCppInvokeDelegate UnityEngineEventsUnityActionCppInvoke; + + public delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvokeDelegate(int thisHandle, UnityEngine.SceneManagement.Scene param0, UnityEngine.SceneManagement.LoadSceneMode param1); + public static UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvokeDelegate UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke; + public delegate void SetCsharpExceptionSystemNullReferenceExceptionDelegate(int param0); public static SetCsharpExceptionSystemNullReferenceExceptionDelegate SetCsharpExceptionSystemNullReferenceException; /*END MONOBEHAVIOUR DELEGATES*/ @@ -598,6 +618,10 @@ static extern void Init( IntPtr systemAppDomainSetupConstructor, IntPtr systemAppDomainSetupPropertyGetAppDomainInitializer, IntPtr systemAppDomainSetupPropertySetAppDomainInitializer, + IntPtr unityEngineApplicationAddEventOnBeforeRender, + IntPtr unityEngineApplicationRemoveEventOnBeforeRender, + IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, + IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, IntPtr systemInt32Array1Constructor1, IntPtr systemInt32Array1GetItem1, IntPtr systemInt32Array1SetItem1, @@ -653,7 +677,17 @@ static extern void Init( IntPtr systemAppDomainInitializerConstructor, IntPtr systemAppDomainInitializerInvoke, IntPtr systemAppDomainInitializerAdd, - IntPtr systemAppDomainInitializerRemove + IntPtr systemAppDomainInitializerRemove, + IntPtr releaseUnityEngineEventsUnityAction, + IntPtr unityEngineEventsUnityActionConstructor, + IntPtr unityEngineEventsUnityActionInvoke, + IntPtr unityEngineEventsUnityActionAdd, + IntPtr unityEngineEventsUnityActionRemove, + IntPtr releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove /*END INIT PARAMS*/); [DllImport(PluginName)] @@ -690,6 +724,12 @@ IntPtr systemAppDomainInitializerRemove [DllImport(Constants.PluginName)] public static extern void SystemAppDomainInitializerCppInvoke(int thisHandle, int param0); + [DllImport(Constants.PluginName)] + public static extern void UnityEngineEventsUnityActionCppInvoke(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke(int thisHandle, UnityEngine.SceneManagement.Scene param0, int param1); + [DllImport(Constants.PluginName)] public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle, int param0); /*END MONOBEHAVIOUR IMPORTS*/ @@ -767,6 +807,10 @@ IntPtr systemAppDomainInitializerRemove 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 int SystemInt32Array1Constructor1Delegate(int length0); delegate int SystemInt32Array1GetItem1Delegate(int thisHandle, int index0); delegate void SystemInt32Array1SetItem1Delegate(int thisHandle, int index0, int item); @@ -823,6 +867,16 @@ IntPtr systemAppDomainInitializerRemove delegate void SystemAppDomainInitializerInvokeDelegate(int thisHandle, int argsHandle); delegate void SystemAppDomainInitializerAddDelegate(int thisHandle, int delHandle); delegate void SystemAppDomainInitializerRemoveDelegate(int thisHandle, int delHandle); + delegate void UnityEngineEventsUnityActionConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); + delegate void ReleaseUnityEngineEventsUnityActionDelegate(int handle, int classHandle); + delegate void UnityEngineEventsUnityActionInvokeDelegate(int thisHandle); + delegate void UnityEngineEventsUnityActionAddDelegate(int thisHandle, int delHandle); + delegate void UnityEngineEventsUnityActionRemoveDelegate(int thisHandle, int delHandle); + delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); + delegate void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate(int handle, int classHandle); + delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1); + delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate(int thisHandle, int delHandle); + delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(int thisHandle, int delHandle); /*END DELEGATE TYPES*/ public static Exception UnhandledCppException; @@ -867,6 +921,8 @@ public static void Open( SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke = GetDelegate(libraryHandle, "SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke"); SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke = GetDelegate(libraryHandle, "SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke"); SystemAppDomainInitializerCppInvoke = GetDelegate(libraryHandle, "SystemAppDomainInitializerCppInvoke"); + UnityEngineEventsUnityActionCppInvoke = GetDelegate(libraryHandle, "UnityEngineEventsUnityActionCppInvoke"); + UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke = GetDelegate(libraryHandle, "UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke"); SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); /*END MONOBEHAVIOUR GETDELEGATE CALLS*/ @@ -946,6 +1002,10 @@ public static void Open( 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 SystemInt32Array1Constructor1Delegate(SystemInt32Array1Constructor1)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1GetItem1Delegate(SystemInt32Array1GetItem1)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1SetItem1Delegate(SystemInt32Array1SetItem1)), @@ -1001,7 +1061,17 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerConstructorDelegate(SystemAppDomainInitializerConstructor)), Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerInvokeDelegate(SystemAppDomainInitializerInvoke)), Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerAddDelegate(SystemAppDomainInitializerAdd)), - Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerRemoveDelegate(SystemAppDomainInitializerRemove)) + Marshal.GetFunctionPointerForDelegate(new SystemAppDomainInitializerRemoveDelegate(SystemAppDomainInitializerRemove)), + Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineEventsUnityActionDelegate(ReleaseUnityEngineEventsUnityAction)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionConstructorDelegate(UnityEngineEventsUnityActionConstructor)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionInvokeDelegate(UnityEngineEventsUnityActionInvoke)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionAddDelegate(UnityEngineEventsUnityActionAdd)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionRemoveDelegate(UnityEngineEventsUnityActionRemove)), + Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate(ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)) /*END INIT CALL*/ ); if (UnhandledCppException != null) @@ -2476,6 +2546,86 @@ static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, } } + [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(SystemInt32Array1Constructor1Delegate))] static int SystemInt32Array1Constructor1(int length0) { @@ -3853,6 +4003,272 @@ static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); } } + + class UnityEngineEventsUnityAction + { + public int CppHandle; + public UnityEngine.Events.UnityAction Delegate; + + public UnityEngineEventsUnityAction(int cppHandle) + { + CppHandle = cppHandle; + Delegate = Invoke; + } + + public void Invoke() + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + NativeScript.Bindings.UnityEngineEventsUnityActionCppInvoke(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + } + + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionConstructorDelegate))] + static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handle, ref int classHandle) + { + try + { + var thiz = new UnityEngineEventsUnityAction(cppHandle); + classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); + handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + } + 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(ReleaseUnityEngineEventsUnityActionDelegate))] + static void ReleaseUnityEngineEventsUnityAction(int handle, int classHandle) + { + try + { + if (classHandle != 0) + { + var thiz = (UnityEngineEventsUnityAction)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(UnityEngineEventsUnityActionInvokeDelegate))] + static void UnityEngineEventsUnityActionInvoke(int thisHandle) + { + try + { + ((UnityEngine.Events.UnityAction)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(UnityEngineEventsUnityActionAddDelegate))] + static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) + { + try + { + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)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(UnityEngineEventsUnityActionRemoveDelegate))] + static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) + { + try + { + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)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)); + } + } + + class UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode + { + public int CppHandle; + public UnityEngine.Events.UnityAction Delegate; + + public UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int cppHandle) + { + CppHandle = cppHandle; + Delegate = Invoke; + } + + public void Invoke(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke(thisHandle, arg0, arg1); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + } + + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(int cppHandle, ref int handle, ref int classHandle) + { + try + { + var thiz = new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle); + classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); + handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + } + 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(ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate))] + static void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int handle, int classHandle) + { + try + { + if (classHandle != 0) + { + var thiz = (UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)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(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) + { + try + { + ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); + } + 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(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(int thisHandle, int delHandle) + { + try + { + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)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(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(int thisHandle, int delHandle) + { + try + { + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)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)); + } + } /*END FUNCTIONS*/ } } diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 579bfc3..531b981 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -75,6 +75,12 @@ class JsonProperty public JsonPropertySet Set; } + [Serializable] + class JsonEvent + { + public string Name; + } + [Serializable] class JsonType { @@ -83,6 +89,7 @@ class JsonType public JsonMethod[] Methods; public JsonProperty[] Properties; public string[] Fields; + public JsonEvent[] Events; public JsonGenericParams[] GenericParams; public int MaxSimultaneous; } @@ -491,6 +498,8 @@ static void DoPostCompileWork(bool canRefreshAssetDb) bool dryRun = EditorPrefs.GetBool(DryRunPref); EditorPrefs.DeleteKey(DryRunPref); + DateTime beforeTime = DateTime.Now; + JsonDocument doc = LoadJson(); Assembly[] assemblies = GetAssemblies(doc.Assemblies); StringBuilders builders = new StringBuilders(); @@ -557,7 +566,11 @@ static void DoPostCompileWork(bool canRefreshAssetDb) if (canRefreshAssetDb) { AssetDatabase.Refresh(); - Debug.Log("Done generating bindings."); + DateTime afterTime = DateTime.Now; + TimeSpan duration = afterTime - beforeTime; + Debug.LogFormat( + "Done generating bindings in {0} seconds.", + duration.TotalSeconds); } else { @@ -1430,8 +1443,6 @@ static void AppendType( type.BaseType.GetGenericArguments(), isStatic, indent, - true, - true, builders.CppMethodDefinitions); // Constructors @@ -1507,6 +1518,23 @@ static void AppendType( } } + if (jsonType.Events != null) + { + foreach (JsonEvent jsonEvent in jsonType.Events) + { + AppendEvent( + jsonEvent, + type, + isStatic, + typeKind, + typeParams, + genericArgTypes, + indent, + builders + ); + } + } + // Methods if (jsonType.Methods != null) { @@ -2150,8 +2178,7 @@ static void AppendField( Type[] typeTypeParams, Type[] typeGenericArgumentTypes, int indent, - StringBuilders builders - ) + StringBuilders builders) { FieldInfo field = enclosingType.GetField(jsonFieldName); Type fieldType = OverrideGenericType( @@ -2200,6 +2227,223 @@ StringBuilders builders builders); } + static void AppendEvent( + JsonEvent jsonEvent, + Type enclosingType, + bool enclosingTypeIsStatic, + TypeKind enclosingTypeKind, + Type[] typeTypeParams, + Type[] typeGenericArgumentTypes, + int indent, + StringBuilders builders) + { + EventInfo eventInfo = enclosingType.GetEvent(jsonEvent.Name); + MethodInfo addMethod = eventInfo.GetAddMethod(); + MethodInfo removeMethod = eventInfo.GetRemoveMethod(); + Type eventType = eventInfo.EventHandlerType; + string uppercaseEventName = char.ToUpper(jsonEvent.Name[0]) + + jsonEvent.Name.Substring(1); + + ParameterInfo[] addRemoveParams = new ParameterInfo[] { + new ParameterInfo { + Name = "del", + ParameterType = eventType, + DereferencedParameterType = eventType, + IsOut = false, + IsRef = false, + Kind = TypeKind.Class, + IsVirtual = false + } + }; + + AppendEventAddRemoveMethod( + jsonEvent.Name, + uppercaseEventName, + "Add", + addMethod.IsStatic, + enclosingType, + enclosingTypeKind, + enclosingTypeIsStatic, + typeTypeParams, + addRemoveParams, + indent, + builders); + AppendEventAddRemoveMethod( + jsonEvent.Name, + uppercaseEventName, + "Remove", + removeMethod.IsStatic, + enclosingType, + enclosingTypeKind, + enclosingTypeIsStatic, + typeTypeParams, + addRemoveParams, + indent, + builders); + } + + static void AppendEventAddRemoveMethod( + string eventName, + string uppercaseEventName, + string operation, + bool methodIsStatic, + Type enclosingType, + TypeKind enclosingTypeKind, + bool enclosingTypeIsStatic, + Type[] typeTypeParams, + ParameterInfo[] methodParams, + int indent, + StringBuilders builders) + { + builders.TempStrBuilder.Length = 0; + AppendNamespace( + enclosingType.Namespace, + string.Empty, + builders.TempStrBuilder); + AppendTypeNameWithoutGenericSuffix( + enclosingType.Name, + builders.TempStrBuilder); + AppendTypeNames( + typeTypeParams, + builders.TempStrBuilder); + builders.TempStrBuilder.Append(operation); + builders.TempStrBuilder.Append("Event"); + 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, + methodIsStatic, + enclosingType, + enclosingTypeKind, + typeof(void), + methodParams, + builders.CsharpDelegateTypes); + + // C# init call arg + AppendCsharpInitCallArg( + funcName, + builders.CsharpInitCall); + + // C# function + AppendCsharpFunctionBeginning( + enclosingType, + funcName, + methodIsStatic, + enclosingTypeKind, + typeof(void), + typeTypeParams, + methodParams, + builders.CsharpFunctions); + AppendCsharpFunctionCallSubject( + enclosingType, + methodIsStatic, + builders.CsharpFunctions); + builders.CsharpFunctions.Append('.'); + builders.CsharpFunctions.Append(eventName); + builders.CsharpFunctions.Append(" += del;"); + AppendCsharpFunctionEnd( + typeof(void), + null, + builders.CsharpFunctions); + + // C++ function pointer + AppendCppFunctionPointerDefinition( + funcName, + methodIsStatic, + enclosingType.Name, + enclosingType.Namespace, + enclosingTypeKind, + methodParams, + typeof(void), + builders.CppFunctionPointers); + + // C++ method declaration + string cppMethodName; + bool cppMethodIsStatic; + ParameterInfo[] cppParameters; + ParameterInfo[] cppCallParameters; + Type cppReturnType = typeof(void); + cppMethodName = methodName; + cppMethodIsStatic = methodIsStatic; + cppParameters = methodParams; + cppCallParameters = methodParams; + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + cppMethodName, + enclosingTypeIsStatic, + false, + cppMethodIsStatic, + cppReturnType, + null, + cppParameters, + builders.CppTypeDefinitions); + + // C++ method definition + AppendCppMethodDefinitionBegin( + enclosingType.Name, + cppReturnType, + cppMethodName, + typeTypeParams, + null, + cppParameters, + indent, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendCppPluginFunctionCall( + methodIsStatic, + enclosingType.Name, + enclosingType.Namespace, + enclosingTypeKind, + typeTypeParams, + typeof(void), + funcName, + cppCallParameters, + indent + 1, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n\t\n"); + + // C++ init params + AppendCppInitParam( + funcNameLower, + methodIsStatic, + enclosingType.Name, + enclosingType.Namespace, + enclosingTypeKind, + methodParams, + typeof(void), + builders.CppInitParams); + + // C++ init body + AppendCppInitBody( + funcName, + funcNameLower, + builders.CppInitBody); + } + static void AppendMethod( JsonMethod jsonMethod, Assembly[] assemblies, @@ -2978,8 +3222,6 @@ static void AppendMonoBehaviour( null, false, cppIndent, - true, - true, builders.CppMethodDefinitions); AppendCppMethodDefinitionsEnd( cppMethodDefinitionsIndent, @@ -3422,8 +3664,6 @@ static void AppendArray( null, false, indent, - true, - true, builders.CppMethodDefinitions); AppendArrayConstructor( @@ -4827,19 +5067,9 @@ static void AppendDelegate( removeFuncNameLower, builders.CppInitBody); - // C++ method definitions (begin) - AppendCppMethodDefinitionsBegin( - numberedTypeName, + // C++ method definitions (end) + int cppMethodDefinitionsIndent = AppendNamespaceBeginning( type.Namespace, - TypeKind.Class, - typeParams, - "Object", - "System", - null, - false, - indent, - false, - false, builders.CppMethodDefinitions); // C++ default constructor @@ -4850,131 +5080,748 @@ static void AppendDelegate( typeParams, null, new ParameterInfo[0], - indent, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(" : System::Object(nullptr)\n"); AppendIndent( - indent, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); builders.CppMethodDefinitions.Append(typeName); builders.CppMethodDefinitions.Append("(this);\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("Plugin::"); builders.CppMethodDefinitions.Append(constructorFuncName); builders.CppMethodDefinitions.Append("(CppHandle, &Handle, &ClassHandle);\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("if (Handle)\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 2, + cppMethodDefinitionsIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::ReferenceManagedClass(Handle);\n"); + builders.CppMethodDefinitions.Append( + "Plugin::ReferenceManagedClass(Handle);\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("else\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 2, + cppMethodDefinitionsIndent + 2, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("Plugin::Remove"); builders.CppMethodDefinitions.Append(typeName); builders.CppMethodDefinitions.Append("(CppHandle);\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("CppHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); AppendCppUnhandledExceptionHandling( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); AppendIndent( - indent, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); AppendIndent( - indent, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); - // C++ handle constructor - AppendCppHandleConstructorDefintionBegin( + // Construct with nullptr_t + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( typeParams, - "Object", - "System", - null, - indent, builders.CppMethodDefinitions); - AppendIndent(indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); - AppendIndent( - indent + 1, + builders.CppMethodDefinitions.Append("::"); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(this);\n"); + builders.CppMethodDefinitions.Append("(std::nullptr_t n)\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "\t: System::Object(Plugin::InternalUse::Only, 0)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); + builders.CppMethodDefinitions.Append(typeName); + builders.CppMethodDefinitions.Append("(this);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Copy constructor + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::"); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("(const "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& other)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); + builders.CppMethodDefinitions.Append(typeName); + builders.CppMethodDefinitions.Append("(this);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("if (Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "Plugin::ReferenceManagedClass(Handle);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "ClassHandle = other.ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Move constructor + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::"); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("("); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("&& other)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "CppHandle = other.CppHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "ClassHandle = other.ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("other.Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("other.CppHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("other.ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Handle constructor + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::"); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "(Plugin::InternalUse iu, int32_t handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "\t: System::Object(iu, handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); + builders.CppMethodDefinitions.Append(typeName); + builders.CppMethodDefinitions.Append("(this);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("if (Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "Plugin::ReferenceManagedClass(Handle);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Destructor + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::~"); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("()\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Plugin::Remove"); + builders.CppMethodDefinitions.Append(typeName); + builders.CppMethodDefinitions.Append("(CppHandle);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("CppHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("if (Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t handle = Handle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t classHandle = ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 3, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Plugin::"); + builders.CppMethodDefinitions.Append(releaseFuncName); + builders.CppMethodDefinitions.Append("(handle, classHandle);\n"); + AppendCppUnhandledExceptionHandling( + cppMethodDefinitionsIndent + 3, + builders.CppMethodDefinitions); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Assignment operator to same type + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator=(const "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& other)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendSetHandle( + numberedTypeName, + type.Namespace, + TypeKind.Class, + typeParams, + cppMethodDefinitionsIndent + 1, + "this", + "other.Handle", + builders.CppMethodDefinitions); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "ClassHandle = other.ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return *this;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Assignment operator to nullptr_t + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "::operator=(std::nullptr_t other)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("if (Handle)\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 2, + cppMethodDefinitionsIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::ReferenceManagedClass(Handle);\n"); + builders.CppMethodDefinitions.Append("int32_t handle = Handle;\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t classHandle = ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 3, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Plugin::"); + builders.CppMethodDefinitions.Append(releaseFuncName); + builders.CppMethodDefinitions.Append("(handle, classHandle);\n"); + AppendCppUnhandledExceptionHandling( + cppMethodDefinitionsIndent + 3, + builders.CppMethodDefinitions); + AppendIndent( + cppMethodDefinitionsIndent + 2, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("else\n"); + builders.CppMethodDefinitions.Append("}\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return *this;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Move assignment operator to same type + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator=("); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("&& other)\n"); + AppendIndent( + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 2, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("Plugin::Remove"); builders.CppMethodDefinitions.Append(typeName); builders.CppMethodDefinitions.Append("(CppHandle);\n"); AppendIndent( - indent + 1, + cppMethodDefinitionsIndent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.Append("CppHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("if (Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t handle = Handle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t classHandle = ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 3, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Plugin::"); + builders.CppMethodDefinitions.Append(releaseFuncName); + builders.CppMethodDefinitions.Append("(handle, classHandle);\n"); AppendCppUnhandledExceptionHandling( - indent + 1, + cppMethodDefinitionsIndent + 3, builders.CppMethodDefinitions); - AppendCppHandleConstructorDefintionEnd( - indent, + AppendIndent( + cppMethodDefinitionsIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "ClassHandle = other.ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("other.ClassHandle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Handle = other.Handle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("other.Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return *this;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // Equality operator with same type + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("bool "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator==(const "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& other) const\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "return Handle == other.Handle;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // Inequality operator with same type + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("bool "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("::operator!=(const "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + builders.CppMethodDefinitions); + AppendCppTypeParameters( + typeParams, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("& other) const\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "return Handle != other.Handle;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); // C++ operator() AppendCppMethodDefinitionBegin( @@ -5045,37 +5892,6 @@ static void AppendDelegate( builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); - // C++ destructor - AppendCppDestructorDefinitionBegin( - numberedTypeName, - type.Namespace, - TypeKind.Class, - typeParams, - indent, - builders.CppMethodDefinitions); - AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::Release"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(Handle, ClassHandle);\n"); - AppendCppUnhandledExceptionHandling( - indent + 2, - builders.CppMethodDefinitions); - AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::Remove"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(CppHandle);\n"); - AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); - AppendCppDestructorDefinitionEnd( - indent, - builders.CppMethodDefinitions); - // C++ add AppendCppMethodDefinitionBegin( numberedTypeName, @@ -5202,11 +6018,19 @@ static void AppendDelegate( } builders.CppMethodDefinitions.Append(")\n"); AppendIndent( - indent, + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("try\n"); + AppendIndent( + indent + 1, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 1, + indent + 2, builders.CppMethodDefinitions); if (invokeMethod.ReturnType != typeof(void)) { @@ -5246,6 +6070,75 @@ static void AppendDelegate( builders.CppMethodDefinitions.Append(".Handle"); } builders.CppMethodDefinitions.Append(";\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "catch (System::Exception ex)\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "Plugin::SetException(ex.Handle);\n"); + if (invokeMethod.ReturnType != typeof(void)) + { + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "return {};\n"); + } + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("catch (...)\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "System::String msg = \"Unhandled exception invoking "); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\";\n"); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "System::Exception ex(msg);\n"); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "Plugin::SetException(ex.Handle);\n"); + if (invokeMethod.ReturnType != typeof(void)) + { + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "return {};\n"); + } + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); AppendIndent( indent, builders.CppMethodDefinitions); @@ -6527,7 +7420,8 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("(Plugin::InternalUse iu, int32_t handle);\n"); + output.Append( + "(Plugin::InternalUse iu, int32_t handle);\n"); // Copy constructor AppendIndent(indent + 1, output); @@ -6674,8 +7568,6 @@ static int AppendCppMethodDefinitionsBegin( Type[] baseTypeTypeParams, bool isStatic, int indent, - bool includeDestructor, - bool includeHandleConstructor, StringBuilder output) { int cppMethodDefinitionsIndent = AppendNamespaceBeginning( @@ -6717,35 +7609,49 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("\n"); - if (includeHandleConstructor) - { - AppendCppHandleConstructorDefintionBegin( - enclosingTypeName, - enclosingTypeParams, - baseTypeName, - baseTypeNamespace, - baseTypeTypeParams, - indent, - output); - AppendIndent(indent + 1, output); - output.Append("if (handle)\n"); - AppendIndent(indent + 1, output); - output.Append("{\n"); - AppendIndent(indent + 2, output); - AppendReferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, - enclosingTypeKind, - enclosingTypeParams, - "handle", - output); - output.Append(";\n"); - AppendIndent(indent + 1, output); - output.Append("}\n"); - AppendCppHandleConstructorDefintionEnd( - indent, - output); - } + AppendIndent(indent, output); + AppendTypeNameWithoutGenericSuffix( + enclosingTypeName, + output); + AppendCppTypeParameters( + enclosingTypeParams, + output); + output.Append("::"); + AppendTypeNameWithoutGenericSuffix( + enclosingTypeName, + output); + output.Append("(Plugin::InternalUse iu, int32_t handle)\n"); + AppendIndent(indent, output); + output.Append("\t: "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + output); + AppendCppTypeParameters( + baseTypeTypeParams, + output); + output.Append("(iu, handle)\n"); + AppendIndent(indent, output); + output.Append("{\n"); + AppendIndent(indent + 1, output); + output.Append("if (handle)\n"); + AppendIndent(indent + 1, output); + output.Append("{\n"); + AppendIndent(indent + 2, output); + AppendReferenceManagedHandleFunctionCall( + enclosingTypeName, + enclosingTypeNamespace, + enclosingTypeKind, + enclosingTypeParams, + "handle", + output); + output.Append(";\n"); + AppendIndent(indent + 1, output); + output.Append("}\n"); + AppendIndent(indent, output); + output.Append("}\n"); + AppendIndent(indent, output); + output.Append("\n"); // Copy constructor AppendIndent(indent, output); @@ -6815,28 +7721,44 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("\n"); - if (includeDestructor) - { - AppendCppDestructorDefinitionBegin( - enclosingTypeName, - enclosingTypeNamespace, - enclosingTypeKind, - enclosingTypeParams, - indent, - output); - AppendIndent(indent + 2, output); - AppendDereferenceManagedHandleFunctionCall( - enclosingTypeName, - enclosingTypeNamespace, - enclosingTypeKind, - enclosingTypeParams, - "Handle", - output); - output.Append(";\n"); - AppendCppDestructorDefinitionEnd( - indent, - output); - } + AppendIndent(indent, output); + AppendTypeNameWithoutGenericSuffix( + enclosingTypeName, + output); + AppendCppTypeParameters( + enclosingTypeParams, + output); + output.Append("::~"); + AppendTypeNameWithoutGenericSuffix( + enclosingTypeName, + output); + AppendCppTypeParameters( + enclosingTypeParams, + output); + output.Append("()\n"); + AppendIndent(indent, output); + output.Append("{\n"); + AppendIndent(indent + 1, output); + output.Append("if (Handle)\n"); + AppendIndent(indent + 1, output); + output.Append("{\n"); + AppendIndent(indent + 2, output); + AppendDereferenceManagedHandleFunctionCall( + enclosingTypeName, + enclosingTypeNamespace, + enclosingTypeKind, + enclosingTypeParams, + "Handle", + output); + output.Append(";\n"); + AppendIndent(indent + 2, output); + output.Append("Handle = 0;\n"); + AppendIndent(indent + 1, output); + output.Append("}\n"); + AppendIndent(indent, output); + output.Append("}\n"); + AppendIndent(indent, output); + output.Append("\n"); // Assignment operator to same type AppendIndent(indent, output); @@ -7029,96 +7951,6 @@ static int AppendCppMethodDefinitionsBegin( return cppMethodDefinitionsIndent; } - static void AppendCppHandleConstructorDefintionBegin( - string enclosingTypeName, - Type[] enclosingTypeParams, - string baseTypeName, - string baseTypeNamespace, - Type[] baseTypeTypeParams, - int indent, - StringBuilder output) - { - AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, - output); - AppendCppTypeParameters( - enclosingTypeParams, - output); - output.Append("::"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, - output); - output.Append("(Plugin::InternalUse iu, int32_t handle)\n"); - AppendIndent(indent, output); - output.Append("\t: "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, - output); - AppendCppTypeParameters( - baseTypeTypeParams, - output); - output.Append("(iu, handle)\n"); - AppendIndent(indent, output); - output.Append("{\n"); - } - - static void AppendCppHandleConstructorDefintionEnd( - int indent, - StringBuilder output) - { - AppendIndent(indent, output); - output.Append("}\n"); - AppendIndent(indent, output); - output.Append("\n"); - } - - static void AppendCppDestructorDefinitionBegin( - string enclosingTypeName, - string enclosingTypeNamespace, - TypeKind enclosingTypeKind, - Type[] enclosingTypeParams, - int indent, - StringBuilder output) - { - AppendIndent(indent, output); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, - output); - AppendCppTypeParameters( - enclosingTypeParams, - output); - output.Append("::~"); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, - output); - AppendCppTypeParameters( - enclosingTypeParams, - output); - output.Append("()\n"); - AppendIndent(indent, output); - output.Append("{\n"); - AppendIndent(indent + 1, output); - output.Append("if (Handle)\n"); - AppendIndent(indent + 1, output); - output.Append("{\n"); - } - - static void AppendCppDestructorDefinitionEnd( - int indent, - StringBuilder output) - { - AppendIndent(indent + 2, output); - output.Append("Handle = 0;\n"); - AppendIndent(indent + 1, output); - output.Append("}\n"); - AppendIndent(indent, output); - output.Append("}\n"); - AppendIndent(indent, output); - output.Append("\n"); - } - static void AppendSetHandle( string enclosingTypeName, string enclosingTypeNamespace, @@ -7133,18 +7965,10 @@ static void AppendSetHandle( AppendIndent(indent, output); output.Append("if ("); output.Append(thisHandleExpression); - output.Append(" != "); - output.Append(otherHandleExpression); output.Append(")\n"); AppendIndent(indent, output); output.Append("{\n"); AppendIndent(indent + 1, output); - output.Append("if ("); - output.Append(thisHandleExpression); - output.Append(")\n"); - AppendIndent(indent + 1, output); - output.Append("{\n"); - AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeName, enclosingTypeNamespace, @@ -7153,20 +7977,20 @@ static void AppendSetHandle( thisHandleExpression, output); output.Append(";\n"); - AppendIndent(indent + 1, output); + AppendIndent(indent, output); output.Append("}\n"); - AppendIndent(indent + 1, output); + AppendIndent(indent, output); output.Append(thisHandleExpression); output.Append(" = "); output.Append(otherHandleExpression); output.Append(";\n"); - AppendIndent(indent + 1, output); + AppendIndent(indent, output); output.Append("if ("); output.Append(thisHandleExpression); output.Append(")\n"); - AppendIndent(indent + 1, output); + AppendIndent(indent, output); output.Append("{\n"); - AppendIndent(indent + 2, output); + AppendIndent(indent + 1, output); AppendReferenceManagedHandleFunctionCall( enclosingTypeName, enclosingTypeNamespace, @@ -7175,8 +7999,6 @@ static void AppendSetHandle( thisHandleExpression, output); output.Append(";\n"); - AppendIndent(indent + 1, output); - output.Append("}\n"); AppendIndent(indent, output); output.Append("}\n"); } diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index a3a4f79..be0f906 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -505,6 +505,28 @@ "Set": {} } ] + }, + { + "Name": "UnityEngine.Application", + "Events": [ + { + "Name": "onBeforeRender" + } + ] + }, + { + "Name": "UnityEngine.SceneManagement.SceneManager", + "Events": [ + { + "Name": "sceneLoaded" + } + ] + }, + { + "Name": "UnityEngine.SceneManagement.Scene" + }, + { + "Name": "UnityEngine.SceneManagement.LoadSceneMode" } ], "MonoBehaviours": [ @@ -588,6 +610,21 @@ }, { "Type": "System.AppDomainInitializer" + }, + { + "Type": "UnityEngine.Events.UnityAction" + }, + { + "Type": "UnityEngine.Events.UnityAction`2", + "GenericParams": [ + { + "Types": [ + "UnityEngine.SceneManagement.Scene", + "UnityEngine.SceneManagement.LoadSceneMode" + ], + "MaxSimultaneous": 10 + } + ] } ] } \ No newline at end of file diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 8da9a20..53e97e8 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -106,6 +106,10 @@ namespace Plugin 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); int32_t (*SystemInt32Array1Constructor1)(int32_t length0); int32_t (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*SystemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item); @@ -162,6 +166,16 @@ namespace Plugin void (*SystemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle); void (*SystemAppDomainInitializerAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemAppDomainInitializerRemove)(int32_t thisHandle, int32_t delHandle); + void (*ReleaseUnityEngineEventsUnityAction)(int32_t handle, int32_t classHandle); + void (*UnityEngineEventsUnityActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); + void (*UnityEngineEventsUnityActionInvoke)(int32_t thisHandle); + void (*UnityEngineEventsUnityActionAdd)(int32_t thisHandle, int32_t delHandle); + void (*UnityEngineEventsUnityActionRemove)(int32_t thisHandle, int32_t delHandle); + void (*ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)(int32_t handle, int32_t classHandle); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle); /*END FUNCTION POINTERS*/ } @@ -196,6 +210,20 @@ namespace Plugin } } + bool DereferenceManagedClassNoRelease(int32_t handle) + { + 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 RefCountsLenUnityEngineRaycastHit; int32_t* RefCountsUnityEngineRaycastHit; @@ -397,6 +425,56 @@ namespace Plugin *pRelease = (System::AppDomainInitializer*)NextFreeSystemAppDomainInitializer; NextFreeSystemAppDomainInitializer = pRelease; } + int32_t UnityEngineEventsUnityActionFreeListSize; + UnityEngine::Events::UnityAction** UnityEngineEventsUnityActionFreeList; + UnityEngine::Events::UnityAction** NextFreeUnityEngineEventsUnityAction; + + 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); + } + + UnityEngine::Events::UnityAction* GetUnityEngineEventsUnityAction(int32_t handle) + { + assert(handle >= 0 && handle < UnityEngineEventsUnityActionFreeListSize); + return UnityEngineEventsUnityActionFreeList[handle]; + } + + void RemoveUnityEngineEventsUnityAction(int32_t handle) + { + 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; + + int32_t StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(UnityEngine::Events::UnityAction2* del) + { + assert(NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode != nullptr); + UnityEngine::Events::UnityAction2** pNext = NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; + NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = (UnityEngine::Events::UnityAction2**)*pNext; + *pNext = del; + return (int32_t)(pNext - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList); + } + + UnityEngine::Events::UnityAction2* GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) + { + assert(handle >= 0 && handle < UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize); + return UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[handle]; + } + + void RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int32_t handle) + { + UnityEngine::Events::UnityAction2** pRelease = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + handle; + *pRelease = (UnityEngine::Events::UnityAction2*)NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; + NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = pRelease; + } /*END GLOBAL STATE AND FUNCTIONS*/ } @@ -597,17 +675,14 @@ namespace System Stopwatch& Stopwatch::operator=(const Stopwatch& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -738,17 +813,14 @@ namespace UnityEngine Object& Object::operator=(const Object& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -874,17 +946,14 @@ namespace UnityEngine GameObject& GameObject::operator=(const GameObject& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1021,17 +1090,14 @@ namespace UnityEngine Component& Component::operator=(const Component& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1119,17 +1185,14 @@ namespace UnityEngine Transform& Transform::operator=(const Transform& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1229,17 +1292,14 @@ namespace UnityEngine Debug& Debug::operator=(const Debug& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1381,17 +1441,14 @@ namespace UnityEngine Collision& Collision::operator=(const Collision& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1466,17 +1523,14 @@ namespace UnityEngine Behaviour& Behaviour::operator=(const Behaviour& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1551,17 +1605,14 @@ namespace UnityEngine MonoBehaviour& MonoBehaviour::operator=(const MonoBehaviour& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1636,17 +1687,14 @@ namespace UnityEngine AudioSettings& AudioSettings::operator=(const AudioSettings& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1735,17 +1783,14 @@ namespace UnityEngine NetworkTransport& NetworkTransport::operator=(const NetworkTransport& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -1792,17 +1837,14 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - if (address->Handle != addressHandle) + if (address->Handle) { - if (address->Handle) - { - Plugin::DereferenceManagedClass(address->Handle); - } - address->Handle = addressHandle; - if (address->Handle) - { - Plugin::ReferenceManagedClass(address->Handle); - } + Plugin::DereferenceManagedClass(address->Handle); + } + address->Handle = addressHandle; + if (address->Handle) + { + Plugin::ReferenceManagedClass(address->Handle); } } @@ -1961,17 +2003,14 @@ namespace UnityEngine RaycastHit& RaycastHit::operator=(const RaycastHit& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); - } + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); } return *this; } @@ -2088,17 +2127,14 @@ namespace System KeyValuePair& KeyValuePair::operator=(const KeyValuePair& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); - } + Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); } return *this; } @@ -2223,17 +2259,14 @@ namespace System List& List::operator=(const List& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -2369,17 +2402,14 @@ namespace System LinkedListNode& LinkedListNode::operator=(const LinkedListNode& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -2503,17 +2533,14 @@ namespace System StrongBox& StrongBox::operator=(const StrongBox& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -2637,17 +2664,14 @@ namespace System Collection& Collection::operator=(const Collection& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -2728,17 +2752,14 @@ namespace System KeyedCollection& KeyedCollection::operator=(const KeyedCollection& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -2815,17 +2836,14 @@ namespace System Exception& Exception::operator=(const Exception& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -2918,17 +2936,14 @@ namespace System SystemException& SystemException::operator=(const SystemException& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -3003,17 +3018,14 @@ namespace System NullReferenceException& NullReferenceException::operator=(const NullReferenceException& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -3170,17 +3182,14 @@ namespace UnityEngine Screen& Screen::operator=(const Screen& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -3288,17 +3297,14 @@ namespace UnityEngine Physics& Physics::operator=(const Physics& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -3413,17 +3419,14 @@ namespace UnityEngine Gradient& Gradient::operator=(const Gradient& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -3541,17 +3544,14 @@ namespace System AppDomainSetup& AppDomainSetup::operator=(const AppDomainSetup& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -3631,103 +3631,15 @@ namespace System } } -namespace MyGame -{ - namespace MonoBehaviours - { - TestScript::TestScript(std::nullptr_t n) - : TestScript(Plugin::InternalUse::Only, 0) - { - } - - TestScript::TestScript(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::MonoBehaviour(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - TestScript::TestScript(const TestScript& other) - : TestScript(Plugin::InternalUse::Only, other.Handle) - { - } - - TestScript::TestScript(TestScript&& other) - : TestScript(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - TestScript::~TestScript() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - TestScript& TestScript::operator=(const TestScript& other) - { - if (this->Handle != other.Handle) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - } - return *this; - } - - TestScript& TestScript::operator=(std::nullptr_t other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - TestScript& TestScript::operator=(TestScript&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool TestScript::operator==(const TestScript& other) const - { - return Handle == other.Handle; - } - - bool TestScript::operator!=(const TestScript& other) const - { - return Handle != other.Handle; - } - } -} - -namespace System +namespace UnityEngine { - Array1::Array1(std::nullptr_t n) - : Array1(Plugin::InternalUse::Only, 0) + Application::Application(std::nullptr_t n) + : Application(Plugin::InternalUse::Only, 0) { } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, handle) + Application::Application(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { if (handle) { @@ -3735,18 +3647,18 @@ namespace System } } - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Application::Application(const Application& other) + : Application(Plugin::InternalUse::Only, other.Handle) { } - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Application::Application(Application&& other) + : Application(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Array1::~Array1() + Application::~Application() { if (Handle) { @@ -3755,24 +3667,21 @@ namespace System } } - Array1& Array1::operator=(const Array1& other) + Application& Application::operator=(const Application& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Application& Application::operator=(std::nullptr_t other) { if (Handle) { @@ -3782,7 +3691,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Application& Application::operator=(Application&& other) { if (Handle) { @@ -3793,47 +3702,19 @@ namespace System return *this; } - bool Array1::operator==(const Array1& other) const + bool Application::operator==(const Application& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Application::operator!=(const Application& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) - : System::Array(nullptr) - { - auto returnValue = Plugin::SystemInt32Array1Constructor1(length0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - } - } - - int32_t Array1::GetLength() - { - return Array::GetLength(); - } - - int32_t Array1::GetRank() - { - return Array::GetRank(); - } - - int32_t Array1::GetItem(int32_t index0) + void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction del) { - auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, index0); + Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3841,12 +3722,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnValue; } - void Array1::SetItem(int32_t index0, int32_t item) + void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction del) { - Plugin::SystemInt32Array1SetItem1(Handle, index0, item); + Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3857,60 +3737,261 @@ namespace System } } -namespace System +namespace UnityEngine { - Array1::Array1(std::nullptr_t n) - : Array1(Plugin::InternalUse::Only, 0) - { - } - - Array1::Array1(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - } - - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Array1::~Array1() + namespace SceneManagement { - if (Handle) + SceneManager::SceneManager(std::nullptr_t n) + : SceneManager(Plugin::InternalUse::Only, 0) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - } - - Array1& Array1::operator=(const Array1& other) - { - if (this->Handle != other.Handle) + + SceneManager::SceneManager(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - if (this->Handle) + if (handle) { - Plugin::DereferenceManagedClass(this->Handle); + Plugin::ReferenceManagedClass(handle); } - this->Handle = other.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=(std::nullptr_t other) + { + 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() + { + } + } +} + +namespace MyGame +{ + namespace MonoBehaviours + { + TestScript::TestScript(std::nullptr_t n) + : TestScript(Plugin::InternalUse::Only, 0) + { + } + + TestScript::TestScript(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::MonoBehaviour(iu, handle) + { + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + TestScript::TestScript(const TestScript& other) + : TestScript(Plugin::InternalUse::Only, other.Handle) + { + } + + TestScript::TestScript(TestScript&& other) + : TestScript(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + TestScript::~TestScript() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + TestScript& TestScript::operator=(const TestScript& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; if (this->Handle) { Plugin::ReferenceManagedClass(this->Handle); } + return *this; + } + + TestScript& TestScript::operator=(std::nullptr_t other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + TestScript& TestScript::operator=(TestScript&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool TestScript::operator==(const TestScript& other) const + { + return Handle == other.Handle; + } + + bool TestScript::operator!=(const TestScript& other) const + { + return Handle != other.Handle; + } + } +} + +namespace System +{ + Array1::Array1(std::nullptr_t n) + : Array1(Plugin::InternalUse::Only, 0) + { + } + + Array1::Array1(Plugin::InternalUse iu, int32_t handle) + : System::Array(iu, handle) + { + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + Array1::Array1(const Array1& other) + : Array1(Plugin::InternalUse::Only, other.Handle) + { + } + + Array1::Array1(Array1&& other) + : Array1(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Array1::~Array1() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Array1& Array1::operator=(const Array1& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(std::nullptr_t other) { if (Handle) { @@ -3920,7 +4001,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -3931,20 +4012,20 @@ 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(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSingleArray1Constructor1(length0); + auto returnValue = Plugin::SystemInt32Array1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3959,19 +4040,19 @@ namespace System } } - int32_t Array1::GetLength() + int32_t Array1::GetLength() { return Array::GetLength(); } - int32_t Array1::GetRank() + int32_t Array1::GetRank() { return Array::GetRank(); } - float Array1::GetItem(int32_t index0) + int32_t Array1::GetItem(int32_t index0) { - auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, index0); + auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3982,9 +4063,9 @@ namespace System return returnValue; } - void Array1::SetItem(int32_t index0, float item) + void Array1::SetItem(int32_t index0, int32_t item) { - Plugin::SystemSingleArray1SetItem1(Handle, index0, item); + Plugin::SystemInt32Array1SetItem1(Handle, index0, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3997,12 +4078,12 @@ namespace System namespace System { - Array2::Array2(std::nullptr_t n) - : Array2(Plugin::InternalUse::Only, 0) + Array1::Array1(std::nullptr_t n) + : Array1(Plugin::InternalUse::Only, 0) { } - Array2::Array2(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse iu, int32_t handle) : System::Array(iu, handle) { if (handle) @@ -4011,18 +4092,18 @@ namespace System } } - Array2::Array2(const Array2& other) - : Array2(Plugin::InternalUse::Only, other.Handle) + Array1::Array1(const Array1& other) + : Array1(Plugin::InternalUse::Only, other.Handle) { } - Array2::Array2(Array2&& other) - : Array2(Plugin::InternalUse::Only, other.Handle) + Array1::Array1(Array1&& other) + : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Array2::~Array2() + Array1::~Array1() { if (Handle) { @@ -4031,19 +4112,151 @@ namespace System } } - Array2& Array2::operator=(const Array2& other) + Array1& Array1::operator=(const Array1& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + Array1& Array1::operator=(std::nullptr_t other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Array1& Array1::operator=(Array1&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Array1::operator==(const Array1& other) const + { + return Handle == other.Handle; + } + + bool Array1::operator!=(const Array1& other) const + { + return Handle != other.Handle; + } + + Array1::Array1(int32_t length0) + : System::Array(nullptr) + { + auto returnValue = Plugin::SystemSingleArray1Constructor1(length0); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + } + } + + int32_t Array1::GetLength() + { + return Array::GetLength(); + } + + int32_t Array1::GetRank() + { + return Array::GetRank(); + } + + float Array1::GetItem(int32_t index0) + { + auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, index0); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } + + void Array1::SetItem(int32_t index0, float item) + { + Plugin::SystemSingleArray1SetItem1(Handle, index0, item); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } +} + +namespace System +{ + Array2::Array2(std::nullptr_t n) + : Array2(Plugin::InternalUse::Only, 0) + { + } + + Array2::Array2(Plugin::InternalUse iu, int32_t handle) + : System::Array(iu, handle) + { + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + Array2::Array2(const Array2& other) + : Array2(Plugin::InternalUse::Only, other.Handle) + { + } + + Array2::Array2(Array2&& other) + : Array2(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Array2::~Array2() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + Array2& Array2::operator=(const Array2& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -4184,17 +4397,14 @@ namespace System Array3& Array3::operator=(const Array3& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -4335,17 +4545,14 @@ namespace System Array1& Array1::operator=(const Array1& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -4473,17 +4680,14 @@ namespace System Array1& Array1::operator=(const Array1& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -4611,17 +4815,14 @@ namespace System Array1& Array1::operator=(const Array1& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -4749,17 +4950,14 @@ namespace System Array1& Array1::operator=(const Array1& other) { - if (this->Handle != other.Handle) + if (this->Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); } return *this; } @@ -4851,112 +5049,170 @@ namespace System namespace System { + Action::Action() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemAction(this); + Plugin::SystemActionConstructor(CppHandle, &Handle, &ClassHandle); + 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(std::nullptr_t n) - : Action(Plugin::InternalUse::Only, 0) + : System::Object(Plugin::InternalUse::Only, 0) { + CppHandle = Plugin::StoreSystemAction(this); + ClassHandle = 0; } Action::Action(const Action& other) - : Action(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = Plugin::StoreSystemAction(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } Action::Action(Action&& other) - : Action(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Action& Action::operator=(const Action& other) + Action::Action(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - if (this->Handle != other.Handle) + CppHandle = Plugin::StoreSystemAction(this); + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + Plugin::ReferenceManagedClass(Handle); } - return *this; + ClassHandle = 0; } - Action& Action::operator=(std::nullptr_t other) + Action::~Action() { + Plugin::RemoveSystemAction(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; + } + } } - return *this; } - Action& Action::operator=(Action&& other) + Action& Action::operator=(const Action& other) { - if (Handle) + if (this->Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedClass(this->Handle); } - Handle = other.Handle; - other.Handle = 0; + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + ClassHandle = other.ClassHandle; return *this; } - bool Action::operator==(const Action& other) const - { - return Handle == other.Handle; - } - - bool Action::operator!=(const Action& other) const - { - return Handle != other.Handle; - } - - Action::Action() - : System::Object(nullptr) + Action& Action::operator=(std::nullptr_t other) { - CppHandle = Plugin::StoreSystemAction(this); - Plugin::SystemActionConstructor(CppHandle, &Handle, &ClassHandle); if (Handle) { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemAction(CppHandle); - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + Action& Action::operator=(Action&& other) { - ClassHandle = 0; - CppHandle = Plugin::StoreSystemAction(this); + Plugin::RemoveSystemAction(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemAction(CppHandle); - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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()() @@ -4975,24 +5231,6 @@ namespace System } } - Action::~Action() - { - if (Handle) - { - Plugin::ReleaseSystemAction(Handle, ClassHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Plugin::RemoveSystemAction(CppHandle); - ClassHandle = 0; - Handle = 0; - } - } - void Action::operator+=(System::Action& del) { Plugin::SystemActionAdd(Handle, del.Handle); @@ -5019,42 +5257,124 @@ namespace System DLLEXPORT void SystemActionCppInvoke(int32_t cppHandle) { - (*Plugin::GetSystemAction(cppHandle))(); + try + { + (*Plugin::GetSystemAction(cppHandle))(); + } + 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); + } } } namespace System { + Action1::Action1() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + Plugin::SystemActionSystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + 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(std::nullptr_t n) - : Action1(Plugin::InternalUse::Only, 0) + : System::Object(Plugin::InternalUse::Only, 0) { + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + ClassHandle = 0; } Action1::Action1(const Action1& other) - : Action1(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } Action1::Action1(Action1&& other) - : Action1(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Action1& Action1::operator=(const Action1& other) + Action1::Action1(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; + } + + Action1::~Action1() { - if (this->Handle != other.Handle) + Plugin::RemoveSystemActionSystemSingle(CppHandle); + CppHandle = 0; + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReferenceManagedClass(this->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; } @@ -5062,18 +5382,51 @@ namespace System { if (Handle) { - Plugin::DereferenceManagedClass(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) { - Plugin::DereferenceManagedClass(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; @@ -5089,19 +5442,13 @@ namespace System return Handle != other.Handle; } - Action1::Action1() - : System::Object(nullptr) + void Action1::operator()(float obj) { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - Plugin::SystemActionSystemSingleConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemActionSystemSingle(CppHandle); - } + } + + void Action1::Invoke(float obj) + { + Plugin::SystemActionSystemSingleInvoke(Handle, obj); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5111,19 +5458,9 @@ namespace System } } - Action1::Action1(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + void Action1::operator+=(System::Action1& del) { - ClassHandle = 0; - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemActionSystemSingle(CppHandle); - } + Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5133,13 +5470,9 @@ namespace System } } - void Action1::operator()(float obj) - { - } - - void Action1::Invoke(float obj) + void Action1::operator-=(System::Action1& del) { - Plugin::SystemActionSystemSingleInvoke(Handle, obj); + Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5149,39 +5482,42 @@ namespace System } } - Action1::~Action1() + DLLEXPORT void SystemActionSystemSingleCppInvoke(int32_t cppHandle, float obj) { - if (Handle) + try { - Plugin::ReleaseSystemActionSystemSingle(Handle, ClassHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Plugin::RemoveSystemActionSystemSingle(CppHandle); - ClassHandle = 0; - Handle = 0; + (*Plugin::GetSystemActionSystemSingle(cppHandle))(obj); } - } - - void Action1::operator+=(System::Action1& del) - { - Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) + catch (System::Exception ex) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Action1"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); } } - - void Action1::operator-=(System::Action1& del) +} + +namespace System +{ + Action2::Action2() + : System::Object(nullptr) { - Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + Plugin::SystemActionSystemSingle_SystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + ClassHandle = 0; + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5191,44 +5527,81 @@ namespace System } } - DLLEXPORT void SystemActionSystemSingleCppInvoke(int32_t cppHandle, float obj) - { - (*Plugin::GetSystemActionSystemSingle(cppHandle))(obj); - } -} - -namespace System -{ Action2::Action2(std::nullptr_t n) - : Action2(Plugin::InternalUse::Only, 0) + : System::Object(Plugin::InternalUse::Only, 0) { + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + ClassHandle = 0; } Action2::Action2(const Action2& other) - : Action2(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } Action2::Action2(Action2&& other) - : Action2(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Action2& Action2::operator=(const Action2& other) + Action2::Action2(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; + } + + Action2::~Action2() { - if (this->Handle != other.Handle) + Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + CppHandle = 0; + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReferenceManagedClass(this->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; } @@ -5236,18 +5609,51 @@ namespace System { if (Handle) { - Plugin::DereferenceManagedClass(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) { - Plugin::DereferenceManagedClass(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; @@ -5263,50 +5669,6 @@ namespace System return Handle != other.Handle; } - Action2::Action2() - : System::Object(nullptr) - { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - Plugin::SystemActionSystemSingle_SystemSingleConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - Action2::Action2(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - ClassHandle = 0; - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - void Action2::operator()(float arg1, float arg2) { } @@ -5323,24 +5685,6 @@ namespace System } } - Action2::~Action2() - { - if (Handle) - { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(Handle, ClassHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); - ClassHandle = 0; - Handle = 0; - } - } - void Action2::operator+=(System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); @@ -5367,76 +5711,25 @@ namespace System DLLEXPORT void SystemActionSystemSingle_SystemSingleCppInvoke(int32_t cppHandle, float arg1, float arg2) { - (*Plugin::GetSystemActionSystemSingle_SystemSingle(cppHandle))(arg1, arg2); - } -} - -namespace System -{ - Func3::Func3(std::nullptr_t n) - : Func3(Plugin::InternalUse::Only, 0) - { - } - - Func3::Func3(const Func3& other) - : Func3(Plugin::InternalUse::Only, other.Handle) - { - } - - Func3::Func3(Func3&& other) - : Func3(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Func3& Func3::operator=(const Func3& other) - { - if (this->Handle != other.Handle) + try { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } + (*Plugin::GetSystemActionSystemSingle_SystemSingle(cppHandle))(arg1, arg2); } - return *this; - } - - Func3& Func3::operator=(std::nullptr_t other) - { - if (Handle) + catch (System::Exception ex) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Plugin::SetException(ex.Handle); } - return *this; - } - - Func3& Func3::operator=(Func3&& other) - { - if (Handle) + catch (...) { - Plugin::DereferenceManagedClass(Handle); + System::String msg = "Unhandled exception invoking System::Action2"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); } - 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; } - +} + +namespace System +{ Func3::Func3() : System::Object(nullptr) { @@ -5449,6 +5742,8 @@ namespace System else { Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); + ClassHandle = 0; + CppHandle = 0; } if (Plugin::unhandledCsharpException) { @@ -5459,62 +5754,164 @@ namespace System } } - Func3::Func3(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + Func3::Func3(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) { + CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); ClassHandle = 0; + } + + Func3::Func3(const Func3& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } - else - { - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + ClassHandle = other.ClassHandle; } - double Func3::operator()(int32_t arg1, float arg2) + Func3::Func3(Func3&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - return {}; + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - double Func3::Invoke(int32_t arg1, float arg2) + Func3::Func3(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - auto returnValue = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(Handle, arg1, arg2); - if (Plugin::unhandledCsharpException) + CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(Handle); } - return returnValue; + ClassHandle = 0; } - Func3::~Func3() + Func3::~Func3() { + Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(Handle, ClassHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); + } + } + + 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=(std::nullptr_t other) + { + 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; + } + + double Func3::operator()(int32_t arg1, float arg2) + { + return {}; + } + + double Func3::Invoke(int32_t arg1, float 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; } void Func3::operator+=(System::Func3& del) @@ -5543,42 +5940,126 @@ namespace System DLLEXPORT double SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke(int32_t cppHandle, int32_t arg1, float arg2) { - return (*Plugin::GetSystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle))(arg1, arg2); + try + { + return (*Plugin::GetSystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle))(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 {}; + } } } namespace System { + Func3::Func3() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(CppHandle, &Handle, &ClassHandle); + 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(std::nullptr_t n) - : Func3(Plugin::InternalUse::Only, 0) + : System::Object(Plugin::InternalUse::Only, 0) { + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); + ClassHandle = 0; } Func3::Func3(const Func3& other) - : Func3(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } Func3::Func3(Func3&& other) - : Func3(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Func3& Func3::operator=(const Func3& other) + Func3::Func3(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - if (this->Handle != other.Handle) + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->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::ReferenceManagedClass(this->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; } @@ -5586,18 +6067,51 @@ namespace System { if (Handle) { - Plugin::DereferenceManagedClass(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) { - Plugin::DereferenceManagedClass(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; @@ -5613,19 +6127,14 @@ namespace System return Handle != other.Handle; } - Func3::Func3() - : System::Object(nullptr) + System::String Func3::operator()(int16_t arg1, int32_t arg2) { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - } + return {}; + } + + System::String Func3::Invoke(int16_t arg1, int32_t arg2) + { + auto returnValue = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(Handle, arg1, arg2); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5633,21 +6142,12 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return System::String(Plugin::InternalUse::Only, returnValue); } - Func3::Func3(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + void Func3::operator+=(System::Func3& del) { - ClassHandle = 0; - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - } + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5657,14 +6157,9 @@ namespace System } } - System::String Func3::operator()(int16_t arg1, int32_t arg2) - { - return {}; - } - - System::String Func3::Invoke(int16_t arg1, int32_t arg2) + void Func3::operator-=(System::Func3& del) { - auto returnValue = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(Handle, arg1, arg2); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5672,42 +6167,46 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return System::String(Plugin::InternalUse::Only, returnValue); } - Func3::~Func3() + DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) { - if (Handle) + try { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(Handle, ClassHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - ClassHandle = 0; - Handle = 0; + return (*Plugin::GetSystemFuncSystemInt16_SystemInt32_SystemString(cppHandle))(arg1, arg2).Handle; } - } - - void Func3::operator+=(System::Func3& del) - { - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) + catch (System::Exception ex) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Func3"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; } } - - void Func3::operator-=(System::Func3& del) +} + +namespace System +{ + AppDomainInitializer::AppDomainInitializer() + : System::Object(nullptr) { - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); + Plugin::SystemAppDomainInitializerConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemAppDomainInitializer(CppHandle); + ClassHandle = 0; + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5717,44 +6216,81 @@ namespace System } } - DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) - { - return (*Plugin::GetSystemFuncSystemInt16_SystemInt32_SystemString(cppHandle))(arg1, arg2).Handle; - } -} - -namespace System -{ AppDomainInitializer::AppDomainInitializer(std::nullptr_t n) - : AppDomainInitializer(Plugin::InternalUse::Only, 0) + : System::Object(Plugin::InternalUse::Only, 0) { + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); + ClassHandle = 0; } AppDomainInitializer::AppDomainInitializer(const AppDomainInitializer& other) - : AppDomainInitializer(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } AppDomainInitializer::AppDomainInitializer(AppDomainInitializer&& other) - : AppDomainInitializer(Plugin::InternalUse::Only, other.Handle) + : System::Object(Plugin::InternalUse::Only, other.Handle) { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - AppDomainInitializer& AppDomainInitializer::operator=(const AppDomainInitializer& other) + AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - if (this->Handle != other.Handle) + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); + if (Handle) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->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::ReferenceManagedClass(this->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; } @@ -5762,18 +6298,51 @@ namespace System { if (Handle) { - Plugin::DereferenceManagedClass(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) { - Plugin::DereferenceManagedClass(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; @@ -5789,19 +6358,13 @@ namespace System return Handle != other.Handle; } - AppDomainInitializer::AppDomainInitializer() - : System::Object(nullptr) + void AppDomainInitializer::operator()(System::Array1 args) { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - Plugin::SystemAppDomainInitializerConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemAppDomainInitializer(CppHandle); - } + } + + void AppDomainInitializer::Invoke(System::Array1 args) + { + Plugin::SystemAppDomainInitializerInvoke(Handle, args.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5811,19 +6374,9 @@ namespace System } } - AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) { - ClassHandle = 0; - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemAppDomainInitializer(CppHandle); - } + Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5833,13 +6386,9 @@ namespace System } } - void AppDomainInitializer::operator()(System::Array1 args) - { - } - - void AppDomainInitializer::Invoke(System::Array1 args) + void AppDomainInitializer::operator-=(System::AppDomainInitializer& del) { - Plugin::SystemAppDomainInitializerInvoke(Handle, args.Handle); + Plugin::SystemAppDomainInitializerRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5849,11 +6398,44 @@ namespace System } } - AppDomainInitializer::~AppDomainInitializer() + DLLEXPORT void SystemAppDomainInitializerCppInvoke(int32_t cppHandle, int32_t argsHandle) { - if (Handle) + try { - Plugin::ReleaseSystemAppDomainInitializer(Handle, ClassHandle); + (*Plugin::GetSystemAppDomainInitializer(cppHandle))(System::Array1(Plugin::InternalUse::Only, argsHandle)); + } + 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); + } + } +} + +namespace UnityEngine +{ + namespace Events + { + UnityAction::UnityAction() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); + Plugin::UnityEngineEventsUnityActionConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); + ClassHandle = 0; + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5861,39 +6443,437 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - Plugin::RemoveSystemAppDomainInitializer(CppHandle); + } + + UnityAction::UnityAction(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); + ClassHandle = 0; + } + + UnityAction::UnityAction(const UnityAction& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; + } + + UnityAction::UnityAction(UnityAction&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; + } + + UnityAction::UnityAction(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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=(std::nullptr_t other) + { + 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; } - } - - void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) - { - Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); - if (Plugin::unhandledCsharpException) + + UnityAction& UnityAction::operator=(UnityAction&& other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; } - } - - void AppDomainInitializer::operator-=(System::AppDomainInitializer& del) - { - Plugin::SystemAppDomainInitializerRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) + + bool UnityAction::operator==(const UnityAction& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; + } + + bool UnityAction::operator!=(const UnityAction& other) const + { + return Handle != other.Handle; + } + + void UnityAction::operator()() + { + } + + void UnityAction::Invoke() + { + Plugin::UnityEngineEventsUnityActionInvoke(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + 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; + } + } + + DLLEXPORT void UnityEngineEventsUnityActionCppInvoke(int32_t cppHandle) + { + try + { + (*Plugin::GetUnityEngineEventsUnityAction(cppHandle))(); + } + 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); + } } } - - DLLEXPORT void SystemAppDomainInitializerCppInvoke(int32_t cppHandle, int32_t argsHandle) +} + +namespace UnityEngine +{ + namespace Events { - (*Plugin::GetSystemAppDomainInitializer(cppHandle))(System::Array1(Plugin::InternalUse::Only, argsHandle)); + UnityAction2::UnityAction2() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(CppHandle, &Handle, &ClassHandle); + 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(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + ClassHandle = 0; + } + + UnityAction2::UnityAction2(const UnityAction2& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; + } + + UnityAction2::UnityAction2(UnityAction2&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; + } + + UnityAction2::UnityAction2(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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=(std::nullptr_t other) + { + 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::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + { + } + + void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + { + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + 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; + } + } + + DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke(int32_t cppHandle, UnityEngine::SceneManagement::Scene arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + { + try + { + (*Plugin::GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle))(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); + } + } } } @@ -6005,6 +6985,10 @@ DLLEXPORT void Init( 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), int32_t (*systemInt32Array1Constructor1)(int32_t length0), int32_t (*systemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*systemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item), @@ -6060,14 +7044,24 @@ DLLEXPORT void Init( void (*systemAppDomainInitializerConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), void (*systemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle), void (*systemAppDomainInitializerAdd)(int32_t thisHandle, int32_t delHandle), - void (*systemAppDomainInitializerRemove)(int32_t thisHandle, int32_t delHandle) + void (*systemAppDomainInitializerRemove)(int32_t thisHandle, int32_t delHandle), + void (*releaseUnityEngineEventsUnityAction)(int32_t handle, int32_t classHandle), + void (*unityEngineEventsUnityActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), + void (*unityEngineEventsUnityActionInvoke)(int32_t thisHandle), + void (*unityEngineEventsUnityActionAdd)(int32_t thisHandle, int32_t delHandle), + void (*unityEngineEventsUnityActionRemove)(int32_t thisHandle, int32_t delHandle), + void (*releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)(int32_t handle, int32_t classHandle), + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1), + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle), + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle) /*END INIT PARAMS*/) { using namespace Plugin; // Init managed object ref counting Plugin::RefCountsLenClass = maxManagedObjects; - Plugin::RefCountsClass = new int32_t[maxManagedObjects]; + Plugin::RefCountsClass = new int32_t[maxManagedObjects](); // Init pointers to C# functions Plugin::StringNew = stringNew; @@ -6143,6 +7137,10 @@ DLLEXPORT void Init( Plugin::SystemAppDomainSetupConstructor = systemAppDomainSetupConstructor; Plugin::SystemAppDomainSetupPropertyGetAppDomainInitializer = systemAppDomainSetupPropertyGetAppDomainInitializer; Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer = systemAppDomainSetupPropertySetAppDomainInitializer; + Plugin::UnityEngineApplicationAddEventOnBeforeRender = unityEngineApplicationAddEventOnBeforeRender; + Plugin::UnityEngineApplicationRemoveEventOnBeforeRender = unityEngineApplicationRemoveEventOnBeforeRender; + Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded = unityEngineSceneManagementSceneManagerAddEventSceneLoaded; + Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded = unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded; Plugin::SystemInt32Array1Constructor1 = systemInt32Array1Constructor1; Plugin::SystemInt32Array1GetItem1 = systemInt32Array1GetItem1; Plugin::SystemInt32Array1SetItem1 = systemInt32Array1SetItem1; @@ -6247,6 +7245,32 @@ DLLEXPORT void Init( Plugin::SystemAppDomainInitializerInvoke = systemAppDomainInitializerInvoke; Plugin::SystemAppDomainInitializerAdd = systemAppDomainInitializerAdd; Plugin::SystemAppDomainInitializerRemove = systemAppDomainInitializerRemove; + UnityEngineEventsUnityActionFreeListSize = maxManagedObjects; + UnityEngineEventsUnityActionFreeList = new UnityEngine::Events::UnityAction*[UnityEngineEventsUnityActionFreeListSize]; + for (int32_t i = 0, end = UnityEngineEventsUnityActionFreeListSize - 1; i < end; ++i) + { + UnityEngineEventsUnityActionFreeList[i] = (UnityEngine::Events::UnityAction*)(UnityEngineEventsUnityActionFreeList + i + 1); + } + UnityEngineEventsUnityActionFreeList[UnityEngineEventsUnityActionFreeListSize - 1] = nullptr; + NextFreeUnityEngineEventsUnityAction = UnityEngineEventsUnityActionFreeList + 1; + Plugin::ReleaseUnityEngineEventsUnityAction = releaseUnityEngineEventsUnityAction; + Plugin::UnityEngineEventsUnityActionConstructor = unityEngineEventsUnityActionConstructor; + Plugin::UnityEngineEventsUnityActionInvoke = unityEngineEventsUnityActionInvoke; + Plugin::UnityEngineEventsUnityActionAdd = unityEngineEventsUnityActionAdd; + Plugin::UnityEngineEventsUnityActionRemove = unityEngineEventsUnityActionRemove; + UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize = 10; + UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList = new UnityEngine::Events::UnityAction2*[UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize]; + for (int32_t i = 0, end = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1; i < end; ++i) + { + UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[i] = (UnityEngine::Events::UnityAction2*)(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + i + 1); + } + UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1] = nullptr; + NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + 1; + Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove; /*END INIT BODY*/ try diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 00a35e9..40a7f6d 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -481,6 +481,39 @@ namespace System struct AppDomainSetup; } +namespace UnityEngine +{ + struct Application; +} + +namespace UnityEngine +{ + namespace SceneManagement + { + struct SceneManager; + } +} + +namespace UnityEngine +{ + namespace SceneManagement + { + struct Scene; + } +} + +namespace UnityEngine +{ + namespace SceneManagement + { + enum struct LoadSceneMode : int32_t + { + Single = 0, + Additive = 1 + }; + } +} + namespace MyGame { namespace MonoBehaviours @@ -578,6 +611,30 @@ namespace System { struct AppDomainInitializer; } + +namespace UnityEngine +{ + namespace Events + { + struct UnityAction; + } +} + +namespace UnityEngine +{ + namespace Events + { + template struct UnityAction2; + } +} + +namespace UnityEngine +{ + namespace Events + { + template<> struct UnityAction2; + } +} /*END TYPE DECLARATIONS*/ /*BEGIN TYPE DEFINITIONS*/ @@ -1199,6 +1256,59 @@ namespace System }; } +namespace UnityEngine +{ + struct Application : System::Object + { + Application(std::nullptr_t n); + Application(Plugin::InternalUse iu, int32_t handle); + Application(const Application& other); + Application(Application&& other); + virtual ~Application(); + Application& operator=(const Application& other); + Application& operator=(std::nullptr_t other); + 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 : System::Object + { + SceneManager(std::nullptr_t n); + SceneManager(Plugin::InternalUse iu, int32_t handle); + SceneManager(const SceneManager& other); + SceneManager(SceneManager&& other); + virtual ~SceneManager(); + SceneManager& operator=(const SceneManager& other); + SceneManager& operator=(std::nullptr_t other); + 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 + { + Scene(); + int32_t m_Handle; + }; + } +} + namespace MyGame { namespace MonoBehaviours @@ -1544,4 +1654,58 @@ namespace System void operator-=(System::AppDomainInitializer& del); }; } + +namespace UnityEngine +{ + namespace Events + { + struct UnityAction : System::Object + { + UnityAction(std::nullptr_t n); + UnityAction(Plugin::InternalUse iu, int32_t handle); + UnityAction(const UnityAction& other); + UnityAction(UnityAction&& other); + virtual ~UnityAction(); + UnityAction& operator=(const UnityAction& other); + UnityAction& operator=(std::nullptr_t other); + UnityAction& operator=(UnityAction&& other); + bool operator==(const UnityAction& other) const; + bool operator!=(const UnityAction& other) const; + int32_t CppHandle; + int32_t ClassHandle; + UnityAction(); + void Invoke(); + virtual void operator()(); + void operator+=(UnityEngine::Events::UnityAction& del); + void operator-=(UnityEngine::Events::UnityAction& del); + }; + } +} + +namespace UnityEngine +{ + namespace Events + { + template<> struct UnityAction2 : System::Object + { + UnityAction2(std::nullptr_t n); + UnityAction2(Plugin::InternalUse iu, int32_t handle); + UnityAction2(const UnityAction2& other); + UnityAction2(UnityAction2&& other); + virtual ~UnityAction2(); + UnityAction2& operator=(const UnityAction2& other); + UnityAction2& operator=(std::nullptr_t other); + UnityAction2& operator=(UnityAction2&& other); + bool operator==(const UnityAction2& other) const; + bool operator!=(const UnityAction2& other) const; + int32_t CppHandle; + int32_t ClassHandle; + UnityAction2(); + void Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + virtual void operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + void operator+=(UnityEngine::Events::UnityAction2& del); + void operator-=(UnityEngine::Events::UnityAction2& del); + }; + } +} /*END TYPE DEFINITIONS*/ From 4f60cb2f50433e186b87e57da72846b6bc4a9146 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 22 Oct 2017 21:10:37 -0700 Subject: [PATCH 02/65] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5713381..197278d 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ While IL2CPP transforms C# into C++ already, it generates a lot of overhead. The * Overloaded operators * Arrays (single- and multi-dimensional) * Delegates + * Events # Performance @@ -188,7 +189,6 @@ To configure the code generator, open `NativeScriptTypes.json` and notice the ex Note that the code generator does not support (yet): -* Events * Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`) * `MonoBehaviour` contents (e.g. fields) except for "message" functions * `Array` methods (e.g. `IndexOf`) From 4b1bdeab543ba50a8e4e53ba2c415a6db9961812 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 29 Oct 2017 21:51:10 -0700 Subject: [PATCH 03/65] Support boxing and unboxing --- README.md | 8 +- Unity/Assets/NativeScript/Bindings.cs | 1307 ++++++++++++++++- .../NativeScript/Editor/GenerateBindings.cs | 416 +++++- Unity/CppSource/NativeScript/Bindings.cpp | 901 +++++++++++- Unity/CppSource/NativeScript/Bindings.h | 141 +- 5 files changed, 2684 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index 197278d..55006c6 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This project aims to give you a viable alternative to C#. Scripting in C++ isn't * Low performance overhead * Easy integration with any Unity project * Fast compile, build, and code generation times +* Don't lose support from Unity Technologies # Reasons to Prefer C++ Over C# # @@ -94,12 +95,13 @@ While IL2CPP transforms C# into C++ already, it generates a lot of overhead. The * Arrays (single- and multi-dimensional) * Delegates * Events + * Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`) # Performance -Most projects will see a net performance win by reducing garbage collection, eliminating IL2CPP overhead, and access to compiler intrinsics and assembly. Calls from C++ into C# incur a minor performance penalty, so if most of your code is calls to .NET APIs then you may experience a net performance loss. +Almost all projects will see a net performance win by reducing garbage collection, eliminating IL2CPP overhead, and access to compiler intrinsics and assembly. Calls from C++ into C# incur only a minor performance penalty. In the rare case that almost all of your code is calls to .NET APIs then you may experience a net performance loss. -For testing and benchmarks, see this [article](http://jacksondunstan.com/articles/3952). +[Testing and benchmarks article](http://jacksondunstan.com/articles/3952) # Project Structure @@ -189,9 +191,9 @@ To configure the code generator, open `NativeScriptTypes.json` and notice the ex Note that the code generator does not support (yet): -* Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`) * `MonoBehaviour` contents (e.g. fields) except for "message" functions * `Array` methods (e.g. `IndexOf`) +* `string` methods (e.g. `Substring`) * Default parameters * Interfaces * `decimal` diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index be02899..1f6d2ca 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -303,16 +303,26 @@ delegate void InitDelegate( IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, + IntPtr boxVector3, + IntPtr unboxVector3, IntPtr unityEngineMatrix4x4PropertyGetItem, IntPtr unityEngineMatrix4x4PropertySetItem, + IntPtr boxMatrix4x4, + IntPtr unboxMatrix4x4, IntPtr releaseUnityEngineRaycastHit, IntPtr unityEngineRaycastHitPropertyGetPoint, IntPtr unityEngineRaycastHitPropertySetPoint, IntPtr unityEngineRaycastHitPropertyGetTransform, + IntPtr boxRaycastHit, + IntPtr unboxRaycastHit, + IntPtr boxQueryTriggerInteraction, + IntPtr unboxQueryTriggerInteraction, IntPtr releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble, IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble, IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey, IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue, + IntPtr boxKeyValuePairSystemString_SystemDouble, + IntPtr unboxKeyValuePairSystemString_SystemDouble, IntPtr systemCollectionsGenericListSystemStringConstructor, IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, IntPtr systemCollectionsGenericListSystemStringPropertySetItem, @@ -330,10 +340,18 @@ delegate void InitDelegate( IntPtr unityEngineResolutionPropertySetHeight, IntPtr unityEngineResolutionPropertyGetRefreshRate, IntPtr unityEngineResolutionPropertySetRefreshRate, + IntPtr boxResolution, + IntPtr unboxResolution, IntPtr unityEngineScreenPropertyGetResolutions, IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, + IntPtr boxRay, + IntPtr unboxRay, IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit, IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, + IntPtr boxColor, + IntPtr unboxColor, + IntPtr boxGradientColorKey, + IntPtr unboxGradientColorKey, IntPtr unityEngineGradientConstructor, IntPtr unityEngineGradientPropertyGetColorKeys, IntPtr unityEngineGradientPropertySetColorKeys, @@ -344,6 +362,34 @@ delegate void InitDelegate( IntPtr unityEngineApplicationRemoveEventOnBeforeRender, IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, + IntPtr boxScene, + IntPtr unboxScene, + IntPtr boxLoadSceneMode, + IntPtr unboxLoadSceneMode, + 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, IntPtr systemInt32Array1Constructor1, IntPtr systemInt32Array1GetItem1, IntPtr systemInt32Array1SetItem1, @@ -581,16 +627,26 @@ static extern void Init( IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, + IntPtr boxVector3, + IntPtr unboxVector3, IntPtr unityEngineMatrix4x4PropertyGetItem, IntPtr unityEngineMatrix4x4PropertySetItem, + IntPtr boxMatrix4x4, + IntPtr unboxMatrix4x4, IntPtr releaseUnityEngineRaycastHit, IntPtr unityEngineRaycastHitPropertyGetPoint, IntPtr unityEngineRaycastHitPropertySetPoint, IntPtr unityEngineRaycastHitPropertyGetTransform, + IntPtr boxRaycastHit, + IntPtr unboxRaycastHit, + IntPtr boxQueryTriggerInteraction, + IntPtr unboxQueryTriggerInteraction, IntPtr releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble, IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble, IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey, IntPtr systemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue, + IntPtr boxKeyValuePairSystemString_SystemDouble, + IntPtr unboxKeyValuePairSystemString_SystemDouble, IntPtr systemCollectionsGenericListSystemStringConstructor, IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, IntPtr systemCollectionsGenericListSystemStringPropertySetItem, @@ -608,10 +664,18 @@ static extern void Init( IntPtr unityEngineResolutionPropertySetHeight, IntPtr unityEngineResolutionPropertyGetRefreshRate, IntPtr unityEngineResolutionPropertySetRefreshRate, + IntPtr boxResolution, + IntPtr unboxResolution, IntPtr unityEngineScreenPropertyGetResolutions, IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, + IntPtr boxRay, + IntPtr unboxRay, IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit, IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, + IntPtr boxColor, + IntPtr unboxColor, + IntPtr boxGradientColorKey, + IntPtr unboxGradientColorKey, IntPtr unityEngineGradientConstructor, IntPtr unityEngineGradientPropertyGetColorKeys, IntPtr unityEngineGradientPropertySetColorKeys, @@ -622,6 +686,34 @@ static extern void Init( IntPtr unityEngineApplicationRemoveEventOnBeforeRender, IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, + IntPtr boxScene, + IntPtr unboxScene, + IntPtr boxLoadSceneMode, + IntPtr unboxLoadSceneMode, + 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, IntPtr systemInt32Array1Constructor1, IntPtr systemInt32Array1GetItem1, IntPtr systemInt32Array1SetItem1, @@ -770,16 +862,26 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc 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 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 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 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 SystemCollectionsGenericListSystemStringConstructorDelegate(); delegate int SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(int thisHandle, int index); delegate void SystemCollectionsGenericListSystemStringPropertySetItemDelegate(int thisHandle, int index, int valueHandle); @@ -797,10 +899,18 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate void UnityEngineResolutionPropertySetHeightDelegate(ref UnityEngine.Resolution thiz, int value); delegate int UnityEngineResolutionPropertyGetRefreshRateDelegate(ref UnityEngine.Resolution thiz); delegate void UnityEngineResolutionPropertySetRefreshRateDelegate(ref UnityEngine.Resolution thiz, int value); + delegate int BoxResolutionDelegate(ref UnityEngine.Resolution val); + delegate UnityEngine.Resolution UnboxResolutionDelegate(int valHandle); delegate int UnityEngineScreenPropertyGetResolutionsDelegate(); delegate UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction); + delegate int BoxRayDelegate(ref UnityEngine.Ray val); + delegate UnityEngine.Ray UnboxRayDelegate(int valHandle); delegate int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate(ref UnityEngine.Ray ray, int resultsHandle); delegate int UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(ref UnityEngine.Ray ray); + 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 int UnityEngineGradientConstructorDelegate(); delegate int UnityEngineGradientPropertyGetColorKeysDelegate(int thisHandle); delegate void UnityEngineGradientPropertySetColorKeysDelegate(int thisHandle, int valueHandle); @@ -811,6 +921,34 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate void UnityEngineApplicationRemoveEventOnBeforeRenderDelegate(int delHandle); delegate void UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate(int delHandle); delegate void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate(int delHandle); + delegate int BoxSceneDelegate(ref UnityEngine.SceneManagement.Scene val); + delegate UnityEngine.SceneManagement.Scene UnboxSceneDelegate(int valHandle); + delegate int BoxLoadSceneModeDelegate(UnityEngine.SceneManagement.LoadSceneMode val); + delegate UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneModeDelegate(int valHandle); + 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 int SystemInt32Array1Constructor1Delegate(int length0); delegate int SystemInt32Array1GetItem1Delegate(int thisHandle, int index0); delegate void SystemInt32Array1SetItem1Delegate(int thisHandle, int index0, int item); @@ -965,16 +1103,26 @@ public static void Open( 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 UnityEngineMatrix4x4PropertyGetItemDelegate(UnityEngineMatrix4x4PropertyGetItem)), Marshal.GetFunctionPointerForDelegate(new UnityEngineMatrix4x4PropertySetItemDelegate(UnityEngineMatrix4x4PropertySetItem)), + Marshal.GetFunctionPointerForDelegate(new BoxMatrix4x4Delegate(BoxMatrix4x4)), + Marshal.GetFunctionPointerForDelegate(new UnboxMatrix4x4Delegate(UnboxMatrix4x4)), 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 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 SystemCollectionsGenericListSystemStringConstructorDelegate(SystemCollectionsGenericListSystemStringConstructor)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertyGetItemDelegate(SystemCollectionsGenericListSystemStringPropertyGetItem)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericListSystemStringPropertySetItemDelegate(SystemCollectionsGenericListSystemStringPropertySetItem)), @@ -992,10 +1140,18 @@ public static void Open( 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 UnityEngineScreenPropertyGetResolutionsDelegate(UnityEngineScreenPropertyGetResolutions)), Marshal.GetFunctionPointerForDelegate(new UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)), + Marshal.GetFunctionPointerForDelegate(new BoxRayDelegate(BoxRay)), + Marshal.GetFunctionPointerForDelegate(new UnboxRayDelegate(UnboxRay)), Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)), Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(UnityEnginePhysicsMethodRaycastAllUnityEngineRay)), + Marshal.GetFunctionPointerForDelegate(new BoxColorDelegate(BoxColor)), + Marshal.GetFunctionPointerForDelegate(new UnboxColorDelegate(UnboxColor)), + Marshal.GetFunctionPointerForDelegate(new BoxGradientColorKeyDelegate(BoxGradientColorKey)), + Marshal.GetFunctionPointerForDelegate(new UnboxGradientColorKeyDelegate(UnboxGradientColorKey)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientConstructorDelegate(UnityEngineGradientConstructor)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientPropertyGetColorKeysDelegate(UnityEngineGradientPropertyGetColorKeys)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientPropertySetColorKeysDelegate(UnityEngineGradientPropertySetColorKeys)), @@ -1006,6 +1162,34 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnityEngineApplicationRemoveEventOnBeforeRenderDelegate(UnityEngineApplicationRemoveEventOnBeforeRender)), Marshal.GetFunctionPointerForDelegate(new UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate(UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)), Marshal.GetFunctionPointerForDelegate(new UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)), + Marshal.GetFunctionPointerForDelegate(new BoxSceneDelegate(BoxScene)), + Marshal.GetFunctionPointerForDelegate(new UnboxSceneDelegate(UnboxScene)), + Marshal.GetFunctionPointerForDelegate(new BoxLoadSceneModeDelegate(BoxLoadSceneMode)), + Marshal.GetFunctionPointerForDelegate(new UnboxLoadSceneModeDelegate(UnboxLoadSceneMode)), + 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)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1Constructor1Delegate(SystemInt32Array1Constructor1)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1GetItem1Delegate(SystemInt32Array1GetItem1)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1SetItem1Delegate(SystemInt32Array1SetItem1)), @@ -1737,6 +1921,51 @@ static UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVe } } + [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(UnityEngineMatrix4x4PropertyGetItemDelegate))] static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) { @@ -1778,6 +2007,51 @@ static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, } } + [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(ReleaseUnityEngineRaycastHitDelegate))] static void ReleaseUnityEngineRaycastHit(int handle) { @@ -1867,6 +2141,97 @@ static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) } } + [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(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) { @@ -1958,6 +2323,52 @@ static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePrope } } + [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(SystemCollectionsGenericListSystemStringConstructorDelegate))] static int SystemCollectionsGenericListSystemStringConstructor() { @@ -2325,13 +2736,13 @@ static void UnityEngineResolutionPropertySetRefreshRate(ref UnityEngine.Resoluti } } - [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] - static int UnityEngineScreenPropertyGetResolutions() + [MonoPInvokeCallback(typeof(BoxResolutionDelegate))] + static int BoxResolution(ref UnityEngine.Resolution 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) { @@ -2347,36 +2758,36 @@ static int UnityEngineScreenPropertyGetResolutions() } } - [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] - static UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) + [MonoPInvokeCallback(typeof(UnboxResolutionDelegate))] + static UnityEngine.Resolution UnboxResolution(int valHandle) { try { - var returnValue = new UnityEngine.Ray(origin, direction); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Resolution)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(UnityEngine.Resolution); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(UnityEngine.Resolution); } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate))] - static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ref UnityEngine.Ray ray, int resultsHandle) + [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] + static int UnityEngineScreenPropertyGetResolutions() { try { - var results = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(resultsHandle); - var returnValue = UnityEngine.Physics.RaycastNonAlloc(ray, results); - return returnValue; + var returnValue = UnityEngine.Screen.resolutions; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -2392,34 +2803,34 @@ static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRayc } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] - static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ref UnityEngine.Ray ray) + [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] + static UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) { try { - var returnValue = UnityEngine.Physics.RaycastAll(ray); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = 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); + return default(UnityEngine.Ray); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Ray); } } - [MonoPInvokeCallback(typeof(UnityEngineGradientConstructorDelegate))] - static int UnityEngineGradientConstructor() + [MonoPInvokeCallback(typeof(BoxRayDelegate))] + static int BoxRay(ref UnityEngine.Ray val) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Gradient()); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -2436,57 +2847,59 @@ static int UnityEngineGradientConstructor() } } - [MonoPInvokeCallback(typeof(UnityEngineGradientPropertyGetColorKeysDelegate))] - static int UnityEngineGradientPropertyGetColorKeys(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxRayDelegate))] + static UnityEngine.Ray UnboxRay(int valHandle) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.colorKeys; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Ray)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.Ray); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Ray); } } - [MonoPInvokeCallback(typeof(UnityEngineGradientPropertySetColorKeysDelegate))] - static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate))] + static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ref UnityEngine.Ray ray, int resultsHandle) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.colorKeys = value; + 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(SystemAppDomainSetupConstructorDelegate))] - static int SystemAppDomainSetupConstructor() + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] + static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ref UnityEngine.Ray ray) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.AppDomainSetup()); - return returnValue; + var returnValue = UnityEngine.Physics.RaycastAll(ray); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -2502,13 +2915,191 @@ static int SystemAppDomainSetupConstructor() } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate))] - static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) + [MonoPInvokeCallback(typeof(BoxColorDelegate))] + static int BoxColor(ref UnityEngine.Color val) { try { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AppDomainInitializer; + 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(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) @@ -2626,6 +3217,636 @@ static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int del } } + [MonoPInvokeCallback(typeof(BoxSceneDelegate))] + static int BoxScene(ref UnityEngine.SceneManagement.Scene 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(UnboxSceneDelegate))] + static UnityEngine.SceneManagement.Scene UnboxScene(int valHandle) + { + try + { + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.SceneManagement.Scene)val; + return returnValue; + } + catch (System.NullReferenceException ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.SceneManagement.Scene); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.SceneManagement.Scene); + } + } + + [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(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(SystemInt32Array1Constructor1Delegate))] static int SystemInt32Array1Constructor1(int length0) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 531b981..a17c733 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -164,6 +164,8 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public StringBuilder CppGlobalStateAndFunctions = new StringBuilder(InitialStringBuilderCapacity); + public StringBuilder CppBoxingMethodDeclarations = + new StringBuilder(InitialStringBuilderCapacity); public StringBuilder TempStrBuilder = new StringBuilder(InitialStringBuilderCapacity); } @@ -308,6 +310,21 @@ public MessageInfo( new MessageInfo("Update"), }; + private static readonly Type[] PRIMITIVE_TYPES = new [] { + typeof(bool), + typeof(sbyte), + typeof(byte), + typeof(short), + typeof(ushort), + typeof(int), + typeof(uint), + typeof(long), + typeof(ulong), + typeof(char), + typeof(float), + typeof(double), + }; + const string PostCompileWorkPref = "NativeScriptGenerateBindingsPostCompileWork"; const string DryRunPref = "NativeScriptGenerateBindingsDryRun"; @@ -513,6 +530,17 @@ static void DoPostCompileWork(bool canRefreshAssetDb) builders); } + // Generate boxing and unboxing for primitive types + foreach (Type type in PRIMITIVE_TYPES) + { + AppendBoxingUnboxing( + type, + TypeKind.Primitive, + null, + assemblies, + builders); + } + // Generate MonoBehaviours if (doc.MonoBehaviours != null) { @@ -1147,12 +1175,19 @@ static void AppendType( StringBuilders builders) { Type type = GetType(jsonType.Name, assemblies); - if (type.IsEnum) + TypeKind typeKind = GetTypeKind(type); + if (typeKind == TypeKind.Enum) { AppendEnum( type, assemblies, builders); + AppendBoxingUnboxing( + type, + typeKind, + null, + assemblies, + builders); } else { @@ -1188,6 +1223,15 @@ static void AppendType( maxSimultaneous, assemblies, builders); + if (typeKind != TypeKind.Class) + { + AppendBoxingUnboxing( + genericType, + typeKind, + typeParams, + assemblies, + builders); + } } } else @@ -1203,6 +1247,15 @@ static void AppendType( maxSimultaneous, assemblies, builders); + if (typeKind != TypeKind.Class) + { + AppendBoxingUnboxing( + type, + typeKind, + null, + assemblies, + builders); + } } } } @@ -1653,6 +1706,362 @@ static void AppendEnum( builders.CppTypeDeclarations.Append('\n'); } + static void AppendBoxingUnboxing( + Type type, + TypeKind typeKind, + Type[] typeParams, + Assembly[] assemblies, + StringBuilders builders) + { + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("Box"); + AppendTypeNameWithoutSuffixes( + type.Name, + builders.TempStrBuilder); + AppendTypeNames( + typeParams, + builders.TempStrBuilder); + string boxFuncName = builders.TempStrBuilder.ToString(); + + builders.TempStrBuilder[0] = char.ToLower( + builders.TempStrBuilder[0]); + string boxFuncNameLower = builders.TempStrBuilder.ToString(); + + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("Unbox"); + AppendTypeNameWithoutSuffixes( + type.Name, + builders.TempStrBuilder); + AppendTypeNames( + typeParams, + 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 "); + AppendCppTypeName( + type, + builders.TempStrBuilder); + string unboxMethodDefinitionName = builders.TempStrBuilder.ToString(); + + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("explicit "); + builders.TempStrBuilder.Append(unboxMethodDefinitionName); + string unboxMethodDeclarationName = builders.TempStrBuilder.ToString(); + + ParameterInfo[] boxParams = new [] { + new ParameterInfo + { + Name = "val", + ParameterType = type, + DereferencedParameterType = type, + IsOut = false, + IsRef = false, + Kind = typeKind + } + }; + + ParameterInfo[] unboxParams = new [] { + new ParameterInfo + { + Name = "val", + ParameterType = typeof(object), + DereferencedParameterType = typeof(object), + IsOut = false, + IsRef = false, + Kind = TypeKind.Class + } + }; + + 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, + type, + typeKind, + type, + unboxParams, + 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), + typeParams, + 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), + unboxFuncName, + true, + TypeKind.Class, + type, + null, + unboxParams, + builders.CsharpFunctions); + switch (typeKind) + { + case TypeKind.Class: + case TypeKind.ManagedStruct: + AppendHandleStoreTypeName( + type, + builders.CsharpFunctions); + builders.CsharpFunctions.Append(".Store(("); + AppendCsharpTypeName( + type, + builders.CsharpFunctions); + builders.CsharpFunctions.Append(")val);"); + break; + default: + builders.CsharpFunctions.Append('('); + AppendCsharpTypeName( + type, + builders.CsharpFunctions); + builders.CsharpFunctions.Append(")val;"); + break; + } + AppendCsharpFunctionReturn( + unboxParams, + type, + typeKind, + null, + true, + builders.CsharpFunctions); + + // C++ function pointers + AppendCppFunctionPointerDefinition( + boxFuncName, + true, + type.Name, + type.Namespace, + typeKind, + boxParams, + typeof(object), + builders.CppFunctionPointers); + AppendCppFunctionPointerDefinition( + unboxFuncName, + true, + type.Name, + type.Namespace, + typeKind, + unboxParams, + type, + builders.CppFunctionPointers); + + // C++ method declarations + AppendIndent( + 2, + builders.CppBoxingMethodDeclarations); + AppendCppMethodDeclaration( + "Object", + false, + false, + false, + null, + null, + boxParams, + builders.CppBoxingMethodDeclarations); + AppendIndent( + 2, + builders.CppBoxingMethodDeclarations); + AppendCppMethodDeclaration( + unboxMethodDeclarationName, + false, + false, + false, + null, + 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, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n\t\n"); + + // C++ unbox method definition + AppendCppMethodDefinitionBegin( + "Object", + null, + unboxMethodDefinitionName, + null, + null, + unboxCppParams, + indent, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + AppendCppTypeName( + type, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(" returnVal("); + if (typeKind == TypeKind.ManagedStruct) + { + builders.CppMethodDefinitions.Append("Plugin::InternalUse::Only, "); + } + builders.CppMethodDefinitions.Append("Plugin::"); + builders.CppMethodDefinitions.Append(unboxFuncName); + builders.CppMethodDefinitions.Append("(Handle));\n"); + AppendCppUnhandledExceptionHandling( + indent + 1, + builders.CppMethodDefinitions); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return returnVal;\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n\t\n"); + + // C++ method definitions (end) + AppendCppMethodDefinitionsEnd( + indent, + builders.CppMethodDefinitions); + + // C++ init params + AppendCppInitParam( + boxFuncNameLower, + true, + type.Name, + type.Namespace, + typeKind, + boxParams, + typeof(object), + builders.CppInitParams); + AppendCppInitParam( + unboxFuncNameLower, + true, + type.Name, + type.Namespace, + typeKind, + unboxParams, + type, + builders.CppInitParams); + + // C++ init body + AppendCppInitBody( + boxFuncName, + boxFuncNameLower, + builders.CppInitBody); + AppendCppInitBody( + unboxFuncName, + unboxFuncNameLower, + builders.CppInitBody); + } + static void AppendHandleStoreTypeName( Type type, StringBuilder output) @@ -9491,6 +9900,11 @@ static void InjectBuilders( "/*BEGIN GLOBAL STATE AND FUNCTIONS*/\n", "\n\t/*END GLOBAL STATE AND FUNCTIONS*/", builders.CppGlobalStateAndFunctions.ToString()); + cppHeaderContents = InjectIntoString( + cppHeaderContents, + "*BEGIN BOXING METHOD DECLARATIONS*/\n", + "\n\t\t/*END BOXING METHOD DECLARATIONS*/", + builders.CppBoxingMethodDeclarations.ToString()); File.WriteAllText(CsharpPath, csharpContents); File.WriteAllText(CppHeaderPath, cppHeaderContents); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 53e97e8..79cdce3 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -69,16 +69,26 @@ namespace Plugin 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); float (*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); 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 (*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); 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); @@ -96,10 +106,18 @@ namespace Plugin void (*UnityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value); int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz); void (*UnityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value); + int32_t (*BoxResolution)(UnityEngine::Resolution& val); + UnityEngine::Resolution (*UnboxResolution)(int32_t valHandle); int32_t (*UnityEngineScreenPropertyGetResolutions)(); UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); + int32_t (*BoxRay)(UnityEngine::Ray& val); + UnityEngine::Ray (*UnboxRay)(int32_t valHandle); int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle); int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray); + int32_t (*BoxColor)(UnityEngine::Color& val); + UnityEngine::Color (*UnboxColor)(int32_t valHandle); + int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); + UnityEngine::GradientColorKey (*UnboxGradientColorKey)(int32_t valHandle); int32_t (*UnityEngineGradientConstructor)(); int32_t (*UnityEngineGradientPropertyGetColorKeys)(int32_t thisHandle); void (*UnityEngineGradientPropertySetColorKeys)(int32_t thisHandle, int32_t valueHandle); @@ -110,6 +128,34 @@ namespace Plugin void (*UnityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle); + int32_t (*BoxScene)(UnityEngine::SceneManagement::Scene& val); + UnityEngine::SceneManagement::Scene (*UnboxScene)(int32_t valHandle); + int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); + UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); + int32_t (*BoxBoolean)(System::Boolean val); + System::Boolean (*UnboxBoolean)(int32_t valHandle); + int32_t (*BoxSByte)(int8_t val); + int8_t (*UnboxSByte)(int32_t valHandle); + int32_t (*BoxByte)(uint8_t val); + uint8_t (*UnboxByte)(int32_t valHandle); + int32_t (*BoxInt16)(int16_t val); + int16_t (*UnboxInt16)(int32_t valHandle); + int32_t (*BoxUInt16)(uint16_t val); + uint16_t (*UnboxUInt16)(int32_t valHandle); + int32_t (*BoxInt32)(int32_t val); + int32_t (*UnboxInt32)(int32_t valHandle); + int32_t (*BoxUInt32)(uint32_t val); + uint32_t (*UnboxUInt32)(int32_t valHandle); + int32_t (*BoxInt64)(int64_t val); + int64_t (*UnboxInt64)(int32_t valHandle); + int32_t (*BoxUInt64)(uint64_t val); + uint64_t (*UnboxUInt64)(int32_t valHandle); + int32_t (*BoxChar)(System::Char val); + System::Char (*UnboxChar)(int32_t valHandle); + int32_t (*BoxSingle)(float val); + float (*UnboxSingle)(int32_t valHandle); + int32_t (*BoxDouble)(double val); + double (*UnboxDouble)(int32_t valHandle); int32_t (*SystemInt32Array1Constructor1)(int32_t length0); int32_t (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*SystemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item); @@ -528,7 +574,7 @@ namespace System } String::String(std::nullptr_t n) - : Object(0) + : Object(Plugin::InternalUse::Only, 0) { } @@ -619,7 +665,7 @@ namespace System } Array::Array(std::nullptr_t n) - : Object(0) + : Object(Plugin::InternalUse::Only, 0) { } @@ -1933,6 +1979,39 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::Vector3& val) + { + 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; + } + } + + Object::operator UnityEngine::Vector3() + { + UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + namespace UnityEngine { Matrix4x4::Matrix4x4() @@ -1965,6 +2044,39 @@ namespace UnityEngine } } +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 UnityEngine { RaycastHit::RaycastHit(std::nullptr_t n) @@ -2085,6 +2197,72 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::RaycastHit val) + { + int32_t handle = Plugin::BoxRaycastHit(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::RaycastHit() + { + UnityEngine::RaycastHit returnVal(Plugin::InternalUse::Only, Plugin::UnboxRaycastHit(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 @@ -2217,6 +2395,39 @@ namespace System } } +namespace System +{ + Object::Object(System::Collections::Generic::KeyValuePair val) + { + 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)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + namespace System { namespace Collections @@ -3144,6 +3355,39 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::Resolution& val) + { + int32_t handle = Plugin::BoxResolution(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::Resolution() + { + UnityEngine::Resolution returnVal(Plugin::UnboxResolution(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + namespace UnityEngine { Screen::Screen(std::nullptr_t n) @@ -3259,6 +3503,39 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::Ray& val) + { + int32_t handle = Plugin::BoxRay(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::Ray() + { + UnityEngine::Ray returnVal(Plugin::UnboxRay(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + namespace UnityEngine { Physics::Physics(std::nullptr_t n) @@ -3374,6 +3651,39 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::Color& val) + { + 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; + } + } + + 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; + } +} + namespace UnityEngine { GradientColorKey::GradientColorKey() @@ -3381,6 +3691,39 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::GradientColorKey& val) + { + 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() + { + 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 { Gradient::Gradient(std::nullptr_t n) @@ -3856,6 +4199,468 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::SceneManagement::Scene& val) + { + int32_t handle = Plugin::BoxScene(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::SceneManagement::Scene() + { + UnityEngine::SceneManagement::Scene returnVal(Plugin::UnboxScene(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::Object(UnityEngine::SceneManagement::LoadSceneMode val) + { + int32_t handle = Plugin::BoxLoadSceneMode(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::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 +{ + Object::Object(System::Boolean val) + { + int32_t handle = Plugin::BoxBoolean(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::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::Object(int8_t val) + { + int32_t handle = Plugin::BoxSByte(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 int8_t() + { + int8_t returnVal(Plugin::UnboxSByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint8_t returnVal(Plugin::UnboxByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int16_t returnVal(Plugin::UnboxInt16(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint16_t returnVal(Plugin::UnboxUInt16(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int32_t returnVal(Plugin::UnboxInt32(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint32_t returnVal(Plugin::UnboxUInt32(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int64_t returnVal(Plugin::UnboxInt64(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint64_t returnVal(Plugin::UnboxUInt64(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::Object(System::Char val) + { + int32_t handle = Plugin::BoxChar(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::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::Object(float val) + { + 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)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + 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 @@ -6948,16 +7753,26 @@ DLLEXPORT void Init( 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), float (*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), 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 (*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), 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), @@ -6975,10 +7790,18 @@ DLLEXPORT void Init( void (*unityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value), int32_t (*unityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz), void (*unityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value), + int32_t (*boxResolution)(UnityEngine::Resolution& val), + UnityEngine::Resolution (*unboxResolution)(int32_t valHandle), int32_t (*unityEngineScreenPropertyGetResolutions)(), UnityEngine::Ray (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), + int32_t (*boxRay)(UnityEngine::Ray& val), + UnityEngine::Ray (*unboxRay)(int32_t valHandle), int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle), int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray), + int32_t (*boxColor)(UnityEngine::Color& val), + UnityEngine::Color (*unboxColor)(int32_t valHandle), + int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), + UnityEngine::GradientColorKey (*unboxGradientColorKey)(int32_t valHandle), int32_t (*unityEngineGradientConstructor)(), int32_t (*unityEngineGradientPropertyGetColorKeys)(int32_t thisHandle), void (*unityEngineGradientPropertySetColorKeys)(int32_t thisHandle, int32_t valueHandle), @@ -6989,6 +7812,34 @@ DLLEXPORT void Init( void (*unityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle), + int32_t (*boxScene)(UnityEngine::SceneManagement::Scene& val), + UnityEngine::SceneManagement::Scene (*unboxScene)(int32_t valHandle), + int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), + UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), + int32_t (*boxBoolean)(System::Boolean val), + System::Boolean (*unboxBoolean)(int32_t valHandle), + int32_t (*boxSByte)(int8_t val), + int8_t (*unboxSByte)(int32_t valHandle), + int32_t (*boxByte)(uint8_t val), + uint8_t (*unboxByte)(int32_t valHandle), + int32_t (*boxInt16)(int16_t val), + int16_t (*unboxInt16)(int32_t valHandle), + int32_t (*boxUInt16)(uint16_t val), + uint16_t (*unboxUInt16)(int32_t valHandle), + int32_t (*boxInt32)(int32_t val), + int32_t (*unboxInt32)(int32_t valHandle), + int32_t (*boxUInt32)(uint32_t val), + uint32_t (*unboxUInt32)(int32_t valHandle), + int32_t (*boxInt64)(int64_t val), + int64_t (*unboxInt64)(int32_t valHandle), + int32_t (*boxUInt64)(uint64_t val), + uint64_t (*unboxUInt64)(int32_t valHandle), + int32_t (*boxChar)(System::Char val), + System::Char (*unboxChar)(int32_t valHandle), + int32_t (*boxSingle)(float val), + float (*unboxSingle)(int32_t valHandle), + int32_t (*boxDouble)(double val), + double (*unboxDouble)(int32_t valHandle), int32_t (*systemInt32Array1Constructor1)(int32_t length0), int32_t (*systemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*systemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item), @@ -7098,18 +7949,28 @@ DLLEXPORT void Init( 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::UnityEngineMatrix4x4PropertyGetItem = unityEngineMatrix4x4PropertyGetItem; Plugin::UnityEngineMatrix4x4PropertySetItem = unityEngineMatrix4x4PropertySetItem; + Plugin::BoxMatrix4x4 = boxMatrix4x4; + Plugin::UnboxMatrix4x4 = unboxMatrix4x4; Plugin::ReleaseUnityEngineRaycastHit = releaseUnityEngineRaycastHit; Plugin::RefCountsUnityEngineRaycastHit = new int32_t[1000](); Plugin::UnityEngineRaycastHitPropertyGetPoint = unityEngineRaycastHitPropertyGetPoint; Plugin::UnityEngineRaycastHitPropertySetPoint = unityEngineRaycastHitPropertySetPoint; Plugin::UnityEngineRaycastHitPropertyGetTransform = unityEngineRaycastHitPropertyGetTransform; + Plugin::BoxRaycastHit = boxRaycastHit; + Plugin::UnboxRaycastHit = unboxRaycastHit; + Plugin::BoxQueryTriggerInteraction = boxQueryTriggerInteraction; + Plugin::UnboxQueryTriggerInteraction = unboxQueryTriggerInteraction; Plugin::ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; Plugin::RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = new int32_t[maxManagedObjects](); 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::SystemCollectionsGenericListSystemStringConstructor = systemCollectionsGenericListSystemStringConstructor; Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem = systemCollectionsGenericListSystemStringPropertyGetItem; Plugin::SystemCollectionsGenericListSystemStringPropertySetItem = systemCollectionsGenericListSystemStringPropertySetItem; @@ -7127,10 +7988,18 @@ DLLEXPORT void Init( Plugin::UnityEngineResolutionPropertySetHeight = unityEngineResolutionPropertySetHeight; Plugin::UnityEngineResolutionPropertyGetRefreshRate = unityEngineResolutionPropertyGetRefreshRate; Plugin::UnityEngineResolutionPropertySetRefreshRate = unityEngineResolutionPropertySetRefreshRate; + Plugin::BoxResolution = boxResolution; + Plugin::UnboxResolution = unboxResolution; Plugin::UnityEngineScreenPropertyGetResolutions = unityEngineScreenPropertyGetResolutions; Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3 = unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3; + Plugin::BoxRay = boxRay; + Plugin::UnboxRay = unboxRay; Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit = unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit; Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay = unityEnginePhysicsMethodRaycastAllUnityEngineRay; + Plugin::BoxColor = boxColor; + Plugin::UnboxColor = unboxColor; + Plugin::BoxGradientColorKey = boxGradientColorKey; + Plugin::UnboxGradientColorKey = unboxGradientColorKey; Plugin::UnityEngineGradientConstructor = unityEngineGradientConstructor; Plugin::UnityEngineGradientPropertyGetColorKeys = unityEngineGradientPropertyGetColorKeys; Plugin::UnityEngineGradientPropertySetColorKeys = unityEngineGradientPropertySetColorKeys; @@ -7141,6 +8010,34 @@ DLLEXPORT void Init( Plugin::UnityEngineApplicationRemoveEventOnBeforeRender = unityEngineApplicationRemoveEventOnBeforeRender; Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded = unityEngineSceneManagementSceneManagerAddEventSceneLoaded; Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded = unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded; + Plugin::BoxScene = boxScene; + Plugin::UnboxScene = unboxScene; + Plugin::BoxLoadSceneMode = boxLoadSceneMode; + Plugin::UnboxLoadSceneMode = unboxLoadSceneMode; + 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; Plugin::SystemInt32Array1Constructor1 = systemInt32Array1Constructor1; Plugin::SystemInt32Array1GetItem1 = systemInt32Array1GetItem1; Plugin::SystemInt32Array1SetItem1 = systemInt32Array1SetItem1; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 40a7f6d..f06394d 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -150,46 +150,10 @@ namespace System namespace System { - struct Object - { - int32_t Handle; - Object(Plugin::InternalUse iu, int32_t handle); - Object(std::nullptr_t n); - virtual ~Object() = default; - bool operator==(std::nullptr_t other) const; - bool operator!=(std::nullptr_t other) const; - virtual void ThrowReferenceToThis(); - }; - - struct ValueType - { - int32_t Handle; - ValueType(Plugin::InternalUse iu, int32_t handle); - ValueType(std::nullptr_t n); - }; - - struct String : Object - { - String(Plugin::InternalUse iu, int32_t handle); - String(std::nullptr_t n); - String(const String& other); - String(String&& other); - virtual ~String(); - String& operator=(const String& other); - String& operator=(std::nullptr_t other); - String& operator=(String&& other); - String(); - String(const char* chars); - }; - - struct Array : Object - { - Array(Plugin::InternalUse iu, int32_t handle); - Array(std::nullptr_t n); - int32_t GetLength(); - int32_t GetRank(); - }; - + struct Object; + struct ValueType; + struct String; + struct Array; template struct Array1; template struct Array2; template struct Array3; @@ -637,6 +601,103 @@ namespace UnityEngine } /*END TYPE DECLARATIONS*/ +//////////////////////////////////////////////////////////////// +// C# type definitions +//////////////////////////////////////////////////////////////// + +namespace System +{ + struct Object + { + int32_t Handle; + Object(Plugin::InternalUse iu, int32_t handle); + Object(std::nullptr_t n); + virtual ~Object() = default; + bool operator==(std::nullptr_t other) const; + bool operator!=(std::nullptr_t other) const; + virtual void ThrowReferenceToThis(); + + /*BEGIN BOXING METHOD DECLARATIONS*/ + Object(UnityEngine::Vector3& val); + explicit operator UnityEngine::Vector3(); + Object(UnityEngine::Matrix4x4& val); + explicit operator UnityEngine::Matrix4x4(); + Object(UnityEngine::RaycastHit val); + explicit operator UnityEngine::RaycastHit(); + Object(UnityEngine::QueryTriggerInteraction val); + explicit operator UnityEngine::QueryTriggerInteraction(); + Object(System::Collections::Generic::KeyValuePair val); + explicit operator System::Collections::Generic::KeyValuePair(); + Object(UnityEngine::Resolution& val); + explicit operator UnityEngine::Resolution(); + Object(UnityEngine::Ray& val); + explicit operator UnityEngine::Ray(); + Object(UnityEngine::Color& val); + explicit operator UnityEngine::Color(); + Object(UnityEngine::GradientColorKey& val); + explicit operator UnityEngine::GradientColorKey(); + Object(UnityEngine::SceneManagement::Scene& val); + explicit operator UnityEngine::SceneManagement::Scene(); + Object(UnityEngine::SceneManagement::LoadSceneMode val); + explicit operator UnityEngine::SceneManagement::LoadSceneMode(); + 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::Char(); + Object(float val); + explicit operator float(); + Object(double val); + explicit operator double(); + + /*END BOXING METHOD DECLARATIONS*/ + }; + + struct ValueType + { + int32_t Handle; + ValueType(Plugin::InternalUse iu, int32_t handle); + ValueType(std::nullptr_t n); + }; + + struct String : Object + { + String(Plugin::InternalUse iu, int32_t handle); + String(std::nullptr_t n); + String(const String& other); + String(String&& other); + virtual ~String(); + String& operator=(const String& other); + String& operator=(std::nullptr_t other); + String& operator=(String&& other); + String(); + String(const char* chars); + }; + + struct Array : Object + { + Array(Plugin::InternalUse iu, int32_t handle); + Array(std::nullptr_t n); + int32_t GetLength(); + int32_t GetRank(); + }; +} + /*BEGIN TYPE DEFINITIONS*/ namespace System { From 7dede45f7244dbe7f2021d78329d121266b38adb Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 5 Nov 2017 21:27:50 -0800 Subject: [PATCH 04/65] Implement array index operator for managed array types in C++ --- Unity/Assets/NativeScript/Bindings.cs | 120 +-- .../NativeScript/Editor/GenerateBindings.cs | 733 ++++++++++++++---- Unity/CppSource/NativeScript/Bindings.cpp | 418 ++++++---- Unity/CppSource/NativeScript/Bindings.h | 232 +++++- 4 files changed, 1152 insertions(+), 351 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 1f6d2ca..242ca37 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -390,30 +390,30 @@ delegate void InitDelegate( IntPtr unboxSingle, IntPtr boxDouble, IntPtr unboxDouble, - IntPtr systemInt32Array1Constructor1, + IntPtr systemSystemInt32Array1Constructor1, IntPtr systemInt32Array1GetItem1, IntPtr systemInt32Array1SetItem1, - IntPtr systemSingleArray1Constructor1, + IntPtr systemSystemSingleArray1Constructor1, IntPtr systemSingleArray1GetItem1, IntPtr systemSingleArray1SetItem1, - IntPtr systemSingleArray2Constructor2, - IntPtr systemSingleArray2GetLength2, + IntPtr systemSystemSingleArray2Constructor2, + IntPtr systemSystemSingleArray2GetLength2, IntPtr systemSingleArray2GetItem2, IntPtr systemSingleArray2SetItem2, - IntPtr systemSingleArray3Constructor3, - IntPtr systemSingleArray3GetLength3, + IntPtr systemSystemSingleArray3Constructor3, + IntPtr systemSystemSingleArray3GetLength3, IntPtr systemSingleArray3GetItem3, IntPtr systemSingleArray3SetItem3, - IntPtr systemStringArray1Constructor1, + IntPtr systemSystemStringArray1Constructor1, IntPtr systemStringArray1GetItem1, IntPtr systemStringArray1SetItem1, - IntPtr unityEngineResolutionArray1Constructor1, + IntPtr unityEngineUnityEngineResolutionArray1Constructor1, IntPtr unityEngineResolutionArray1GetItem1, IntPtr unityEngineResolutionArray1SetItem1, - IntPtr unityEngineRaycastHitArray1Constructor1, + IntPtr unityEngineUnityEngineRaycastHitArray1Constructor1, IntPtr unityEngineRaycastHitArray1GetItem1, IntPtr unityEngineRaycastHitArray1SetItem1, - IntPtr unityEngineGradientColorKeyArray1Constructor1, + IntPtr unityEngineUnityEngineGradientColorKeyArray1Constructor1, IntPtr unityEngineGradientColorKeyArray1GetItem1, IntPtr unityEngineGradientColorKeyArray1SetItem1, IntPtr releaseSystemAction, @@ -714,30 +714,30 @@ static extern void Init( IntPtr unboxSingle, IntPtr boxDouble, IntPtr unboxDouble, - IntPtr systemInt32Array1Constructor1, + IntPtr systemSystemInt32Array1Constructor1, IntPtr systemInt32Array1GetItem1, IntPtr systemInt32Array1SetItem1, - IntPtr systemSingleArray1Constructor1, + IntPtr systemSystemSingleArray1Constructor1, IntPtr systemSingleArray1GetItem1, IntPtr systemSingleArray1SetItem1, - IntPtr systemSingleArray2Constructor2, - IntPtr systemSingleArray2GetLength2, + IntPtr systemSystemSingleArray2Constructor2, + IntPtr systemSystemSingleArray2GetLength2, IntPtr systemSingleArray2GetItem2, IntPtr systemSingleArray2SetItem2, - IntPtr systemSingleArray3Constructor3, - IntPtr systemSingleArray3GetLength3, + IntPtr systemSystemSingleArray3Constructor3, + IntPtr systemSystemSingleArray3GetLength3, IntPtr systemSingleArray3GetItem3, IntPtr systemSingleArray3SetItem3, - IntPtr systemStringArray1Constructor1, + IntPtr systemSystemStringArray1Constructor1, IntPtr systemStringArray1GetItem1, IntPtr systemStringArray1SetItem1, - IntPtr unityEngineResolutionArray1Constructor1, + IntPtr unityEngineUnityEngineResolutionArray1Constructor1, IntPtr unityEngineResolutionArray1GetItem1, IntPtr unityEngineResolutionArray1SetItem1, - IntPtr unityEngineRaycastHitArray1Constructor1, + IntPtr unityEngineUnityEngineRaycastHitArray1Constructor1, IntPtr unityEngineRaycastHitArray1GetItem1, IntPtr unityEngineRaycastHitArray1SetItem1, - IntPtr unityEngineGradientColorKeyArray1Constructor1, + IntPtr unityEngineUnityEngineGradientColorKeyArray1Constructor1, IntPtr unityEngineGradientColorKeyArray1GetItem1, IntPtr unityEngineGradientColorKeyArray1SetItem1, IntPtr releaseSystemAction, @@ -949,30 +949,30 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate float UnboxSingleDelegate(int valHandle); delegate int BoxDoubleDelegate(double val); delegate double UnboxDoubleDelegate(int valHandle); - delegate int SystemInt32Array1Constructor1Delegate(int length0); + delegate int SystemSystemInt32Array1Constructor1Delegate(int length0); delegate int SystemInt32Array1GetItem1Delegate(int thisHandle, int index0); delegate void SystemInt32Array1SetItem1Delegate(int thisHandle, int index0, int item); - delegate int SystemSingleArray1Constructor1Delegate(int length0); + delegate int SystemSystemSingleArray1Constructor1Delegate(int length0); delegate float SystemSingleArray1GetItem1Delegate(int thisHandle, int index0); delegate void SystemSingleArray1SetItem1Delegate(int thisHandle, int index0, float item); - delegate int SystemSingleArray2Constructor2Delegate(int length0, int length1); - delegate int SystemSingleArray2GetLength2Delegate(int thisHandle, int dimension); + 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 SystemSingleArray3Constructor3Delegate(int length0, int length1, int length2); - delegate int SystemSingleArray3GetLength3Delegate(int thisHandle, int dimension); + 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 SystemStringArray1Constructor1Delegate(int length0); + delegate int SystemSystemStringArray1Constructor1Delegate(int length0); delegate int SystemStringArray1GetItem1Delegate(int thisHandle, int index0); delegate void SystemStringArray1SetItem1Delegate(int thisHandle, int index0, int itemHandle); - delegate int UnityEngineResolutionArray1Constructor1Delegate(int length0); + delegate int UnityEngineUnityEngineResolutionArray1Constructor1Delegate(int length0); delegate UnityEngine.Resolution UnityEngineResolutionArray1GetItem1Delegate(int thisHandle, int index0); delegate void UnityEngineResolutionArray1SetItem1Delegate(int thisHandle, int index0, ref UnityEngine.Resolution item); - delegate int UnityEngineRaycastHitArray1Constructor1Delegate(int length0); + delegate int UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate(int length0); delegate int UnityEngineRaycastHitArray1GetItem1Delegate(int thisHandle, int index0); delegate void UnityEngineRaycastHitArray1SetItem1Delegate(int thisHandle, int index0, int itemHandle); - delegate int UnityEngineGradientColorKeyArray1Constructor1Delegate(int length0); + 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 SystemActionConstructorDelegate(int cppHandle, ref int handle, ref int classHandle); @@ -1190,30 +1190,30 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnboxSingleDelegate(UnboxSingle)), Marshal.GetFunctionPointerForDelegate(new BoxDoubleDelegate(BoxDouble)), Marshal.GetFunctionPointerForDelegate(new UnboxDoubleDelegate(UnboxDouble)), - Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1Constructor1Delegate(SystemInt32Array1Constructor1)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemInt32Array1Constructor1Delegate(SystemSystemInt32Array1Constructor1)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1GetItem1Delegate(SystemInt32Array1GetItem1)), Marshal.GetFunctionPointerForDelegate(new SystemInt32Array1SetItem1Delegate(SystemInt32Array1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray1Constructor1Delegate(SystemSingleArray1Constructor1)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray1Constructor1Delegate(SystemSystemSingleArray1Constructor1)), Marshal.GetFunctionPointerForDelegate(new SystemSingleArray1GetItem1Delegate(SystemSingleArray1GetItem1)), Marshal.GetFunctionPointerForDelegate(new SystemSingleArray1SetItem1Delegate(SystemSingleArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray2Constructor2Delegate(SystemSingleArray2Constructor2)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray2GetLength2Delegate(SystemSingleArray2GetLength2)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray2Constructor2Delegate(SystemSystemSingleArray2Constructor2)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray2GetLength2Delegate(SystemSystemSingleArray2GetLength2)), Marshal.GetFunctionPointerForDelegate(new SystemSingleArray2GetItem2Delegate(SystemSingleArray2GetItem2)), Marshal.GetFunctionPointerForDelegate(new SystemSingleArray2SetItem2Delegate(SystemSingleArray2SetItem2)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray3Constructor3Delegate(SystemSingleArray3Constructor3)), - Marshal.GetFunctionPointerForDelegate(new SystemSingleArray3GetLength3Delegate(SystemSingleArray3GetLength3)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray3Constructor3Delegate(SystemSystemSingleArray3Constructor3)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemSingleArray3GetLength3Delegate(SystemSystemSingleArray3GetLength3)), Marshal.GetFunctionPointerForDelegate(new SystemSingleArray3GetItem3Delegate(SystemSingleArray3GetItem3)), Marshal.GetFunctionPointerForDelegate(new SystemSingleArray3SetItem3Delegate(SystemSingleArray3SetItem3)), - Marshal.GetFunctionPointerForDelegate(new SystemStringArray1Constructor1Delegate(SystemStringArray1Constructor1)), + Marshal.GetFunctionPointerForDelegate(new SystemSystemStringArray1Constructor1Delegate(SystemSystemStringArray1Constructor1)), Marshal.GetFunctionPointerForDelegate(new SystemStringArray1GetItem1Delegate(SystemStringArray1GetItem1)), Marshal.GetFunctionPointerForDelegate(new SystemStringArray1SetItem1Delegate(SystemStringArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionArray1Constructor1Delegate(UnityEngineResolutionArray1Constructor1)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineUnityEngineResolutionArray1Constructor1Delegate(UnityEngineUnityEngineResolutionArray1Constructor1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionArray1GetItem1Delegate(UnityEngineResolutionArray1GetItem1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionArray1SetItem1Delegate(UnityEngineResolutionArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitArray1Constructor1Delegate(UnityEngineRaycastHitArray1Constructor1)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate(UnityEngineUnityEngineRaycastHitArray1Constructor1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitArray1GetItem1Delegate(UnityEngineRaycastHitArray1GetItem1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineRaycastHitArray1SetItem1Delegate(UnityEngineRaycastHitArray1SetItem1)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientColorKeyArray1Constructor1Delegate(UnityEngineGradientColorKeyArray1Constructor1)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate(UnityEngineUnityEngineGradientColorKeyArray1Constructor1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientColorKeyArray1GetItem1Delegate(UnityEngineGradientColorKeyArray1GetItem1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientColorKeyArray1SetItem1Delegate(UnityEngineGradientColorKeyArray1SetItem1)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemActionDelegate(ReleaseSystemAction)), @@ -3847,8 +3847,8 @@ static double UnboxDouble(int valHandle) } } - [MonoPInvokeCallback(typeof(SystemInt32Array1Constructor1Delegate))] - static int SystemInt32Array1Constructor1(int length0) + [MonoPInvokeCallback(typeof(SystemSystemInt32Array1Constructor1Delegate))] + static int SystemSystemInt32Array1Constructor1(int length0) { try { @@ -3912,8 +3912,8 @@ static void SystemInt32Array1SetItem1(int thisHandle, int index0, int item) } } - [MonoPInvokeCallback(typeof(SystemSingleArray1Constructor1Delegate))] - static int SystemSingleArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray1Constructor1Delegate))] + static int SystemSystemSingleArray1Constructor1(int length0) { try { @@ -3977,8 +3977,8 @@ static void SystemSingleArray1SetItem1(int thisHandle, int index0, float item) } } - [MonoPInvokeCallback(typeof(SystemSingleArray2Constructor2Delegate))] - static int SystemSingleArray2Constructor2(int length0, int length1) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray2Constructor2Delegate))] + static int SystemSystemSingleArray2Constructor2(int length0, int length1) { try { @@ -3999,8 +3999,8 @@ static int SystemSingleArray2Constructor2(int length0, int length1) } } - [MonoPInvokeCallback(typeof(SystemSingleArray2GetLength2Delegate))] - static int SystemSingleArray2GetLength2(int thisHandle, int dimension) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray2GetLength2Delegate))] + static int SystemSystemSingleArray2GetLength2(int thisHandle, int dimension) { try { @@ -4065,8 +4065,8 @@ static void SystemSingleArray2SetItem2(int thisHandle, int index0, int index1, f } } - [MonoPInvokeCallback(typeof(SystemSingleArray3Constructor3Delegate))] - static int SystemSingleArray3Constructor3(int length0, int length1, int length2) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray3Constructor3Delegate))] + static int SystemSystemSingleArray3Constructor3(int length0, int length1, int length2) { try { @@ -4087,8 +4087,8 @@ static int SystemSingleArray3Constructor3(int length0, int length1, int length2) } } - [MonoPInvokeCallback(typeof(SystemSingleArray3GetLength3Delegate))] - static int SystemSingleArray3GetLength3(int thisHandle, int dimension) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray3GetLength3Delegate))] + static int SystemSystemSingleArray3GetLength3(int thisHandle, int dimension) { try { @@ -4153,8 +4153,8 @@ static void SystemSingleArray3SetItem3(int thisHandle, int index0, int index1, i } } - [MonoPInvokeCallback(typeof(SystemStringArray1Constructor1Delegate))] - static int SystemStringArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(SystemSystemStringArray1Constructor1Delegate))] + static int SystemSystemStringArray1Constructor1(int length0) { try { @@ -4219,8 +4219,8 @@ static void SystemStringArray1SetItem1(int thisHandle, int index0, int itemHandl } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1Constructor1Delegate))] - static int UnityEngineResolutionArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(UnityEngineUnityEngineResolutionArray1Constructor1Delegate))] + static int UnityEngineUnityEngineResolutionArray1Constructor1(int length0) { try { @@ -4284,8 +4284,8 @@ static void UnityEngineResolutionArray1SetItem1(int thisHandle, int index0, ref } } - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitArray1Constructor1Delegate))] - static int UnityEngineRaycastHitArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate))] + static int UnityEngineUnityEngineRaycastHitArray1Constructor1(int length0) { try { @@ -4350,8 +4350,8 @@ static void UnityEngineRaycastHitArray1SetItem1(int thisHandle, int index0, int } } - [MonoPInvokeCallback(typeof(UnityEngineGradientColorKeyArray1Constructor1Delegate))] - static int UnityEngineGradientColorKeyArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate))] + static int UnityEngineUnityEngineGradientColorKeyArray1Constructor1(int length0) { try { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index a17c733..0ddb332 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -4008,20 +4008,79 @@ static void AppendArray( ranks = jsonArray.Ranks; } + // C++ element proxy for [1-R] for all ranks R + Type[] cppTypeParams = new Type[]{ elementType }; foreach (int rank in ranks) { // Build array name builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append("Array"); - builders.TempStrBuilder.Append(rank); + AppendCppArrayTypeName( + rank, + builders.TempStrBuilder); string cppArrayTypeName = builders.TempStrBuilder.ToString(); // Build "TypeArray" name builders.TempStrBuilder.Length = 0; - AppendTypeNameWithoutGenericSuffix( + AppendBindingArrayTypeName( + elementType.Name, + elementType.Namespace, + cppArrayTypeName, + builders.TempStrBuilder); + string bindingArrayTypeName = builders.TempStrBuilder.ToString(); + + // GetItem params + ParameterInfo[] getItemParams = BuildArrayGetItemsParams( + rank, + "index"); + + for (int i = 1; i <= rank; ++i) + { + AppendArrayElementProxy( + elementType, + elementTypeKind, + bindingArrayTypeName, + i, + rank, + cppTypeParams, + cppArrayTypeName, + getItemParams, + builders); + } + } + + foreach (int rank in ranks) + { + // Build array name + builders.TempStrBuilder.Length = 0; + AppendCppArrayTypeName( + rank, + builders.TempStrBuilder); + string cppArrayTypeName = builders.TempStrBuilder.ToString(); + + // Build array name with element type + builders.TempStrBuilder.Append('<'); + AppendCppTypeName( + elementType, + builders.TempStrBuilder); + builders.TempStrBuilder.Append('>'); + string cppGenericArrayTypeName = builders.TempStrBuilder.ToString(); + + // Build element proxy name + builders.TempStrBuilder.Length = 0; + AppendCppArrayElementProxyName( + 1, + rank, + elementType, + builders.TempStrBuilder); + string cppElementProxyTypeName = builders.TempStrBuilder.ToString(); + + // Build "TypeArray" name + builders.TempStrBuilder.Length = 0; + AppendBindingArrayTypeName( elementType.Name, + elementType.Namespace, + cppArrayTypeName, builders.TempStrBuilder); - builders.TempStrBuilder.Append(cppArrayTypeName); string bindingArrayTypeName = builders.TempStrBuilder.ToString(); // MakeArrayType() creates a Type for a "vector" @@ -4041,7 +4100,6 @@ static void AppendArray( } // C++ type declaration - Type[] cppTypeParams = new Type[]{ elementType }; int indent = AppendCppTypeDeclaration( "System", cppArrayTypeName, @@ -4131,6 +4189,32 @@ static void AppendArray( indent, builders); + // C++ operator[] method declaration + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("Plugin::"); + AppendCppArrayElementProxyName( + 1, + rank, + elementType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(' '); + AppendTypeNameWithoutGenericSuffix( + "operator[]", + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("(int32_t index);\n"); + + // C++ operator[] method definition + AppendCppArrayIndexOperatorMethodDefinition( + 0, + cppMethodDefinitionsIndent, + cppGenericArrayTypeName, + "System", + cppElementProxyTypeName, + builders.CppMethodDefinitions); + + // C++ type definition (end) AppendCppTypeDefinitionEnd( false, indent, @@ -4143,6 +4227,490 @@ static void AppendArray( } } + static void AppendCppArrayIndexOperatorMethodDefinition( + int rank, + int indent, + string enclosingTypeName, + string enclosingTypeNamespace, + string nextCppElementProxyTypeName, + StringBuilder output) + { + AppendIndent( + indent, + output); + AppendCppTypeName( + "Plugin", + nextCppElementProxyTypeName, + output); + output.Append(' '); + output.Append(enclosingTypeNamespace); + output.Append("::"); + AppendTypeNameWithoutGenericSuffix( + enclosingTypeName, + output); + output.Append("::operator[](int32_t index)\n"); + AppendIndent( + indent, + output); + output.Append("{\n"); + AppendIndent( + indent + 1, + output); + output.Append("return Plugin::"); + output.Append(nextCppElementProxyTypeName); + output.Append("(Plugin::InternalUse::Only, Handle, "); + for (int i = 0; i < rank; ++i) + { + output.Append("Index"); + output.Append(i); + output.Append(", "); + } + output.Append("index);\n"); + AppendIndent( + indent, + output); + output.Append("}\n"); + AppendIndent( + indent, + output); + output.Append('\n'); + } + + static void AppendCppArrayTypeName( + int rank, + StringBuilder output) + { + output.Append("Array"); + output.Append(rank); + } + + static void AppendCppArrayElementProxyName( + int rank, + int maxRank, + Type elementType, + StringBuilder output) + { + output.Append("ArrayElementProxy"); + output.Append(rank); + output.Append('_'); + output.Append(maxRank); + output.Append('<'); + AppendCppTypeName( + 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) + { + ParameterInfo[] parameters = new ParameterInfo[rank]; + for (int i = 0; i < rank; ++i) + { + ParameterInfo param = new ParameterInfo(); + param.Name = indexName + i; + param.ParameterType = typeof(int); + param.IsOut = false; + param.IsRef = false; + param.DereferencedParameterType = param.ParameterType; + param.Kind = GetTypeKind( + param.DereferencedParameterType); + parameters[i] = param; + } + return parameters; + } + + static ParameterInfo[] BuildArraySetItemsParams( + int rank, + string indexName, + Type elementType) + { + ParameterInfo[] parameters = new ParameterInfo[rank+1]; + for (int i = 0; i < rank; ++i) + { + ParameterInfo param = new ParameterInfo(); + param.Name = indexName + i; + param.ParameterType = typeof(int); + param.IsOut = false; + param.IsRef = false; + param.DereferencedParameterType = param.ParameterType; + param.Kind = GetTypeKind( + param.DereferencedParameterType); + parameters[i] = param; + } + + ParameterInfo lastParamInfo = new ParameterInfo(); + lastParamInfo.Name = "item"; + lastParamInfo.ParameterType = elementType; + lastParamInfo.IsOut = false; + lastParamInfo.IsRef = false; + lastParamInfo.DereferencedParameterType = lastParamInfo.ParameterType; + lastParamInfo.Kind = GetTypeKind( + lastParamInfo.DereferencedParameterType); + parameters[rank] = lastParamInfo; + + return parameters; + } + + static void AppendArrayGetItemFuncName( + string elementTypeName, + string elementTypeNamespace, + string bindingArrayTypeName, + int rank, + StringBuilder output) + { + AppendNamespace( + elementTypeNamespace, + string.Empty, + output); + output.Append(elementTypeName); + AppendTypeNameWithoutGenericSuffix( + bindingArrayTypeName, + output); + output.Append("GetItem"); + output.Append(rank); + } + + static void AppendArraySetItemFuncName( + string elementTypeName, + string elementTypeNamespace, + string bindingArrayTypeName, + int rank, + StringBuilder output) + { + AppendNamespace( + elementTypeNamespace, + string.Empty, + output); + output.Append(elementTypeName); + AppendTypeNameWithoutGenericSuffix( + bindingArrayTypeName, + output); + output.Append("SetItem"); + output.Append(rank); + } + + static void AppendArrayElementProxy( + Type elementType, + TypeKind elementTypeKind, + string bindingArrayTypeName, + int rank, + int maxRank, + Type[] cppTypeParams, + string cppArrayTypeName, + ParameterInfo[] getItemParams, + StringBuilders builders) + { + // Build element proxy name + builders.TempStrBuilder.Length = 0; + AppendCppArrayElementProxyName( + rank, + maxRank, + elementType, + builders.TempStrBuilder); + string cppElementProxyTypeName = builders.TempStrBuilder.ToString(); + + // Build next element proxy name + builders.TempStrBuilder.Length = 0; + AppendCppArrayElementProxyName( + rank + 1, + maxRank, + elementType, + builders.TempStrBuilder); + string nextCppElementProxyTypeName = builders.TempStrBuilder.ToString(); + + // GetItem name + builders.TempStrBuilder.Length = 0; + AppendArrayGetItemFuncName( + elementType.Name, + elementType.Namespace, + cppArrayTypeName, + rank, + builders.TempStrBuilder); + string getItemFuncName = builders.TempStrBuilder.ToString(); + + // SetItem name + builders.TempStrBuilder.Length = 0; + AppendArraySetItemFuncName( + elementType.Name, + elementType.Namespace, + cppArrayTypeName, + rank, + builders.TempStrBuilder); + string setItemFuncName = builders.TempStrBuilder.ToString(); + + // GetItem call params + ParameterInfo[] getItemCallParams = BuildArrayGetItemsParams( + rank, + "Index"); + + // SetItem params + ParameterInfo[] setItemCallParams = BuildArraySetItemsParams( + rank, + "Index", + elementType); + + // C++ element proxy type declaration + int indent = AppendNamespaceBeginning( + "Plugin", + builders.CppTypeDeclarations); + AppendIndent(indent, builders.CppTypeDeclarations); + builders.CppTypeDeclarations.Append("template<> struct "); + AppendTypeNameWithoutGenericSuffix( + cppElementProxyTypeName, + builders.CppTypeDeclarations); + builders.CppTypeDeclarations.Append(";\n"); + AppendNamespaceEnding( + indent, + builders.CppTypeDeclarations); + builders.CppTypeDeclarations.Append('\n'); + + // C++ element proxy type definition + AppendNamespaceBeginning( + "Plugin", + builders.CppTypeDefinitions); + AppendIndent( + indent, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("template<> struct "); + builders.CppTypeDefinitions.Append(cppElementProxyTypeName); + builders.CppTypeDefinitions.Append('\n'); + AppendIndent( + indent, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("int32_t Handle;\n"); + for (int i = 0; i < rank; ++i) + { + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("int32_t Index"); + builders.CppTypeDefinitions.Append(i); + builders.CppTypeDefinitions.Append(";\n"); + } + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(cppElementProxyTypeName); + builders.CppTypeDefinitions.Append( + "(Plugin::InternalUse iu, int32_t handle, "); + for (int i = 0; i < rank; ++i) + { + builders.CppTypeDefinitions.Append("int32_t index"); + builders.CppTypeDefinitions.Append(i); + if (i != rank - 1) + { + builders.CppTypeDefinitions.Append(", "); + } + } + builders.CppTypeDefinitions.Append(");\n"); + if (rank == maxRank) + { + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("void operator=("); + AppendCppTypeName( + elementType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(" item);\n"); + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("operator "); + AppendCppTypeName( + elementType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("();\n"); + } + else + { + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("Plugin::"); + AppendCppArrayElementProxyName( + rank + 1, + maxRank, + elementType, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append(" operator[]("); + builders.CppTypeDefinitions.Append("int32_t index);\n"); + } + AppendIndent( + indent, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("};\n"); + builders.CppTypeDefinitions.Append("}\n"); + builders.CppTypeDefinitions.Append('\n'); + + // C++ element proxy method definitions (beginning) + int cppMethodDefinitionsIndent = AppendNamespaceBeginning( + "Plugin", + builders.CppMethodDefinitions); + + // C++ element proxy constructor definition + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(cppElementProxyTypeName); + builders.CppMethodDefinitions.Append( + "::ArrayElementProxy"); + builders.CppMethodDefinitions.Append(rank); + builders.CppMethodDefinitions.Append('_'); + builders.CppMethodDefinitions.Append(maxRank); + builders.CppMethodDefinitions.Append( + "(Plugin::InternalUse iu, int32_t handle, "); + for (int i = 0; i < rank; ++i) + { + builders.CppMethodDefinitions.Append("int32_t index"); + builders.CppMethodDefinitions.Append(i); + if (i != rank - 1) + { + builders.CppMethodDefinitions.Append(", "); + } + } + builders.CppMethodDefinitions.Append(")\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Handle = handle;\n"); + for (int i = 0; i < rank; ++i) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("Index"); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append(" = index"); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append(";\n"); + } + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + if (rank == maxRank) + { + // C++ element proxy operator= definition + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("void "); + builders.CppMethodDefinitions.Append(cppElementProxyTypeName); + builders.CppMethodDefinitions.Append("::"); + builders.CppMethodDefinitions.Append("operator=("); + AppendCppTypeName( + elementType, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(" item)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendCppPluginFunctionCall( + false, + cppArrayTypeName, + "System", + TypeKind.Class, + cppTypeParams, + typeof(void), + setItemFuncName, + setItemCallParams, + cppMethodDefinitionsIndent + 1, + builders.CppMethodDefinitions); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // C++ element proxy type conversion operator definition + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(cppElementProxyTypeName); + builders.CppMethodDefinitions.Append("::"); + builders.CppMethodDefinitions.Append("operator "); + AppendCppTypeName( + elementType, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("()\n"); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendCppPluginFunctionCall( + false, + cppArrayTypeName, + "System", + TypeKind.Class, + cppTypeParams, + elementType, + getItemFuncName, + getItemCallParams, + indent + 1, + builders.CppMethodDefinitions); + AppendCppMethodReturn( + elementType, + elementTypeKind, + indent + 1, + builders.CppMethodDefinitions); + AppendIndent( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + } + else + { + AppendCppArrayIndexOperatorMethodDefinition( + rank, + cppMethodDefinitionsIndent, + cppElementProxyTypeName, + "Plugin", + nextCppElementProxyTypeName, + builders.CppMethodDefinitions); + } + + // C++ method definitions (ending) + AppendCppMethodDefinitionsEnd( + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + } + static void AppendArrayConstructor( Type elementType, Type arrayType, @@ -4565,34 +5133,21 @@ static void AppendArrayGetItem( StringBuilders builders) { builders.TempStrBuilder.Length = 0; - AppendNamespace( + AppendArrayGetItemFuncName( + elementType.Name, elementType.Namespace, - string.Empty, - builders.TempStrBuilder); - AppendTypeNameWithoutGenericSuffix( - csharpTypeName, + cppArrayTypeName, + rank, builders.TempStrBuilder); - builders.TempStrBuilder.Append("GetItem"); - 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) - { - ParameterInfo info = new ParameterInfo(); - info.Name = "index" + i; - info.ParameterType = typeof(int); - info.IsOut = false; - info.IsRef = false; - info.DereferencedParameterType = info.ParameterType; - info.Kind = GetTypeKind( - info.DereferencedParameterType); - parameters[i] = info; - } + ParameterInfo[] parameters = BuildArrayGetItemsParams( + rank, + "index"); // C# Delegate Type AppendCsharpDelegateType( @@ -4670,54 +5225,6 @@ static void AppendArrayGetItem( funcName, funcNameLower, builders.CppInitBody); - - // C++ method declaration - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - "GetItem", - false, - false, - false, - elementType, - null, - parameters, - builders.CppTypeDefinitions); - - // C++ method definition - Type[] cppTypeParams = new Type[] { elementType }; - AppendCppMethodDefinitionBegin( - cppArrayTypeName, - elementType, - "GetItem", - cppTypeParams, - null, - parameters, - indent, - builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendCppPluginFunctionCall( - false, - cppArrayTypeName, - "System", - TypeKind.Class, - cppTypeParams, - elementType, - funcName, - parameters, - indent + 1, - builders.CppMethodDefinitions); - AppendCppMethodReturn( - elementType, - elementTypeKind, - indent + 1, - builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); } static void AppendArraySetItem( @@ -4730,15 +5237,12 @@ static void AppendArraySetItem( StringBuilders builders) { builders.TempStrBuilder.Length = 0; - AppendNamespace( + AppendArraySetItemFuncName( + elementType.Name, elementType.Namespace, - string.Empty, - builders.TempStrBuilder); - AppendTypeNameWithoutGenericSuffix( - csharpTypeName, + cppArrayTypeName, + rank, builders.TempStrBuilder); - builders.TempStrBuilder.Append("SetItem"); - builders.TempStrBuilder.Append(rank); string funcName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder[0] = char.ToLower( @@ -4746,28 +5250,10 @@ static void AppendArraySetItem( string funcNameLower = builders.TempStrBuilder.ToString(); // Build parameters as indexes then element - ParameterInfo[] parameters = new ParameterInfo[rank+1]; - for (int i = 0; i < rank; ++i) - { - ParameterInfo info = new ParameterInfo(); - info.Name = "index" + i; - info.ParameterType = typeof(int); - info.IsOut = false; - info.IsRef = false; - info.DereferencedParameterType = info.ParameterType; - info.Kind = GetTypeKind( - info.DereferencedParameterType); - parameters[i] = info; - } - ParameterInfo lastParamInfo = new ParameterInfo(); - lastParamInfo.Name = "item"; - lastParamInfo.ParameterType = elementType; - lastParamInfo.IsOut = false; - lastParamInfo.IsRef = false; - lastParamInfo.DereferencedParameterType = lastParamInfo.ParameterType; - lastParamInfo.Kind = GetTypeKind( - lastParamInfo.DereferencedParameterType); - parameters[rank] = lastParamInfo; + ParameterInfo[] parameters = BuildArraySetItemsParams( + rank, + "index", + elementType); // C# Delegate Type AppendCsharpDelegateType( @@ -4845,49 +5331,6 @@ static void AppendArraySetItem( funcName, funcNameLower, builders.CppInitBody); - - // C++ method declaration - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - "SetItem", - false, - false, - false, - typeof(void), - null, - parameters, - builders.CppTypeDefinitions); - - // C++ method definition - Type[] cppTypeParams = new Type[] { elementType }; - AppendCppMethodDefinitionBegin( - cppArrayTypeName, - typeof(void), - "SetItem", - cppTypeParams, - null, - parameters, - indent, - builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendCppPluginFunctionCall( - false, - cppArrayTypeName, - "System", - TypeKind.Class, - cppTypeParams, - typeof(void), - funcName, - parameters, - indent + 1, - builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent(indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); } static void AppendDelegate( diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 79cdce3..2c42ed2 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -156,30 +156,30 @@ namespace Plugin float (*UnboxSingle)(int32_t valHandle); int32_t (*BoxDouble)(double val); double (*UnboxDouble)(int32_t valHandle); - int32_t (*SystemInt32Array1Constructor1)(int32_t length0); + int32_t (*SystemSystemInt32Array1Constructor1)(int32_t length0); int32_t (*SystemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*SystemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item); - int32_t (*SystemSingleArray1Constructor1)(int32_t length0); + int32_t (*SystemSystemSingleArray1Constructor1)(int32_t length0); float (*SystemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*SystemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item); - int32_t (*SystemSingleArray2Constructor2)(int32_t length0, int32_t length1); - int32_t (*SystemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension); + 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); int32_t (*SystemSingleArray2SetItem2)(int32_t thisHandle, int32_t index0, int32_t index1, float item); - int32_t (*SystemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2); - int32_t (*SystemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension); + 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); int32_t (*SystemSingleArray3SetItem3)(int32_t thisHandle, int32_t index0, int32_t index1, int32_t index2, float item); - int32_t (*SystemStringArray1Constructor1)(int32_t length0); + int32_t (*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 (*UnityEngineResolutionArray1Constructor1)(int32_t length0); + int32_t (*UnityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0); UnityEngine::Resolution (*UnityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0); int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item); - int32_t (*UnityEngineRaycastHitArray1Constructor1)(int32_t length0); + int32_t (*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 (*UnityEngineGradientColorKeyArray1Constructor1)(int32_t length0); + 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); @@ -4746,6 +4746,40 @@ namespace MyGame } } +namespace Plugin +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + { + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(int32_t item) + { + Plugin::SystemInt32Array1SetItem1(Handle, Index0, item); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + ArrayElementProxy1_1::operator int32_t() + { + 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(std::nullptr_t n) @@ -4830,7 +4864,7 @@ namespace System Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemInt32Array1Constructor1(length0); + auto returnValue = Plugin::SystemSystemInt32Array1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4855,9 +4889,35 @@ namespace System return Array::GetRank(); } - int32_t Array1::GetItem(int32_t index0) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, index0); + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + } +} + +namespace Plugin +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + { + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(float item) + { + Plugin::SystemSingleArray1SetItem1(Handle, Index0, item); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + ArrayElementProxy1_1::operator float() + { + auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4867,10 +4927,99 @@ namespace System } return returnValue; } +} + +namespace Plugin +{ + ArrayElementProxy1_2::ArrayElementProxy1_2(Plugin::InternalUse iu, 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 iu, int32_t handle, int32_t index0, int32_t index1) + { + Handle = handle; + Index0 = index0; + Index1 = index1; + } + + void ArrayElementProxy2_2::operator=(float 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 float() + { + 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 iu, 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 iu, 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 iu, int32_t handle, int32_t index0, int32_t index1, int32_t index2) + { + Handle = handle; + Index0 = index0; + Index1 = index1; + Index2 = index2; + } - void Array1::SetItem(int32_t index0, int32_t item) + void ArrayElementProxy3_3::operator=(float item) { - Plugin::SystemInt32Array1SetItem1(Handle, index0, item); + Plugin::SystemSingleArray3SetItem3(Handle, Index0, Index1, Index2, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4879,6 +5028,19 @@ namespace System delete ex; } } + + ArrayElementProxy3_3::operator float() + { + 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 @@ -4965,7 +5127,7 @@ namespace System Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSingleArray1Constructor1(length0); + auto returnValue = Plugin::SystemSystemSingleArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4990,29 +5152,9 @@ namespace System return Array::GetRank(); } - float Array1::GetItem(int32_t index0) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void Array1::SetItem(int32_t index0, float item) - { - Plugin::SystemSingleArray1SetItem1(Handle, index0, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); } } @@ -5100,7 +5242,7 @@ namespace System Array2::Array2(int32_t length0, int32_t length1) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSingleArray2Constructor2(length0, length1); + auto returnValue = Plugin::SystemSystemSingleArray2Constructor2(length0, length1); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5122,7 +5264,7 @@ namespace System int32_t Array2::GetLength(int32_t dimension) { - auto returnValue = Plugin::SystemSingleArray2GetLength2(Handle, dimension); + auto returnValue = Plugin::SystemSystemSingleArray2GetLength2(Handle, dimension); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5138,29 +5280,9 @@ namespace System return Array::GetRank(); } - float Array2::GetItem(int32_t index0, int32_t index1) + Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) { - auto returnValue = Plugin::SystemSingleArray2GetItem2(Handle, index0, index1); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void Array2::SetItem(int32_t index0, int32_t index1, float item) - { - Plugin::SystemSingleArray2SetItem2(Handle, index0, index1, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Plugin::ArrayElementProxy1_2(Plugin::InternalUse::Only, Handle, index); } } @@ -5248,7 +5370,7 @@ namespace System Array3::Array3(int32_t length0, int32_t length1, int32_t length2) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSingleArray3Constructor3(length0, length1, length2); + auto returnValue = Plugin::SystemSystemSingleArray3Constructor3(length0, length1, length2); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5270,7 +5392,7 @@ namespace System int32_t Array3::GetLength(int32_t dimension) { - auto returnValue = Plugin::SystemSingleArray3GetLength3(Handle, dimension); + auto returnValue = Plugin::SystemSystemSingleArray3GetLength3(Handle, dimension); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5286,9 +5408,23 @@ namespace System return Array::GetRank(); } - float Array3::GetItem(int32_t index0, int32_t index1, int32_t index2) + 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 iu, int32_t handle, int32_t index0) + { + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(System::String item) { - auto returnValue = Plugin::SystemSingleArray3GetItem3(Handle, index0, index1, index2); + Plugin::SystemStringArray1SetItem1(Handle, Index0, item.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5296,12 +5432,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnValue; } - void Array3::SetItem(int32_t index0, int32_t index1, int32_t index2, float item) + ArrayElementProxy1_1::operator System::String() { - Plugin::SystemSingleArray3SetItem3(Handle, index0, index1, index2, item); + auto returnValue = Plugin::SystemStringArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5309,6 +5444,7 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return System::String(Plugin::InternalUse::Only, returnValue); } } @@ -5396,7 +5532,7 @@ namespace System Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemStringArray1Constructor1(length0); + auto returnValue = Plugin::SystemSystemStringArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5421,9 +5557,23 @@ namespace System return Array::GetRank(); } - System::String Array1::GetItem(int32_t index0) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + { + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + } +} + +namespace Plugin +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + { + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(UnityEngine::Resolution item) { - auto returnValue = Plugin::SystemStringArray1GetItem1(Handle, index0); + Plugin::UnityEngineResolutionArray1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5431,12 +5581,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return System::String(Plugin::InternalUse::Only, returnValue); } - void Array1::SetItem(int32_t index0, System::String item) + ArrayElementProxy1_1::operator UnityEngine::Resolution() { - Plugin::SystemStringArray1SetItem1(Handle, index0, item.Handle); + auto returnValue = Plugin::UnityEngineResolutionArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5444,6 +5593,7 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return returnValue; } } @@ -5531,7 +5681,7 @@ namespace System Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::UnityEngineResolutionArray1Constructor1(length0); + auto returnValue = Plugin::UnityEngineUnityEngineResolutionArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5556,9 +5706,23 @@ namespace System return Array::GetRank(); } - UnityEngine::Resolution Array1::GetItem(int32_t index0) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - auto returnValue = Plugin::UnityEngineResolutionArray1GetItem1(Handle, index0); + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + } +} + +namespace Plugin +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, 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; @@ -5566,12 +5730,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnValue; } - void Array1::SetItem(int32_t index0, UnityEngine::Resolution& item) + ArrayElementProxy1_1::operator UnityEngine::RaycastHit() { - Plugin::UnityEngineResolutionArray1SetItem1(Handle, index0, item); + auto returnValue = Plugin::UnityEngineRaycastHitArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5579,6 +5742,7 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); } } @@ -5666,7 +5830,7 @@ namespace System Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::UnityEngineRaycastHitArray1Constructor1(length0); + auto returnValue = Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5691,9 +5855,23 @@ namespace System return Array::GetRank(); } - UnityEngine::RaycastHit Array1::GetItem(int32_t index0) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + { + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + } +} + +namespace Plugin +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + { + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(UnityEngine::GradientColorKey item) { - auto returnValue = Plugin::UnityEngineRaycastHitArray1GetItem1(Handle, index0); + Plugin::UnityEngineGradientColorKeyArray1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5701,12 +5879,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); } - void Array1::SetItem(int32_t index0, UnityEngine::RaycastHit item) + ArrayElementProxy1_1::operator UnityEngine::GradientColorKey() { - Plugin::UnityEngineRaycastHitArray1SetItem1(Handle, index0, item.Handle); + auto returnValue = Plugin::UnityEngineGradientColorKeyArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5714,6 +5891,7 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return returnValue; } } @@ -5801,7 +5979,7 @@ namespace System Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::UnityEngineGradientColorKeyArray1Constructor1(length0); + auto returnValue = Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5826,29 +6004,9 @@ namespace System return Array::GetRank(); } - UnityEngine::GradientColorKey Array1::GetItem(int32_t index0) - { - auto returnValue = Plugin::UnityEngineGradientColorKeyArray1GetItem1(Handle, index0); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void Array1::SetItem(int32_t index0, UnityEngine::GradientColorKey& item) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - Plugin::UnityEngineGradientColorKeyArray1SetItem1(Handle, index0, item); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); } } @@ -7840,30 +7998,30 @@ DLLEXPORT void Init( float (*unboxSingle)(int32_t valHandle), int32_t (*boxDouble)(double val), double (*unboxDouble)(int32_t valHandle), - int32_t (*systemInt32Array1Constructor1)(int32_t length0), + int32_t (*systemSystemInt32Array1Constructor1)(int32_t length0), int32_t (*systemInt32Array1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*systemInt32Array1SetItem1)(int32_t thisHandle, int32_t index0, int32_t item), - int32_t (*systemSingleArray1Constructor1)(int32_t length0), + int32_t (*systemSystemSingleArray1Constructor1)(int32_t length0), float (*systemSingleArray1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*systemSingleArray1SetItem1)(int32_t thisHandle, int32_t index0, float item), - int32_t (*systemSingleArray2Constructor2)(int32_t length0, int32_t length1), - int32_t (*systemSingleArray2GetLength2)(int32_t thisHandle, int32_t dimension), + 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), int32_t (*systemSingleArray2SetItem2)(int32_t thisHandle, int32_t index0, int32_t index1, float item), - int32_t (*systemSingleArray3Constructor3)(int32_t length0, int32_t length1, int32_t length2), - int32_t (*systemSingleArray3GetLength3)(int32_t thisHandle, int32_t dimension), + 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), int32_t (*systemSingleArray3SetItem3)(int32_t thisHandle, int32_t index0, int32_t index1, int32_t index2, float item), - int32_t (*systemStringArray1Constructor1)(int32_t length0), + int32_t (*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 (*unityEngineResolutionArray1Constructor1)(int32_t length0), + int32_t (*unityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0), UnityEngine::Resolution (*unityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0), int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item), - int32_t (*unityEngineRaycastHitArray1Constructor1)(int32_t length0), + int32_t (*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 (*unityEngineGradientColorKeyArray1Constructor1)(int32_t length0), + 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), @@ -8038,30 +8196,30 @@ DLLEXPORT void Init( Plugin::UnboxSingle = unboxSingle; Plugin::BoxDouble = boxDouble; Plugin::UnboxDouble = unboxDouble; - Plugin::SystemInt32Array1Constructor1 = systemInt32Array1Constructor1; + Plugin::SystemSystemInt32Array1Constructor1 = systemSystemInt32Array1Constructor1; Plugin::SystemInt32Array1GetItem1 = systemInt32Array1GetItem1; Plugin::SystemInt32Array1SetItem1 = systemInt32Array1SetItem1; - Plugin::SystemSingleArray1Constructor1 = systemSingleArray1Constructor1; + Plugin::SystemSystemSingleArray1Constructor1 = systemSystemSingleArray1Constructor1; Plugin::SystemSingleArray1GetItem1 = systemSingleArray1GetItem1; Plugin::SystemSingleArray1SetItem1 = systemSingleArray1SetItem1; - Plugin::SystemSingleArray2Constructor2 = systemSingleArray2Constructor2; - Plugin::SystemSingleArray2GetLength2 = systemSingleArray2GetLength2; + Plugin::SystemSystemSingleArray2Constructor2 = systemSystemSingleArray2Constructor2; + Plugin::SystemSystemSingleArray2GetLength2 = systemSystemSingleArray2GetLength2; Plugin::SystemSingleArray2GetItem2 = systemSingleArray2GetItem2; Plugin::SystemSingleArray2SetItem2 = systemSingleArray2SetItem2; - Plugin::SystemSingleArray3Constructor3 = systemSingleArray3Constructor3; - Plugin::SystemSingleArray3GetLength3 = systemSingleArray3GetLength3; + Plugin::SystemSystemSingleArray3Constructor3 = systemSystemSingleArray3Constructor3; + Plugin::SystemSystemSingleArray3GetLength3 = systemSystemSingleArray3GetLength3; Plugin::SystemSingleArray3GetItem3 = systemSingleArray3GetItem3; Plugin::SystemSingleArray3SetItem3 = systemSingleArray3SetItem3; - Plugin::SystemStringArray1Constructor1 = systemStringArray1Constructor1; + Plugin::SystemSystemStringArray1Constructor1 = systemSystemStringArray1Constructor1; Plugin::SystemStringArray1GetItem1 = systemStringArray1GetItem1; Plugin::SystemStringArray1SetItem1 = systemStringArray1SetItem1; - Plugin::UnityEngineResolutionArray1Constructor1 = unityEngineResolutionArray1Constructor1; + Plugin::UnityEngineUnityEngineResolutionArray1Constructor1 = unityEngineUnityEngineResolutionArray1Constructor1; Plugin::UnityEngineResolutionArray1GetItem1 = unityEngineResolutionArray1GetItem1; Plugin::UnityEngineResolutionArray1SetItem1 = unityEngineResolutionArray1SetItem1; - Plugin::UnityEngineRaycastHitArray1Constructor1 = unityEngineRaycastHitArray1Constructor1; + Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1 = unityEngineUnityEngineRaycastHitArray1Constructor1; Plugin::UnityEngineRaycastHitArray1GetItem1 = unityEngineRaycastHitArray1GetItem1; Plugin::UnityEngineRaycastHitArray1SetItem1 = unityEngineRaycastHitArray1SetItem1; - Plugin::UnityEngineGradientColorKeyArray1Constructor1 = unityEngineGradientColorKeyArray1Constructor1; + Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1 = unityEngineUnityEngineGradientColorKeyArray1Constructor1; Plugin::UnityEngineGradientColorKeyArray1GetItem1 = unityEngineGradientColorKeyArray1GetItem1; Plugin::UnityEngineGradientColorKeyArray1SetItem1 = unityEngineGradientColorKeyArray1SetItem1; SystemActionFreeListSize = maxManagedObjects; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index f06394d..e7989fe 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -26,6 +26,26 @@ namespace Plugin { Only }; + + template struct ArrayElementProxy1_1; + + template struct ArrayElementProxy1_2; + template struct ArrayElementProxy2_2; + + template struct ArrayElementProxy1_3; + template struct ArrayElementProxy2_3; + template struct ArrayElementProxy3_3; + + template struct ArrayElementProxy1_4; + template struct ArrayElementProxy2_4; + template struct ArrayElementProxy3_4; + template struct ArrayElementProxy4_4; + + template struct ArrayElementProxy1_5; + template struct ArrayElementProxy2_5; + template struct ArrayElementProxy3_5; + template struct ArrayElementProxy4_5; + template struct ArrayElementProxy5_5; } //////////////////////////////////////////////////////////////// @@ -486,11 +506,46 @@ namespace MyGame } } +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; @@ -506,21 +561,41 @@ 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; @@ -1394,6 +1469,18 @@ namespace MyGame } } +namespace Plugin +{ + 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(); + }; +} + namespace System { template<> struct Array1 : System::Array @@ -1411,8 +1498,80 @@ namespace System Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); - int32_t GetItem(int32_t index0); - void SetItem(int32_t index0, int32_t item); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); + }; +} + +namespace Plugin +{ + 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(); + }; +} + +namespace Plugin +{ + 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); + }; +} + +namespace Plugin +{ + 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(); + }; +} + +namespace Plugin +{ + 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); + }; +} + +namespace Plugin +{ + 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); + }; +} + +namespace Plugin +{ + 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(); }; } @@ -1433,8 +1592,7 @@ namespace System Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); - float GetItem(int32_t index0); - void SetItem(int32_t index0, float item); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } @@ -1456,8 +1614,7 @@ namespace System int32_t GetLength(); int32_t GetLength(int32_t dimension); int32_t GetRank(); - float GetItem(int32_t index0, int32_t index1); - void SetItem(int32_t index0, int32_t index1, float item); + Plugin::ArrayElementProxy1_2 operator[](int32_t index); }; } @@ -1479,8 +1636,19 @@ namespace System int32_t GetLength(); int32_t GetLength(int32_t dimension); int32_t GetRank(); - float GetItem(int32_t index0, int32_t index1, int32_t index2); - void SetItem(int32_t index0, int32_t index1, int32_t index2, float item); + Plugin::ArrayElementProxy1_3 operator[](int32_t index); + }; +} + +namespace Plugin +{ + template<> struct ArrayElementProxy1_1 + { + int32_t Handle; + int32_t Index0; + ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + void operator=(System::String item); + operator System::String(); }; } @@ -1501,8 +1669,19 @@ namespace System Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); - System::String GetItem(int32_t index0); - void SetItem(int32_t index0, System::String item); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); + }; +} + +namespace Plugin +{ + template<> struct ArrayElementProxy1_1 + { + int32_t Handle; + int32_t Index0; + ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + void operator=(UnityEngine::Resolution item); + operator UnityEngine::Resolution(); }; } @@ -1523,8 +1702,19 @@ namespace System Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); - UnityEngine::Resolution GetItem(int32_t index0); - void SetItem(int32_t index0, UnityEngine::Resolution& item); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); + }; +} + +namespace Plugin +{ + template<> struct ArrayElementProxy1_1 + { + int32_t Handle; + int32_t Index0; + ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + void operator=(UnityEngine::RaycastHit item); + operator UnityEngine::RaycastHit(); }; } @@ -1545,8 +1735,19 @@ namespace System Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); - UnityEngine::RaycastHit GetItem(int32_t index0); - void SetItem(int32_t index0, UnityEngine::RaycastHit item); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); + }; +} + +namespace Plugin +{ + template<> struct ArrayElementProxy1_1 + { + int32_t Handle; + int32_t Index0; + ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0); + void operator=(UnityEngine::GradientColorKey item); + operator UnityEngine::GradientColorKey(); }; } @@ -1567,8 +1768,7 @@ namespace System Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); - UnityEngine::GradientColorKey GetItem(int32_t index0); - void SetItem(int32_t index0, UnityEngine::GradientColorKey& item); + Plugin::ArrayElementProxy1_1 operator[](int32_t index); }; } From 6657523369e69c6fd837b0b31364ae3ad1ee6e4a Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 12 Nov 2017 23:22:07 -0800 Subject: [PATCH 05/65] Support C++ classes that derive from C# classes and implement C# interfaces --- README.md | 4 +- Unity/Assets/NativeScript/Bindings.cs | 1722 ++++--- .../NativeScript/Editor/GenerateBindings.cs | 4222 ++++++++++------- Unity/Assets/NativeScriptTypes.json | 40 + Unity/CppSource/NativeScript/Bindings.cpp | 1570 +++++- Unity/CppSource/NativeScript/Bindings.h | 229 +- 6 files changed, 5222 insertions(+), 2565 deletions(-) diff --git a/README.md b/README.md index 55006c6..ad80b82 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ While IL2CPP transforms C# into C++ already, it generates a lot of overhead. The * Delegates * Events * Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`) + * Implementing C# interfaces and deriving from C# classes with C++ classes # Performance @@ -195,7 +196,8 @@ Note that the code generator does not support (yet): * `Array` methods (e.g. `IndexOf`) * `string` methods (e.g. `Substring`) * Default parameters -* Interfaces +* Overriding properties, events, and indexers +* Deriving from classes without a default constructor * `decimal` * C# pointers diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 242ca37..7822da0 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -327,6 +327,12 @@ delegate void InitDelegate( IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, IntPtr systemCollectionsGenericListSystemStringPropertySetItem, IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, + IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, + IntPtr systemCollectionsGenericListSystemInt32Constructor, + IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, + IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, + IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, + IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, IntPtr systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue, @@ -366,6 +372,14 @@ delegate void InitDelegate( IntPtr unboxScene, IntPtr boxLoadSceneMode, IntPtr unboxLoadSceneMode, + IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, + IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, + IntPtr releaseSystemCollectionsGenericIComparerSystemString, + IntPtr systemCollectionsGenericIComparerSystemStringConstructor, + IntPtr releaseSystemStringComparer, + IntPtr systemStringComparerConstructor, + IntPtr releaseSystemEventArgs, + IntPtr systemEventArgsConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -418,49 +432,67 @@ delegate void InitDelegate( IntPtr unityEngineGradientColorKeyArray1SetItem1, IntPtr releaseSystemAction, IntPtr systemActionConstructor, - IntPtr systemActionInvoke, IntPtr systemActionAdd, IntPtr systemActionRemove, + IntPtr systemActionInvoke, IntPtr releaseSystemActionSystemSingle, IntPtr systemActionSystemSingleConstructor, - IntPtr systemActionSystemSingleInvoke, IntPtr systemActionSystemSingleAdd, IntPtr systemActionSystemSingleRemove, + IntPtr systemActionSystemSingleInvoke, IntPtr releaseSystemActionSystemSingle_SystemSingle, IntPtr systemActionSystemSingle_SystemSingleConstructor, - IntPtr systemActionSystemSingle_SystemSingleInvoke, IntPtr systemActionSystemSingle_SystemSingleAdd, IntPtr systemActionSystemSingle_SystemSingleRemove, + IntPtr systemActionSystemSingle_SystemSingleInvoke, IntPtr releaseSystemFuncSystemInt32_SystemSingle_SystemDouble, IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke, IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleAdd, IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleRemove, + IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke, IntPtr releaseSystemFuncSystemInt16_SystemInt32_SystemString, IntPtr systemFuncSystemInt16_SystemInt32_SystemStringConstructor, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringInvoke, IntPtr systemFuncSystemInt16_SystemInt32_SystemStringAdd, IntPtr systemFuncSystemInt16_SystemInt32_SystemStringRemove, + IntPtr systemFuncSystemInt16_SystemInt32_SystemStringInvoke, IntPtr releaseSystemAppDomainInitializer, IntPtr systemAppDomainInitializerConstructor, - IntPtr systemAppDomainInitializerInvoke, IntPtr systemAppDomainInitializerAdd, IntPtr systemAppDomainInitializerRemove, + IntPtr systemAppDomainInitializerInvoke, IntPtr releaseUnityEngineEventsUnityAction, IntPtr unityEngineEventsUnityActionConstructor, - IntPtr unityEngineEventsUnityActionInvoke, IntPtr unityEngineEventsUnityActionAdd, IntPtr unityEngineEventsUnityActionRemove, + IntPtr unityEngineEventsUnityActionInvoke, IntPtr releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke /*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 SystemEventArgsToStringDelegate(int thisHandle); + public static SystemEventArgsToStringDelegate SystemEventArgsToString; + public delegate void MyGameMonoBehavioursTestScriptAwakeDelegate(int thisHandle); public static MyGameMonoBehavioursTestScriptAwakeDelegate MyGameMonoBehavioursTestScriptAwake; @@ -473,29 +505,29 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc public delegate void MyGameMonoBehavioursTestScriptUpdateDelegate(int thisHandle); public static MyGameMonoBehavioursTestScriptUpdateDelegate MyGameMonoBehavioursTestScriptUpdate; - public delegate void SystemActionCppInvokeDelegate(int thisHandle); - public static SystemActionCppInvokeDelegate SystemActionCppInvoke; + public delegate void SystemActionNativeInvokeDelegate(int thisHandle); + public static SystemActionNativeInvokeDelegate SystemActionNativeInvoke; - public delegate void SystemActionSystemSingleCppInvokeDelegate(int thisHandle, float param0); - public static SystemActionSystemSingleCppInvokeDelegate SystemActionSystemSingleCppInvoke; + public delegate void SystemActionSystemSingleNativeInvokeDelegate(int thisHandle, float param0); + public static SystemActionSystemSingleNativeInvokeDelegate SystemActionSystemSingleNativeInvoke; - public delegate void SystemActionSystemSingle_SystemSingleCppInvokeDelegate(int thisHandle, float param0, float param1); - public static SystemActionSystemSingle_SystemSingleCppInvokeDelegate SystemActionSystemSingle_SystemSingleCppInvoke; + public delegate void SystemActionSystemSingle_SystemSingleNativeInvokeDelegate(int thisHandle, float param0, float param1); + public static SystemActionSystemSingle_SystemSingleNativeInvokeDelegate SystemActionSystemSingle_SystemSingleNativeInvoke; - public delegate double SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvokeDelegate(int thisHandle, int param0, float param1); - public static SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvokeDelegate SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke; + 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_SystemStringCppInvokeDelegate(int thisHandle, short param0, int param1); - public static SystemFuncSystemInt16_SystemInt32_SystemStringCppInvokeDelegate SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke; + public delegate int SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvokeDelegate(int thisHandle, short param0, int param1); + public static SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvokeDelegate SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke; - public delegate void SystemAppDomainInitializerCppInvokeDelegate(int thisHandle, int param0); - public static SystemAppDomainInitializerCppInvokeDelegate SystemAppDomainInitializerCppInvoke; + public delegate void SystemAppDomainInitializerNativeInvokeDelegate(int thisHandle, int param0); + public static SystemAppDomainInitializerNativeInvokeDelegate SystemAppDomainInitializerNativeInvoke; - public delegate void UnityEngineEventsUnityActionCppInvokeDelegate(int thisHandle); - public static UnityEngineEventsUnityActionCppInvokeDelegate UnityEngineEventsUnityActionCppInvoke; + public delegate void UnityEngineEventsUnityActionNativeInvokeDelegate(int thisHandle); + public static UnityEngineEventsUnityActionNativeInvokeDelegate UnityEngineEventsUnityActionNativeInvoke; - public delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvokeDelegate(int thisHandle, UnityEngine.SceneManagement.Scene param0, UnityEngine.SceneManagement.LoadSceneMode param1); - public static UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvokeDelegate UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke; + public delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvokeDelegate(int thisHandle, UnityEngine.SceneManagement.Scene param0, UnityEngine.SceneManagement.LoadSceneMode param1); + public static UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvokeDelegate UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke; public delegate void SetCsharpExceptionSystemNullReferenceExceptionDelegate(int param0); public static SetCsharpExceptionSystemNullReferenceExceptionDelegate SetCsharpExceptionSystemNullReferenceException; @@ -651,6 +683,12 @@ static extern void Init( IntPtr systemCollectionsGenericListSystemStringPropertyGetItem, IntPtr systemCollectionsGenericListSystemStringPropertySetItem, IntPtr systemCollectionsGenericListSystemStringMethodAddSystemString, + IntPtr systemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer, + IntPtr systemCollectionsGenericListSystemInt32Constructor, + IntPtr systemCollectionsGenericListSystemInt32PropertyGetItem, + IntPtr systemCollectionsGenericListSystemInt32PropertySetItem, + IntPtr systemCollectionsGenericListSystemInt32MethodAddSystemInt32, + IntPtr systemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer, IntPtr systemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue, IntPtr systemCollectionsGenericLinkedListNodeSystemStringPropertySetValue, @@ -690,6 +728,14 @@ static extern void Init( IntPtr unboxScene, IntPtr boxLoadSceneMode, IntPtr unboxLoadSceneMode, + IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, + IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, + IntPtr releaseSystemCollectionsGenericIComparerSystemString, + IntPtr systemCollectionsGenericIComparerSystemStringConstructor, + IntPtr releaseSystemStringComparer, + IntPtr systemStringComparerConstructor, + IntPtr releaseSystemEventArgs, + IntPtr systemEventArgsConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -742,50 +788,68 @@ static extern void Init( IntPtr unityEngineGradientColorKeyArray1SetItem1, IntPtr releaseSystemAction, IntPtr systemActionConstructor, - IntPtr systemActionInvoke, IntPtr systemActionAdd, IntPtr systemActionRemove, + IntPtr systemActionInvoke, IntPtr releaseSystemActionSystemSingle, IntPtr systemActionSystemSingleConstructor, - IntPtr systemActionSystemSingleInvoke, IntPtr systemActionSystemSingleAdd, IntPtr systemActionSystemSingleRemove, + IntPtr systemActionSystemSingleInvoke, IntPtr releaseSystemActionSystemSingle_SystemSingle, IntPtr systemActionSystemSingle_SystemSingleConstructor, - IntPtr systemActionSystemSingle_SystemSingleInvoke, IntPtr systemActionSystemSingle_SystemSingleAdd, IntPtr systemActionSystemSingle_SystemSingleRemove, + IntPtr systemActionSystemSingle_SystemSingleInvoke, IntPtr releaseSystemFuncSystemInt32_SystemSingle_SystemDouble, IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor, - IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke, IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleAdd, IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleRemove, + IntPtr systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke, IntPtr releaseSystemFuncSystemInt16_SystemInt32_SystemString, IntPtr systemFuncSystemInt16_SystemInt32_SystemStringConstructor, - IntPtr systemFuncSystemInt16_SystemInt32_SystemStringInvoke, IntPtr systemFuncSystemInt16_SystemInt32_SystemStringAdd, IntPtr systemFuncSystemInt16_SystemInt32_SystemStringRemove, + IntPtr systemFuncSystemInt16_SystemInt32_SystemStringInvoke, IntPtr releaseSystemAppDomainInitializer, IntPtr systemAppDomainInitializerConstructor, - IntPtr systemAppDomainInitializerInvoke, IntPtr systemAppDomainInitializerAdd, IntPtr systemAppDomainInitializerRemove, + IntPtr systemAppDomainInitializerInvoke, IntPtr releaseUnityEngineEventsUnityAction, IntPtr unityEngineEventsUnityActionConstructor, - IntPtr unityEngineEventsUnityActionInvoke, IntPtr unityEngineEventsUnityActionAdd, IntPtr unityEngineEventsUnityActionRemove, + IntPtr unityEngineEventsUnityActionInvoke, IntPtr releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove, + IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke /*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 SystemEventArgsToString(int thisHandle); + [DllImport(Constants.PluginName)] public static extern void MyGameMonoBehavioursTestScriptAwake(int thisHandle); @@ -799,28 +863,28 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc public static extern void MyGameMonoBehavioursTestScriptUpdate(int thisHandle); [DllImport(Constants.PluginName)] - public static extern void SystemActionCppInvoke(int thisHandle); + public static extern void SystemActionNativeInvoke(int thisHandle); [DllImport(Constants.PluginName)] - public static extern void SystemActionSystemSingleCppInvoke(int thisHandle, int param0); + public static extern void SystemActionSystemSingleNativeInvoke(int thisHandle, int param0); [DllImport(Constants.PluginName)] - public static extern void SystemActionSystemSingle_SystemSingleCppInvoke(int thisHandle, int param0, int param1); + public static extern void SystemActionSystemSingle_SystemSingleNativeInvoke(int thisHandle, int param0, int param1); [DllImport(Constants.PluginName)] - public static extern void SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke(int thisHandle, int param0, int param1); + public static extern void SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(int thisHandle, int param0, int param1); [DllImport(Constants.PluginName)] - public static extern void SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke(int thisHandle, int param0, int param1); + public static extern void SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(int thisHandle, int param0, int param1); [DllImport(Constants.PluginName)] - public static extern void SystemAppDomainInitializerCppInvoke(int thisHandle, int param0); + public static extern void SystemAppDomainInitializerNativeInvoke(int thisHandle, int param0); [DllImport(Constants.PluginName)] - public static extern void UnityEngineEventsUnityActionCppInvoke(int thisHandle); + public static extern void UnityEngineEventsUnityActionNativeInvoke(int thisHandle); [DllImport(Constants.PluginName)] - public static extern void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke(int thisHandle, UnityEngine.SceneManagement.Scene param0, int param1); + public static extern void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int thisHandle, UnityEngine.SceneManagement.Scene param0, int param1); [DllImport(Constants.PluginName)] public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle, int param0); @@ -886,6 +950,12 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc 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); @@ -925,6 +995,14 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate UnityEngine.SceneManagement.Scene UnboxSceneDelegate(int valHandle); delegate int BoxLoadSceneModeDelegate(UnityEngine.SceneManagement.LoadSceneMode val); delegate UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneModeDelegate(int valHandle); + delegate void SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(int handle); + delegate void SystemCollectionsGenericIComparerSystemStringConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(int handle); + delegate void SystemStringComparerConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemStringComparerDelegate(int handle); + delegate void SystemEventArgsConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemEventArgsDelegate(int handle); delegate int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -975,44 +1053,44 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc 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 SystemActionInvokeDelegate(int thisHandle); 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 SystemActionSystemSingleInvokeDelegate(int thisHandle, float obj); 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_SystemSingleInvokeDelegate(int thisHandle, float arg1, float arg2); 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 double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate(int thisHandle, int arg1, float arg2); 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 int SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate(int thisHandle, short arg1, int arg2); 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 SystemAppDomainInitializerInvokeDelegate(int thisHandle, int argsHandle); 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 UnityEngineEventsUnityActionInvokeDelegate(int thisHandle); delegate void UnityEngineEventsUnityActionAddDelegate(int thisHandle, int delHandle); delegate void UnityEngineEventsUnityActionRemoveDelegate(int thisHandle, int delHandle); + delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, 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_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1); delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate(int thisHandle, int delHandle); delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(int thisHandle, int delHandle); /*END DELEGATE TYPES*/ @@ -1049,18 +1127,24 @@ public static void Open( 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"); + SystemEventArgsToString = GetDelegate(libraryHandle, "SystemEventArgsToString"); MyGameMonoBehavioursTestScriptAwake = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptAwake"); MyGameMonoBehavioursTestScriptOnAnimatorIK = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnAnimatorIK"); MyGameMonoBehavioursTestScriptOnCollisionEnter = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnCollisionEnter"); MyGameMonoBehavioursTestScriptUpdate = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptUpdate"); - SystemActionCppInvoke = GetDelegate(libraryHandle, "SystemActionCppInvoke"); - SystemActionSystemSingleCppInvoke = GetDelegate(libraryHandle, "SystemActionSystemSingleCppInvoke"); - SystemActionSystemSingle_SystemSingleCppInvoke = GetDelegate(libraryHandle, "SystemActionSystemSingle_SystemSingleCppInvoke"); - SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke = GetDelegate(libraryHandle, "SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke"); - SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke = GetDelegate(libraryHandle, "SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke"); - SystemAppDomainInitializerCppInvoke = GetDelegate(libraryHandle, "SystemAppDomainInitializerCppInvoke"); - UnityEngineEventsUnityActionCppInvoke = GetDelegate(libraryHandle, "UnityEngineEventsUnityActionCppInvoke"); - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke = GetDelegate(libraryHandle, "UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke"); + 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"); SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); /*END MONOBEHAVIOUR GETDELEGATE CALLS*/ @@ -1127,6 +1211,12 @@ public static void Open( 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)), @@ -1166,6 +1256,14 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnboxSceneDelegate(UnboxScene)), Marshal.GetFunctionPointerForDelegate(new BoxLoadSceneModeDelegate(BoxLoadSceneMode)), Marshal.GetFunctionPointerForDelegate(new UnboxLoadSceneModeDelegate(UnboxLoadSceneMode)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(ReleaseSystemCollectionsGenericIComparerSystemInt32)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(SystemCollectionsGenericIComparerSystemInt32Constructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(ReleaseSystemCollectionsGenericIComparerSystemString)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemStringConstructorDelegate(SystemCollectionsGenericIComparerSystemStringConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemStringComparerDelegate(ReleaseSystemStringComparer)), + Marshal.GetFunctionPointerForDelegate(new SystemStringComparerConstructorDelegate(SystemStringComparerConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemEventArgsDelegate(ReleaseSystemEventArgs)), + Marshal.GetFunctionPointerForDelegate(new SystemEventArgsConstructorDelegate(SystemEventArgsConstructor)), Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -1218,44 +1316,44 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientColorKeyArray1SetItem1Delegate(UnityEngineGradientColorKeyArray1SetItem1)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemActionDelegate(ReleaseSystemAction)), Marshal.GetFunctionPointerForDelegate(new SystemActionConstructorDelegate(SystemActionConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemActionInvokeDelegate(SystemActionInvoke)), 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 SystemActionSystemSingleInvokeDelegate(SystemActionSystemSingleInvoke)), 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_SystemSingleInvokeDelegate(SystemActionSystemSingle_SystemSingleInvoke)), 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_SystemDoubleInvokeDelegate(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)), 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_SystemStringInvokeDelegate(SystemFuncSystemInt16_SystemInt32_SystemStringInvoke)), 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 SystemAppDomainInitializerInvokeDelegate(SystemAppDomainInitializerInvoke)), 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 UnityEngineEventsUnityActionInvokeDelegate(UnityEngineEventsUnityActionInvoke)), 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_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)), Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)) + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)) /*END INIT CALL*/ ); if (UnhandledCppException != null) @@ -1317,117 +1415,487 @@ static int ArrayGetRank(int handle) return ((Array)ObjectStore.Get(handle)).Rank; } - /*BEGIN FUNCTIONS*/ - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] - static int SystemDiagnosticsStopwatchConstructor() + /*BEGIN BASE TYPES*/ + class SystemCollectionsGenericIComparerSystemInt32 : System.Collections.Generic.IComparer { - try - { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); - return returnValue; - } - catch (System.NullReferenceException ex) + public int CppHandle; + + public SystemCollectionsGenericIComparerSystemInt32(int cppHandle) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + CppHandle = cppHandle; } - catch (System.Exception ex) + + public int Compare(int x, int y) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(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); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] - static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) + class SystemCollectionsGenericIComparerSystemString : System.Collections.Generic.IComparer { - try - { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.ElapsedMilliseconds; - return returnValue; - } - catch (System.NullReferenceException ex) + public int CppHandle; + + public SystemCollectionsGenericIComparerSystemString(int cppHandle) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + CppHandle = cppHandle; } - catch (System.Exception ex) + + public int Compare(string x, string y) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + 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); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] - static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) + class SystemStringComparer : System.StringComparer { - try + public int CppHandle; + + public SystemStringComparer(int cppHandle) { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Start(); + CppHandle = cppHandle; } - catch (System.NullReferenceException ex) + + public override int Compare(string x, string y) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(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; + } + return default(int); } - catch (System.Exception ex) + public override bool Equals(string x, string y) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(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.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) + { + 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; + } + return default(int); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodResetDelegate))] - static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) + class SystemEventArgs : System.EventArgs { - try - { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Reset(); - } - catch (System.NullReferenceException ex) + public int CppHandle; + + public SystemEventArgs(int cppHandle) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + CppHandle = cppHandle; } - catch (System.Exception ex) + + public override string ToString() { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemEventArgsToString(thisHandle); + 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); } } - [MonoPInvokeCallback(typeof(UnityEngineObjectPropertyGetNameDelegate))] - static int UnityEngineObjectPropertyGetName(int thisHandle) + class SystemAction { - try - { - var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.name; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); - } - catch (System.NullReferenceException ex) + public int CppHandle; + public System.Action Delegate; + + public SystemAction(int cppHandle) { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + CppHandle = cppHandle; + Delegate = NativeInvoke; } - catch (System.Exception ex) + + public void NativeInvoke() { - UnityEngine.Debug.LogException(ex); - NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + 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; + } + } } } - [MonoPInvokeCallback(typeof(UnityEngineObjectPropertySetNameDelegate))] - static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) + 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; + NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(thisHandle, arg0, arg1); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + } + /*END BASE TYPES*/ + + /*BEGIN FUNCTIONS*/ + [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(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 { @@ -2254,13 +2722,127 @@ static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) + [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(SystemCollectionsGenericListSystemStringConstructorDelegate))] + static int SystemCollectionsGenericListSystemStringConstructor() { 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.ObjectStore.Store(new System.Collections.Generic.List()); return returnValue; } catch (System.NullReferenceException ex) @@ -2277,13 +2859,13 @@ static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstruc } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Key; + 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) @@ -2300,81 +2882,75 @@ static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleProperty } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] - static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Value; - 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(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) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] + static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) { try { - var val = (System.Collections.Generic.KeyValuePair)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); + 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(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) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] + static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store((System.Collections.Generic.KeyValuePair)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(SystemCollectionsGenericListSystemStringConstructorDelegate))] - static int SystemCollectionsGenericListSystemStringConstructor() + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] + static int SystemCollectionsGenericListSystemInt32Constructor() { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); return returnValue; } catch (System.NullReferenceException ex) @@ -2391,14 +2967,14 @@ static int SystemCollectionsGenericListSystemStringConstructor() } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); var returnValue = thiz[index]; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + return returnValue; } catch (System.NullReferenceException ex) { @@ -2414,13 +2990,12 @@ static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandl } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); thiz[index] = value; } catch (System.NullReferenceException ex) @@ -2435,13 +3010,12 @@ static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHand } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] - static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] + static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); thiz.Add(item); } catch (System.NullReferenceException ex) @@ -2456,6 +3030,27 @@ static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int th } } + [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(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) { @@ -2987,120 +3582,288 @@ static UnityEngine.GradientColorKey UnboxGradientColorKey(int valHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.GradientColorKey)val; - return returnValue; + 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(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)); - 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(UnityEngineGradientConstructorDelegate))] - static int UnityEngineGradientConstructor() + [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] + static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Gradient()); - return returnValue; + 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)); - 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(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] + static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.colorKeys; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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)); - 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) + [MonoPInvokeCallback(typeof(BoxSceneDelegate))] + static int BoxScene(ref UnityEngine.SceneManagement.Scene val) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.colorKeys = 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(SystemAppDomainSetupConstructorDelegate))] - static int SystemAppDomainSetupConstructor() + [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] + static UnityEngine.SceneManagement.Scene UnboxScene(int valHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.AppDomainSetup()); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (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); + return default(UnityEngine.SceneManagement.Scene); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.SceneManagement.Scene); } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate))] - static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) + [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] + static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) { try { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AppDomainInitializer; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3116,34 +3879,36 @@ static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertySetAppDomainInitializerDelegate))] - static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnboxLoadSceneModeDelegate))] + static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandle) { try { - var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.AppDomainInitializer = 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(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(UnityEngineApplicationAddEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] + static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; + var thiz = new SystemCollectionsGenericIComparerSystemInt32(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -3157,13 +3922,12 @@ static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineApplicationRemoveEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate))] + static void ReleaseSystemCollectionsGenericIComparerSystemInt32(int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -3177,13 +3941,13 @@ static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemStringConstructorDelegate))] + static void SystemCollectionsGenericIComparerSystemStringConstructor(int cppHandle, ref int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; + var thiz = new SystemCollectionsGenericIComparerSystemString(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -3197,13 +3961,12 @@ static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHan } } - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemStringDelegate))] + static void ReleaseSystemCollectionsGenericIComparerSystemString(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) { @@ -3217,93 +3980,81 @@ static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int del } } - [MonoPInvokeCallback(typeof(BoxSceneDelegate))] - static int BoxScene(ref UnityEngine.SceneManagement.Scene val) + [MonoPInvokeCallback(typeof(SystemStringComparerConstructorDelegate))] + static void SystemStringComparerConstructor(int cppHandle, ref int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = new SystemStringComparer(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); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] - static UnityEngine.SceneManagement.Scene UnboxScene(int valHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemStringComparerDelegate))] + static void ReleaseSystemStringComparer(int handle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.Scene)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(UnityEngine.SceneManagement.Scene); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.Scene); } } - [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] - static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) + [MonoPInvokeCallback(typeof(SystemEventArgsConstructorDelegate))] + static void SystemEventArgsConstructor(int cppHandle, ref int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = new SystemEventArgs(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); } 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) + [MonoPInvokeCallback(typeof(ReleaseSystemEventArgsDelegate))] + static void ReleaseSystemEventArgs(int handle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.LoadSceneMode)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(UnityEngine.SceneManagement.LoadSceneMode); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); } } @@ -4415,30 +5166,22 @@ static void UnityEngineGradientColorKeyArray1SetItem1(int thisHandle, int index0 } } - class SystemAction + [MonoPInvokeCallback(typeof(SystemActionInvokeDelegate))] + static void SystemActionInvoke(int thisHandle) { - public int CppHandle; - public System.Action Delegate; - - public SystemAction(int cppHandle) + try { - CppHandle = cppHandle; - Delegate = Invoke; + ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); } - - public void Invoke() + catch (System.NullReferenceException ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionCppInvoke(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw 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)); } } @@ -4448,8 +5191,7 @@ static void SystemActionConstructor(int cppHandle, ref int handle, ref int class try { var thiz = new SystemAction(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4487,12 +5229,14 @@ static void ReleaseSystemAction(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(SystemActionInvokeDelegate))] - static void SystemActionInvoke(int thisHandle) + [MonoPInvokeCallback(typeof(SystemActionAddDelegate))] + static void SystemActionAdd(int thisHandle, int delHandle) { try { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); + var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + thiz += del; } catch (System.NullReferenceException ex) { @@ -4506,14 +5250,14 @@ static void SystemActionInvoke(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemActionAddDelegate))] - static void SystemActionAdd(int thisHandle, int delHandle) + [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; + thiz -= del; } catch (System.NullReferenceException ex) { @@ -4527,14 +5271,12 @@ static void SystemActionAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemActionRemoveDelegate))] - static void SystemActionRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemActionSystemSingleInvokeDelegate))] + static void SystemActionSystemSingleInvoke(int thisHandle, float obj) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(obj); } catch (System.NullReferenceException ex) { @@ -4548,41 +5290,13 @@ static void SystemActionRemove(int thisHandle, int delHandle) } } - class SystemActionSystemSingle - { - public int CppHandle; - public System.Action Delegate; - - public SystemActionSystemSingle(int cppHandle) - { - CppHandle = cppHandle; - Delegate = Invoke; - } - - public void Invoke(float obj) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionSystemSingleCppInvoke(thisHandle, obj); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - [MonoPInvokeCallback(typeof(SystemActionSystemSingleConstructorDelegate))] static void SystemActionSystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) { try { var thiz = new SystemActionSystemSingle(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4620,25 +5334,6 @@ static void ReleaseSystemActionSystemSingle(int handle, int classHandle) } } - [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(SystemActionSystemSingleAddDelegate))] static void SystemActionSystemSingleAdd(int thisHandle, int delHandle) { @@ -4681,41 +5376,12 @@ static void SystemActionSystemSingleRemove(int thisHandle, int delHandle) } } - class SystemActionSystemSingle_SystemSingle - { - public int CppHandle; - public System.Action Delegate; - - public SystemActionSystemSingle_SystemSingle(int cppHandle) - { - CppHandle = cppHandle; - Delegate = Invoke; - } - - public void Invoke(float arg1, float arg2) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionSystemSingle_SystemSingleCppInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleConstructorDelegate))] - static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleInvokeDelegate))] + static void SystemActionSystemSingle_SystemSingleInvoke(int thisHandle, float arg1, float arg2) { try { - var thiz = new SystemActionSystemSingle_SystemSingle(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); } catch (System.NullReferenceException ex) { @@ -4729,17 +5395,13 @@ static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref } } - [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingle_SystemSingleDelegate))] - static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHandle) + [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleConstructorDelegate))] + static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - if (classHandle != 0) - { - var thiz = (SystemActionSystemSingle_SystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); - thiz.CppHandle = 0; - } - NativeScript.Bindings.ObjectStore.Remove(handle); + var thiz = new SystemActionSystemSingle_SystemSingle(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4753,12 +5415,17 @@ static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHa } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleInvokeDelegate))] - static void SystemActionSystemSingle_SystemSingleInvoke(int thisHandle, float arg1, float arg2) + [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingle_SystemSingleDelegate))] + static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHandle) { try { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + if (classHandle != 0) + { + var thiz = (SystemActionSystemSingle_SystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); + thiz.CppHandle = 0; + } + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -4814,31 +5481,24 @@ static void SystemActionSystemSingle_SystemSingleRemove(int thisHandle, int delH } } - class SystemFuncSystemInt32_SystemSingle_SystemDouble + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate))] + static double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(int thisHandle, int arg1, float arg2) { - public int CppHandle; - public System.Func Delegate; - - public SystemFuncSystemInt32_SystemSingle_SystemDouble(int cppHandle) + try { - CppHandle = cppHandle; - Delegate = Invoke; + var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + return returnValue; } - - public double Invoke(int arg1, float arg2) + catch (System.NullReferenceException ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke(thisHandle, arg1, arg2); - 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(double); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); return default(double); } } @@ -4849,8 +5509,7 @@ static void SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(int cppHa try { var thiz = new SystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4888,36 +5547,35 @@ static void ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(int handle, i } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate))] - static double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(int thisHandle, int arg1, float arg2) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate))] + static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, int delHandle) { try { - var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); - return returnValue; + 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(double); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(double); } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate))] + static void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(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; + thiz -= del; } catch (System.NullReferenceException ex) { @@ -4931,53 +5589,25 @@ static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, i } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate))] + static int SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(int thisHandle, short arg1, int arg2) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + 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)); - } - } - - class SystemFuncSystemInt16_SystemInt32_SystemString - { - public int CppHandle; - public System.Func Delegate; - - public SystemFuncSystemInt16_SystemInt32_SystemString(int cppHandle) - { - CppHandle = cppHandle; - Delegate = Invoke; - } - - public string Invoke(short arg1, int arg2) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke(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); + return default(int); } } @@ -4987,8 +5617,7 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(int cppHan try { var thiz = new SystemFuncSystemInt16_SystemInt32_SystemString(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -5026,36 +5655,35 @@ static void ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(int handle, in } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate))] - static int SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(int thisHandle, short arg1, int arg2) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate))] + static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, int delHandle) { try { - var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, int delHandle) + [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; + thiz -= del; } catch (System.NullReferenceException ex) { @@ -5069,14 +5697,13 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, in } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringRemoveDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerInvokeDelegate))] + static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + var args = (string[])NativeScript.Bindings.ObjectStore.Get(argsHandle); + ((System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle))(args); } catch (System.NullReferenceException ex) { @@ -5090,42 +5717,13 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringRemove(int thisHandle, } } - class SystemAppDomainInitializer - { - public int CppHandle; - public System.AppDomainInitializer Delegate; - - public SystemAppDomainInitializer(int cppHandle) - { - CppHandle = cppHandle; - Delegate = Invoke; - } - - public void Invoke(string[] args) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int argsHandle = NativeScript.Bindings.ObjectStore.GetHandle(args); - NativeScript.Bindings.SystemAppDomainInitializerCppInvoke(thisHandle, argsHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerConstructorDelegate))] static void SystemAppDomainInitializerConstructor(int cppHandle, ref int handle, ref int classHandle) { try { var thiz = new SystemAppDomainInitializer(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -5163,13 +5761,14 @@ static void ReleaseSystemAppDomainInitializer(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerInvokeDelegate))] - static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerAddDelegate))] + static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) { try { - var args = (string[])NativeScript.Bindings.ObjectStore.Get(argsHandle); - ((System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle))(args); + var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); + thiz += del; } catch (System.NullReferenceException ex) { @@ -5183,14 +5782,14 @@ static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerAddDelegate))] - static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerRemoveDelegate))] + static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) { try { var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + thiz -= del; } catch (System.NullReferenceException ex) { @@ -5204,14 +5803,12 @@ static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerRemoveDelegate))] - static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionInvokeDelegate))] + static void UnityEngineEventsUnityActionInvoke(int thisHandle) { try { - var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); } catch (System.NullReferenceException ex) { @@ -5225,41 +5822,13 @@ static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) } } - class UnityEngineEventsUnityAction - { - public int CppHandle; - public UnityEngine.Events.UnityAction Delegate; - - public UnityEngineEventsUnityAction(int cppHandle) - { - CppHandle = cppHandle; - Delegate = Invoke; - } - - public void Invoke() - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.UnityEngineEventsUnityActionCppInvoke(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionConstructorDelegate))] static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handle, ref int classHandle) { try { var thiz = new UnityEngineEventsUnityAction(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -5297,12 +5866,14 @@ static void ReleaseUnityEngineEventsUnityAction(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionInvokeDelegate))] - static void UnityEngineEventsUnityActionInvoke(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionAddDelegate))] + static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) { try { - ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + thiz += del; } catch (System.NullReferenceException ex) { @@ -5316,14 +5887,14 @@ static void UnityEngineEventsUnityActionInvoke(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionAddDelegate))] - static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionRemoveDelegate))] + static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) { try { var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz += del; + thiz -= del; } catch (System.NullReferenceException ex) { @@ -5337,14 +5908,12 @@ static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionRemoveDelegate))] - static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - thiz -= del; + ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); } catch (System.NullReferenceException ex) { @@ -5358,41 +5927,13 @@ static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) } } - class UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode - { - public int CppHandle; - public UnityEngine.Events.UnityAction Delegate; - - public UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int cppHandle) - { - CppHandle = cppHandle; - Delegate = Invoke; - } - - public void Invoke(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke(thisHandle, arg0, arg1); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate))] static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(int cppHandle, ref int handle, ref int classHandle) { try { var thiz = new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle); - classHandle = NativeScript.Bindings.ObjectStore.Store(thiz); - handle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -5430,25 +5971,6 @@ static void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_U } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) - { - try - { - ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); - } - 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(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate))] static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(int thisHandle, int delHandle) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 0ddb332..a7b5fc1 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -94,6 +94,15 @@ class JsonType public int MaxSimultaneous; } + [Serializable] + class JsonBaseType + { + public string Name; + public JsonGenericParams[] GenericParams; + public int MaxSimultaneous; + public JsonMethod[] OverrideMethods; + } + [Serializable] class JsonMonoBehaviour { @@ -121,6 +130,7 @@ class JsonDocument { public string[] Assemblies; public JsonType[] Types; + public JsonBaseType[] BaseTypes; public JsonMonoBehaviour[] MonoBehaviours; public JsonArray[] Arrays; public JsonDelegate[] Delegates; @@ -130,43 +140,45 @@ class JsonDocument class StringBuilders { - public StringBuilder CsharpInitParams = + public readonly StringBuilder CsharpInitParams = + new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CsharpDelegateTypes = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpDelegateTypes = + public readonly StringBuilder CsharpStructStoreInitCalls = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpStructStoreInitCalls = + public readonly StringBuilder CsharpInitCall = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpInitCall = + public readonly StringBuilder CsharpBaseTypes = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpFunctions = + public readonly StringBuilder CsharpFunctions = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpMonoBehaviours = + public readonly StringBuilder CsharpMonoBehaviours = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpDelegates = + public readonly StringBuilder CsharpDelegates = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpImports = + public readonly StringBuilder CsharpImports = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CsharpGetDelegateCalls = + public readonly StringBuilder CsharpGetDelegateCalls = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppFunctionPointers = + public readonly StringBuilder CppFunctionPointers = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppTypeDeclarations = + public readonly StringBuilder CppTypeDeclarations = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppTypeDefinitions = + public readonly StringBuilder CppTypeDefinitions = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppMethodDefinitions = + public readonly StringBuilder CppMethodDefinitions = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppInitParams = + public readonly StringBuilder CppInitParams = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppInitBody = + public readonly StringBuilder CppInitBody = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppMonoBehaviourMessages = + public readonly StringBuilder CppMonoBehaviourMessages = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppGlobalStateAndFunctions = + public readonly StringBuilder CppGlobalStateAndFunctions = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder CppBoxingMethodDeclarations = + public readonly StringBuilder CppBoxingMethodDeclarations = new StringBuilder(InitialStringBuilderCapacity); - public StringBuilder TempStrBuilder = + public readonly StringBuilder TempStrBuilder = new StringBuilder(InitialStringBuilderCapacity); } @@ -206,10 +218,7 @@ enum TypeKind Primitive, // A pointer to any type, either X*, IntPtr, or UIntPtr - Pointer, - - // The decimal type - Decimal + Pointer } // Compares by field declaration order @@ -231,8 +240,8 @@ int IComparer.Compare(object x, object y) class MessageInfo { - public string Name; - public Type[] ParameterTypes; + public readonly string Name; + public readonly Type[] ParameterTypes; public bool Selected; public MessageInfo( @@ -310,7 +319,7 @@ public MessageInfo( new MessageInfo("Update"), }; - private static readonly Type[] PRIMITIVE_TYPES = new [] { + private static readonly Type[] PRIMITIVE_TYPES = { typeof(bool), typeof(sbyte), typeof(byte), @@ -326,7 +335,6 @@ public MessageInfo( }; const string PostCompileWorkPref = "NativeScriptGenerateBindingsPostCompileWork"; - const string DryRunPref = "NativeScriptGenerateBindingsDryRun"; static readonly string DotNetDllsDirPath = new FileInfo( new Uri(typeof(string).Assembly.CodeBase).LocalPath @@ -365,87 +373,68 @@ static readonly FieldOrderComparer DefaultFieldOrderComparer [MenuItem("NativeScript/Generate Bindings #%g")] public static void Generate() - { - Generate(false); - } - - [MenuItem("NativeScript/Generate Bindings (dry run) #%&g")] - public static void GenerateDryRun() - { - Generate(true); - } - - static void Generate(bool dryRun) { EditorPrefs.DeleteKey(PostCompileWorkPref); - EditorPrefs.SetBool(DryRunPref, dryRun); - if (dryRun) - { - DoPostCompileWork(true); - } - else + JsonDocument doc = LoadJson(); + Assembly[] assemblies = GetAssemblies(doc.Assemblies); + + // 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 + bool needStubs = false; + foreach (JsonMonoBehaviour monoBehaviour in doc.MonoBehaviours) { - JsonDocument doc = LoadJson(); - Assembly[] assemblies = GetAssemblies(doc.Assemblies); + // Check if the MonoBehaviour type is already generated + Type type = TryGetType( + monoBehaviour.Name, + assemblies); + if (type == null) + { + needStubs = true; + break; + } - // 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 - bool needStubs = false; - foreach (JsonMonoBehaviour monoBehaviour in doc.MonoBehaviours) + // Check if all the messages are already generated + foreach (string message in monoBehaviour.Messages) { - // Check if the MonoBehaviour type is already generated - Type type = TryGetType( - monoBehaviour.Name, - assemblies); - if (type == null) + MethodInfo methodInfo = type.GetMethod(message); + if (methodInfo == null) { needStubs = true; - break; - } - - // Check if all the messages are already generated - foreach (string message in monoBehaviour.Messages) - { - MethodInfo methodInfo = type.GetMethod(message); - if (methodInfo == null) - { - needStubs = true; - goto determinedNeedStubs; - } + goto determinedNeedStubs; } } - determinedNeedStubs:; + } + determinedNeedStubs:; + + if (needStubs) + { + // We'll need to be able to get these via reflection later + StringBuilder csharpMonoBehaviours = new StringBuilder( + InitialStringBuilderCapacity); + string timestamp = DateTime.Now.ToLongTimeString(); + AppendStubMonoBehaviours( + doc.MonoBehaviours, + timestamp, + csharpMonoBehaviours); - if (needStubs) - { - // We'll need to be able to get these via reflection later - StringBuilder csharpMonoBehaviours = new StringBuilder( - InitialStringBuilderCapacity); - string timestamp = DateTime.Now.ToLongTimeString(); - AppendStubMonoBehaviours( - doc.MonoBehaviours, - timestamp, - csharpMonoBehaviours); - - // Inject - string csharpContents = File.ReadAllText(CsharpPath); - csharpContents = InjectIntoString( - csharpContents, - "/*BEGIN MONOBEHAVIOURS*/\n", - "\n/*END MONOBEHAVIOURS*/", - csharpMonoBehaviours.ToString()); - File.WriteAllText(CsharpPath, csharpContents); - - // Compile and continue after scripts are refreshed - Debug.Log("Waiting for compile..."); - AssetDatabase.Refresh(); - EditorPrefs.SetBool(PostCompileWorkPref, true); - } - else - { - DoPostCompileWork(true); - } + // Inject + string csharpContents = File.ReadAllText(CsharpPath); + csharpContents = InjectIntoString( + csharpContents, + "/*BEGIN MONOBEHAVIOURS*/\n", + "\n/*END MONOBEHAVIOURS*/", + csharpMonoBehaviours.ToString()); + File.WriteAllText(CsharpPath, csharpContents); + + // Compile and continue after scripts are refreshed + Debug.Log("Waiting for compile..."); + AssetDatabase.Refresh(); + EditorPrefs.SetBool(PostCompileWorkPref, true); + } + else + { + DoPostCompileWork(true); } } @@ -512,9 +501,6 @@ static void OnScriptsReloaded() static void DoPostCompileWork(bool canRefreshAssetDb) { - bool dryRun = EditorPrefs.GetBool(DryRunPref); - EditorPrefs.DeleteKey(DryRunPref); - DateTime beforeTime = DateTime.Now; JsonDocument doc = LoadJson(); @@ -522,14 +508,29 @@ static void DoPostCompileWork(bool canRefreshAssetDb) StringBuilders builders = new StringBuilders(); // Generate types - foreach (JsonType jsonType in doc.Types) + if (doc.Types != null) { - AppendType( - jsonType, - assemblies, - builders); + foreach (JsonType jsonType in doc.Types) + { + AppendType( + jsonType, + assemblies, + builders); + } } - + + // Generate base types + if (doc.BaseTypes != null) + { + foreach (JsonBaseType jsonBaseType in doc.BaseTypes) + { + AppendBaseType( + jsonBaseType, + assemblies, + builders); + } + } + // Generate boxing and unboxing for primitive types foreach (Type type in PRIMITIVE_TYPES) { @@ -537,7 +538,6 @@ static void DoPostCompileWork(bool canRefreshAssetDb) type, TypeKind.Primitive, null, - assemblies, builders); } @@ -584,29 +584,22 @@ static void DoPostCompileWork(bool canRefreshAssetDb) RemoveTrailingChars(builders); - if (dryRun) + InjectBuilders(builders); + if (canRefreshAssetDb) { - LogStringBuilders(builders); + AssetDatabase.Refresh(); + DateTime afterTime = DateTime.Now; + TimeSpan duration = afterTime - beforeTime; + Debug.LogFormat( + "Done generating bindings in {0} seconds.", + duration.TotalSeconds); } else { - InjectBuilders(builders); - if (canRefreshAssetDb) - { - AssetDatabase.Refresh(); - DateTime afterTime = DateTime.Now; - TimeSpan duration = afterTime - beforeTime; - Debug.LogFormat( - "Done generating bindings in {0} seconds.", - duration.TotalSeconds); - } - else - { - Debug.LogWarning( - "Can't auto-refresh due to a bug in Unity. " + - "Please manually refresh assets with " + - "Assets -> Refresh to finish generating bindings"); - } + Debug.LogWarning( + "Can't auto-refresh due to a bug in Unity. " + + "Please manually refresh assets with " + + "Assets -> Refresh to finish generating bindings"); } } @@ -999,7 +992,6 @@ static void AppendNamespace( { break; } - break; } output.Append( namespaceName, @@ -1180,13 +1172,11 @@ static void AppendType( { AppendEnum( type, - assemblies, builders); AppendBoxingUnboxing( type, typeKind, null, - assemblies, builders); } else @@ -1229,7 +1219,6 @@ static void AppendType( genericType, typeKind, typeParams, - assemblies, builders); } } @@ -1253,7 +1242,6 @@ static void AppendType( type, typeKind, null, - assemblies, builders); } } @@ -1269,14 +1257,6 @@ static void AppendType( Assembly[] assemblies, StringBuilders builders) { - builders.TempStrBuilder.Length = 0; - AppendTypeNameWithoutGenericSuffix( - type.Name, - builders.TempStrBuilder); - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string typeNameLower = builders.TempStrBuilder.ToString(); - bool isStatic = IsStatic(type); TypeKind typeKind = GetTypeKind(type); if (!isStatic && typeKind == TypeKind.ManagedStruct) @@ -1334,7 +1314,7 @@ static void AppendType( paramInfo.IsRef = false; paramInfo.DereferencedParameterType = typeof(int); paramInfo.Kind = TypeKind.Primitive; - ParameterInfo[] parameters = new[] { paramInfo }; + ParameterInfo[] parameters = { paramInfo }; // ReleaseX C# delegate type AppendCsharpDelegateType( @@ -1353,7 +1333,6 @@ static void AppendType( true, typeKind, typeof(void), - null, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append( @@ -1473,14 +1452,15 @@ static void AppendType( builders.CppTypeDeclarations); // C++ type definition (beginning) + Type baseType = type.BaseType ?? typeof(object); AppendCppTypeDefinitionBegin( type.Name, type.Namespace, typeKind, typeParams, - type.BaseType.Name, - type.BaseType.Namespace, - type.BaseType.GetGenericArguments(), + baseType.Name, + baseType.Namespace, + baseType.GetGenericArguments(), isStatic, indent, builders.CppTypeDefinitions); @@ -1491,9 +1471,9 @@ static void AppendType( type.Namespace, typeKind, typeParams, - type.BaseType.Name, - type.BaseType.Namespace, - type.BaseType.GetGenericArguments(), + baseType.Name, + baseType.Namespace, + baseType.GetGenericArguments(), isStatic, indent, builders.CppMethodDefinitions); @@ -1519,7 +1499,6 @@ static void AppendType( assemblies, typeParams, genericArgTypes, - typeNameLower, indent, builders); } @@ -1581,7 +1560,6 @@ static void AppendType( isStatic, typeKind, typeParams, - genericArgTypes, indent, builders ); @@ -1602,7 +1580,6 @@ static void AppendType( typeKind, methods, typeParams, - typeNameLower, genericArgTypes, indent, builders); @@ -1621,6 +1598,60 @@ static void AppendType( builders.CppMethodDefinitions); } + static void AppendBaseType( + JsonBaseType jsonBaseType, + Assembly[] assemblies, + StringBuilders builders) + { + Type type = GetType(jsonBaseType.Name, assemblies); + Type[] genericArgTypes = type.GetGenericArguments(); + if (jsonBaseType.GenericParams != null) + { + if (!IsStatic(type)) + { + AppendCppTemplateDeclaration( + type.Name, + type.Namespace, + genericArgTypes.Length, + builders.CppTypeDeclarations); + } + + foreach (JsonGenericParams jsonGenericParams + in jsonBaseType.GenericParams) + { + Type[] typeParams = GetTypes( + jsonGenericParams.Types, + assemblies); + Type genericType = type.MakeGenericType(typeParams); + int? maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 + ? jsonGenericParams.MaxSimultaneous + : jsonBaseType.MaxSimultaneous != 0 + ? jsonBaseType.MaxSimultaneous + : default(int?); + AppendBaseType( + genericType, + jsonBaseType, + type.Name, + typeParams, + maxSimultaneous, + builders); + } + } + else + { + int? maxSimultaneous = jsonBaseType.MaxSimultaneous != 0 + ? jsonBaseType.MaxSimultaneous + : default(int?); + AppendBaseType( + type, + jsonBaseType, + type.Name, + null, + maxSimultaneous, + builders); + } + } + static void AppendReleaseFunctionNameSuffix( string typeName, string typeNamespace, @@ -1656,7 +1687,6 @@ static void AppendReleaseFunctionNameSuffix( static void AppendEnum( Type type, - Assembly[] assemblies, StringBuilders builders) { // C++ type declaration (actually definition) @@ -1710,7 +1740,6 @@ static void AppendBoxingUnboxing( Type type, TypeKind typeKind, Type[] typeParams, - Assembly[] assemblies, StringBuilders builders) { builders.TempStrBuilder.Length = 0; @@ -1753,7 +1782,7 @@ static void AppendBoxingUnboxing( builders.TempStrBuilder.Append(unboxMethodDefinitionName); string unboxMethodDeclarationName = builders.TempStrBuilder.ToString(); - ParameterInfo[] boxParams = new [] { + ParameterInfo[] boxParams = { new ParameterInfo { Name = "val", @@ -1765,7 +1794,7 @@ static void AppendBoxingUnboxing( } }; - ParameterInfo[] unboxParams = new [] { + ParameterInfo[] unboxParams = { new ParameterInfo { Name = "val", @@ -1820,7 +1849,6 @@ static void AppendBoxingUnboxing( true, TypeKind.Class, typeof(object), - typeParams, boxParams, builders.CsharpFunctions); builders.CsharpFunctions.Append( @@ -1840,7 +1868,6 @@ static void AppendBoxingUnboxing( true, TypeKind.Class, type, - null, unboxParams, builders.CsharpFunctions); switch (typeKind) @@ -2088,7 +2115,6 @@ static void AppendConstructor( Assembly[] assemblies, Type[] enclosingTypeParams, Type[] genericArgTypes, - string typeNameLower, int indent, StringBuilders builders) { @@ -2184,7 +2210,6 @@ static void AppendConstructor( true, enclosingTypeKind, enclosingType, - null, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append("new "); @@ -2192,7 +2217,6 @@ static void AppendConstructor( enclosingType, builders.CsharpFunctions); AppendCsharpFunctionCallParameters( - true, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append(";"); @@ -2212,7 +2236,6 @@ static void AppendConstructor( true, enclosingTypeKind, typeof(int), - null, parameters, builders.CsharpFunctions); AppendHandleStoreTypeName( @@ -2224,7 +2247,6 @@ static void AppendConstructor( enclosingType, builders.CsharpFunctions); AppendCsharpFunctionCallParameters( - true, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append(");"); @@ -2382,7 +2404,7 @@ static void AppendProperty( if (jsonPropertyGet != null) { PropertyInfo property = null; - MethodInfo getMethod = null; + MethodInfo getMethod; if (jsonPropertyGet.ParamTypes != null) { PropertyInfo[] properties = enclosingType.GetProperties(); @@ -2414,9 +2436,19 @@ static void AppendProperty( else { property = enclosingType.GetProperty(jsonProperty.Name); - getMethod = property.GetGetMethod(); } + if (property == null) + { + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("Property '"); + builders.TempStrBuilder.Append(jsonProperty.Name); + builders.TempStrBuilder.Append("' not found on "); + builders.TempStrBuilder.Append(enclosingType); + throw new Exception(builders.TempStrBuilder.ToString()); + } + + getMethod = property.GetGetMethod(); if (getMethod != null) { Type propertyType = property.PropertyType; @@ -2452,7 +2484,6 @@ static void AppendProperty( if (jsonPropertySet != null) { PropertyInfo property = null; - MethodInfo setMethod = null; if (jsonPropertySet.ParamTypes != null) { PropertyInfo[] properties = enclosingType.GetProperties(); @@ -2465,7 +2496,7 @@ static void AppendProperty( } // Must have a set method - setMethod = curProperty.GetSetMethod(); + MethodInfo setMethod = curProperty.GetSetMethod(); if (setMethod == null) { continue; @@ -2484,7 +2515,16 @@ static void AppendProperty( else { property = enclosingType.GetProperty(jsonProperty.Name); - setMethod = property.GetSetMethod(); + } + + if (property == null) + { + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("Property '"); + builders.TempStrBuilder.Append(jsonProperty.Name); + builders.TempStrBuilder.Append("' not found on "); + builders.TempStrBuilder.Append(enclosingType); + throw new Exception(builders.TempStrBuilder.ToString()); } MethodInfo method = property.GetSetMethod(); @@ -2509,7 +2549,6 @@ static void AppendProperty( jsonPropertySet.IsReadOnly, enclosingType, typeParams, - property.PropertyType, indent, exceptionTypes, builders); @@ -2619,7 +2658,7 @@ static void AppendField( setParam.DereferencedParameterType = setParam.ParameterType; setParam.Kind = GetTypeKind( setParam.DereferencedParameterType); - ParameterInfo[] parameters = new []{ setParam }; + ParameterInfo[] parameters = { setParam }; AppendSetter( field.Name, "Field", @@ -2630,7 +2669,6 @@ static void AppendField( false, enclosingType, typeTypeParams, - fieldType, indent, exceptionTypes, builders); @@ -2642,7 +2680,6 @@ static void AppendEvent( bool enclosingTypeIsStatic, TypeKind enclosingTypeKind, Type[] typeTypeParams, - Type[] typeGenericArgumentTypes, int indent, StringBuilders builders) { @@ -2653,7 +2690,7 @@ static void AppendEvent( string uppercaseEventName = char.ToUpper(jsonEvent.Name[0]) + jsonEvent.Name.Substring(1); - ParameterInfo[] addRemoveParams = new ParameterInfo[] { + ParameterInfo[] addRemoveParams = { new ParameterInfo { Name = "del", ParameterType = eventType, @@ -2756,7 +2793,6 @@ static void AppendEventAddRemoveMethod( methodIsStatic, enclosingTypeKind, typeof(void), - typeTypeParams, methodParams, builders.CsharpFunctions); AppendCsharpFunctionCallSubject( @@ -2783,15 +2819,11 @@ static void AppendEventAddRemoveMethod( builders.CppFunctionPointers); // C++ method declaration - string cppMethodName; - bool cppMethodIsStatic; - ParameterInfo[] cppParameters; - ParameterInfo[] cppCallParameters; Type cppReturnType = typeof(void); - cppMethodName = methodName; - cppMethodIsStatic = methodIsStatic; - cppParameters = methodParams; - cppCallParameters = methodParams; + string cppMethodName = methodName; + bool cppMethodIsStatic = methodIsStatic; + ParameterInfo[] cppParameters = methodParams; + ParameterInfo[] cppCallParameters = methodParams; AppendIndent( indent + 1, builders.CppTypeDefinitions); @@ -2853,18 +2885,12 @@ static void AppendEventAddRemoveMethod( builders.CppInitBody); } - static void AppendMethod( + static MethodInfo GetMethod( JsonMethod jsonMethod, - Assembly[] assemblies, Type enclosingType, - bool enclosingTypeIsStatic, - TypeKind enclosingTypeKind, - MethodInfo[] methods, Type[] typeTypeParams, - string typeNameLower, Type[] genericArgTypes, - int indent, - StringBuilders builders) + MethodInfo[] methods) { // Map convenience method names to actual method names switch (jsonMethod.Name) @@ -2949,15 +2975,13 @@ static void AppendMethod( break; } - // Get the method - MethodInfo method; if (enclosingType.IsGenericType) { string[] overriddenParamTypeNames = OverrideGenericTypeNames( jsonMethod.ParamTypes, genericArgTypes, typeTypeParams); - method = GetMethod( + return GetMethod( enclosingType, methods, jsonMethod.Name, @@ -2965,12 +2989,32 @@ static void AppendMethod( } else { - method = GetMethod( + return GetMethod( enclosingType, methods, jsonMethod.Name, jsonMethod.ParamTypes); } + } + + static void AppendMethod( + JsonMethod jsonMethod, + Assembly[] assemblies, + Type enclosingType, + bool enclosingTypeIsStatic, + TypeKind enclosingTypeKind, + MethodInfo[] methods, + Type[] typeTypeParams, + Type[] genericArgTypes, + int indent, + StringBuilders builders) + { + MethodInfo method = GetMethod( + jsonMethod, + enclosingType, + typeTypeParams, + genericArgTypes, + methods); Type[] exceptionTypes = GetTypes( jsonMethod.Exceptions, @@ -2992,8 +3036,6 @@ static void AppendMethod( TypeKind returnTypeKind = GetTypeKind(returnType); AppendMethod( enclosingType, - assemblies, - typeNameLower, method.Name, enclosingTypeIsStatic, enclosingTypeKind, @@ -3017,8 +3059,6 @@ static void AppendMethod( TypeKind returnTypeKind = GetTypeKind(returnType); AppendMethod( enclosingType, - assemblies, - typeNameLower, method.Name, enclosingTypeIsStatic, enclosingTypeKind, @@ -3044,7 +3084,7 @@ static Type OverrideGenericType( { for (int i = 0, len = genericArgumentTypes.Length; i < len; ++i) { - if (genericType.Equals(genericArgumentTypes[i])) + if (genericType == genericArgumentTypes[i]) { return overrideTypes[i]; } @@ -3058,9 +3098,8 @@ static void OverrideGenericParameterTypes( Type[] typeGenericArgumentTypes, Type[] typeParams) { - for (int i = 0; i < parameters.Length; ++i) + foreach (ParameterInfo info in parameters) { - ParameterInfo info = parameters[i]; info.ParameterType = OverrideGenericType( info.ParameterType, typeGenericArgumentTypes, @@ -3078,11 +3117,11 @@ static string[] OverrideGenericTypeNames( for (int i = 0; i < numParams; ++i) { string typeName = typeNames[i]; - for (int j = 0; j < genericArgTypes.Length; ++j) + foreach (Type genericArgType in genericArgTypes) { if (CheckTypeNameMatches( typeName, - genericArgTypes[j])) + genericArgType)) { typeName = typeParams[i].FullName; break; @@ -3095,8 +3134,6 @@ static string[] OverrideGenericTypeNames( static void AppendMethod( Type enclosingType, - Assembly[] assemblies, - string typeNameLower, string methodName, bool enclosingTypeIsStatic, TypeKind enclosingTypeKind, @@ -3165,7 +3202,6 @@ static void AppendMethod( methodIsStatic, enclosingTypeKind, returnType, - methodTypeParams, parameters, builders.CsharpFunctions); if (methodName.StartsWith("op_")) @@ -3292,7 +3328,6 @@ static void AppendMethod( methodTypeParams, builders.CsharpFunctions); AppendCsharpFunctionCallParameters( - methodIsStatic, parameters, builders.CsharpFunctions); } @@ -3662,6 +3697,14 @@ static void AppendMonoBehaviour( 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; @@ -3726,8 +3769,6 @@ static void AppendMonoBehaviour( cppFunctionName, parameters, typeof(void), - type.Name, - type.Namespace, false, csharpIndent + 2, builders.CsharpMonoBehaviours); @@ -3883,17 +3924,14 @@ static void AppendCppFunctionCall( string funcName, ParameterInfo[] parameters, Type returnType, - string enclosingTypeName, - string enclosingTypeNamespace, bool enclosingTypeIsStatic, int indent, StringBuilder output) { - for (int i = 0; i < parameters.Length; ++i) + foreach (ParameterInfo param in parameters) { - ParameterInfo param = parameters[i]; if (param.Kind == TypeKind.Class - || param.Kind == TypeKind.ManagedStruct) + || param.Kind == TypeKind.ManagedStruct) { AppendIndent( indent, @@ -4001,7 +4039,7 @@ static void AppendArray( if (jsonArray.Ranks == null || jsonArray.Ranks.Length == 0) { - ranks = new int[]{ 1 }; + ranks = new[]{ 1 }; } else { @@ -4009,7 +4047,7 @@ static void AppendArray( } // C++ element proxy for [1-R] for all ranks R - Type[] cppTypeParams = new Type[]{ elementType }; + Type[] cppTypeParams = { elementType }; foreach (int rank in ranks) { // Build array name @@ -4019,31 +4057,15 @@ static void AppendArray( builders.TempStrBuilder); string cppArrayTypeName = builders.TempStrBuilder.ToString(); - // Build "TypeArray" name - builders.TempStrBuilder.Length = 0; - AppendBindingArrayTypeName( - elementType.Name, - elementType.Namespace, - cppArrayTypeName, - builders.TempStrBuilder); - string bindingArrayTypeName = builders.TempStrBuilder.ToString(); - - // GetItem params - ParameterInfo[] getItemParams = BuildArrayGetItemsParams( - rank, - "index"); - for (int i = 1; i <= rank; ++i) { AppendArrayElementProxy( elementType, elementTypeKind, - bindingArrayTypeName, i, rank, cppTypeParams, cppArrayTypeName, - getItemParams, builders); } } @@ -4176,8 +4198,6 @@ static void AppendArray( arrayType, cppArrayTypeName, rank, - bindingArrayTypeName, - indent, builders); AppendArraySetItem( @@ -4185,8 +4205,6 @@ static void AppendArray( arrayType, cppArrayTypeName, rank, - bindingArrayTypeName, - indent, builders); // C++ operator[] method declaration @@ -4410,12 +4428,10 @@ static void AppendArraySetItemFuncName( static void AppendArrayElementProxy( Type elementType, TypeKind elementTypeKind, - string bindingArrayTypeName, int rank, int maxRank, Type[] cppTypeParams, string cppArrayTypeName, - ParameterInfo[] getItemParams, StringBuilders builders) { // Build element proxy name @@ -4776,7 +4792,6 @@ static void AppendArrayConstructor( true, TypeKind.Class, arrayType, - null, parameters, builders.CsharpFunctions); AppendHandleStoreTypeName( @@ -4848,7 +4863,7 @@ static void AppendArrayConstructor( builders.CppTypeDefinitions); // C++ method definition - Type[] cppTypeParams = new Type[] { elementType }; + Type[] cppTypeParams = { elementType }; AppendCppMethodDefinitionBegin( cppArrayTypeName, null, @@ -4994,7 +5009,7 @@ static void AppendArrayGetLength( builders.TempStrBuilder[0]); string funcNameLower = builders.TempStrBuilder.ToString(); - ParameterInfo[] parameters = new ParameterInfo[] { + ParameterInfo[] parameters = { new ParameterInfo { Name = "dimension", ParameterType = typeof(int), @@ -5032,7 +5047,6 @@ static void AppendArrayGetLength( false, TypeKind.Class, typeof(int), - null, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append( @@ -5088,7 +5102,7 @@ static void AppendArrayGetLength( builders.CppTypeDefinitions); // C++ method definition - Type[] cppTypeParams = new Type[] { elementType }; + Type[] cppTypeParams = { elementType }; AppendCppMethodDefinitionBegin( cppArrayTypeName, typeof(int), @@ -5128,8 +5142,6 @@ static void AppendArrayGetItem( Type arrayType, string cppArrayTypeName, int rank, - string csharpTypeName, - int indent, StringBuilders builders) { builders.TempStrBuilder.Length = 0; @@ -5176,7 +5188,6 @@ static void AppendArrayGetItem( false, TypeKind.Class, elementType, - null, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append("thiz["); @@ -5232,8 +5243,6 @@ static void AppendArraySetItem( Type arrayType, string cppArrayTypeName, int rank, - string csharpTypeName, - int indent, StringBuilders builders) { builders.TempStrBuilder.Length = 0; @@ -5282,7 +5291,6 @@ static void AppendArraySetItem( false, TypeKind.Class, typeof(void), - null, parameters, builders.CsharpFunctions); builders.CsharpFunctions.Append("thiz["); @@ -5391,11 +5399,8 @@ static void AppendDelegate( AppendDelegate( genericType, numberedTypeName, - jsonDelegate, - genericArgTypes, typeParams, maxSimultaneous, - assemblies, builders); } } @@ -5407,11 +5412,8 @@ static void AppendDelegate( AppendDelegate( type, type.Name, - jsonDelegate, - genericArgTypes, null, maxSimultaneous, - assemblies, builders); } } @@ -5419,11 +5421,8 @@ static void AppendDelegate( static void AppendDelegate( Type type, string numberedTypeName, - JsonDelegate jsonDelegate, - Type[] genericArgTypes, Type[] typeParams, int? maxSimultaneous, - Assembly[] assemblies, StringBuilders builders) { builders.TempStrBuilder.Length = 0; @@ -5457,15 +5456,6 @@ static void AppendDelegate( builders.TempStrBuilder[0]); string constructorFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append(typeName); - builders.TempStrBuilder.Append("Invoke"); - string invokeFuncName = builders.TempStrBuilder.ToString(); - - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string invokeFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(typeName); builders.TempStrBuilder.Append("Add"); @@ -5484,36 +5474,15 @@ static void AppendDelegate( builders.TempStrBuilder[0]); string removeFuncNameLower = builders.TempStrBuilder.ToString(); - builders.TempStrBuilder.Length = 0; - AppendCsharpDelegateName( - type.Name, + // C++ type declaration + int indent = AppendCppTypeDeclaration( type.Namespace, + numberedTypeName, + false, typeParams, - "CppInvoke", - builders.TempStrBuilder); - string cppInvokeFuncName = builders.TempStrBuilder.ToString(); - - MethodInfo invokeMethod = type.GetMethod("Invoke"); - TypeKind invokeReturnTypeKind = GetTypeKind( - invokeMethod.ReturnType); - ParameterInfo[] invokeParams = ConvertParameters( - invokeMethod.GetParameters()); - ParameterInfo[] invokeParamsWithThis = new ParameterInfo[ - invokeParams.Length + 1]; - for (int i = 0; i < invokeParams.Length; ++i) - { - invokeParamsWithThis[i+1] = invokeParams[i]; - } - invokeParamsWithThis[0] = new ParameterInfo { - Name = "thisHandle", - ParameterType = typeof(int), - DereferencedParameterType = typeof(int), - IsOut = false, - IsRef = false, - Kind = TypeKind.Primitive - }; + builders.CppTypeDeclarations); - ParameterInfo[] addRemoveParams = new ParameterInfo[] { + ParameterInfo[] addRemoveParams = { new ParameterInfo { Name = "del", @@ -5525,7 +5494,7 @@ static void AppendDelegate( IsVirtual = true }}; - ParameterInfo[] releaseParams = new ParameterInfo[] { + ParameterInfo[] releaseParams = { new ParameterInfo { Name = "handle", @@ -5545,7 +5514,7 @@ static void AppendDelegate( Kind = TypeKind.Primitive }}; - ParameterInfo[] constructorParams = new ParameterInfo[] { + ParameterInfo[] constructorParams = { new ParameterInfo { Name = "cppHandle", @@ -5574,150 +5543,17 @@ static void AppendDelegate( Kind = TypeKind.Primitive }}; - // Free list state and functions - builders.CppGlobalStateAndFunctions.Append("\tint32_t "); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("FreeListSize;\n"); - builders.CppGlobalStateAndFunctions.Append('\t'); - AppendCppTypeName( + AppendCppFreeListStateAndFunctions( type, + typeName, builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("** "); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("FreeList;\n"); - builders.CppGlobalStateAndFunctions.Append('\t'); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("** NextFree"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append(";\n"); - builders.CppGlobalStateAndFunctions.Append("\t\n"); - builders.CppGlobalStateAndFunctions.Append("\tint32_t Store"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append('('); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("* del)\n"); - builders.CppGlobalStateAndFunctions.Append("\t{\n"); - builders.CppGlobalStateAndFunctions.Append("\t\tassert(NextFree"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append(" != nullptr);\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t"); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("** pNext = NextFree"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append(";\n"); - builders.CppGlobalStateAndFunctions.Append("\t\tNextFree"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append(" = ("); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("**)*pNext;\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t*pNext = del;\n"); - builders.CppGlobalStateAndFunctions.Append("\t\treturn (int32_t)(pNext - "); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("FreeList);\n"); - builders.CppGlobalStateAndFunctions.Append("\t}\n"); - builders.CppGlobalStateAndFunctions.Append("\t\n"); - builders.CppGlobalStateAndFunctions.Append('\t'); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("* Get"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("(int32_t handle)\n"); - builders.CppGlobalStateAndFunctions.Append("\t{\n"); - builders.CppGlobalStateAndFunctions.Append("\t\tassert(handle >= 0 && handle < "); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("FreeListSize);\n"); - builders.CppGlobalStateAndFunctions.Append("\t\treturn "); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("FreeList[handle];\n"); - builders.CppGlobalStateAndFunctions.Append("\t}\n"); - builders.CppGlobalStateAndFunctions.Append("\t\n"); - builders.CppGlobalStateAndFunctions.Append("\tvoid Remove"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("(int32_t handle)\n"); - builders.CppGlobalStateAndFunctions.Append("\t{\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t"); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("** pRelease = "); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append("FreeList + handle;\n"); - builders.CppGlobalStateAndFunctions.Append("\t\t*pRelease = ("); - AppendCppTypeName( - type, - builders.CppGlobalStateAndFunctions); - builders.CppGlobalStateAndFunctions.Append("*)NextFree"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append(";\n"); - builders.CppGlobalStateAndFunctions.Append("\t\tNextFree"); - builders.CppGlobalStateAndFunctions.Append(typeName); - builders.CppGlobalStateAndFunctions.Append(" = pRelease;\n"); - builders.CppGlobalStateAndFunctions.Append("\t}\n"); - - // Free list init - builders.CppInitBody.Append('\t'); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeListSize = "); - if (maxSimultaneous.HasValue) - { - builders.CppInitBody.Append(maxSimultaneous); - } - else - { - builders.CppInitBody.Append("maxManagedObjects"); - } - builders.CppInitBody.Append(";\n"); - builders.CppInitBody.Append("\t"); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeList = new "); - AppendCppTypeName( - type, - builders.CppInitBody); - builders.CppInitBody.Append("*["); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeListSize];\n"); - builders.CppInitBody.Append("\tfor (int32_t i = 0, end = "); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeListSize - 1; i < end; ++i)\n"); - builders.CppInitBody.Append("\t{\n"); - builders.CppInitBody.Append("\t "); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeList[i] = ("); - AppendCppTypeName( + + AppendCppFreeListInit( type, + maxSimultaneous, + typeName, builders.CppInitBody); - builders.CppInitBody.Append("*)("); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeList + i + 1);\n"); - builders.CppInitBody.Append("\t}\n"); - builders.CppInitBody.Append('\t'); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeList["); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeListSize - 1] = nullptr;\n"); - builders.CppInitBody.Append("\tNextFree"); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append(" = "); - builders.CppInitBody.Append(typeName); - builders.CppInitBody.Append("FreeList + 1;\n"); - - // C++ type declaration - int indent = AppendCppTypeDeclaration( - type.Namespace, - numberedTypeName, - false, - typeParams, - builders.CppTypeDeclarations); - + // C++ type definition (begin) AppendCppTypeDefinitionBegin( numberedTypeName, @@ -5757,30 +5593,6 @@ static void AppendDelegate( AppendIndent( indent + 1, builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - "Invoke", - false, - false, - false, - invokeMethod.ReturnType, - null, - invokeParams, - builders.CppTypeDefinitions); - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - "operator()", - false, - true, - false, - invokeMethod.ReturnType, - null, - invokeParams, - builders.CppTypeDefinitions); - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); AppendCppMethodDeclaration( "operator+=", false, @@ -5822,15 +5634,6 @@ static void AppendDelegate( constructorParams, typeof(void), builders.CppFunctionPointers); - AppendCppFunctionPointerDefinition( - invokeFuncName, - false, - null, - null, - TypeKind.None, - invokeParams, - invokeMethod.ReturnType, - builders.CppFunctionPointers); AppendCppFunctionPointerDefinition( addFuncName, false, @@ -5869,15 +5672,6 @@ static void AppendDelegate( constructorParams, typeof(void), builders.CppInitParams); - AppendCppInitParam( - invokeFuncNameLower, - false, - null, - null, - TypeKind.None, - invokeParams, - invokeMethod.ReturnType, - builders.CppInitParams); AppendCppInitParam( addFuncNameLower, false, @@ -5897,7 +5691,7 @@ static void AppendDelegate( typeof(void), builders.CppInitParams); - // C++ init body + // C++ and C# init params AppendCppInitBody( releaseFuncName, releaseFuncNameLower, @@ -5906,10 +5700,6 @@ static void AppendDelegate( constructorFuncName, constructorFuncNameLower, builders.CppInitBody); - AppendCppInitBody( - invokeFuncName, - invokeFuncNameLower, - builders.CppInitBody); AppendCppInitBody( addFuncName, addFuncNameLower, @@ -5918,1418 +5708,2494 @@ static void AppendDelegate( removeFuncName, removeFuncNameLower, builders.CppInitBody); + AppendCsharpInitParam( + releaseFuncNameLower, + builders.CsharpInitParams); + AppendCsharpInitParam( + constructorFuncNameLower, + builders.CsharpInitParams); + AppendCsharpInitParam( + addFuncNameLower, + builders.CsharpInitParams); + AppendCsharpInitParam( + removeFuncNameLower, + builders.CsharpInitParams); + AppendCsharpInitCallArg( + releaseFuncName, + builders.CsharpInitCall); + AppendCsharpInitCallArg( + constructorFuncName, + builders.CsharpInitCall); + AppendCsharpInitCallArg( + addFuncName, + builders.CsharpInitCall); + AppendCsharpInitCallArg( + removeFuncName, + builders.CsharpInitCall); // C++ method definitions (end) int cppMethodDefinitionsIndent = AppendNamespaceBeginning( type.Namespace, builders.CppMethodDefinitions); - // C++ default constructor - AppendCppMethodDefinitionBegin( - numberedTypeName, - null, + AppendCppBaseTypeDefaultConstructor( + typeName, numberedTypeName, typeParams, - null, - new ParameterInfo[0], + true, + constructorFuncName, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(" : System::Object(nullptr)\n"); - AppendIndent( + + AppendCppBaseTypeNullptrConstructor( + typeName, + numberedTypeName, + typeParams, + true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeCopyConstructor( + typeName, + numberedTypeName, + typeParams, + true, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(this);\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeMoveConstructor( + numberedTypeName, + typeParams, + true, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::"); - builders.CppMethodDefinitions.Append(constructorFuncName); - builders.CppMethodDefinitions.Append("(CppHandle, &Handle, &ClassHandle);\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeHandleConstructor( + typeName, + numberedTypeName, + typeParams, + true, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (Handle)\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeDestructor( + typeName, + numberedTypeName, + typeParams, + true, + releaseFuncName, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, + + AppendCppBaseTypeAssignmentOperatorSameType( + type, + numberedTypeName, + typeParams, + true, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Plugin::ReferenceManagedClass(Handle);\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeAssignmentOperatorNullptr( + numberedTypeName, + typeParams, + true, + releaseFuncName, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeMoveAssignmentOperator( + typeName, + numberedTypeName, + typeParams, + true, + releaseFuncName, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("else\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, + + AppendCppBaseTypeEqualityOperator( + numberedTypeName, + typeParams, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, + + AppendCppBaseTypeInequalityOperator( + numberedTypeName, + typeParams, + cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::Remove"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(CppHandle);\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, + + // C++ add + AppendCppMethodDefinitionBegin( + numberedTypeName, + typeof(void), + "operator+=", + typeParams, + null, + addRemoveParams, + indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); AppendIndent( - cppMethodDefinitionsIndent + 2, + indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = 0;\n"); + builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent + 1, + indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + builders.CppMethodDefinitions.Append("Plugin::"); + builders.CppMethodDefinitions.Append(addFuncName); + builders.CppMethodDefinitions.Append("(Handle, del.Handle);\n"); AppendCppUnhandledExceptionHandling( - cppMethodDefinitionsIndent + 1, + indent + 1, builders.CppMethodDefinitions); AppendIndent( - cppMethodDefinitionsIndent, + indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); AppendIndent( - cppMethodDefinitionsIndent, + indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); + builders.CppMethodDefinitions.Append("\n"); - // Construct with nullptr_t - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - AppendTypeNameWithoutGenericSuffix( + // C++ remove + AppendCppMethodDefinitionBegin( numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( + typeof(void), + "operator-=", typeParams, + null, + addRemoveParams, + indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::"); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(std::nullptr_t n)\n"); - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "\t: System::Object(Plugin::InternalUse::Only, 0)\n"); AppendIndent( - cppMethodDefinitionsIndent, + indent, builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent + 1, + indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(this);\n"); + builders.CppMethodDefinitions.Append("Plugin::"); + builders.CppMethodDefinitions.Append(removeFuncName); + builders.CppMethodDefinitions.Append("(Handle, del.Handle);\n"); + AppendCppUnhandledExceptionHandling( + indent + 1, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("\n"); + + // C# GetDelegate call + AppendCsharpGetDelegateCall( + type.Name, + type.Namespace, + typeParams, + "NativeInvoke", + builders.CsharpGetDelegateCalls); + + // C# class (beginning) + builders.CsharpBaseTypes.Append("\t\tclass "); + builders.CsharpBaseTypes.Append(typeName); + builders.CsharpBaseTypes.Append("\n"); + builders.CsharpBaseTypes.Append("\t\t{\n"); + + // C# class fields + builders.CsharpBaseTypes.Append("\t\t\tpublic int CppHandle;\n"); + builders.CsharpBaseTypes.Append("\t\t\tpublic "); + AppendCsharpTypeName( + type, + builders.CsharpBaseTypes); + builders.CsharpBaseTypes.Append(" Delegate;\n"); + builders.CsharpBaseTypes.Append("\t\t\t\n"); + + // C# class constructor + builders.CsharpBaseTypes.Append("\t\t\tpublic "); + builders.CsharpBaseTypes.Append(typeName); + 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"); + + // operator() is how C# forwards the delegate invocation to C++ + AppendBaseTypeCppMethodCall( + type, + typeName, + numberedTypeName, + typeParams, + type.GetMethod("Invoke"), + "NativeInvoke", + "operator()", + false, + indent, + builders); + + // C# class (ending) + builders.CsharpBaseTypes.Append("\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); + + // Invoke() is how C++ invokes the delegate + MethodInfo invokeMethod = type.GetMethod("Invoke"); + AppendBaseTypeMethodCallsCsharpMethod( + type, + typeName, + numberedTypeName, + typeParams, + invokeMethod, + "Invoke", + null, + indent, + builders); + + // C# constructor delegate type + AppendCsharpDelegateType( + constructorFuncName, + true, + type, + TypeKind.Class, + typeof(void), + constructorParams, + builders.CsharpDelegateTypes); + + AppendCsharpBaseTypeConstructorFunction( + type, + typeName, + false, + constructorFuncName, + constructorParams, + builders.CsharpFunctions); + + // C# release delegate type + AppendCsharpDelegateType( + releaseFuncName, + true, + type, + TypeKind.Class, + typeof(void), + releaseParams, + builders.CsharpDelegateTypes); + + AppendCsharpBaseTypeReleaseFunction( + type, + typeName, + true, + releaseFuncName, + releaseParams, + builders.CsharpFunctions); + + // C# add delegate type + AppendCsharpDelegateType( + addFuncName, + false, + type, + TypeKind.Class, + typeof(void), + addRemoveParams, + builders.CsharpDelegateTypes); + + // C# add function + AppendCsharpFunctionBeginning( + type, + addFuncName, + false, + TypeKind.Class, + typeof(void), + addRemoveParams, + builders.CsharpFunctions); + builders.CsharpFunctions.Append("thiz += del;"); + AppendCsharpFunctionReturn( + addRemoveParams, + typeof(void), + TypeKind.Class, + null, + false, + builders.CsharpFunctions); + + // C# remove delegate type + AppendCsharpDelegateType( + removeFuncName, + false, + type, + TypeKind.Class, + typeof(void), + addRemoveParams, + builders.CsharpDelegateTypes); + + // C# remove function + AppendCsharpFunctionBeginning( + type, + removeFuncName, + false, + TypeKind.Class, + typeof(void), + addRemoveParams, + builders.CsharpFunctions); + builders.CsharpFunctions.Append("thiz -= del;"); + AppendCsharpFunctionReturn( + addRemoveParams, + typeof(void), + TypeKind.Class, + null, + false, + builders.CsharpFunctions); + + // C++ method definitions (end) + AppendCppMethodDefinitionsEnd( + indent, + builders.CppMethodDefinitions); + + // C++ type definition (end) + AppendCppTypeDefinitionEnd( + false, + indent, + builders.CppTypeDefinitions); + } + + static void AppendBaseType( + Type type, + JsonBaseType jsonBaseType, + string numberedTypeName, + Type[] typeParams, + int? maxSimultaneous, + StringBuilders builders) + { + builders.TempStrBuilder.Length = 0; + AppendNamespace( + type.Namespace, + string.Empty, + builders.TempStrBuilder); + AppendTypeNameWithoutSuffixes( + type.Name, + builders.TempStrBuilder); + AppendTypeNames( + typeParams, + builders.TempStrBuilder); + string typeName = builders.TempStrBuilder.ToString(); + + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append("Release"); + builders.TempStrBuilder.Append(typeName); + 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(typeName); + builders.TempStrBuilder.Append("Constructor"); + string constructorFuncName = builders.TempStrBuilder.ToString(); + + builders.TempStrBuilder[0] = char.ToLower( + builders.TempStrBuilder[0]); + string constructorFuncNameLower = builders.TempStrBuilder.ToString(); + + // C++ type declaration + int indent = AppendCppTypeDeclaration( + type.Namespace, + numberedTypeName, + false, + typeParams, + builders.CppTypeDeclarations); + + ParameterInfo[] releaseParams = { + new ParameterInfo + { + Name = "handle", + ParameterType = typeof(int), + DereferencedParameterType = typeof(int), + IsOut = false, + IsRef = false, + Kind = TypeKind.Primitive + }}; + + ParameterInfo[] constructorParams = { + new ParameterInfo + { + Name = "cppHandle", + ParameterType = typeof(int), + DereferencedParameterType = typeof(int), + IsOut = false, + IsRef = false, + Kind = TypeKind.Primitive + }, + new ParameterInfo + { + Name = "handle", + ParameterType = typeof(int), + DereferencedParameterType = typeof(int), + IsOut = true, + IsRef = false, + Kind = TypeKind.Primitive + }}; + + AppendCppFreeListStateAndFunctions( + type, + typeName, + builders.CppGlobalStateAndFunctions); + + AppendCppFreeListInit( + type, + maxSimultaneous, + typeName, + builders.CppInitBody); + + // C++ type definition (begin) + AppendCppTypeDefinitionBegin( + numberedTypeName, + type.Namespace, + TypeKind.Class, + typeParams, + "Object", + "System", + null, + false, + indent, + builders.CppTypeDefinitions); + + // C++ type fields + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append("int32_t CppHandle;\n"); + + // C++ method declarations + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + numberedTypeName, + false, + false, + false, + null, + null, + new ParameterInfo[0], + builders.CppTypeDefinitions); + + // C++ function pointers + AppendCppFunctionPointerDefinition( + releaseFuncName, + true, + null, + null, + TypeKind.None, + releaseParams, + typeof(void), + builders.CppFunctionPointers); + AppendCppFunctionPointerDefinition( + constructorFuncName, + true, + null, + null, + TypeKind.None, + constructorParams, + typeof(void), + builders.CppFunctionPointers); + + // C++ init params + AppendCppInitParam( + releaseFuncNameLower, + true, + null, + null, + TypeKind.None, + releaseParams, + typeof(void), + builders.CppInitParams); + AppendCppInitParam( + constructorFuncNameLower, + true, + null, + null, + TypeKind.None, + constructorParams, + typeof(void), + builders.CppInitParams); + + // C++ and C# init params + AppendCppInitBody( + releaseFuncName, + releaseFuncNameLower, + builders.CppInitBody); + AppendCppInitBody( + constructorFuncName, + constructorFuncNameLower, + builders.CppInitBody); + AppendCsharpInitParam( + releaseFuncNameLower, + builders.CsharpInitParams); + AppendCsharpInitParam( + constructorFuncNameLower, + builders.CsharpInitParams); + AppendCsharpInitCallArg( + releaseFuncName, + builders.CsharpInitCall); + AppendCsharpInitCallArg( + constructorFuncName, + builders.CsharpInitCall); + + // C++ method definitions (end) + int cppMethodDefinitionsIndent = AppendNamespaceBeginning( + type.Namespace, + builders.CppMethodDefinitions); + + AppendCppBaseTypeDefaultConstructor( + typeName, + numberedTypeName, + typeParams, + false, + constructorFuncName, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeNullptrConstructor( + typeName, + numberedTypeName, + typeParams, + false, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeCopyConstructor( + typeName, + numberedTypeName, + typeParams, + false, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeMoveConstructor( + numberedTypeName, + typeParams, + false, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeHandleConstructor( + typeName, + numberedTypeName, + typeParams, + false, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeDestructor( + typeName, + numberedTypeName, + typeParams, + false, + releaseFuncName, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeAssignmentOperatorSameType( + type, + numberedTypeName, + typeParams, + false, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeAssignmentOperatorNullptr( + numberedTypeName, + typeParams, + false, + releaseFuncName, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeMoveAssignmentOperator( + typeName, + numberedTypeName, + typeParams, + false, + releaseFuncName, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeEqualityOperator( + numberedTypeName, + typeParams, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + AppendCppBaseTypeInequalityOperator( + numberedTypeName, + typeParams, + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + + // C# class (beginning) + builders.CsharpBaseTypes.Append("\t\tclass "); + builders.CsharpBaseTypes.Append(typeName); + if (jsonBaseType != null) + { + builders.CsharpBaseTypes.Append(" : "); + AppendCsharpTypeName( + type, + builders.CsharpBaseTypes); + } + builders.CsharpBaseTypes.Append("\n"); + builders.CsharpBaseTypes.Append("\t\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\t\tpublic "); + builders.CsharpBaseTypes.Append(typeName); + 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}\n"); + builders.CsharpBaseTypes.Append("\t\t\t\n"); + + // C# constructor delegate type + AppendCsharpDelegateType( + constructorFuncName, + true, + type, + TypeKind.Class, + typeof(void), + constructorParams, + builders.CsharpDelegateTypes); + + AppendCsharpBaseTypeConstructorFunction( + type, + typeName, + false, + constructorFuncName, + constructorParams, + builders.CsharpFunctions); + + // C# release delegate type + AppendCsharpDelegateType( + releaseFuncName, + true, + type, + TypeKind.Class, + typeof(void), + releaseParams, + builders.CsharpDelegateTypes); + + AppendCsharpBaseTypeReleaseFunction( + type, + typeName, + false, + releaseFuncName, + releaseParams, + builders.CsharpFunctions); + + // All abstract methods + foreach (MethodInfo methodInfo in type.GetMethods()) + { + if (methodInfo.IsAbstract) + { + AppendBaseTypeNativeMethod( + type, + typeName, + typeParams, + numberedTypeName, + methodInfo, + indent, + builders); + } + } + + // Specified virtual methods + if (jsonBaseType.OverrideMethods != null) + { + MethodInfo[] methods = type.GetMethods(); + Type[] genericArgTypes = type.GetGenericArguments(); + foreach (JsonMethod jsonMethod in jsonBaseType.OverrideMethods) + { + MethodInfo methodInfo = GetMethod( + jsonMethod, + type, + typeParams, + genericArgTypes, + methods); + AppendBaseTypeNativeMethod( + type, + typeName, + typeParams, + numberedTypeName, + methodInfo, + indent, + builders); + } + } + + // C# class (ending) + builders.CsharpBaseTypes.Append("\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\n"); + + // C++ method definitions (end) + AppendCppMethodDefinitionsEnd( + indent, + builders.CppMethodDefinitions); + + // C++ type definition (end) + AppendCppTypeDefinitionEnd( + false, + indent, + builders.CppTypeDefinitions); + } + + static void AppendBaseTypeNativeMethod( + Type type, + string typeName, + Type[] typeParams, + string cppTypeName, + MethodInfo methodInfo, + int indent, + StringBuilders builders) + { + AppendCsharpGetDelegateCall( + type.Name, + type.Namespace, + typeParams, + methodInfo.Name, + builders.CsharpGetDelegateCalls); + + AppendBaseTypeCppMethodCall( + type, + typeName, + cppTypeName, + typeParams, + methodInfo, + methodInfo.Name, + methodInfo.Name, + !type.IsInterface, + indent, + builders); + } + + static void AppendBaseTypeMethodCallsCsharpMethod( + Type type, + string typeName, + string cppTypeName, + Type[] typeParams, + MethodInfo methodInfo, + string methodName, + string csharpMethodName, + int indent, + StringBuilders builders) + { + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append(typeName); + 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()); + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + methodName, + false, + false, + false, + methodInfo.ReturnType, + null, + invokeParams, + builders.CppTypeDefinitions); + + // C++ function pointer for the C# binding function + AppendCppFunctionPointerDefinition( + funcName, + false, + null, + null, + TypeKind.None, + invokeParams, + methodInfo.ReturnType, + builders.CppFunctionPointers); + + // C++ and C# Init parameter and body for the C# binding function + AppendCppInitParam( + funcNameLower, + false, + null, + null, + TypeKind.None, + invokeParams, + methodInfo.ReturnType, + builders.CppInitParams); + AppendCppInitBody( + funcName, + funcNameLower, + builders.CppInitBody); + AppendCsharpInitParam( + funcNameLower, + builders.CsharpInitParams); + AppendCsharpInitCallArg( + funcName, + builders.CsharpInitCall); + + // C++ method definition for the method + TypeKind returnTypeKind = GetTypeKind( + methodInfo.ReturnType); + AppendCppMethodDefinitionBegin( + cppTypeName, + methodInfo.ReturnType, + methodName, + typeParams, + null, + invokeParams, + indent, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendCppPluginFunctionCall( + false, + type.Name, + type.Namespace, + TypeKind.Class, + typeParams, + methodInfo.ReturnType, + funcName, + invokeParams, + indent + 1, + builders.CppMethodDefinitions); + AppendCppMethodReturn( + methodInfo.ReturnType, + returnTypeKind, + indent + 1, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // C# delegate type for the binding function that C++ calls + ParameterInfo[] invokeParamsWithThis = new ParameterInfo[ + invokeParams.Length + 1]; + for (int i = 0; i < invokeParams.Length; ++i) + { + invokeParamsWithThis[i+1] = invokeParams[i]; + } + invokeParamsWithThis[0] = new ParameterInfo { + Name = "thisHandle", + ParameterType = typeof(int), + DereferencedParameterType = typeof(int), + IsOut = false, + IsRef = false, + Kind = TypeKind.Primitive + }; + AppendCsharpDelegateType( + funcName, + true, + type, + TypeKind.Class, + methodInfo.ReturnType, + invokeParamsWithThis, + builders.CsharpDelegateTypes); + + // C# binding function that C++ calls to invoke the method + AppendCsharpFunctionBeginning( + type, + funcName, + true, + TypeKind.Class, + methodInfo.ReturnType, + invokeParamsWithThis, + builders.CsharpFunctions); + builders.CsharpFunctions.Append("(("); + AppendCsharpTypeName( + type, + builders.CsharpFunctions); + builders.CsharpFunctions.Append( + ")NativeScript.Bindings.ObjectStore.Get(thisHandle))"); + if (csharpMethodName != null) + { + builders.CsharpFunctions.Append('.'); + builders.CsharpFunctions.Append(csharpMethodName); + } + AppendCsharpFunctionCallParameters( + invokeParams, + builders.CsharpFunctions); + builders.CsharpFunctions.Append(';'); + AppendCsharpFunctionReturn( + invokeParams, + methodInfo.ReturnType, + returnTypeKind, + null, + false, + builders.CsharpFunctions); + } + + static void AppendBaseTypeCppMethodCall( + Type type, + string typeName, + string numberedTypeName, + Type[] typeParams, + MethodInfo invokeMethod, + string funcName, + string methodName, + bool isOverride, + int indent, + StringBuilders builders) + { + // Build the name of the C++ binding function that C# calls + builders.TempStrBuilder.Length = 0; + AppendNamespace( + type.Namespace, + string.Empty, + builders.TempStrBuilder); + AppendTypeNameWithoutSuffixes( + type.Name, + builders.TempStrBuilder); + AppendTypeNames( + typeParams, + builders.TempStrBuilder); + builders.TempStrBuilder.Append(funcName); + string nativeInvokeFuncName = builders.TempStrBuilder.ToString(); + + // C++ method declaration + ParameterInfo[] invokeParams = ConvertParameters( + invokeMethod.GetParameters()); + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + methodName, + false, + true, + false, + invokeMethod.ReturnType, + null, + invokeParams, + builders.CppTypeDefinitions); + + // C++ method definition. This is a no-op that game code overrides. + AppendCppMethodDefinitionBegin( + numberedTypeName, + invokeMethod.ReturnType, + methodName, + typeParams, + null, + invokeParams, + indent, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + if (invokeMethod.ReturnType != typeof(void)) + { + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return {};\n"); + } AppendIndent( - cppMethodDefinitionsIndent + 1, + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + + // C++ binding function that C# calls. Calls the C++ method. + TypeKind invokeReturnTypeKind = GetTypeKind( + invokeMethod.ReturnType); + AppendCppBaseTypeMethodInvokeBindingFunction( + funcName, + type, + typeParams, + invokeMethod, + methodName, + invokeReturnTypeKind, + invokeParams, + indent, + typeName, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + + // C# method that calls the C++ binding function + ParameterInfo[] invokeParamsWithThis = new ParameterInfo[ + invokeParams.Length + 1]; + for (int i = 0; i < invokeParams.Length; ++i) + { + invokeParamsWithThis[i+1] = invokeParams[i]; + } + invokeParamsWithThis[0] = new ParameterInfo { + Name = "thisHandle", + ParameterType = typeof(int), + DereferencedParameterType = typeof(int), + IsOut = false, + IsRef = false, + Kind = TypeKind.Primitive + }; + AppendCsharpBaseTypeCppMethodCallMethod( + isOverride, + invokeMethod, + funcName, + invokeParams, + nativeInvokeFuncName, + invokeParamsWithThis, + invokeReturnTypeKind, + builders.CsharpBaseTypes); + + // C# delegate for the C++ binding function + AppendCsharpDelegate( + false, + type.Name, + type.Namespace, + typeParams, + funcName, + invokeParams, + invokeMethod.ReturnType, + invokeReturnTypeKind, + builders.CsharpDelegates); + + // C# import for the C++ binding function + AppendCsharpImport( + type.Name, + type.Namespace, + typeParams, + funcName, + invokeParams, + builders.CsharpImports); + } + + static void AppendCsharpBaseTypeReleaseFunction( + Type type, + string typeName, + bool typeIsDelegate, + string releaseFuncName, + ParameterInfo[] releaseParams, + StringBuilder output) + { + AppendCsharpFunctionBeginning( + type, + releaseFuncName, + true, + TypeKind.Class, + typeof(void), + releaseParams, + output); + if (typeIsDelegate) + { + output.Append("if (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.CppHandle = 0;\n"); + output.Append("\t\t\t\t}\n"); + output.Append("\t\t\t\t"); + } + output.Append( + "NativeScript.Bindings.ObjectStore.Remove(handle);"); + AppendCsharpFunctionReturn( + releaseParams, + typeof(void), + TypeKind.Class, + null, + true, + output); + } + + static void AppendCsharpBaseTypeCppMethodCallMethod( + bool isOverride, + MethodInfo invokeMethod, + string funcName, + ParameterInfo[] invokeParams, + string nativeInvokeFuncName, + ParameterInfo[] invokeParamsWithThis, + TypeKind invokeReturnTypeKind, + StringBuilder output) + { + output.Append("\t\t\tpublic "); + if (isOverride) + { + output.Append("override "); + } + AppendCsharpTypeName( + invokeMethod.ReturnType, + output); + output.Append(" "); + output.Append(funcName); + output.Append("("); + for (int i = 0; i < invokeParams.Length; ++i) + { + ParameterInfo param = invokeParams[i]; + AppendCsharpTypeName( + param.ParameterType, + output); + output.Append(' '); + output.Append(param.Name); + if (i != invokeParams.Length - 1) + { + output.Append(", "); + } + } + output.Append(")\n"); + output.Append("\t\t\t{\n"); + output.Append("\t\t\t\tif (CppHandle != 0)\n"); + output.Append("\t\t\t\t{\n"); + output.Append("\t\t\t\t\tint thisHandle = CppHandle;\n"); + AppendCppFunctionCall( + nativeInvokeFuncName, + invokeParamsWithThis, + invokeMethod.ReturnType, + true, + 5, + output); + if (invokeMethod.ReturnType != typeof(void)) + { + output.Append("\t\t\t\t\treturn "); + switch (invokeReturnTypeKind) + { + case TypeKind.Class: + case TypeKind.ManagedStruct: + if (invokeMethod.ReturnType != typeof(object)) + { + output.Append('('); + AppendCsharpTypeName( + invokeMethod.ReturnType, + output); + output.Append(')'); + } + AppendHandleStoreTypeName( + invokeMethod.ReturnType, + output); + output.Append(".Get(returnVal);\n"); + break; + default: + output.Append("returnVal;\n"); + break; + } + } + output.Append("\t\t\t\t}\n"); + if (invokeMethod.ReturnType != typeof(void)) + { + output.Append("\t\t\t\treturn default("); + AppendCsharpTypeName( + invokeMethod.ReturnType, + output); + output.Append(");\n"); + } + output.Append("\t\t\t}\n"); + } + + private static void AppendCsharpBaseTypeConstructorFunction( + Type type, + string typeName, + bool typeIsDelegate, + string constructorFuncName, + ParameterInfo[] constructorParams, + StringBuilder output) + { + AppendCsharpFunctionBeginning( + type, + constructorFuncName, + true, + TypeKind.Class, + typeof(void), + constructorParams, + output); + output.Append("var thiz = new "); + output.Append(typeName); + output.Append("(cppHandle);\n"); + if (typeIsDelegate) + { + output.Append( + "\t\t\t\tclassHandle = NativeScript.Bindings.ObjectStore.Store(thiz);\n"); + output.Append( + "\t\t\t\thandle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate);"); + } + else + { + output.Append( + "\t\t\t\thandle = NativeScript.Bindings.ObjectStore.Store(thiz);"); + } + AppendCsharpFunctionReturn( + constructorParams, + typeof(void), + TypeKind.Class, + null, + true, + output); + } + + static void AppendCppBaseTypeMethodInvokeBindingFunction( + string funcName, + Type type, + Type[] typeParams, + MethodInfo method, + string methodName, + TypeKind methodReturnTypeKind, + ParameterInfo[] methodParams, + int indent, + string typeName, + StringBuilder output) + { + AppendIndent( + indent, + output); + output.Append("DLLEXPORT "); + if (method.ReturnType == typeof(void)) + { + output.Append("void"); + } + else + { + switch (methodReturnTypeKind) + { + case TypeKind.Class: + case TypeKind.ManagedStruct: + output.Append("int32_t"); + break; + default: + AppendCppTypeName( + method.ReturnType, + output); + break; + } + } + output.Append(' '); + AppendCsharpDelegateName( + type.Name, + type.Namespace, + typeParams, + funcName, + output); + output.Append("(int32_t cppHandle"); + if (methodParams.Length > 0) + { + output.Append(", "); + } + for (int i = 0; i < methodParams.Length; ++i) + { + ParameterInfo param = methodParams[i]; + switch (param.Kind) + { + case TypeKind.Class: + case TypeKind.ManagedStruct: + output.Append("int32_t "); + output.Append(param.Name); + output.Append("Handle"); + break; + default: + AppendCppTypeName( + param.ParameterType, + output); + output.Append(' '); + output.Append(param.Name); + break; + } + if (i != methodParams.Length - 1) + { + output.Append(", "); + } + } + output.Append(")\n"); + AppendIndent( + indent, + output); + output.Append("{\n"); + AppendIndent( + indent + 1, + output); + output.Append("try\n"); + AppendIndent( + indent + 1, + output); + output.Append("{\n"); + AppendIndent( + indent + 2, + output); + if (method.ReturnType != typeof(void)) + { + output.Append("return "); + } + output.Append("Plugin::Get"); + output.Append(typeName); + output.Append("(cppHandle)->"); + output.Append(methodName); + output.Append("("); + for (int i = 0; i < methodParams.Length; ++i) + { + ParameterInfo parameter = methodParams[i]; + if (parameter.Kind == TypeKind.Class || + parameter.Kind == TypeKind.ManagedStruct) + { + AppendCppTypeName( + parameter.ParameterType, + output); + output.Append("(Plugin::InternalUse::Only, "); + output.Append(parameter.Name); + output.Append("Handle)"); + } + else + { + output.Append(parameter.Name); + } + if (i != methodParams.Length - 1) + { + output.Append(", "); + } + } + output.Append(")"); + if ( + method.ReturnType != typeof(void) && + (methodReturnTypeKind == TypeKind.Class || + methodReturnTypeKind == TypeKind.ManagedStruct)) + { + output.Append(".Handle"); + } + output.Append(";\n"); AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + indent + 1, + output); + output.Append("}\n"); AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Copy constructor + indent + 1, + output); + output.Append( + "catch (System::Exception ex)\n"); AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::"); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(const "); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& other)\n"); + indent + 1, + output); + output.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); + indent + 2, + output); + output.Append( + "Plugin::SetException(ex.Handle);\n"); + if (method.ReturnType != typeof(void)) + { + AppendIndent( + indent + 2, + output); + output.Append( + "return {};\n"); + } AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + indent + 1, + output); + output.Append("}\n"); AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(this);\n"); + indent + 1, + output); + output.Append("catch (...)\n"); AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (Handle)\n"); + indent + 1, + output); + output.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + indent + 2, + output); + output.Append( + "System::String msg = \"Unhandled exception invoking "); + AppendCppTypeName( + type, + output); + output.Append("\";\n"); AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Plugin::ReferenceManagedClass(Handle);\n"); + indent + 2, + output); + output.Append( + "System::Exception ex(msg);\n"); AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + indent + 2, + output); + output.Append( + "Plugin::SetException(ex.Handle);\n"); + if (method.ReturnType != typeof(void)) + { + AppendIndent( + indent + 2, + output); + output.Append( + "return {};\n"); + } AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "ClassHandle = other.ClassHandle;\n"); + indent + 1, + output); + output.Append("}\n"); AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + indent, + output); + output.Append("}\n"); AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Move constructor + indent, + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeInequalityOperator( + string numberedTypeName, + Type[] typeParams, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); + output); + output.Append("bool "); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::"); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("("); + output); + output.Append("::operator!=(const "); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("&& other)\n"); - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); + output); + output.Append("& other) const\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "CppHandle = other.CppHandle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "ClassHandle = other.ClassHandle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("other.Handle = 0;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("other.CppHandle = 0;\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("other.ClassHandle = 0;\n"); + output); + output.Append( + "return Handle != other.Handle;\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Handle constructor + output); + output.Append('\n'); + } + + static void AppendCppBaseTypeEqualityOperator( + string numberedTypeName, + Type[] typeParams, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); + output); + output.Append("bool "); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::"); + output); + output.Append("::operator==(const "); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "(Plugin::InternalUse iu, int32_t handle)\n"); - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "\t: System::Object(iu, handle)\n"); + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("& other) const\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = Plugin::Store"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(this);\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (Handle)\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Plugin::ReferenceManagedClass(Handle);\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "ClassHandle = 0;\n"); + output); + output.Append( + "return Handle == other.Handle;\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Destructor + output); + output.Append('\n'); + } + + static void AppendCppBaseTypeMoveAssignmentOperator( + string typeName, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + string releaseFuncName, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); + output); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::~"); + output); + output.Append("& "); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("()\n"); + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("::operator=("); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("&& other)\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::Remove"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(CppHandle);\n"); + output); + output.Append("Plugin::Remove"); + output.Append(typeName); + output.Append("(CppHandle);\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = 0;\n"); + output); + output.Append("CppHandle = 0;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (Handle)\n"); + output); + output.Append("if (Handle)\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t handle = Handle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t classHandle = ClassHandle;\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = 0;\n"); + output); + output.Append("int32_t handle = Handle;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("int32_t classHandle = ClassHandle;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + output); + output.Append("Handle = 0;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("ClassHandle = 0;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( + output); + output.Append( "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 3, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::"); - builders.CppMethodDefinitions.Append(releaseFuncName); - builders.CppMethodDefinitions.Append("(handle, classHandle);\n"); + output); + output.Append("Plugin::"); + output.Append(releaseFuncName); + output.Append("(handle"); + if (typeIsDelegate) + { + output.Append(", classHandle"); + } + output.Append(");\n"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 3, - builders.CppMethodDefinitions); + output); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Assignment operator to same type - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& "); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::operator=(const "); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& other)\n"); + output); + output.Append("}\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append( + "ClassHandle = other.ClassHandle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("other.ClassHandle = 0;\n"); + } AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendSetHandle( - numberedTypeName, - type.Namespace, - TypeKind.Class, - typeParams, cppMethodDefinitionsIndent + 1, - "this", - "other.Handle", - builders.CppMethodDefinitions); + output); + output.Append("Handle = other.Handle;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "ClassHandle = other.ClassHandle;\n"); + output); + output.Append("other.Handle = 0;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return *this;\n"); + output); + output.Append("return *this;\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Assignment operator to nullptr_t + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeAssignmentOperatorNullptr( + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + string releaseFuncName, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); + output); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& "); + output); + output.Append("& "); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( + output); + output.Append( "::operator=(std::nullptr_t other)\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (Handle)\n"); + output); + output.Append("if (Handle)\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t handle = Handle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t classHandle = ClassHandle;\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = 0;\n"); + output); + output.Append("int32_t handle = Handle;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("int32_t classHandle = ClassHandle;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + output); + output.Append("Handle = 0;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("ClassHandle = 0;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( + output); + output.Append( "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 3, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::"); - builders.CppMethodDefinitions.Append(releaseFuncName); - builders.CppMethodDefinitions.Append("(handle, classHandle);\n"); + output); + output.Append("Plugin::"); + output.Append(releaseFuncName); + output.Append("(handle"); + if (typeIsDelegate) + { + output.Append(", classHandle"); + } + output.Append(");\n"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 3, - builders.CppMethodDefinitions); + output); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("ClassHandle = 0;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + output); + output.Append("Handle = 0;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("return *this;\n"); + AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeAssignmentOperatorSameType( + Type type, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + int cppMethodDefinitionsIndent, + StringBuilder output) + { + AppendIndent( + cppMethodDefinitionsIndent, + output); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("& "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("::operator=(const "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("& other)\n"); AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append("{\n"); + AppendSetHandle( + numberedTypeName, + type.Namespace, + TypeKind.Class, + typeParams, cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = 0;\n"); + "this", + "other.Handle", + output); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append( + "ClassHandle = other.ClassHandle;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return *this;\n"); + output); + output.Append("return *this;\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Move assignment operator to same type + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeDestructor( + string typeName, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + string releaseFuncName, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - AppendTypeNameWithoutGenericSuffix( - numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& "); + output); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::operator=("); + output); + output.Append("::~"); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("&& other)\n"); + output); + output.Append("()\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::Remove"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(CppHandle);\n"); + output); + output.Append("Plugin::Remove"); + output.Append(typeName); + output.Append("(CppHandle);\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("CppHandle = 0;\n"); + output); + output.Append("CppHandle = 0;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("if (Handle)\n"); + output); + output.Append("if (Handle)\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t handle = Handle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t classHandle = ClassHandle;\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = 0;\n"); + output); + output.Append("int32_t handle = Handle;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("int32_t classHandle = ClassHandle;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("ClassHandle = 0;\n"); + output); + output.Append("Handle = 0;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("ClassHandle = 0;\n"); + } AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( + output); + output.Append( "if (Plugin::DereferenceManagedClassNoRelease(handle))\n"); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 3, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::"); - builders.CppMethodDefinitions.Append(releaseFuncName); - builders.CppMethodDefinitions.Append("(handle, classHandle);\n"); + output); + output.Append("Plugin::"); + output.Append(releaseFuncName); + output.Append("(handle"); + if (typeIsDelegate) + { + output.Append(", classHandle"); + } + output.Append(");\n"); AppendCppUnhandledExceptionHandling( cppMethodDefinitionsIndent + 3, - builders.CppMethodDefinitions); + output); AppendIndent( cppMethodDefinitionsIndent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "ClassHandle = other.ClassHandle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("other.ClassHandle = 0;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Handle = other.Handle;\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("other.Handle = 0;\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return *this;\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // Equality operator with same type + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeHandleConstructor( + string typeName, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("bool "); + output); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::operator==(const "); + output); + output.Append("::"); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); - AppendCppTypeParameters( - typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& other) const\n"); + output); + output.Append( + "(Plugin::InternalUse iu, int32_t handle)\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + output); + output.Append( + "\t: System::Object(iu, handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append("{\n"); AppendIndent( cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "return Handle == other.Handle;\n"); + output); + output.Append("CppHandle = Plugin::Store"); + output.Append(typeName); + output.Append("(this);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("if (Handle)\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append( + "Plugin::ReferenceManagedClass(Handle);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("}\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append( + "ClassHandle = 0;\n"); + } AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append("}\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); - - // Inequality operator with same type + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeMoveConstructor( + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("bool "); + output); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("::operator!=(const "); + output); + output.Append("::"); AppendTypeNameWithoutGenericSuffix( numberedTypeName, - builders.CppMethodDefinitions); + output); + output.Append("("); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); AppendCppTypeParameters( typeParams, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("& other) const\n"); - AppendIndent( - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - cppMethodDefinitionsIndent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "return Handle != other.Handle;\n"); + output); + output.Append("&& other)\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + output); + output.Append( + "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent( cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); - - // C++ operator() - AppendCppMethodDefinitionBegin( - numberedTypeName, - invokeMethod.ReturnType, - "operator()", - typeParams, - null, - invokeParams, - indent, - builders.CppMethodDefinitions); + output); + output.Append("{\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - if (invokeMethod.ReturnType != typeof(void)) + cppMethodDefinitionsIndent + 1, + output); + output.Append( + "CppHandle = other.CppHandle;\n"); + if (typeIsDelegate) { AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return {};\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append( + "ClassHandle = other.ClassHandle;\n"); } AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("other.Handle = 0;\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); - - // C++ Invoke - AppendCppMethodDefinitionBegin( - numberedTypeName, - invokeMethod.ReturnType, - "Invoke", - typeParams, - null, - invokeParams, - indent, - builders.CppMethodDefinitions); + cppMethodDefinitionsIndent + 1, + output); + output.Append("other.CppHandle = 0;\n"); + if (typeIsDelegate) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("other.ClassHandle = 0;\n"); + } AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendCppPluginFunctionCall( - false, - type.Name, - type.Namespace, - TypeKind.Class, - typeParams, - invokeMethod.ReturnType, - invokeFuncName, - invokeParams, - indent + 1, - builders.CppMethodDefinitions); - AppendCppMethodReturn( - invokeMethod.ReturnType, - invokeReturnTypeKind, - indent + 1, - builders.CppMethodDefinitions); + cppMethodDefinitionsIndent, + output); + output.Append("}\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent, + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeCopyConstructor( + string typeName, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append('\n'); - - // C++ add - AppendCppMethodDefinitionBegin( + cppMethodDefinitionsIndent, + output); + AppendTypeNameWithoutGenericSuffix( numberedTypeName, - typeof(void), - "operator+=", + output); + AppendCppTypeParameters( typeParams, - null, - addRemoveParams, - indent, - builders.CppMethodDefinitions); - AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::"); - builders.CppMethodDefinitions.Append(addFuncName); - builders.CppMethodDefinitions.Append("(Handle, del.Handle);\n"); - AppendCppUnhandledExceptionHandling( - indent + 1, - builders.CppMethodDefinitions); - AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); - AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // C++ remove - AppendCppMethodDefinitionBegin( + output); + output.Append("::"); + AppendTypeNameWithoutGenericSuffix( numberedTypeName, - typeof(void), - "operator-=", + output); + output.Append("(const "); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + AppendCppTypeParameters( typeParams, - null, - addRemoveParams, - indent, - builders.CppMethodDefinitions); + output); + output.Append("& other)\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + cppMethodDefinitionsIndent, + output); + output.Append( + "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("Plugin::"); - builders.CppMethodDefinitions.Append(removeFuncName); - builders.CppMethodDefinitions.Append("(Handle, del.Handle);\n"); - AppendCppUnhandledExceptionHandling( - indent + 1, - builders.CppMethodDefinitions); + cppMethodDefinitionsIndent, + output); + output.Append("{\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("CppHandle = Plugin::Store"); + output.Append(typeName); + output.Append("(this);\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // C++ CppInvoke function + cppMethodDefinitionsIndent + 1, + output); + output.Append("if (Handle)\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("DLLEXPORT "); - if (invokeMethod.ReturnType == typeof(void)) - { - builders.CppMethodDefinitions.Append("void"); - } - else - { - switch (invokeReturnTypeKind) - { - case TypeKind.Class: - case TypeKind.ManagedStruct: - builders.CppMethodDefinitions.Append("int32_t"); - break; - default: - AppendCppTypeName( - invokeMethod.ReturnType, - builders.CppMethodDefinitions); - break; - } - } - builders.CppMethodDefinitions.Append(' '); - AppendCsharpDelegateName( - type.Name, - type.Namespace, - typeParams, - "CppInvoke", - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(int32_t cppHandle"); - if (invokeParams.Length > 0) - { - builders.CppMethodDefinitions.Append(", "); - } - for (int i = 0; i < invokeParams.Length; ++i) + cppMethodDefinitionsIndent + 1, + output); + output.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append( + "Plugin::ReferenceManagedClass(Handle);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("}\n"); + if (typeIsDelegate) { - ParameterInfo param = invokeParams[i]; - switch (param.Kind) - { - case TypeKind.Class: - case TypeKind.ManagedStruct: - builders.CppMethodDefinitions.Append("int32_t "); - builders.CppMethodDefinitions.Append(param.Name); - builders.CppMethodDefinitions.Append("Handle"); - break; - default: - AppendCppTypeName( - param.ParameterType, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(' '); - builders.CppMethodDefinitions.Append(param.Name); - break; - } - if (i != invokeParams.Length - 1) - { - builders.CppMethodDefinitions.Append(", "); - } + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append( + "ClassHandle = other.ClassHandle;\n"); } - builders.CppMethodDefinitions.Append(")\n"); - AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("try\n"); + cppMethodDefinitionsIndent, + output); + output.Append("}\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + cppMethodDefinitionsIndent, + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeNullptrConstructor( + string typeName, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + int cppMethodDefinitionsIndent, + StringBuilder output) + { AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - if (invokeMethod.ReturnType != typeof(void)) - { - builders.CppMethodDefinitions.Append("return "); - } - builders.CppMethodDefinitions.Append("(*Plugin::Get"); - builders.CppMethodDefinitions.Append(typeName); - builders.CppMethodDefinitions.Append("(cppHandle))("); - for (int i = 0; i < invokeParams.Length; ++i) - { - ParameterInfo parameter = invokeParams[i]; - if (parameter.Kind == TypeKind.Class - || parameter.Kind == TypeKind.ManagedStruct) - { - AppendCppTypeName( - parameter.ParameterType, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(Plugin::InternalUse::Only, "); - builders.CppMethodDefinitions.Append(parameter.Name); - builders.CppMethodDefinitions.Append("Handle)"); - } - else - { - builders.CppMethodDefinitions.Append(parameter.Name); - } - if (i != invokeParams.Length - 1) - { - builders.CppMethodDefinitions.Append(", "); - } - } - builders.CppMethodDefinitions.Append(")"); - if ( - invokeMethod.ReturnType != typeof(void) && - (invokeReturnTypeKind == TypeKind.Class || - invokeReturnTypeKind == TypeKind.ManagedStruct)) + cppMethodDefinitionsIndent, + output); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + AppendCppTypeParameters( + typeParams, + output); + output.Append("::"); + AppendTypeNameWithoutGenericSuffix( + numberedTypeName, + output); + output.Append("(std::nullptr_t n)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append( + "\t: System::Object(Plugin::InternalUse::Only, 0)\n"); + AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("CppHandle = Plugin::Store"); + output.Append(typeName); + output.Append("(this);\n"); + if (typeIsDelegate) { - builders.CppMethodDefinitions.Append(".Handle"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("ClassHandle = 0;\n"); } - builders.CppMethodDefinitions.Append(";\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent, + output); + output.Append("}\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "catch (System::Exception ex)\n"); + cppMethodDefinitionsIndent, + output); + output.Append("\n"); + } + + static void AppendCppBaseTypeDefaultConstructor( + string typeName, + string numberedTypeName, + Type[] typeParams, + bool typeIsDelegate, + string constructorFuncName, + int cppMethodDefinitionsIndent, + StringBuilder output) + { + AppendCppMethodDefinitionBegin( + numberedTypeName, + null, + numberedTypeName, + typeParams, + null, + new ParameterInfo[0], + cppMethodDefinitionsIndent, + output); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append(" : System::Object(nullptr)\n"); AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Plugin::SetException(ex.Handle);\n"); - if (invokeMethod.ReturnType != typeof(void)) + cppMethodDefinitionsIndent, + output); + output.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("CppHandle = Plugin::Store"); + output.Append(typeName); + output.Append("(this);\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("Plugin::"); + output.Append(constructorFuncName); + output.Append("(CppHandle, &Handle"); + if (typeIsDelegate) { - AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "return {};\n"); + output.Append(", &ClassHandle"); } + output.Append(");\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("if (Handle)\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("catch (...)\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("{\n"); AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("{\n"); + cppMethodDefinitionsIndent + 2, + output); + output.Append( + "Plugin::ReferenceManagedClass(Handle);\n"); AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "System::String msg = \"Unhandled exception invoking "); - AppendCppTypeName( - type, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\";\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("}\n"); AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "System::Exception ex(msg);\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("else\n"); AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "Plugin::SetException(ex.Handle);\n"); - if (invokeMethod.ReturnType != typeof(void)) + cppMethodDefinitionsIndent + 1, + output); + output.Append("{\n"); + AppendIndent( + cppMethodDefinitionsIndent + 2, + output); + output.Append("Plugin::Remove"); + output.Append(typeName); + output.Append("(CppHandle);\n"); + if (typeIsDelegate) { AppendIndent( - indent + 2, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "return {};\n"); + cppMethodDefinitionsIndent + 2, + output); + output.Append("ClassHandle = 0;\n"); } AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent + 2, + output); + output.Append("CppHandle = 0;\n"); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("}\n"); + cppMethodDefinitionsIndent + 1, + output); + output.Append("}\n"); + AppendCppUnhandledExceptionHandling( + cppMethodDefinitionsIndent + 1, + output); AppendIndent( - indent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); - - // C++ method definitions (end) - AppendCppMethodDefinitionsEnd( - indent, - builders.CppMethodDefinitions); - - // C++ type definition (end) - AppendCppTypeDefinitionEnd( - false, - indent, - builders.CppTypeDefinitions); - - // C# delegate - AppendCsharpDelegate( - false, - type.Name, - type.Namespace, - typeParams, - "CppInvoke", - invokeParams, - invokeMethod.ReturnType, - invokeReturnTypeKind, - builders.CsharpDelegates); - - // C# GetDelegate call - AppendCsharpGetDelegateCall( - type.Name, - type.Namespace, - typeParams, - "CppInvoke", - builders.CsharpGetDelegateCalls); - - // C# import - AppendCsharpImport( - type.Name, - type.Namespace, - typeParams, - "CppInvoke", - invokeParams, - builders.CsharpImports); - - // C# class - builders.CsharpFunctions.Append("\t\tclass "); - builders.CsharpFunctions.Append(typeName); - builders.CsharpFunctions.Append("\n"); - builders.CsharpFunctions.Append("\t\t{\n"); - builders.CsharpFunctions.Append("\t\t\tpublic int CppHandle;\n"); - builders.CsharpFunctions.Append("\t\t\tpublic "); - AppendCsharpTypeName( - type, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(" Delegate;\n"); - builders.CsharpFunctions.Append("\t\t\t\n"); - builders.CsharpFunctions.Append("\t\t\tpublic "); - builders.CsharpFunctions.Append(typeName); - builders.CsharpFunctions.Append("(int cppHandle)\n"); - builders.CsharpFunctions.Append("\t\t\t{\n"); - builders.CsharpFunctions.Append("\t\t\t\tCppHandle = cppHandle;\n"); - builders.CsharpFunctions.Append("\t\t\t\tDelegate = Invoke;\n"); - builders.CsharpFunctions.Append("\t\t\t}\n"); - builders.CsharpFunctions.Append("\t\t\t\n"); - builders.CsharpFunctions.Append("\t\t\tpublic "); - AppendCsharpTypeName( - invokeMethod.ReturnType, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(" Invoke("); - for (int i = 0; i < invokeParams.Length; ++i) - { - ParameterInfo param = invokeParams[i]; - AppendCsharpTypeName( - param.ParameterType, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(' '); - builders.CsharpFunctions.Append(param.Name); - if (i != invokeParams.Length - 1) - { - builders.CsharpFunctions.Append(", "); - } - } - builders.CsharpFunctions.Append(")\n"); - builders.CsharpFunctions.Append("\t\t\t{\n"); - builders.CsharpFunctions.Append("\t\t\t\tif (CppHandle != 0)\n"); - builders.CsharpFunctions.Append("\t\t\t\t{\n"); - builders.CsharpFunctions.Append("\t\t\t\t\tint thisHandle = CppHandle;\n"); - AppendCppFunctionCall( - cppInvokeFuncName, - invokeParamsWithThis, - invokeMethod.ReturnType, - type.Name, - type.Namespace, - true, - 5, - builders.CsharpFunctions); - if (invokeMethod.ReturnType != typeof(void)) - { - builders.CsharpFunctions.Append("\t\t\t\t\treturn "); - switch (invokeReturnTypeKind) - { - case TypeKind.Class: - case TypeKind.ManagedStruct: - if (invokeMethod.ReturnType != typeof(object)) - { - builders.CsharpFunctions.Append('('); - AppendCsharpTypeName( - invokeMethod.ReturnType, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(')'); - } - AppendHandleStoreTypeName( - invokeMethod.ReturnType, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(".Get(returnVal);\n"); - break; - default: - builders.CsharpFunctions.Append("returnVal;\n"); - break; - } - } - builders.CsharpFunctions.Append("\t\t\t\t}\n"); - if (invokeMethod.ReturnType != typeof(void)) - { - builders.CsharpFunctions.Append("\t\t\t\treturn default("); - AppendCsharpTypeName( - invokeMethod.ReturnType, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(");\n"); - } - builders.CsharpFunctions.Append("\t\t\t}\n"); - builders.CsharpFunctions.Append("\t\t}\n"); - builders.CsharpFunctions.Append("\t\t\n"); - - // C# constructor delegate type - AppendCsharpDelegateType( - constructorFuncName, - true, - type, - TypeKind.Class, - typeof(void), - constructorParams, - builders.CsharpDelegateTypes); - - // C# constructor function - AppendCsharpFunctionBeginning( + cppMethodDefinitionsIndent, + output); + output.Append("}\n"); + AppendIndent( + cppMethodDefinitionsIndent, + output); + output.Append('\n'); + } + + static void AppendCppFreeListInit( + Type type, + int? maxSimultaneous, + string typeName, + StringBuilder output) + { + output.Append('\t'); + output.Append(typeName); + output.Append("FreeListSize = "); + if (maxSimultaneous.HasValue) + { + output.Append(maxSimultaneous); + } + else + { + output.Append("maxManagedObjects"); + } + output.Append(";\n"); + output.Append("\t"); + output.Append(typeName); + output.Append("FreeList = new "); + AppendCppTypeName( type, - constructorFuncName, - true, - TypeKind.Class, - typeof(void), - typeParams, - constructorParams, - builders.CsharpFunctions); - builders.CsharpFunctions.Append("var thiz = new "); - builders.CsharpFunctions.Append(typeName); - builders.CsharpFunctions.Append("(cppHandle);\n"); - builders.CsharpFunctions.Append("\t\t\t\tclassHandle = NativeScript.Bindings.ObjectStore.Store(thiz);\n"); - builders.CsharpFunctions.Append("\t\t\t\thandle = NativeScript.Bindings.ObjectStore.Store(thiz.Delegate);"); - AppendCsharpFunctionReturn( - constructorParams, - typeof(void), - TypeKind.Class, - null, - true, - builders.CsharpFunctions); - - // C# release delegate type - AppendCsharpDelegateType( - releaseFuncName, - true, + output); + output.Append("*["); + output.Append(typeName); + output.Append("FreeListSize];\n"); + output.Append("\tfor (int32_t i = 0, end = "); + output.Append(typeName); + output.Append("FreeListSize - 1; i < end; ++i)\n"); + output.Append("\t{\n"); + output.Append("\t "); + output.Append(typeName); + output.Append("FreeList[i] = ("); + AppendCppTypeName( type, - TypeKind.Class, - typeof(void), - releaseParams, - builders.CsharpDelegateTypes); - - // C# release function - AppendCsharpFunctionBeginning( + output); + output.Append("*)("); + output.Append(typeName); + output.Append("FreeList + i + 1);\n"); + output.Append("\t}\n"); + output.Append('\t'); + output.Append(typeName); + output.Append("FreeList["); + output.Append(typeName); + output.Append("FreeListSize - 1] = nullptr;\n"); + output.Append("\tNextFree"); + output.Append(typeName); + output.Append(" = "); + output.Append(typeName); + output.Append("FreeList + 1;\n"); + } + + static void AppendCppFreeListStateAndFunctions( + Type type, + string typeName, + StringBuilder output) + { + output.Append("\tint32_t "); + output.Append(typeName); + output.Append("FreeListSize;\n"); + output.Append('\t'); + AppendCppTypeName( type, - releaseFuncName, - true, - TypeKind.Class, - typeof(void), - typeParams, - releaseParams, - builders.CsharpFunctions); - builders.CsharpFunctions.Append("if (classHandle != 0)\n"); - builders.CsharpFunctions.Append("\t\t\t\t{\n"); - builders.CsharpFunctions.Append("\t\t\t\t\tvar thiz = ("); - builders.CsharpFunctions.Append(typeName); - builders.CsharpFunctions.Append(")NativeScript.Bindings.ObjectStore.Remove(classHandle);\n"); - builders.CsharpFunctions.Append("\t\t\t\t\tthiz.CppHandle = 0;\n"); - builders.CsharpFunctions.Append("\t\t\t\t}\n"); - builders.CsharpFunctions.Append("\t\t\t\tNativeScript.Bindings.ObjectStore.Remove(handle);"); - AppendCsharpFunctionReturn( - releaseParams, - typeof(void), - TypeKind.Class, - null, - true, - builders.CsharpFunctions); - - // C# invoke delegate type - AppendCsharpDelegateType( - invokeFuncName, - true, + output); + output.Append("** "); + output.Append(typeName); + output.Append("FreeList;\n"); + output.Append('\t'); + AppendCppTypeName( type, - TypeKind.Class, - invokeMethod.ReturnType, - invokeParamsWithThis, - builders.CsharpDelegateTypes); - - // C# invoke function - AppendCsharpFunctionBeginning( + output); + output.Append("** NextFree"); + output.Append(typeName); + output.Append(";\n"); + output.Append("\t\n"); + output.Append("\tint32_t Store"); + output.Append(typeName); + output.Append('('); + AppendCppTypeName( type, - invokeFuncName, - true, - TypeKind.Class, - invokeMethod.ReturnType, - typeParams, - invokeParamsWithThis, - builders.CsharpFunctions); - builders.CsharpFunctions.Append("(("); - AppendCsharpTypeName( + output); + output.Append("* del)\n"); + output.Append("\t{\n"); + output.Append("\t\tassert(NextFree"); + output.Append(typeName); + output.Append(" != nullptr);\n"); + output.Append("\t\t"); + AppendCppTypeName( type, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(")NativeScript.Bindings.ObjectStore.Get(thisHandle))"); - AppendCsharpFunctionCallParameters( - true, - invokeParams, - builders.CsharpFunctions); - builders.CsharpFunctions.Append(';'); - AppendCsharpFunctionReturn( - invokeParams, - invokeMethod.ReturnType, - invokeReturnTypeKind, - null, - false, - builders.CsharpFunctions); - - // C# add delegate type - AppendCsharpDelegateType( - addFuncName, - false, + output); + output.Append("** pNext = NextFree"); + output.Append(typeName); + output.Append(";\n"); + output.Append("\t\tNextFree"); + output.Append(typeName); + output.Append(" = ("); + AppendCppTypeName( type, - TypeKind.Class, - typeof(void), - addRemoveParams, - builders.CsharpDelegateTypes); - - // C# add function - AppendCsharpFunctionBeginning( + output); + output.Append("**)*pNext;\n"); + output.Append("\t\t*pNext = del;\n"); + output.Append("\t\treturn (int32_t)(pNext - "); + output.Append(typeName); + output.Append("FreeList);\n"); + output.Append("\t}\n"); + output.Append("\t\n"); + output.Append('\t'); + AppendCppTypeName( type, - addFuncName, - false, - TypeKind.Class, - typeof(void), - typeParams, - addRemoveParams, - builders.CsharpFunctions); - builders.CsharpFunctions.Append("thiz += del;"); - AppendCsharpFunctionReturn( - addRemoveParams, - typeof(void), - TypeKind.Class, - null, - false, - builders.CsharpFunctions); - - // C# remove delegate type - AppendCsharpDelegateType( - removeFuncName, - false, + output); + output.Append("* Get"); + output.Append(typeName); + output.Append("(int32_t handle)\n"); + output.Append("\t{\n"); + output.Append( + "\t\tassert(handle >= 0 && handle < "); + output.Append(typeName); + output.Append("FreeListSize);\n"); + output.Append("\t\treturn "); + output.Append(typeName); + output.Append("FreeList[handle];\n"); + output.Append("\t}\n"); + output.Append("\t\n"); + output.Append("\tvoid Remove"); + output.Append(typeName); + output.Append("(int32_t handle)\n"); + output.Append("\t{\n"); + output.Append("\t\t"); + AppendCppTypeName( type, - TypeKind.Class, - typeof(void), - addRemoveParams, - builders.CsharpDelegateTypes); - - // C# remove function - AppendCsharpFunctionBeginning( + output); + output.Append("** pRelease = "); + output.Append(typeName); + output.Append("FreeList + handle;\n"); + output.Append("\t\t*pRelease = ("); + AppendCppTypeName( type, - removeFuncName, - false, - TypeKind.Class, - typeof(void), - typeParams, - addRemoveParams, - builders.CsharpFunctions); - builders.CsharpFunctions.Append("thiz -= del;"); - AppendCsharpFunctionReturn( - addRemoveParams, - typeof(void), - TypeKind.Class, - null, - false, - builders.CsharpFunctions); - - // C# init params - AppendCsharpInitParam( - releaseFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - constructorFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - invokeFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - addFuncNameLower, - builders.CsharpInitParams); - AppendCsharpInitParam( - removeFuncNameLower, - builders.CsharpInitParams); - - // C# init call args - AppendCsharpInitCallArg( - releaseFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( - constructorFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( - invokeFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( - addFuncName, - builders.CsharpInitCall); - AppendCsharpInitCallArg( - removeFuncName, - builders.CsharpInitCall); + output); + output.Append("*)NextFree"); + output.Append(typeName); + output.Append(";\n"); + output.Append("\t\tNextFree"); + output.Append(typeName); + output.Append(" = pRelease;\n"); + output.Append("\t}\n"); } - + static void AppendCsharpDelegate( bool isStatic, string typeName, @@ -7672,7 +8538,7 @@ static void AppendExceptions( // Build parameters ParameterInfo[] parameters = ConvertParameters( - new Type[]{ typeof(int) }); + new[]{ typeof(int) }); // C# imports AppendCsharpImport( @@ -7805,7 +8671,6 @@ static void AppendGetter( methodIsStatic, enclosingTypeKind, fieldType, - enclosingTypeParams, parameters, builders.CsharpFunctions); AppendCsharpFunctionCallSubject( @@ -7932,7 +8797,6 @@ static void AppendSetter( bool isReadOnly, Type enclosingType, Type[] enclosingTypeParams, - Type fieldType, int indent, Type[] exceptionTypes, StringBuilders builders) @@ -8001,7 +8865,6 @@ static void AppendSetter( methodIsStatic, enclosingTypeKind, typeof(void), - enclosingTypeParams, parameters, builders.CsharpFunctions); AppendCsharpFunctionCallSubject( @@ -9048,7 +9911,6 @@ static void AppendCsharpFunctionBeginning( bool isStatic, TypeKind enclosingTypeKind, Type returnType, - Type[] typeParams, ParameterInfo[] parameters, StringBuilder output) { @@ -9130,7 +9992,7 @@ static void AppendCsharpFunctionBeginning( output.Append("var "); output.Append(param.Name); output.Append(" = "); - if (!paramType.Equals(typeof(object))) + if (paramType != typeof(object)) { output.Append('('); AppendCsharpTypeName(paramType, output); @@ -9144,10 +10006,10 @@ static void AppendCsharpFunctionBeginning( } // Save return value as local variable - if (!returnType.Equals(typeof(void))) + if (returnType != typeof(void)) { output.Append("var returnValue = "); - }; + } } static void AppendCsharpFunctionCallSubject( @@ -9168,7 +10030,6 @@ static void AppendCsharpFunctionCallSubject( } static void AppendCsharpFunctionCallParameters( - bool isStatic, ParameterInfo[] parameters, StringBuilder output) { @@ -9251,7 +10112,7 @@ static void AppendCsharpFunctionReturn( } // Return - if (!returnType.Equals(typeof(void))) + if (returnType != typeof(void)) { output.Append("\n\t\t\t\treturn "); if ( @@ -9473,29 +10334,7 @@ static void AppendCppParameterDeclaration( } } } - - static void AppendParameterCall( - ParameterInfo[] parameters, - string separator, - StringBuilder output) - { - for (int i = 0; i < parameters.Length; ++i) - { - ParameterInfo parameter = parameters[i]; - output.Append(parameter.Name); - if (parameter.Kind == TypeKind.Class - || parameter.Kind == TypeKind.ManagedStruct) - { - output.Append("Handle"); - } - if (i != parameters.Length - 1) - { - output.Append(','); - output.Append(separator); - } - } - } - + static void AppendCppInitBody( string globalVariableName, string paramName, @@ -9571,7 +10410,7 @@ static void AppendCppMethodReturn( int indent, StringBuilder output) { - if (returnType != null && !returnType.Equals(typeof(void))) + if (returnType != null && returnType != typeof(void)) { AppendIndent(indent, output); output.Append("return "); @@ -9943,59 +10782,59 @@ static void AppendCsharpTypeName( Type type, StringBuilder output) { - if (type.Equals(typeof(void))) + if (type == typeof(void)) { output.Append("void"); } - else if (type.Equals(typeof(bool))) + else if (type == typeof(bool)) { output.Append("bool"); } - else if (type.Equals(typeof(sbyte))) + else if (type == typeof(sbyte)) { output.Append("sbyte"); } - else if (type.Equals(typeof(byte))) + else if (type == typeof(byte)) { output.Append("byte"); } - else if (type.Equals(typeof(short))) + else if (type == typeof(short)) { output.Append("short"); } - else if (type.Equals(typeof(ushort))) + else if (type == typeof(ushort)) { output.Append("ushort"); } - else if (type.Equals(typeof(int))) + else if (type == typeof(int)) { output.Append("int"); } - else if (type.Equals(typeof(uint))) + else if (type == typeof(uint)) { output.Append("uint"); } - else if (type.Equals(typeof(long))) + else if (type == typeof(long)) { output.Append("long"); } - else if (type.Equals(typeof(ulong))) + else if (type == typeof(ulong)) { output.Append("ulong"); } - else if (type.Equals(typeof(char))) + else if (type == typeof(char)) { output.Append("char"); } - else if (type.Equals(typeof(float))) + else if (type == typeof(float)) { output.Append("float"); } - else if (type.Equals(typeof(double))) + else if (type == typeof(double)) { output.Append("double"); } - else if (type.Equals(typeof(string))) + else if (type == typeof(string)) { output.Append("string"); } @@ -10026,59 +10865,59 @@ static void AppendCppTypeName( Type type, StringBuilder output) { - if (type.Equals(typeof(void))) + if (type == typeof(void)) { output.Append("void"); } - else if (type.Equals(typeof(bool))) + else if (type == typeof(bool)) { output.Append("System::Boolean"); } - else if (type.Equals(typeof(sbyte))) + else if (type == typeof(sbyte)) { output.Append("int8_t"); } - else if (type.Equals(typeof(byte))) + else if (type == typeof(byte)) { output.Append("uint8_t"); } - else if (type.Equals(typeof(short))) + else if (type == typeof(short)) { output.Append("int16_t"); } - else if (type.Equals(typeof(ushort))) + else if (type == typeof(ushort)) { output.Append("uint16_t"); } - else if (type.Equals(typeof(int))) + else if (type == typeof(int)) { output.Append("int32_t"); } - else if (type.Equals(typeof(uint))) + else if (type == typeof(uint)) { output.Append("uint32_t"); } - else if (type.Equals(typeof(long))) + else if (type == typeof(long)) { output.Append("int64_t"); } - else if (type.Equals(typeof(ulong))) + else if (type == typeof(ulong)) { output.Append("uint64_t"); } - else if (type.Equals(typeof(char))) + else if (type == typeof(char)) { output.Append("System::Char"); } - else if (type.Equals(typeof(float))) + else if (type == typeof(float)) { output.Append("float"); } - else if (type.Equals(typeof(double))) + else if (type == typeof(double)) { output.Append("double"); } - else if (type.Equals(typeof(string))) + else if (type == typeof(string)) { output.Append("System::String"); } @@ -10108,7 +10947,7 @@ static void AppendCppTypeName( type.Name, output); Type[] genTypes = type.GetGenericArguments(); - if (genTypes != null && genTypes.Length > 0) + if (genTypes.Length > 0) { output.Append(genTypes.Length); } @@ -10141,69 +10980,6 @@ static void AppendCppTypeName( output); } - static void LogStringBuilders( - StringBuilders builders) - { - LogStringBuilder( - "C# init params", - builders.CsharpInitParams); - LogStringBuilder( - "C# delegates", - builders.CsharpDelegateTypes); - LogStringBuilder( - "C# StructStore Init calls", - builders.CsharpStructStoreInitCalls); - LogStringBuilder( - "C# init call", - builders.CsharpInitCall); - LogStringBuilder( - "C# functions", - builders.CsharpFunctions); - LogStringBuilder( - "C# MonoBehaviours", - builders.CsharpMonoBehaviours); - LogStringBuilder( - "C# MonoBehaviour Delegates", - builders.CsharpDelegates); - LogStringBuilder( - "C# MonoBehaviour Imports", - builders.CsharpImports); - LogStringBuilder( - "C# MonoBehaviour GetDelegate Calls", - builders.CsharpGetDelegateCalls); - LogStringBuilder( - "C++ function pointers", - builders.CppFunctionPointers); - LogStringBuilder( - "C++ type declarations", - builders.CppTypeDeclarations); - LogStringBuilder( - "C++ type definitions", - builders.CppTypeDefinitions); - LogStringBuilder( - "C++ method definitions", - builders.CppMethodDefinitions); - LogStringBuilder( - "C++ init params", - builders.CppInitParams); - LogStringBuilder( - "C++ init body", - builders.CppInitBody); - LogStringBuilder( - "C++ MonoBehaviour messages", - builders.CppMonoBehaviourMessages); - } - - static void LogStringBuilder( - string title, - StringBuilder builder) - { - Debug.LogFormat( - "{0}:\n\n{1}\n\n", - title, - builder); - } - static void RemoveTrailingChars( StringBuilders builders) { @@ -10211,6 +10987,7 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CsharpDelegateTypes); RemoveTrailingChars(builders.CsharpStructStoreInitCalls); RemoveTrailingChars(builders.CsharpInitCall); + RemoveTrailingChars(builders.CsharpBaseTypes); RemoveTrailingChars(builders.CsharpFunctions); RemoveTrailingChars(builders.CsharpMonoBehaviours); RemoveTrailingChars(builders.CsharpDelegates); @@ -10218,11 +10995,13 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CsharpGetDelegateCalls); RemoveTrailingChars(builders.CppFunctionPointers); RemoveTrailingChars(builders.CppTypeDeclarations); - RemoveTrailingChars(builders.CppMethodDefinitions); RemoveTrailingChars(builders.CppTypeDefinitions); + RemoveTrailingChars(builders.CppMethodDefinitions); RemoveTrailingChars(builders.CppInitParams); RemoveTrailingChars(builders.CppInitBody); RemoveTrailingChars(builders.CppMonoBehaviourMessages); + RemoveTrailingChars(builders.CppGlobalStateAndFunctions); + RemoveTrailingChars(builders.CppBoxingMethodDeclarations); } // Remove trailing chars (e.g. commas) for last elements @@ -10278,6 +11057,11 @@ static void InjectBuilders( "/*BEGIN INIT CALL*/\n", "\n\t\t\t\t/*END INIT CALL*/", builders.CsharpInitCall.ToString()); + csharpContents = InjectIntoString( + csharpContents, + "/*BEGIN BASE TYPES*/\n", + "\n\t\t/*END BASE TYPES*/", + builders.CsharpBaseTypes.ToString()); csharpContents = InjectIntoString( csharpContents, "/*BEGIN FUNCTIONS*/\n", @@ -10360,7 +11144,7 @@ static string InjectIntoString( string endMarker, string text) { - for (int startIndex = 0; true; ) + for (int startIndex = 0; ; ) { int beginIndex = contents.IndexOf(beginMarker, startIndex); if (beginIndex < 0) diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index be0f906..1d9522a 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -308,6 +308,11 @@ "Types": [ "System.String" ] + }, + { + "Types": [ + "System.Int32" + ] } ], "Constructors": [ @@ -328,6 +333,12 @@ "ParamTypes": [ "T" ] + }, + { + "Name": "Sort", + "ParamTypes": [ + "System.Collections.Generic.IComparer`1" + ] } ] }, @@ -529,6 +540,35 @@ "Name": "UnityEngine.SceneManagement.LoadSceneMode" } ], + "BaseTypes": [ + { + "Name": "System.Collections.Generic.IComparer`1", + "GenericParams": [ + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.String" + ] + } + ] + }, + { + "Name": "System.StringComparer" + }, + { + "Name": "System.EventArgs", + "OverrideMethods": [ + { + "Name": "ToString", + "ParamTypes": [] + } + ] + } + ], "MonoBehaviours": [ { "Name": "MyGame.MonoBehaviours.TestScript", diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 2c42ed2..7db5553 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -93,6 +93,12 @@ namespace Plugin 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); @@ -132,6 +138,14 @@ namespace Plugin UnityEngine::SceneManagement::Scene (*UnboxScene)(int32_t valHandle); int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); + void (*ReleaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle); + void (*SystemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemCollectionsGenericIComparerSystemString)(int32_t handle); + void (*SystemCollectionsGenericIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemStringComparer)(int32_t handle); + void (*SystemStringComparerConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemEventArgs)(int32_t handle); + void (*SystemEventArgsConstructor)(int32_t cppHandle, int32_t* handle); int32_t (*BoxBoolean)(System::Boolean val); System::Boolean (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -184,44 +198,44 @@ namespace Plugin int32_t (*UnityEngineGradientColorKeyArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::GradientColorKey& item); void (*ReleaseSystemAction)(int32_t handle, int32_t classHandle); void (*SystemActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemActionInvoke)(int32_t thisHandle); void (*SystemActionAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemActionRemove)(int32_t thisHandle, int32_t delHandle); + void (*SystemActionInvoke)(int32_t thisHandle); void (*ReleaseSystemActionSystemSingle)(int32_t handle, int32_t classHandle); void (*SystemActionSystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle); - void (*SystemActionSystemSingleInvoke)(int32_t thisHandle, float obj); void (*SystemActionSystemSingleAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemActionSystemSingleRemove)(int32_t thisHandle, int32_t delHandle); + void (*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_SystemSingleInvoke)(int32_t thisHandle, float arg1, float arg2); void (*SystemActionSystemSingle_SystemSingleAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemActionSystemSingle_SystemSingleRemove)(int32_t thisHandle, int32_t delHandle); + void (*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); - double (*SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2); void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle); + 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); - int32_t (*SystemFuncSystemInt16_SystemInt32_SystemStringInvoke)(int32_t thisHandle, int16_t arg1, int32_t arg2); void (*SystemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle); void (*SystemFuncSystemInt16_SystemInt32_SystemStringRemove)(int32_t thisHandle, int32_t delHandle); + 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 (*SystemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle); 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 (*UnityEngineEventsUnityActionInvoke)(int32_t thisHandle); 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_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle); void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); /*END FUNCTION POINTERS*/ } @@ -321,6 +335,106 @@ namespace Plugin } } + int32_t SystemCollectionsGenericIComparerSystemInt32FreeListSize; + System::Collections::Generic::IComparer** SystemCollectionsGenericIComparerSystemInt32FreeList; + System::Collections::Generic::IComparer** NextFreeSystemCollectionsGenericIComparerSystemInt32; + + int32_t StoreSystemCollectionsGenericIComparerSystemInt32(System::Collections::Generic::IComparer* del) + { + assert(NextFreeSystemCollectionsGenericIComparerSystemInt32 != nullptr); + System::Collections::Generic::IComparer** pNext = NextFreeSystemCollectionsGenericIComparerSystemInt32; + NextFreeSystemCollectionsGenericIComparerSystemInt32 = (System::Collections::Generic::IComparer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsGenericIComparerSystemInt32FreeList); + } + + System::Collections::Generic::IComparer* GetSystemCollectionsGenericIComparerSystemInt32(int32_t handle) + { + assert(handle >= 0 && handle < SystemCollectionsGenericIComparerSystemInt32FreeListSize); + return SystemCollectionsGenericIComparerSystemInt32FreeList[handle]; + } + + void RemoveSystemCollectionsGenericIComparerSystemInt32(int32_t handle) + { + System::Collections::Generic::IComparer** pRelease = SystemCollectionsGenericIComparerSystemInt32FreeList + handle; + *pRelease = (System::Collections::Generic::IComparer*)NextFreeSystemCollectionsGenericIComparerSystemInt32; + NextFreeSystemCollectionsGenericIComparerSystemInt32 = pRelease; + } + int32_t SystemCollectionsGenericIComparerSystemStringFreeListSize; + System::Collections::Generic::IComparer** SystemCollectionsGenericIComparerSystemStringFreeList; + System::Collections::Generic::IComparer** NextFreeSystemCollectionsGenericIComparerSystemString; + + int32_t StoreSystemCollectionsGenericIComparerSystemString(System::Collections::Generic::IComparer* del) + { + assert(NextFreeSystemCollectionsGenericIComparerSystemString != nullptr); + System::Collections::Generic::IComparer** pNext = NextFreeSystemCollectionsGenericIComparerSystemString; + NextFreeSystemCollectionsGenericIComparerSystemString = (System::Collections::Generic::IComparer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsGenericIComparerSystemStringFreeList); + } + + System::Collections::Generic::IComparer* GetSystemCollectionsGenericIComparerSystemString(int32_t handle) + { + assert(handle >= 0 && handle < SystemCollectionsGenericIComparerSystemStringFreeListSize); + return SystemCollectionsGenericIComparerSystemStringFreeList[handle]; + } + + void RemoveSystemCollectionsGenericIComparerSystemString(int32_t handle) + { + System::Collections::Generic::IComparer** pRelease = SystemCollectionsGenericIComparerSystemStringFreeList + handle; + *pRelease = (System::Collections::Generic::IComparer*)NextFreeSystemCollectionsGenericIComparerSystemString; + NextFreeSystemCollectionsGenericIComparerSystemString = pRelease; + } + int32_t SystemStringComparerFreeListSize; + System::StringComparer** SystemStringComparerFreeList; + System::StringComparer** NextFreeSystemStringComparer; + + int32_t StoreSystemStringComparer(System::StringComparer* del) + { + assert(NextFreeSystemStringComparer != nullptr); + System::StringComparer** pNext = NextFreeSystemStringComparer; + NextFreeSystemStringComparer = (System::StringComparer**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemStringComparerFreeList); + } + + System::StringComparer* GetSystemStringComparer(int32_t handle) + { + assert(handle >= 0 && handle < SystemStringComparerFreeListSize); + return SystemStringComparerFreeList[handle]; + } + + void RemoveSystemStringComparer(int32_t handle) + { + System::StringComparer** pRelease = SystemStringComparerFreeList + handle; + *pRelease = (System::StringComparer*)NextFreeSystemStringComparer; + NextFreeSystemStringComparer = pRelease; + } + int32_t SystemEventArgsFreeListSize; + System::EventArgs** SystemEventArgsFreeList; + System::EventArgs** NextFreeSystemEventArgs; + + int32_t StoreSystemEventArgs(System::EventArgs* del) + { + assert(NextFreeSystemEventArgs != nullptr); + System::EventArgs** pNext = NextFreeSystemEventArgs; + NextFreeSystemEventArgs = (System::EventArgs**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemEventArgsFreeList); + } + + System::EventArgs* GetSystemEventArgs(int32_t handle) + { + assert(handle >= 0 && handle < SystemEventArgsFreeListSize); + return SystemEventArgsFreeList[handle]; + } + + void RemoveSystemEventArgs(int32_t handle) + { + System::EventArgs** pRelease = SystemEventArgsFreeList + handle; + *pRelease = (System::EventArgs*)NextFreeSystemEventArgs; + NextFreeSystemEventArgs = pRelease; + } int32_t SystemActionFreeListSize; System::Action** SystemActionFreeList; System::Action** NextFreeSystemAction; @@ -521,7 +635,6 @@ namespace Plugin *pRelease = (UnityEngine::Events::UnityAction2*)NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = pRelease; } - /*END GLOBAL STATE AND FUNCTIONS*/ } @@ -2567,6 +2680,173 @@ namespace System 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 System +{ + namespace Collections + { + namespace Generic + { + List::List(std::nullptr_t n) + : List(Plugin::InternalUse::Only, 0) + { + } + + List::List(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + List::List(const List& other) + : List(Plugin::InternalUse::Only, other.Handle) + { + } + + List::List(List&& other) + : List(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + List::~List() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + List& List::operator=(const List& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + List& List::operator=(std::nullptr_t other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + List& List::operator=(List&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool List::operator==(const List& other) const + { + return Handle == other.Handle; + } + + bool List::operator!=(const List& other) const + { + return Handle != other.Handle; + } + + List::List() + : System::Object(nullptr) + { + auto returnValue = Plugin::SystemCollectionsGenericListSystemInt32Constructor(); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + } + } + + 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) + { + Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + 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) + { + Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } } } @@ -4267,60 +4547,834 @@ namespace System namespace System { - Object::Object(System::Boolean val) - { - int32_t handle = Plugin::BoxBoolean(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::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::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 Generic { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - - Object::operator int8_t() - { - int8_t returnVal(Plugin::UnboxSByte(Handle)); - if (Plugin::unhandledCsharpException) + IComparer::IComparer() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + IComparer::IComparer(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + } + + IComparer::IComparer(const IComparer& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IComparer::IComparer(IComparer&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IComparer::~IComparer() + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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=(std::nullptr_t other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + IComparer& IComparer::operator=(IComparer&& other) + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(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 IComparer::operator==(const IComparer& other) const + { + return Handle == other.Handle; + } + + bool IComparer::operator!=(const IComparer& other) const + { + return Handle != other.Handle; + } + + int32_t IComparer::Compare(int32_t x, int32_t y) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) + { + try + { + return Plugin::GetSystemCollectionsGenericIComparerSystemInt32(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 + { + IComparer::IComparer() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + Plugin::SystemCollectionsGenericIComparerSystemStringConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + IComparer::IComparer(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + } + + IComparer::IComparer(const IComparer& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IComparer::IComparer(IComparer&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IComparer::~IComparer() + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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=(std::nullptr_t other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + IComparer& IComparer::operator=(IComparer&& other) + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(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 IComparer::operator==(const IComparer& other) const + { + return Handle == other.Handle; + } + + bool IComparer::operator!=(const IComparer& other) const + { + return Handle != other.Handle; + } + + int32_t IComparer::Compare(System::String x, System::String y) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(System::String(Plugin::InternalUse::Only, xHandle), System::String(Plugin::InternalUse::Only, yHandle)); + } + 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() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + Plugin::SystemStringComparerConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemStringComparer(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + StringComparer::StringComparer(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + } + + StringComparer::StringComparer(const StringComparer& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + StringComparer::StringComparer(StringComparer&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + StringComparer::~StringComparer() + { + Plugin::RemoveSystemStringComparer(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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=(std::nullptr_t other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + StringComparer& StringComparer::operator=(StringComparer&& other) + { + Plugin::RemoveSystemStringComparer(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemStringComparer(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 StringComparer::operator==(const StringComparer& other) const + { + return Handle == other.Handle; + } + + bool StringComparer::operator!=(const StringComparer& other) const + { + return Handle != other.Handle; + } + + int32_t StringComparer::Compare(System::String x, System::String y) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + return Plugin::GetSystemStringComparer(cppHandle)->Compare(System::String(Plugin::InternalUse::Only, xHandle), System::String(Plugin::InternalUse::Only, yHandle)); + } + 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 StringComparer::Equals(System::String x, System::String y) + { + return {}; + } + + DLLEXPORT System::Boolean SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + return Plugin::GetSystemStringComparer(cppHandle)->Equals(System::String(Plugin::InternalUse::Only, xHandle), System::String(Plugin::InternalUse::Only, yHandle)); + } + 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 {}; + } + } + + int32_t StringComparer::GetHashCode(System::String obj) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) + { + try + { + return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(System::String(Plugin::InternalUse::Only, objHandle)); + } + 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 +{ + EventArgs::EventArgs() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemEventArgs(this); + Plugin::SystemEventArgsConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemEventArgs(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + EventArgs::EventArgs(std::nullptr_t n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemEventArgs(this); + } + + EventArgs::EventArgs(const EventArgs& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemEventArgs(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + EventArgs::EventArgs(EventArgs&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + EventArgs::EventArgs(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemEventArgs(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + EventArgs::~EventArgs() + { + Plugin::RemoveSystemEventArgs(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemEventArgs(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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=(std::nullptr_t other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemEventArgs(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + EventArgs& EventArgs::operator=(EventArgs&& other) + { + Plugin::RemoveSystemEventArgs(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemEventArgs(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 EventArgs::operator==(const EventArgs& other) const + { + return Handle == other.Handle; + } + + bool EventArgs::operator!=(const EventArgs& other) const + { + return Handle != other.Handle; + } + + System::String EventArgs::ToString() + { + return {}; + } + + DLLEXPORT int32_t SystemEventArgsToString(int32_t cppHandle) + { + try + { + return Plugin::GetSystemEventArgs(cppHandle)->ToString().Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::EventArgs"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } +} + +namespace System +{ + Object::Object(System::Boolean val) + { + int32_t handle = Plugin::BoxBoolean(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::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::Object(int8_t val) + { + int32_t handle = Plugin::BoxSByte(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 int8_t() + { + int8_t returnVal(Plugin::UnboxSByte(Handle)); + if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; Plugin::unhandledCsharpException = nullptr; @@ -6178,22 +7232,6 @@ namespace System return Handle != other.Handle; } - void Action::operator()() - { - } - - void Action::Invoke() - { - Plugin::SystemActionInvoke(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - void Action::operator+=(System::Action& del) { Plugin::SystemActionAdd(Handle, del.Handle); @@ -6218,11 +7256,15 @@ namespace System } } - DLLEXPORT void SystemActionCppInvoke(int32_t cppHandle) + void Action::operator()() + { + } + + DLLEXPORT void SystemActionNativeInvoke(int32_t cppHandle) { try { - (*Plugin::GetSystemAction(cppHandle))(); + Plugin::GetSystemAction(cppHandle)->operator()(); } catch (System::Exception ex) { @@ -6235,6 +7277,18 @@ namespace System 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 @@ -6400,25 +7454,9 @@ namespace System return Handle == other.Handle; } - bool Action1::operator!=(const Action1& other) const - { - return Handle != other.Handle; - } - - void Action1::operator()(float obj) - { - } - - void Action1::Invoke(float obj) + bool Action1::operator!=(const Action1& other) const { - Plugin::SystemActionSystemSingleInvoke(Handle, obj); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Handle != other.Handle; } void Action1::operator+=(System::Action1& del) @@ -6445,11 +7483,15 @@ namespace System } } - DLLEXPORT void SystemActionSystemSingleCppInvoke(int32_t cppHandle, float obj) + void Action1::operator()(float obj) + { + } + + DLLEXPORT void SystemActionSystemSingleNativeInvoke(int32_t cppHandle, float obj) { try { - (*Plugin::GetSystemActionSystemSingle(cppHandle))(obj); + Plugin::GetSystemActionSystemSingle(cppHandle)->operator()(obj); } catch (System::Exception ex) { @@ -6462,6 +7504,18 @@ namespace System Plugin::SetException(ex.Handle); } } + + void Action1::Invoke(float obj) + { + Plugin::SystemActionSystemSingleInvoke(Handle, obj); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } namespace System @@ -6632,22 +7686,6 @@ namespace System return Handle != other.Handle; } - void Action2::operator()(float arg1, float arg2) - { - } - - void Action2::Invoke(float arg1, float arg2) - { - Plugin::SystemActionSystemSingle_SystemSingleInvoke(Handle, arg1, arg2); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - void Action2::operator+=(System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); @@ -6672,11 +7710,15 @@ namespace System } } - DLLEXPORT void SystemActionSystemSingle_SystemSingleCppInvoke(int32_t cppHandle, float arg1, float arg2) + void Action2::operator()(float arg1, float arg2) + { + } + + DLLEXPORT void SystemActionSystemSingle_SystemSingleNativeInvoke(int32_t cppHandle, float arg1, float arg2) { try { - (*Plugin::GetSystemActionSystemSingle_SystemSingle(cppHandle))(arg1, arg2); + Plugin::GetSystemActionSystemSingle_SystemSingle(cppHandle)->operator()(arg1, arg2); } catch (System::Exception ex) { @@ -6689,6 +7731,18 @@ namespace System Plugin::SetException(ex.Handle); } } + + void Action2::Invoke(float arg1, float arg2) + { + Plugin::SystemActionSystemSingle_SystemSingleInvoke(Handle, arg1, arg2); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } namespace System @@ -6859,24 +7913,6 @@ namespace System return Handle != other.Handle; } - double Func3::operator()(int32_t arg1, float arg2) - { - return {}; - } - - double Func3::Invoke(int32_t arg1, float 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; - } - void Func3::operator+=(System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(Handle, del.Handle); @@ -6901,11 +7937,16 @@ namespace System } } - DLLEXPORT double SystemFuncSystemInt32_SystemSingle_SystemDoubleCppInvoke(int32_t cppHandle, int32_t arg1, float arg2) + double Func3::operator()(int32_t arg1, float arg2) + { + return {}; + } + + DLLEXPORT double SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(int32_t cppHandle, int32_t arg1, float arg2) { try { - return (*Plugin::GetSystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle))(arg1, arg2); + return Plugin::GetSystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle)->operator()(arg1, arg2); } catch (System::Exception ex) { @@ -6920,6 +7961,19 @@ namespace System return {}; } } + + double Func3::Invoke(int32_t arg1, float 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 @@ -7090,24 +8144,6 @@ namespace System return Handle != other.Handle; } - System::String Func3::operator()(int16_t arg1, int32_t arg2) - { - return {}; - } - - System::String Func3::Invoke(int16_t arg1, int32_t 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); - } - void Func3::operator+=(System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); @@ -7132,11 +8168,16 @@ namespace System } } - DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringCppInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) + System::String Func3::operator()(int16_t arg1, int32_t arg2) + { + return {}; + } + + DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) { try { - return (*Plugin::GetSystemFuncSystemInt16_SystemInt32_SystemString(cppHandle))(arg1, arg2).Handle; + return Plugin::GetSystemFuncSystemInt16_SystemInt32_SystemString(cppHandle)->operator()(arg1, arg2).Handle; } catch (System::Exception ex) { @@ -7151,6 +8192,19 @@ namespace System return {}; } } + + System::String Func3::Invoke(int16_t arg1, int32_t 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 @@ -7321,22 +8375,6 @@ namespace System return Handle != other.Handle; } - void AppDomainInitializer::operator()(System::Array1 args) - { - } - - 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; - } - } - void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) { Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); @@ -7361,11 +8399,15 @@ namespace System } } - DLLEXPORT void SystemAppDomainInitializerCppInvoke(int32_t cppHandle, int32_t argsHandle) + void AppDomainInitializer::operator()(System::Array1 args) + { + } + + DLLEXPORT void SystemAppDomainInitializerNativeInvoke(int32_t cppHandle, int32_t argsHandle) { try { - (*Plugin::GetSystemAppDomainInitializer(cppHandle))(System::Array1(Plugin::InternalUse::Only, argsHandle)); + Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(System::Array1(Plugin::InternalUse::Only, argsHandle)); } catch (System::Exception ex) { @@ -7378,6 +8420,18 @@ namespace System 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 @@ -7550,22 +8604,6 @@ namespace UnityEngine return Handle != other.Handle; } - void UnityAction::operator()() - { - } - - void UnityAction::Invoke() - { - Plugin::UnityEngineEventsUnityActionInvoke(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - void UnityAction::operator+=(UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineEventsUnityActionAdd(Handle, del.Handle); @@ -7590,11 +8628,15 @@ namespace UnityEngine } } - DLLEXPORT void UnityEngineEventsUnityActionCppInvoke(int32_t cppHandle) + void UnityAction::operator()() + { + } + + DLLEXPORT void UnityEngineEventsUnityActionNativeInvoke(int32_t cppHandle) { try { - (*Plugin::GetUnityEngineEventsUnityAction(cppHandle))(); + Plugin::GetUnityEngineEventsUnityAction(cppHandle)->operator()(); } catch (System::Exception ex) { @@ -7607,6 +8649,18 @@ namespace UnityEngine 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; + } + } } } @@ -7780,22 +8834,6 @@ namespace UnityEngine return Handle != other.Handle; } - void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - } - - void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - void UnityAction2::operator+=(UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(Handle, del.Handle); @@ -7820,11 +8858,15 @@ namespace UnityEngine } } - DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeCppInvoke(int32_t cppHandle, UnityEngine::SceneManagement::Scene arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + { + } + + DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int32_t cppHandle, UnityEngine::SceneManagement::Scene arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { try { - (*Plugin::GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle))(arg0, arg1); + Plugin::GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle)->operator()(arg0, arg1); } catch (System::Exception ex) { @@ -7837,6 +8879,18 @@ namespace UnityEngine Plugin::SetException(ex.Handle); } } + + void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + { + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } } } @@ -7935,6 +8989,12 @@ DLLEXPORT void Init( 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), @@ -7974,6 +9034,14 @@ DLLEXPORT void Init( UnityEngine::SceneManagement::Scene (*unboxScene)(int32_t valHandle), int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), + void (*releaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle), + void (*systemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemCollectionsGenericIComparerSystemString)(int32_t handle), + void (*systemCollectionsGenericIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemStringComparer)(int32_t handle), + void (*systemStringComparerConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemEventArgs)(int32_t handle), + void (*systemEventArgsConstructor)(int32_t cppHandle, int32_t* handle), int32_t (*boxBoolean)(System::Boolean val), System::Boolean (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -8026,44 +9094,44 @@ DLLEXPORT void Init( int32_t (*unityEngineGradientColorKeyArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::GradientColorKey& item), void (*releaseSystemAction)(int32_t handle, int32_t classHandle), void (*systemActionConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemActionInvoke)(int32_t thisHandle), void (*systemActionAdd)(int32_t thisHandle, int32_t delHandle), void (*systemActionRemove)(int32_t thisHandle, int32_t delHandle), + void (*systemActionInvoke)(int32_t thisHandle), void (*releaseSystemActionSystemSingle)(int32_t handle, int32_t classHandle), void (*systemActionSystemSingleConstructor)(int32_t cppHandle, int32_t* handle, int32_t* classHandle), - void (*systemActionSystemSingleInvoke)(int32_t thisHandle, float obj), void (*systemActionSystemSingleAdd)(int32_t thisHandle, int32_t delHandle), void (*systemActionSystemSingleRemove)(int32_t thisHandle, int32_t delHandle), + void (*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_SystemSingleInvoke)(int32_t thisHandle, float arg1, float arg2), void (*systemActionSystemSingle_SystemSingleAdd)(int32_t thisHandle, int32_t delHandle), void (*systemActionSystemSingle_SystemSingleRemove)(int32_t thisHandle, int32_t delHandle), + void (*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), - double (*systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke)(int32_t thisHandle, int32_t arg1, float arg2), void (*systemFuncSystemInt32_SystemSingle_SystemDoubleAdd)(int32_t thisHandle, int32_t delHandle), void (*systemFuncSystemInt32_SystemSingle_SystemDoubleRemove)(int32_t thisHandle, int32_t delHandle), + 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), - int32_t (*systemFuncSystemInt16_SystemInt32_SystemStringInvoke)(int32_t thisHandle, int16_t arg1, int32_t arg2), void (*systemFuncSystemInt16_SystemInt32_SystemStringAdd)(int32_t thisHandle, int32_t delHandle), void (*systemFuncSystemInt16_SystemInt32_SystemStringRemove)(int32_t thisHandle, int32_t delHandle), + 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 (*systemAppDomainInitializerInvoke)(int32_t thisHandle, int32_t argsHandle), 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 (*unityEngineEventsUnityActionInvoke)(int32_t thisHandle), 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_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1), void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle), - void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle) + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle), + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) /*END INIT PARAMS*/) { using namespace Plugin; @@ -8133,6 +9201,12 @@ DLLEXPORT void Init( 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; @@ -8172,6 +9246,46 @@ DLLEXPORT void Init( Plugin::UnboxScene = unboxScene; Plugin::BoxLoadSceneMode = boxLoadSceneMode; Plugin::UnboxLoadSceneMode = unboxLoadSceneMode; + SystemCollectionsGenericIComparerSystemInt32FreeListSize = maxManagedObjects; + SystemCollectionsGenericIComparerSystemInt32FreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemInt32FreeListSize]; + for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1; i < end; ++i) + { + SystemCollectionsGenericIComparerSystemInt32FreeList[i] = (System::Collections::Generic::IComparer*)(SystemCollectionsGenericIComparerSystemInt32FreeList + i + 1); + } + SystemCollectionsGenericIComparerSystemInt32FreeList[SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1] = nullptr; + NextFreeSystemCollectionsGenericIComparerSystemInt32 = SystemCollectionsGenericIComparerSystemInt32FreeList + 1; + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32 = releaseSystemCollectionsGenericIComparerSystemInt32; + Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor = systemCollectionsGenericIComparerSystemInt32Constructor; + SystemCollectionsGenericIComparerSystemStringFreeListSize = maxManagedObjects; + SystemCollectionsGenericIComparerSystemStringFreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemStringFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemStringFreeListSize - 1; i < end; ++i) + { + SystemCollectionsGenericIComparerSystemStringFreeList[i] = (System::Collections::Generic::IComparer*)(SystemCollectionsGenericIComparerSystemStringFreeList + i + 1); + } + SystemCollectionsGenericIComparerSystemStringFreeList[SystemCollectionsGenericIComparerSystemStringFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsGenericIComparerSystemString = SystemCollectionsGenericIComparerSystemStringFreeList + 1; + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString = releaseSystemCollectionsGenericIComparerSystemString; + Plugin::SystemCollectionsGenericIComparerSystemStringConstructor = systemCollectionsGenericIComparerSystemStringConstructor; + SystemStringComparerFreeListSize = maxManagedObjects; + SystemStringComparerFreeList = new System::StringComparer*[SystemStringComparerFreeListSize]; + for (int32_t i = 0, end = SystemStringComparerFreeListSize - 1; i < end; ++i) + { + SystemStringComparerFreeList[i] = (System::StringComparer*)(SystemStringComparerFreeList + i + 1); + } + SystemStringComparerFreeList[SystemStringComparerFreeListSize - 1] = nullptr; + NextFreeSystemStringComparer = SystemStringComparerFreeList + 1; + Plugin::ReleaseSystemStringComparer = releaseSystemStringComparer; + Plugin::SystemStringComparerConstructor = systemStringComparerConstructor; + SystemEventArgsFreeListSize = maxManagedObjects; + SystemEventArgsFreeList = new System::EventArgs*[SystemEventArgsFreeListSize]; + for (int32_t i = 0, end = SystemEventArgsFreeListSize - 1; i < end; ++i) + { + SystemEventArgsFreeList[i] = (System::EventArgs*)(SystemEventArgsFreeList + i + 1); + } + SystemEventArgsFreeList[SystemEventArgsFreeListSize - 1] = nullptr; + NextFreeSystemEventArgs = SystemEventArgsFreeList + 1; + Plugin::ReleaseSystemEventArgs = releaseSystemEventArgs; + Plugin::SystemEventArgsConstructor = systemEventArgsConstructor; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; @@ -8232,9 +9346,9 @@ DLLEXPORT void Init( NextFreeSystemAction = SystemActionFreeList + 1; Plugin::ReleaseSystemAction = releaseSystemAction; Plugin::SystemActionConstructor = systemActionConstructor; - Plugin::SystemActionInvoke = systemActionInvoke; Plugin::SystemActionAdd = systemActionAdd; Plugin::SystemActionRemove = systemActionRemove; + Plugin::SystemActionInvoke = systemActionInvoke; SystemActionSystemSingleFreeListSize = maxManagedObjects; SystemActionSystemSingleFreeList = new System::Action1*[SystemActionSystemSingleFreeListSize]; for (int32_t i = 0, end = SystemActionSystemSingleFreeListSize - 1; i < end; ++i) @@ -8245,9 +9359,9 @@ DLLEXPORT void Init( NextFreeSystemActionSystemSingle = SystemActionSystemSingleFreeList + 1; Plugin::ReleaseSystemActionSystemSingle = releaseSystemActionSystemSingle; Plugin::SystemActionSystemSingleConstructor = systemActionSystemSingleConstructor; - Plugin::SystemActionSystemSingleInvoke = systemActionSystemSingleInvoke; Plugin::SystemActionSystemSingleAdd = systemActionSystemSingleAdd; Plugin::SystemActionSystemSingleRemove = systemActionSystemSingleRemove; + Plugin::SystemActionSystemSingleInvoke = systemActionSystemSingleInvoke; SystemActionSystemSingle_SystemSingleFreeListSize = 100; SystemActionSystemSingle_SystemSingleFreeList = new System::Action2*[SystemActionSystemSingle_SystemSingleFreeListSize]; for (int32_t i = 0, end = SystemActionSystemSingle_SystemSingleFreeListSize - 1; i < end; ++i) @@ -8258,9 +9372,9 @@ DLLEXPORT void Init( NextFreeSystemActionSystemSingle_SystemSingle = SystemActionSystemSingle_SystemSingleFreeList + 1; Plugin::ReleaseSystemActionSystemSingle_SystemSingle = releaseSystemActionSystemSingle_SystemSingle; Plugin::SystemActionSystemSingle_SystemSingleConstructor = systemActionSystemSingle_SystemSingleConstructor; - Plugin::SystemActionSystemSingle_SystemSingleInvoke = systemActionSystemSingle_SystemSingleInvoke; Plugin::SystemActionSystemSingle_SystemSingleAdd = systemActionSystemSingle_SystemSingleAdd; Plugin::SystemActionSystemSingle_SystemSingleRemove = systemActionSystemSingle_SystemSingleRemove; + Plugin::SystemActionSystemSingle_SystemSingleInvoke = systemActionSystemSingle_SystemSingleInvoke; SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize = 50; SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList = new System::Func3*[SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize]; for (int32_t i = 0, end = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1; i < end; ++i) @@ -8271,9 +9385,9 @@ DLLEXPORT void Init( NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + 1; Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble = releaseSystemFuncSystemInt32_SystemSingle_SystemDouble; Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor = systemFuncSystemInt32_SystemSingle_SystemDoubleConstructor; - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke = systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke; Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd = systemFuncSystemInt32_SystemSingle_SystemDoubleAdd; Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove = systemFuncSystemInt32_SystemSingle_SystemDoubleRemove; + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke = systemFuncSystemInt32_SystemSingle_SystemDoubleInvoke; SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize = 25; SystemFuncSystemInt16_SystemInt32_SystemStringFreeList = new System::Func3*[SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize]; for (int32_t i = 0, end = SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1; i < end; ++i) @@ -8284,9 +9398,9 @@ DLLEXPORT void Init( NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + 1; Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString = releaseSystemFuncSystemInt16_SystemInt32_SystemString; Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor = systemFuncSystemInt16_SystemInt32_SystemStringConstructor; - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke = systemFuncSystemInt16_SystemInt32_SystemStringInvoke; Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd = systemFuncSystemInt16_SystemInt32_SystemStringAdd; Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove = systemFuncSystemInt16_SystemInt32_SystemStringRemove; + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke = systemFuncSystemInt16_SystemInt32_SystemStringInvoke; SystemAppDomainInitializerFreeListSize = maxManagedObjects; SystemAppDomainInitializerFreeList = new System::AppDomainInitializer*[SystemAppDomainInitializerFreeListSize]; for (int32_t i = 0, end = SystemAppDomainInitializerFreeListSize - 1; i < end; ++i) @@ -8297,9 +9411,9 @@ DLLEXPORT void Init( NextFreeSystemAppDomainInitializer = SystemAppDomainInitializerFreeList + 1; Plugin::ReleaseSystemAppDomainInitializer = releaseSystemAppDomainInitializer; Plugin::SystemAppDomainInitializerConstructor = systemAppDomainInitializerConstructor; - Plugin::SystemAppDomainInitializerInvoke = systemAppDomainInitializerInvoke; Plugin::SystemAppDomainInitializerAdd = systemAppDomainInitializerAdd; Plugin::SystemAppDomainInitializerRemove = systemAppDomainInitializerRemove; + Plugin::SystemAppDomainInitializerInvoke = systemAppDomainInitializerInvoke; UnityEngineEventsUnityActionFreeListSize = maxManagedObjects; UnityEngineEventsUnityActionFreeList = new UnityEngine::Events::UnityAction*[UnityEngineEventsUnityActionFreeListSize]; for (int32_t i = 0, end = UnityEngineEventsUnityActionFreeListSize - 1; i < end; ++i) @@ -8310,9 +9424,9 @@ DLLEXPORT void Init( NextFreeUnityEngineEventsUnityAction = UnityEngineEventsUnityActionFreeList + 1; Plugin::ReleaseUnityEngineEventsUnityAction = releaseUnityEngineEventsUnityAction; Plugin::UnityEngineEventsUnityActionConstructor = unityEngineEventsUnityActionConstructor; - Plugin::UnityEngineEventsUnityActionInvoke = unityEngineEventsUnityActionInvoke; Plugin::UnityEngineEventsUnityActionAdd = unityEngineEventsUnityActionAdd; Plugin::UnityEngineEventsUnityActionRemove = unityEngineEventsUnityActionRemove; + Plugin::UnityEngineEventsUnityActionInvoke = unityEngineEventsUnityActionInvoke; UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize = 10; UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList = new UnityEngine::Events::UnityAction2*[UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize]; for (int32_t i = 0, end = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1; i < end; ++i) @@ -8323,9 +9437,9 @@ DLLEXPORT void Init( NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + 1; Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = releaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode; Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor; - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke; Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd; Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke; /*END INIT BODY*/ try diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index e7989fe..e1a940a 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -181,6 +181,25 @@ namespace System template struct Array5; } +//////////////////////////////////////////////////////////////// +// 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 Boolean = Boolean; + using Single = float; + using Double = double; +} + /*BEGIN TYPE DECLARATIONS*/ namespace System { @@ -322,6 +341,17 @@ namespace System } } +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct List; + } + } +} + namespace System { namespace Collections @@ -498,6 +528,49 @@ namespace UnityEngine } } +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 IComparer; + } + } +} + +namespace System +{ + struct StringComparer; +} + +namespace System +{ + struct EventArgs; +} + namespace MyGame { namespace MonoBehaviours @@ -739,7 +812,6 @@ namespace System explicit operator float(); Object(double val); explicit operator double(); - /*END BOXING METHOD DECLARATIONS*/ }; @@ -1110,6 +1182,35 @@ namespace System 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); + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct List : System::Object + { + List(std::nullptr_t n); + List(Plugin::InternalUse iu, int32_t handle); + List(const List& other); + List(List&& other); + virtual ~List(); + List& operator=(const List& other); + List& operator=(std::nullptr_t other); + 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); }; } } @@ -1445,6 +1546,100 @@ namespace UnityEngine } } +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IComparer : System::Object + { + IComparer(std::nullptr_t n); + IComparer(Plugin::InternalUse iu, int32_t handle); + IComparer(const IComparer& other); + IComparer(IComparer&& other); + virtual ~IComparer(); + IComparer& operator=(const IComparer& other); + IComparer& operator=(std::nullptr_t other); + IComparer& operator=(IComparer&& other); + bool operator==(const IComparer& other) const; + bool operator!=(const IComparer& other) const; + int32_t CppHandle; + IComparer(); + virtual int32_t Compare(int32_t x, int32_t y); + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IComparer : System::Object + { + IComparer(std::nullptr_t n); + IComparer(Plugin::InternalUse iu, int32_t handle); + IComparer(const IComparer& other); + IComparer(IComparer&& other); + virtual ~IComparer(); + IComparer& operator=(const IComparer& other); + IComparer& operator=(std::nullptr_t other); + IComparer& operator=(IComparer&& other); + bool operator==(const IComparer& other) const; + bool operator!=(const IComparer& other) const; + int32_t CppHandle; + IComparer(); + virtual int32_t Compare(System::String x, System::String y); + }; + } + } +} + +namespace System +{ + struct StringComparer : System::Object + { + StringComparer(std::nullptr_t n); + StringComparer(Plugin::InternalUse iu, int32_t handle); + StringComparer(const StringComparer& other); + StringComparer(StringComparer&& other); + virtual ~StringComparer(); + StringComparer& operator=(const StringComparer& other); + StringComparer& operator=(std::nullptr_t other); + StringComparer& operator=(StringComparer&& other); + bool operator==(const StringComparer& other) const; + bool operator!=(const StringComparer& other) const; + int32_t CppHandle; + StringComparer(); + 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); + }; +} + +namespace System +{ + struct EventArgs : System::Object + { + EventArgs(std::nullptr_t n); + EventArgs(Plugin::InternalUse iu, int32_t handle); + EventArgs(const EventArgs& other); + EventArgs(EventArgs&& other); + virtual ~EventArgs(); + EventArgs& operator=(const EventArgs& other); + EventArgs& operator=(std::nullptr_t other); + EventArgs& operator=(EventArgs&& other); + bool operator==(const EventArgs& other) const; + bool operator!=(const EventArgs& other) const; + int32_t CppHandle; + EventArgs(); + virtual System::String ToString(); + }; +} + namespace MyGame { namespace MonoBehaviours @@ -1789,10 +1984,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action(); - void Invoke(); - virtual void operator()(); void operator+=(System::Action& del); void operator-=(System::Action& del); + virtual void operator()(); + void Invoke(); }; } @@ -1813,10 +2008,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action1(); - void Invoke(float obj); - virtual void operator()(float obj); void operator+=(System::Action1& del); void operator-=(System::Action1& del); + virtual void operator()(float obj); + void Invoke(float obj); }; } @@ -1837,10 +2032,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action2(); - void Invoke(float arg1, float arg2); - virtual void operator()(float arg1, float arg2); void operator+=(System::Action2& del); void operator-=(System::Action2& del); + virtual void operator()(float arg1, float arg2); + void Invoke(float arg1, float arg2); }; } @@ -1861,10 +2056,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Func3(); - double Invoke(int32_t arg1, float arg2); - virtual double operator()(int32_t arg1, float arg2); 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); }; } @@ -1885,10 +2080,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Func3(); - System::String Invoke(int16_t arg1, int32_t arg2); - virtual System::String operator()(int16_t arg1, int32_t arg2); 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); }; } @@ -1909,10 +2104,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; AppDomainInitializer(); - void Invoke(System::Array1 args); - virtual void operator()(System::Array1 args); void operator+=(System::AppDomainInitializer& del); void operator-=(System::AppDomainInitializer& del); + virtual void operator()(System::Array1 args); + void Invoke(System::Array1 args); }; } @@ -1935,10 +2130,10 @@ namespace UnityEngine int32_t CppHandle; int32_t ClassHandle; UnityAction(); - void Invoke(); - virtual void operator()(); void operator+=(UnityEngine::Events::UnityAction& del); void operator-=(UnityEngine::Events::UnityAction& del); + virtual void operator()(); + void Invoke(); }; } } @@ -1962,10 +2157,10 @@ namespace UnityEngine int32_t CppHandle; int32_t ClassHandle; UnityAction2(); - void Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); - virtual void operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); 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); }; } } From b84f6c469f81add539b34f1fb15786580236c320 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 09:15:36 -0800 Subject: [PATCH 06/65] Remove dependency on the C++ standard library Update README --- README.md | 7 +- .../NativeScript/Editor/GenerateBindings.cs | 12 +- Unity/CppSource/NativeScript/Bindings.cpp | 210 ++++++++--------- Unity/CppSource/NativeScript/Bindings.h | 213 +++++++++--------- 4 files changed, 222 insertions(+), 220 deletions(-) diff --git a/README.md b/README.md index ad80b82..0128b59 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,14 @@ C++ is a much larger language than C# and some developers will prefer having mor While IL2CPP transforms C# into C++ already, it generates a lot of overhead. There are many [surprises](http://jacksondunstan.com/articles/3916) if you read through the generated C++. For example, there's overhead for any function using a static variable and an extra two pointers are stored at the beginning of every class. The same goes for all sorts of features such as `sizeof()`, mandatory null checks, and so forth. Instead, you could write C++ directly and not need to work around IL2CPP. +## 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. + # UnityNativeScripting Features -* Supports Windows, macOS, iOS, and Android (editor and standalone) +* 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++ * Object-oriented API just like in C# diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index a7b5fc1..c252acd 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -7399,7 +7399,7 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( typeParams, output); output.Append( - "::operator=(std::nullptr_t other)\n"); + "::operator=(decltype(nullptr) other)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -7913,7 +7913,7 @@ static void AppendCppBaseTypeNullptrConstructor( AppendTypeNameWithoutGenericSuffix( numberedTypeName, output); - output.Append("(std::nullptr_t n)\n"); + output.Append("(decltype(nullptr) n)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -9125,7 +9125,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("(std::nullptr_t n);\n"); + output.Append("(decltype(nullptr) n);\n"); // Constructor from handle AppendIndent(indent + 1, output); @@ -9208,7 +9208,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& operator=(std::nullptr_t other);\n"); + output.Append("& operator=(decltype(nullptr) other);\n"); // Move assignment operator to same type AppendIndent(indent + 1, output); @@ -9310,7 +9310,7 @@ static int AppendCppMethodDefinitionsBegin( AppendTypeNameWithoutGenericSuffix( enclosingTypeName, output); - output.Append("(std::nullptr_t n)\n"); + output.Append("(decltype(nullptr) n)\n"); AppendIndent(indent, output); output.Append("\t: "); AppendTypeNameWithoutGenericSuffix( @@ -9531,7 +9531,7 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("::operator=(std::nullptr_t other)\n"); + output.Append("::operator=(decltype(nullptr) other)\n"); AppendIndent(indent, output); output.Append("{\n"); AppendIndent(indent, output); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 7db5553..b0b52df 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -656,17 +656,17 @@ namespace System { } - Object::Object(std::nullptr_t n) + Object::Object(decltype(nullptr) n) : Handle(0) { } - bool Object::operator==(std::nullptr_t other) const + bool Object::operator==(decltype(nullptr) other) const { return Handle == 0; } - bool Object::operator!=(std::nullptr_t other) const + bool Object::operator!=(decltype(nullptr) other) const { return Handle != 0; } @@ -681,12 +681,12 @@ namespace System Handle = handle; } - ValueType::ValueType(std::nullptr_t n) + ValueType::ValueType(decltype(nullptr) n) { Handle = 0; } - String::String(std::nullptr_t n) + String::String(decltype(nullptr) n) : Object(Plugin::InternalUse::Only, 0) { } @@ -741,7 +741,7 @@ namespace System return *this; } - String& String::operator=(std::nullptr_t other) + String& String::operator=(decltype(nullptr) other) { if (Handle) { @@ -777,7 +777,7 @@ namespace System { } - Array::Array(std::nullptr_t n) + Array::Array(decltype(nullptr) n) : Object(Plugin::InternalUse::Only, 0) { } @@ -798,7 +798,7 @@ namespace System { namespace Diagnostics { - Stopwatch::Stopwatch(std::nullptr_t n) + Stopwatch::Stopwatch(decltype(nullptr) n) : Stopwatch(Plugin::InternalUse::Only, 0) { } @@ -846,7 +846,7 @@ namespace System return *this; } - Stopwatch& Stopwatch::operator=(std::nullptr_t other) + Stopwatch& Stopwatch::operator=(decltype(nullptr) other) { if (Handle) { @@ -936,7 +936,7 @@ namespace System namespace UnityEngine { - Object::Object(std::nullptr_t n) + Object::Object(decltype(nullptr) n) : Object(Plugin::InternalUse::Only, 0) { } @@ -984,7 +984,7 @@ namespace UnityEngine return *this; } - Object& Object::operator=(std::nullptr_t other) + Object& Object::operator=(decltype(nullptr) other) { if (Handle) { @@ -1069,7 +1069,7 @@ namespace UnityEngine namespace UnityEngine { - GameObject::GameObject(std::nullptr_t n) + GameObject::GameObject(decltype(nullptr) n) : GameObject(Plugin::InternalUse::Only, 0) { } @@ -1117,7 +1117,7 @@ namespace UnityEngine return *this; } - GameObject& GameObject::operator=(std::nullptr_t other) + GameObject& GameObject::operator=(decltype(nullptr) other) { if (Handle) { @@ -1213,7 +1213,7 @@ namespace UnityEngine namespace UnityEngine { - Component::Component(std::nullptr_t n) + Component::Component(decltype(nullptr) n) : Component(Plugin::InternalUse::Only, 0) { } @@ -1261,7 +1261,7 @@ namespace UnityEngine return *this; } - Component& Component::operator=(std::nullptr_t other) + Component& Component::operator=(decltype(nullptr) other) { if (Handle) { @@ -1308,7 +1308,7 @@ namespace UnityEngine namespace UnityEngine { - Transform::Transform(std::nullptr_t n) + Transform::Transform(decltype(nullptr) n) : Transform(Plugin::InternalUse::Only, 0) { } @@ -1356,7 +1356,7 @@ namespace UnityEngine return *this; } - Transform& Transform::operator=(std::nullptr_t other) + Transform& Transform::operator=(decltype(nullptr) other) { if (Handle) { @@ -1415,7 +1415,7 @@ namespace UnityEngine namespace UnityEngine { - Debug::Debug(std::nullptr_t n) + Debug::Debug(decltype(nullptr) n) : Debug(Plugin::InternalUse::Only, 0) { } @@ -1463,7 +1463,7 @@ namespace UnityEngine return *this; } - Debug& Debug::operator=(std::nullptr_t other) + Debug& Debug::operator=(decltype(nullptr) other) { if (Handle) { @@ -1564,7 +1564,7 @@ namespace UnityEngine namespace UnityEngine { - Collision::Collision(std::nullptr_t n) + Collision::Collision(decltype(nullptr) n) : Collision(Plugin::InternalUse::Only, 0) { } @@ -1612,7 +1612,7 @@ namespace UnityEngine return *this; } - Collision& Collision::operator=(std::nullptr_t other) + Collision& Collision::operator=(decltype(nullptr) other) { if (Handle) { @@ -1646,7 +1646,7 @@ namespace UnityEngine namespace UnityEngine { - Behaviour::Behaviour(std::nullptr_t n) + Behaviour::Behaviour(decltype(nullptr) n) : Behaviour(Plugin::InternalUse::Only, 0) { } @@ -1694,7 +1694,7 @@ namespace UnityEngine return *this; } - Behaviour& Behaviour::operator=(std::nullptr_t other) + Behaviour& Behaviour::operator=(decltype(nullptr) other) { if (Handle) { @@ -1728,7 +1728,7 @@ namespace UnityEngine namespace UnityEngine { - MonoBehaviour::MonoBehaviour(std::nullptr_t n) + MonoBehaviour::MonoBehaviour(decltype(nullptr) n) : MonoBehaviour(Plugin::InternalUse::Only, 0) { } @@ -1776,7 +1776,7 @@ namespace UnityEngine return *this; } - MonoBehaviour& MonoBehaviour::operator=(std::nullptr_t other) + MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr) other) { if (Handle) { @@ -1810,7 +1810,7 @@ namespace UnityEngine namespace UnityEngine { - AudioSettings::AudioSettings(std::nullptr_t n) + AudioSettings::AudioSettings(decltype(nullptr) n) : AudioSettings(Plugin::InternalUse::Only, 0) { } @@ -1858,7 +1858,7 @@ namespace UnityEngine return *this; } - AudioSettings& AudioSettings::operator=(std::nullptr_t other) + AudioSettings& AudioSettings::operator=(decltype(nullptr) other) { if (Handle) { @@ -1906,7 +1906,7 @@ namespace UnityEngine { namespace Networking { - NetworkTransport::NetworkTransport(std::nullptr_t n) + NetworkTransport::NetworkTransport(decltype(nullptr) n) : NetworkTransport(Plugin::InternalUse::Only, 0) { } @@ -1954,7 +1954,7 @@ namespace UnityEngine return *this; } - NetworkTransport& NetworkTransport::operator=(std::nullptr_t other) + NetworkTransport& NetworkTransport::operator=(decltype(nullptr) other) { if (Handle) { @@ -2192,7 +2192,7 @@ namespace System namespace UnityEngine { - RaycastHit::RaycastHit(std::nullptr_t n) + RaycastHit::RaycastHit(decltype(nullptr) n) : RaycastHit(Plugin::InternalUse::Only, 0) { } @@ -2240,7 +2240,7 @@ namespace UnityEngine return *this; } - RaycastHit& RaycastHit::operator=(std::nullptr_t other) + RaycastHit& RaycastHit::operator=(decltype(nullptr) other) { if (Handle) { @@ -2382,7 +2382,7 @@ namespace System { namespace Generic { - KeyValuePair::KeyValuePair(std::nullptr_t n) + KeyValuePair::KeyValuePair(decltype(nullptr) n) : KeyValuePair(Plugin::InternalUse::Only, 0) { } @@ -2430,7 +2430,7 @@ namespace System return *this; } - KeyValuePair& KeyValuePair::operator=(std::nullptr_t other) + KeyValuePair& KeyValuePair::operator=(decltype(nullptr) other) { if (Handle) { @@ -2547,7 +2547,7 @@ namespace System { namespace Generic { - List::List(std::nullptr_t n) + List::List(decltype(nullptr) n) : List(Plugin::InternalUse::Only, 0) { } @@ -2595,7 +2595,7 @@ namespace System return *this; } - List& List::operator=(std::nullptr_t other) + List& List::operator=(decltype(nullptr) other) { if (Handle) { @@ -2702,7 +2702,7 @@ namespace System { namespace Generic { - List::List(std::nullptr_t n) + List::List(decltype(nullptr) n) : List(Plugin::InternalUse::Only, 0) { } @@ -2750,7 +2750,7 @@ namespace System return *this; } - List& List::operator=(std::nullptr_t other) + List& List::operator=(decltype(nullptr) other) { if (Handle) { @@ -2857,7 +2857,7 @@ namespace System { namespace Generic { - LinkedListNode::LinkedListNode(std::nullptr_t n) + LinkedListNode::LinkedListNode(decltype(nullptr) n) : LinkedListNode(Plugin::InternalUse::Only, 0) { } @@ -2905,7 +2905,7 @@ namespace System return *this; } - LinkedListNode& LinkedListNode::operator=(std::nullptr_t other) + LinkedListNode& LinkedListNode::operator=(decltype(nullptr) other) { if (Handle) { @@ -2988,7 +2988,7 @@ namespace System { namespace CompilerServices { - StrongBox::StrongBox(std::nullptr_t n) + StrongBox::StrongBox(decltype(nullptr) n) : StrongBox(Plugin::InternalUse::Only, 0) { } @@ -3036,7 +3036,7 @@ namespace System return *this; } - StrongBox& StrongBox::operator=(std::nullptr_t other) + StrongBox& StrongBox::operator=(decltype(nullptr) other) { if (Handle) { @@ -3119,7 +3119,7 @@ namespace System { namespace ObjectModel { - Collection::Collection(std::nullptr_t n) + Collection::Collection(decltype(nullptr) n) : Collection(Plugin::InternalUse::Only, 0) { } @@ -3167,7 +3167,7 @@ namespace System return *this; } - Collection& Collection::operator=(std::nullptr_t other) + Collection& Collection::operator=(decltype(nullptr) other) { if (Handle) { @@ -3207,7 +3207,7 @@ namespace System { namespace ObjectModel { - KeyedCollection::KeyedCollection(std::nullptr_t n) + KeyedCollection::KeyedCollection(decltype(nullptr) n) : KeyedCollection(Plugin::InternalUse::Only, 0) { } @@ -3255,7 +3255,7 @@ namespace System return *this; } - KeyedCollection& KeyedCollection::operator=(std::nullptr_t other) + KeyedCollection& KeyedCollection::operator=(decltype(nullptr) other) { if (Handle) { @@ -3291,7 +3291,7 @@ namespace System namespace System { - Exception::Exception(std::nullptr_t n) + Exception::Exception(decltype(nullptr) n) : Exception(Plugin::InternalUse::Only, 0) { } @@ -3339,7 +3339,7 @@ namespace System return *this; } - Exception& Exception::operator=(std::nullptr_t other) + Exception& Exception::operator=(decltype(nullptr) other) { if (Handle) { @@ -3391,7 +3391,7 @@ namespace System namespace System { - SystemException::SystemException(std::nullptr_t n) + SystemException::SystemException(decltype(nullptr) n) : SystemException(Plugin::InternalUse::Only, 0) { } @@ -3439,7 +3439,7 @@ namespace System return *this; } - SystemException& SystemException::operator=(std::nullptr_t other) + SystemException& SystemException::operator=(decltype(nullptr) other) { if (Handle) { @@ -3473,7 +3473,7 @@ namespace System namespace System { - NullReferenceException::NullReferenceException(std::nullptr_t n) + NullReferenceException::NullReferenceException(decltype(nullptr) n) : NullReferenceException(Plugin::InternalUse::Only, 0) { } @@ -3521,7 +3521,7 @@ namespace System return *this; } - NullReferenceException& NullReferenceException::operator=(std::nullptr_t other) + NullReferenceException& NullReferenceException::operator=(decltype(nullptr) other) { if (Handle) { @@ -3670,7 +3670,7 @@ namespace System namespace UnityEngine { - Screen::Screen(std::nullptr_t n) + Screen::Screen(decltype(nullptr) n) : Screen(Plugin::InternalUse::Only, 0) { } @@ -3718,7 +3718,7 @@ namespace UnityEngine return *this; } - Screen& Screen::operator=(std::nullptr_t other) + Screen& Screen::operator=(decltype(nullptr) other) { if (Handle) { @@ -3818,7 +3818,7 @@ namespace System namespace UnityEngine { - Physics::Physics(std::nullptr_t n) + Physics::Physics(decltype(nullptr) n) : Physics(Plugin::InternalUse::Only, 0) { } @@ -3866,7 +3866,7 @@ namespace UnityEngine return *this; } - Physics& Physics::operator=(std::nullptr_t other) + Physics& Physics::operator=(decltype(nullptr) other) { if (Handle) { @@ -4006,7 +4006,7 @@ namespace System namespace UnityEngine { - Gradient::Gradient(std::nullptr_t n) + Gradient::Gradient(decltype(nullptr) n) : Gradient(Plugin::InternalUse::Only, 0) { } @@ -4054,7 +4054,7 @@ namespace UnityEngine return *this; } - Gradient& Gradient::operator=(std::nullptr_t other) + Gradient& Gradient::operator=(decltype(nullptr) other) { if (Handle) { @@ -4131,7 +4131,7 @@ namespace UnityEngine namespace System { - AppDomainSetup::AppDomainSetup(std::nullptr_t n) + AppDomainSetup::AppDomainSetup(decltype(nullptr) n) : AppDomainSetup(Plugin::InternalUse::Only, 0) { } @@ -4179,7 +4179,7 @@ namespace System return *this; } - AppDomainSetup& AppDomainSetup::operator=(std::nullptr_t other) + AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr) other) { if (Handle) { @@ -4256,7 +4256,7 @@ namespace System namespace UnityEngine { - Application::Application(std::nullptr_t n) + Application::Application(decltype(nullptr) n) : Application(Plugin::InternalUse::Only, 0) { } @@ -4304,7 +4304,7 @@ namespace UnityEngine return *this; } - Application& Application::operator=(std::nullptr_t other) + Application& Application::operator=(decltype(nullptr) other) { if (Handle) { @@ -4364,7 +4364,7 @@ namespace UnityEngine { namespace SceneManagement { - SceneManager::SceneManager(std::nullptr_t n) + SceneManager::SceneManager(decltype(nullptr) n) : SceneManager(Plugin::InternalUse::Only, 0) { } @@ -4412,7 +4412,7 @@ namespace UnityEngine return *this; } - SceneManager& SceneManager::operator=(std::nullptr_t other) + SceneManager& SceneManager::operator=(decltype(nullptr) other) { if (Handle) { @@ -4574,7 +4574,7 @@ namespace System } } - IComparer::IComparer(std::nullptr_t n) + IComparer::IComparer(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); @@ -4644,7 +4644,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(std::nullptr_t other) + IComparer& IComparer::operator=(decltype(nullptr) other) { if (Handle) { @@ -4758,7 +4758,7 @@ namespace System } } - IComparer::IComparer(std::nullptr_t n) + IComparer::IComparer(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); @@ -4828,7 +4828,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(std::nullptr_t other) + IComparer& IComparer::operator=(decltype(nullptr) other) { if (Handle) { @@ -4938,7 +4938,7 @@ namespace System } } - StringComparer::StringComparer(std::nullptr_t n) + StringComparer::StringComparer(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemStringComparer(this); @@ -5008,7 +5008,7 @@ namespace System return *this; } - StringComparer& StringComparer::operator=(std::nullptr_t other) + StringComparer& StringComparer::operator=(decltype(nullptr) other) { if (Handle) { @@ -5166,7 +5166,7 @@ namespace System } } - EventArgs::EventArgs(std::nullptr_t n) + EventArgs::EventArgs(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemEventArgs(this); @@ -5236,7 +5236,7 @@ namespace System return *this; } - EventArgs& EventArgs::operator=(std::nullptr_t other) + EventArgs& EventArgs::operator=(decltype(nullptr) other) { if (Handle) { @@ -5719,7 +5719,7 @@ namespace MyGame { namespace MonoBehaviours { - TestScript::TestScript(std::nullptr_t n) + TestScript::TestScript(decltype(nullptr) n) : TestScript(Plugin::InternalUse::Only, 0) { } @@ -5767,7 +5767,7 @@ namespace MyGame return *this; } - TestScript& TestScript::operator=(std::nullptr_t other) + TestScript& TestScript::operator=(decltype(nullptr) other) { if (Handle) { @@ -5836,7 +5836,7 @@ namespace Plugin namespace System { - Array1::Array1(std::nullptr_t n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { } @@ -5884,7 +5884,7 @@ namespace System return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -6099,7 +6099,7 @@ namespace Plugin namespace System { - Array1::Array1(std::nullptr_t n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { } @@ -6147,7 +6147,7 @@ namespace System return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -6214,7 +6214,7 @@ namespace System namespace System { - Array2::Array2(std::nullptr_t n) + Array2::Array2(decltype(nullptr) n) : Array2(Plugin::InternalUse::Only, 0) { } @@ -6262,7 +6262,7 @@ namespace System return *this; } - Array2& Array2::operator=(std::nullptr_t other) + Array2& Array2::operator=(decltype(nullptr) other) { if (Handle) { @@ -6342,7 +6342,7 @@ namespace System namespace System { - Array3::Array3(std::nullptr_t n) + Array3::Array3(decltype(nullptr) n) : Array3(Plugin::InternalUse::Only, 0) { } @@ -6390,7 +6390,7 @@ namespace System return *this; } - Array3& Array3::operator=(std::nullptr_t other) + Array3& Array3::operator=(decltype(nullptr) other) { if (Handle) { @@ -6504,7 +6504,7 @@ namespace Plugin namespace System { - Array1::Array1(std::nullptr_t n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { } @@ -6552,7 +6552,7 @@ namespace System return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -6653,7 +6653,7 @@ namespace Plugin namespace System { - Array1::Array1(std::nullptr_t n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { } @@ -6701,7 +6701,7 @@ namespace System return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -6802,7 +6802,7 @@ namespace Plugin namespace System { - Array1::Array1(std::nullptr_t n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { } @@ -6850,7 +6850,7 @@ namespace System return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -6951,7 +6951,7 @@ namespace Plugin namespace System { - Array1::Array1(std::nullptr_t n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { } @@ -6999,7 +6999,7 @@ namespace System return *this; } - Array1& Array1::operator=(std::nullptr_t other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -7090,7 +7090,7 @@ namespace System } } - Action::Action(std::nullptr_t n) + Action::Action(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemAction(this); @@ -7168,7 +7168,7 @@ namespace System return *this; } - Action& Action::operator=(std::nullptr_t other) + Action& Action::operator=(decltype(nullptr) other) { if (Handle) { @@ -7317,7 +7317,7 @@ namespace System } } - Action1::Action1(std::nullptr_t n) + Action1::Action1(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemActionSystemSingle(this); @@ -7395,7 +7395,7 @@ namespace System return *this; } - Action1& Action1::operator=(std::nullptr_t other) + Action1& Action1::operator=(decltype(nullptr) other) { if (Handle) { @@ -7544,7 +7544,7 @@ namespace System } } - Action2::Action2(std::nullptr_t n) + Action2::Action2(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); @@ -7622,7 +7622,7 @@ namespace System return *this; } - Action2& Action2::operator=(std::nullptr_t other) + Action2& Action2::operator=(decltype(nullptr) other) { if (Handle) { @@ -7771,7 +7771,7 @@ namespace System } } - Func3::Func3(std::nullptr_t n) + Func3::Func3(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); @@ -7849,7 +7849,7 @@ namespace System return *this; } - Func3& Func3::operator=(std::nullptr_t other) + Func3& Func3::operator=(decltype(nullptr) other) { if (Handle) { @@ -8002,7 +8002,7 @@ namespace System } } - Func3::Func3(std::nullptr_t n) + Func3::Func3(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); @@ -8080,7 +8080,7 @@ namespace System return *this; } - Func3& Func3::operator=(std::nullptr_t other) + Func3& Func3::operator=(decltype(nullptr) other) { if (Handle) { @@ -8233,7 +8233,7 @@ namespace System } } - AppDomainInitializer::AppDomainInitializer(std::nullptr_t n) + AppDomainInitializer::AppDomainInitializer(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemAppDomainInitializer(this); @@ -8311,7 +8311,7 @@ namespace System return *this; } - AppDomainInitializer& AppDomainInitializer::operator=(std::nullptr_t other) + AppDomainInitializer& AppDomainInitializer::operator=(decltype(nullptr) other) { if (Handle) { @@ -8462,7 +8462,7 @@ namespace UnityEngine } } - UnityAction::UnityAction(std::nullptr_t n) + UnityAction::UnityAction(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); @@ -8540,7 +8540,7 @@ namespace UnityEngine return *this; } - UnityAction& UnityAction::operator=(std::nullptr_t other) + UnityAction& UnityAction::operator=(decltype(nullptr) other) { if (Handle) { @@ -8692,7 +8692,7 @@ namespace UnityEngine } } - UnityAction2::UnityAction2(std::nullptr_t n) + UnityAction2::UnityAction2(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); @@ -8770,7 +8770,7 @@ namespace UnityEngine return *this; } - UnityAction2& UnityAction2::operator=(std::nullptr_t other) + UnityAction2& UnityAction2::operator=(decltype(nullptr) other) { if (Handle) { diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index e1a940a..c737a55 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -13,9 +13,6 @@ // For int32_t, etc. #include -// For nullptr_t -#include - //////////////////////////////////////////////////////////////// // Plugin internals //////////////////////////////////////////////////////////////// @@ -759,10 +756,10 @@ namespace System { int32_t Handle; Object(Plugin::InternalUse iu, int32_t handle); - Object(std::nullptr_t n); + Object(decltype(nullptr) n); virtual ~Object() = default; - bool operator==(std::nullptr_t other) const; - bool operator!=(std::nullptr_t other) const; + bool operator==(decltype(nullptr) other) const; + bool operator!=(decltype(nullptr) other) const; virtual void ThrowReferenceToThis(); /*BEGIN BOXING METHOD DECLARATIONS*/ @@ -819,18 +816,18 @@ namespace System { int32_t Handle; ValueType(Plugin::InternalUse iu, int32_t handle); - ValueType(std::nullptr_t n); + ValueType(decltype(nullptr) n); }; struct String : Object { String(Plugin::InternalUse iu, int32_t handle); - String(std::nullptr_t n); + String(decltype(nullptr) n); String(const String& other); String(String&& other); virtual ~String(); String& operator=(const String& other); - String& operator=(std::nullptr_t other); + String& operator=(decltype(nullptr) other); String& operator=(String&& other); String(); String(const char* chars); @@ -839,7 +836,7 @@ namespace System struct Array : Object { Array(Plugin::InternalUse iu, int32_t handle); - Array(std::nullptr_t n); + Array(decltype(nullptr) n); int32_t GetLength(); int32_t GetRank(); }; @@ -852,13 +849,13 @@ namespace System { struct Stopwatch : System::Object { - Stopwatch(std::nullptr_t n); + Stopwatch(decltype(nullptr) n); Stopwatch(Plugin::InternalUse iu, int32_t handle); Stopwatch(const Stopwatch& other); Stopwatch(Stopwatch&& other); virtual ~Stopwatch(); Stopwatch& operator=(const Stopwatch& other); - Stopwatch& operator=(std::nullptr_t other); + Stopwatch& operator=(decltype(nullptr) other); Stopwatch& operator=(Stopwatch&& other); bool operator==(const Stopwatch& other) const; bool operator!=(const Stopwatch& other) const; @@ -874,13 +871,13 @@ namespace UnityEngine { struct Object : System::Object { - Object(std::nullptr_t n); + Object(decltype(nullptr) n); Object(Plugin::InternalUse iu, int32_t handle); Object(const Object& other); Object(Object&& other); virtual ~Object(); Object& operator=(const Object& other); - Object& operator=(std::nullptr_t other); + Object& operator=(decltype(nullptr) other); Object& operator=(Object&& other); bool operator==(const Object& other) const; bool operator!=(const Object& other) const; @@ -895,13 +892,13 @@ namespace UnityEngine { struct GameObject : UnityEngine::Object { - GameObject(std::nullptr_t n); + GameObject(decltype(nullptr) n); GameObject(Plugin::InternalUse iu, int32_t handle); GameObject(const GameObject& other); GameObject(GameObject&& other); virtual ~GameObject(); GameObject& operator=(const GameObject& other); - GameObject& operator=(std::nullptr_t other); + GameObject& operator=(decltype(nullptr) other); GameObject& operator=(GameObject&& other); bool operator==(const GameObject& other) const; bool operator!=(const GameObject& other) const; @@ -916,13 +913,13 @@ namespace UnityEngine { struct Component : UnityEngine::Object { - Component(std::nullptr_t n); + Component(decltype(nullptr) n); Component(Plugin::InternalUse iu, int32_t handle); Component(const Component& other); Component(Component&& other); virtual ~Component(); Component& operator=(const Component& other); - Component& operator=(std::nullptr_t other); + Component& operator=(decltype(nullptr) other); Component& operator=(Component&& other); bool operator==(const Component& other) const; bool operator!=(const Component& other) const; @@ -934,13 +931,13 @@ namespace UnityEngine { struct Transform : UnityEngine::Component { - Transform(std::nullptr_t n); + Transform(decltype(nullptr) n); Transform(Plugin::InternalUse iu, int32_t handle); Transform(const Transform& other); Transform(Transform&& other); virtual ~Transform(); Transform& operator=(const Transform& other); - Transform& operator=(std::nullptr_t other); + Transform& operator=(decltype(nullptr) other); Transform& operator=(Transform&& other); bool operator==(const Transform& other) const; bool operator!=(const Transform& other) const; @@ -953,13 +950,13 @@ namespace UnityEngine { struct Debug : System::Object { - Debug(std::nullptr_t n); + Debug(decltype(nullptr) n); Debug(Plugin::InternalUse iu, int32_t handle); Debug(const Debug& other); Debug(Debug&& other); virtual ~Debug(); Debug& operator=(const Debug& other); - Debug& operator=(std::nullptr_t other); + Debug& operator=(decltype(nullptr) other); Debug& operator=(Debug&& other); bool operator==(const Debug& other) const; bool operator!=(const Debug& other) const; @@ -985,13 +982,13 @@ namespace UnityEngine { struct Collision : System::Object { - Collision(std::nullptr_t n); + Collision(decltype(nullptr) n); Collision(Plugin::InternalUse iu, int32_t handle); Collision(const Collision& other); Collision(Collision&& other); virtual ~Collision(); Collision& operator=(const Collision& other); - Collision& operator=(std::nullptr_t other); + Collision& operator=(decltype(nullptr) other); Collision& operator=(Collision&& other); bool operator==(const Collision& other) const; bool operator!=(const Collision& other) const; @@ -1002,13 +999,13 @@ namespace UnityEngine { struct Behaviour : UnityEngine::Component { - Behaviour(std::nullptr_t n); + Behaviour(decltype(nullptr) n); Behaviour(Plugin::InternalUse iu, int32_t handle); Behaviour(const Behaviour& other); Behaviour(Behaviour&& other); virtual ~Behaviour(); Behaviour& operator=(const Behaviour& other); - Behaviour& operator=(std::nullptr_t other); + Behaviour& operator=(decltype(nullptr) other); Behaviour& operator=(Behaviour&& other); bool operator==(const Behaviour& other) const; bool operator!=(const Behaviour& other) const; @@ -1019,13 +1016,13 @@ namespace UnityEngine { struct MonoBehaviour : UnityEngine::Behaviour { - MonoBehaviour(std::nullptr_t n); + MonoBehaviour(decltype(nullptr) n); MonoBehaviour(Plugin::InternalUse iu, int32_t handle); MonoBehaviour(const MonoBehaviour& other); MonoBehaviour(MonoBehaviour&& other); virtual ~MonoBehaviour(); MonoBehaviour& operator=(const MonoBehaviour& other); - MonoBehaviour& operator=(std::nullptr_t other); + MonoBehaviour& operator=(decltype(nullptr) other); MonoBehaviour& operator=(MonoBehaviour&& other); bool operator==(const MonoBehaviour& other) const; bool operator!=(const MonoBehaviour& other) const; @@ -1036,13 +1033,13 @@ namespace UnityEngine { struct AudioSettings : System::Object { - AudioSettings(std::nullptr_t n); + AudioSettings(decltype(nullptr) n); AudioSettings(Plugin::InternalUse iu, int32_t handle); AudioSettings(const AudioSettings& other); AudioSettings(AudioSettings&& other); virtual ~AudioSettings(); AudioSettings& operator=(const AudioSettings& other); - AudioSettings& operator=(std::nullptr_t other); + AudioSettings& operator=(decltype(nullptr) other); AudioSettings& operator=(AudioSettings&& other); bool operator==(const AudioSettings& other) const; bool operator!=(const AudioSettings& other) const; @@ -1056,13 +1053,13 @@ namespace UnityEngine { struct NetworkTransport : System::Object { - NetworkTransport(std::nullptr_t n); + NetworkTransport(decltype(nullptr) n); NetworkTransport(Plugin::InternalUse iu, int32_t handle); NetworkTransport(const NetworkTransport& other); NetworkTransport(NetworkTransport&& other); virtual ~NetworkTransport(); NetworkTransport& operator=(const NetworkTransport& other); - NetworkTransport& operator=(std::nullptr_t other); + NetworkTransport& operator=(decltype(nullptr) other); NetworkTransport& operator=(NetworkTransport&& other); bool operator==(const NetworkTransport& other) const; bool operator!=(const NetworkTransport& other) const; @@ -1118,13 +1115,13 @@ namespace UnityEngine { struct RaycastHit : System::ValueType { - RaycastHit(std::nullptr_t n); + RaycastHit(decltype(nullptr) n); RaycastHit(Plugin::InternalUse iu, int32_t handle); RaycastHit(const RaycastHit& other); RaycastHit(RaycastHit&& other); virtual ~RaycastHit(); RaycastHit& operator=(const RaycastHit& other); - RaycastHit& operator=(std::nullptr_t other); + RaycastHit& operator=(decltype(nullptr) other); RaycastHit& operator=(RaycastHit&& other); bool operator==(const RaycastHit& other) const; bool operator!=(const RaycastHit& other) const; @@ -1142,13 +1139,13 @@ namespace System { template<> struct KeyValuePair : System::ValueType { - KeyValuePair(std::nullptr_t n); + KeyValuePair(decltype(nullptr) n); KeyValuePair(Plugin::InternalUse iu, int32_t handle); KeyValuePair(const KeyValuePair& other); KeyValuePair(KeyValuePair&& other); virtual ~KeyValuePair(); KeyValuePair& operator=(const KeyValuePair& other); - KeyValuePair& operator=(std::nullptr_t other); + KeyValuePair& operator=(decltype(nullptr) other); KeyValuePair& operator=(KeyValuePair&& other); bool operator==(const KeyValuePair& other) const; bool operator!=(const KeyValuePair& other) const; @@ -1168,13 +1165,13 @@ namespace System { template<> struct List : System::Object { - List(std::nullptr_t n); + List(decltype(nullptr) n); List(Plugin::InternalUse iu, int32_t handle); List(const List& other); List(List&& other); virtual ~List(); List& operator=(const List& other); - List& operator=(std::nullptr_t other); + List& operator=(decltype(nullptr) other); List& operator=(List&& other); bool operator==(const List& other) const; bool operator!=(const List& other) const; @@ -1196,13 +1193,13 @@ namespace System { template<> struct List : System::Object { - List(std::nullptr_t n); + List(decltype(nullptr) n); List(Plugin::InternalUse iu, int32_t handle); List(const List& other); List(List&& other); virtual ~List(); List& operator=(const List& other); - List& operator=(std::nullptr_t other); + List& operator=(decltype(nullptr) other); List& operator=(List&& other); bool operator==(const List& other) const; bool operator!=(const List& other) const; @@ -1224,13 +1221,13 @@ namespace System { template<> struct LinkedListNode : System::Object { - LinkedListNode(std::nullptr_t n); + LinkedListNode(decltype(nullptr) n); LinkedListNode(Plugin::InternalUse iu, int32_t handle); LinkedListNode(const LinkedListNode& other); LinkedListNode(LinkedListNode&& other); virtual ~LinkedListNode(); LinkedListNode& operator=(const LinkedListNode& other); - LinkedListNode& operator=(std::nullptr_t other); + LinkedListNode& operator=(decltype(nullptr) other); LinkedListNode& operator=(LinkedListNode&& other); bool operator==(const LinkedListNode& other) const; bool operator!=(const LinkedListNode& other) const; @@ -1250,13 +1247,13 @@ namespace System { template<> struct StrongBox : System::Object { - StrongBox(std::nullptr_t n); + StrongBox(decltype(nullptr) n); StrongBox(Plugin::InternalUse iu, int32_t handle); StrongBox(const StrongBox& other); StrongBox(StrongBox&& other); virtual ~StrongBox(); StrongBox& operator=(const StrongBox& other); - StrongBox& operator=(std::nullptr_t other); + StrongBox& operator=(decltype(nullptr) other); StrongBox& operator=(StrongBox&& other); bool operator==(const StrongBox& other) const; bool operator!=(const StrongBox& other) const; @@ -1276,13 +1273,13 @@ namespace System { template<> struct Collection : System::Object { - Collection(std::nullptr_t n); + Collection(decltype(nullptr) n); Collection(Plugin::InternalUse iu, int32_t handle); Collection(const Collection& other); Collection(Collection&& other); virtual ~Collection(); Collection& operator=(const Collection& other); - Collection& operator=(std::nullptr_t other); + Collection& operator=(decltype(nullptr) other); Collection& operator=(Collection&& other); bool operator==(const Collection& other) const; bool operator!=(const Collection& other) const; @@ -1299,13 +1296,13 @@ namespace System { template<> struct KeyedCollection : System::Collections::ObjectModel::Collection { - KeyedCollection(std::nullptr_t n); + KeyedCollection(decltype(nullptr) n); KeyedCollection(Plugin::InternalUse iu, int32_t handle); KeyedCollection(const KeyedCollection& other); KeyedCollection(KeyedCollection&& other); virtual ~KeyedCollection(); KeyedCollection& operator=(const KeyedCollection& other); - KeyedCollection& operator=(std::nullptr_t other); + KeyedCollection& operator=(decltype(nullptr) other); KeyedCollection& operator=(KeyedCollection&& other); bool operator==(const KeyedCollection& other) const; bool operator!=(const KeyedCollection& other) const; @@ -1318,13 +1315,13 @@ namespace System { struct Exception : System::Object { - Exception(std::nullptr_t n); + Exception(decltype(nullptr) n); Exception(Plugin::InternalUse iu, int32_t handle); Exception(const Exception& other); Exception(Exception&& other); virtual ~Exception(); Exception& operator=(const Exception& other); - Exception& operator=(std::nullptr_t other); + Exception& operator=(decltype(nullptr) other); Exception& operator=(Exception&& other); bool operator==(const Exception& other) const; bool operator!=(const Exception& other) const; @@ -1336,13 +1333,13 @@ namespace System { struct SystemException : System::Exception { - SystemException(std::nullptr_t n); + SystemException(decltype(nullptr) n); SystemException(Plugin::InternalUse iu, int32_t handle); SystemException(const SystemException& other); SystemException(SystemException&& other); virtual ~SystemException(); SystemException& operator=(const SystemException& other); - SystemException& operator=(std::nullptr_t other); + SystemException& operator=(decltype(nullptr) other); SystemException& operator=(SystemException&& other); bool operator==(const SystemException& other) const; bool operator!=(const SystemException& other) const; @@ -1353,13 +1350,13 @@ namespace System { struct NullReferenceException : System::SystemException { - NullReferenceException(std::nullptr_t n); + NullReferenceException(decltype(nullptr) n); NullReferenceException(Plugin::InternalUse iu, int32_t handle); NullReferenceException(const NullReferenceException& other); NullReferenceException(NullReferenceException&& other); virtual ~NullReferenceException(); NullReferenceException& operator=(const NullReferenceException& other); - NullReferenceException& operator=(std::nullptr_t other); + NullReferenceException& operator=(decltype(nullptr) other); NullReferenceException& operator=(NullReferenceException&& other); bool operator==(const NullReferenceException& other) const; bool operator!=(const NullReferenceException& other) const; @@ -1387,13 +1384,13 @@ namespace UnityEngine { struct Screen : System::Object { - Screen(std::nullptr_t n); + Screen(decltype(nullptr) n); Screen(Plugin::InternalUse iu, int32_t handle); Screen(const Screen& other); Screen(Screen&& other); virtual ~Screen(); Screen& operator=(const Screen& other); - Screen& operator=(std::nullptr_t other); + Screen& operator=(decltype(nullptr) other); Screen& operator=(Screen&& other); bool operator==(const Screen& other) const; bool operator!=(const Screen& other) const; @@ -1416,13 +1413,13 @@ namespace UnityEngine { struct Physics : System::Object { - Physics(std::nullptr_t n); + Physics(decltype(nullptr) n); Physics(Plugin::InternalUse iu, int32_t handle); Physics(const Physics& other); Physics(Physics&& other); virtual ~Physics(); Physics& operator=(const Physics& other); - Physics& operator=(std::nullptr_t other); + Physics& operator=(decltype(nullptr) other); Physics& operator=(Physics&& other); bool operator==(const Physics& other) const; bool operator!=(const Physics& other) const; @@ -1457,13 +1454,13 @@ namespace UnityEngine { struct Gradient : System::Object { - Gradient(std::nullptr_t n); + Gradient(decltype(nullptr) n); Gradient(Plugin::InternalUse iu, int32_t handle); Gradient(const Gradient& other); Gradient(Gradient&& other); virtual ~Gradient(); Gradient& operator=(const Gradient& other); - Gradient& operator=(std::nullptr_t other); + Gradient& operator=(decltype(nullptr) other); Gradient& operator=(Gradient&& other); bool operator==(const Gradient& other) const; bool operator!=(const Gradient& other) const; @@ -1477,13 +1474,13 @@ namespace System { struct AppDomainSetup : System::Object { - AppDomainSetup(std::nullptr_t n); + AppDomainSetup(decltype(nullptr) n); AppDomainSetup(Plugin::InternalUse iu, int32_t handle); AppDomainSetup(const AppDomainSetup& other); AppDomainSetup(AppDomainSetup&& other); virtual ~AppDomainSetup(); AppDomainSetup& operator=(const AppDomainSetup& other); - AppDomainSetup& operator=(std::nullptr_t other); + AppDomainSetup& operator=(decltype(nullptr) other); AppDomainSetup& operator=(AppDomainSetup&& other); bool operator==(const AppDomainSetup& other) const; bool operator!=(const AppDomainSetup& other) const; @@ -1497,13 +1494,13 @@ namespace UnityEngine { struct Application : System::Object { - Application(std::nullptr_t n); + Application(decltype(nullptr) n); Application(Plugin::InternalUse iu, int32_t handle); Application(const Application& other); Application(Application&& other); virtual ~Application(); Application& operator=(const Application& other); - Application& operator=(std::nullptr_t other); + Application& operator=(decltype(nullptr) other); Application& operator=(Application&& other); bool operator==(const Application& other) const; bool operator!=(const Application& other) const; @@ -1518,13 +1515,13 @@ namespace UnityEngine { struct SceneManager : System::Object { - SceneManager(std::nullptr_t n); + SceneManager(decltype(nullptr) n); SceneManager(Plugin::InternalUse iu, int32_t handle); SceneManager(const SceneManager& other); SceneManager(SceneManager&& other); virtual ~SceneManager(); SceneManager& operator=(const SceneManager& other); - SceneManager& operator=(std::nullptr_t other); + SceneManager& operator=(decltype(nullptr) other); SceneManager& operator=(SceneManager&& other); bool operator==(const SceneManager& other) const; bool operator!=(const SceneManager& other) const; @@ -1554,13 +1551,13 @@ namespace System { template<> struct IComparer : System::Object { - IComparer(std::nullptr_t n); + IComparer(decltype(nullptr) n); IComparer(Plugin::InternalUse iu, int32_t handle); IComparer(const IComparer& other); IComparer(IComparer&& other); virtual ~IComparer(); IComparer& operator=(const IComparer& other); - IComparer& operator=(std::nullptr_t other); + IComparer& operator=(decltype(nullptr) other); IComparer& operator=(IComparer&& other); bool operator==(const IComparer& other) const; bool operator!=(const IComparer& other) const; @@ -1580,13 +1577,13 @@ namespace System { template<> struct IComparer : System::Object { - IComparer(std::nullptr_t n); + IComparer(decltype(nullptr) n); IComparer(Plugin::InternalUse iu, int32_t handle); IComparer(const IComparer& other); IComparer(IComparer&& other); virtual ~IComparer(); IComparer& operator=(const IComparer& other); - IComparer& operator=(std::nullptr_t other); + IComparer& operator=(decltype(nullptr) other); IComparer& operator=(IComparer&& other); bool operator==(const IComparer& other) const; bool operator!=(const IComparer& other) const; @@ -1602,13 +1599,13 @@ namespace System { struct StringComparer : System::Object { - StringComparer(std::nullptr_t n); + StringComparer(decltype(nullptr) n); StringComparer(Plugin::InternalUse iu, int32_t handle); StringComparer(const StringComparer& other); StringComparer(StringComparer&& other); virtual ~StringComparer(); StringComparer& operator=(const StringComparer& other); - StringComparer& operator=(std::nullptr_t other); + StringComparer& operator=(decltype(nullptr) other); StringComparer& operator=(StringComparer&& other); bool operator==(const StringComparer& other) const; bool operator!=(const StringComparer& other) const; @@ -1624,13 +1621,13 @@ namespace System { struct EventArgs : System::Object { - EventArgs(std::nullptr_t n); + EventArgs(decltype(nullptr) n); EventArgs(Plugin::InternalUse iu, int32_t handle); EventArgs(const EventArgs& other); EventArgs(EventArgs&& other); virtual ~EventArgs(); EventArgs& operator=(const EventArgs& other); - EventArgs& operator=(std::nullptr_t other); + EventArgs& operator=(decltype(nullptr) other); EventArgs& operator=(EventArgs&& other); bool operator==(const EventArgs& other) const; bool operator!=(const EventArgs& other) const; @@ -1646,13 +1643,13 @@ namespace MyGame { struct TestScript : UnityEngine::MonoBehaviour { - TestScript(std::nullptr_t n); + TestScript(decltype(nullptr) n); TestScript(Plugin::InternalUse iu, int32_t handle); TestScript(const TestScript& other); TestScript(TestScript&& other); virtual ~TestScript(); TestScript& operator=(const TestScript& other); - TestScript& operator=(std::nullptr_t other); + TestScript& operator=(decltype(nullptr) other); TestScript& operator=(TestScript&& other); bool operator==(const TestScript& other) const; bool operator!=(const TestScript& other) const; @@ -1680,13 +1677,13 @@ namespace System { template<> struct Array1 : System::Array { - Array1(std::nullptr_t n); + Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); Array1& operator=(const Array1& other); - Array1& operator=(std::nullptr_t other); + Array1& operator=(decltype(nullptr) other); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -1774,13 +1771,13 @@ namespace System { template<> struct Array1 : System::Array { - Array1(std::nullptr_t n); + Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); Array1& operator=(const Array1& other); - Array1& operator=(std::nullptr_t other); + Array1& operator=(decltype(nullptr) other); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -1795,13 +1792,13 @@ namespace System { template<> struct Array2 : System::Array { - Array2(std::nullptr_t n); + Array2(decltype(nullptr) n); Array2(Plugin::InternalUse iu, int32_t handle); Array2(const Array2& other); Array2(Array2&& other); virtual ~Array2(); Array2& operator=(const Array2& other); - Array2& operator=(std::nullptr_t other); + Array2& operator=(decltype(nullptr) other); Array2& operator=(Array2&& other); bool operator==(const Array2& other) const; bool operator!=(const Array2& other) const; @@ -1817,13 +1814,13 @@ namespace System { template<> struct Array3 : System::Array { - Array3(std::nullptr_t n); + Array3(decltype(nullptr) n); Array3(Plugin::InternalUse iu, int32_t handle); Array3(const Array3& other); Array3(Array3&& other); virtual ~Array3(); Array3& operator=(const Array3& other); - Array3& operator=(std::nullptr_t other); + Array3& operator=(decltype(nullptr) other); Array3& operator=(Array3&& other); bool operator==(const Array3& other) const; bool operator!=(const Array3& other) const; @@ -1851,13 +1848,13 @@ namespace System { template<> struct Array1 : System::Array { - Array1(std::nullptr_t n); + Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); Array1& operator=(const Array1& other); - Array1& operator=(std::nullptr_t other); + Array1& operator=(decltype(nullptr) other); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -1884,13 +1881,13 @@ namespace System { template<> struct Array1 : System::Array { - Array1(std::nullptr_t n); + Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); Array1& operator=(const Array1& other); - Array1& operator=(std::nullptr_t other); + Array1& operator=(decltype(nullptr) other); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -1917,13 +1914,13 @@ namespace System { template<> struct Array1 : System::Array { - Array1(std::nullptr_t n); + Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); Array1& operator=(const Array1& other); - Array1& operator=(std::nullptr_t other); + Array1& operator=(decltype(nullptr) other); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -1950,13 +1947,13 @@ namespace System { template<> struct Array1 : System::Array { - Array1(std::nullptr_t n); + Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); Array1(const Array1& other); Array1(Array1&& other); virtual ~Array1(); Array1& operator=(const Array1& other); - Array1& operator=(std::nullptr_t other); + Array1& operator=(decltype(nullptr) other); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -1971,13 +1968,13 @@ namespace System { struct Action : System::Object { - Action(std::nullptr_t n); + Action(decltype(nullptr) n); Action(Plugin::InternalUse iu, int32_t handle); Action(const Action& other); Action(Action&& other); virtual ~Action(); Action& operator=(const Action& other); - Action& operator=(std::nullptr_t other); + Action& operator=(decltype(nullptr) other); Action& operator=(Action&& other); bool operator==(const Action& other) const; bool operator!=(const Action& other) const; @@ -1995,13 +1992,13 @@ namespace System { template<> struct Action1 : System::Object { - Action1(std::nullptr_t n); + Action1(decltype(nullptr) n); Action1(Plugin::InternalUse iu, int32_t handle); Action1(const Action1& other); Action1(Action1&& other); virtual ~Action1(); Action1& operator=(const Action1& other); - Action1& operator=(std::nullptr_t other); + Action1& operator=(decltype(nullptr) other); Action1& operator=(Action1&& other); bool operator==(const Action1& other) const; bool operator!=(const Action1& other) const; @@ -2019,13 +2016,13 @@ namespace System { template<> struct Action2 : System::Object { - Action2(std::nullptr_t n); + Action2(decltype(nullptr) n); Action2(Plugin::InternalUse iu, int32_t handle); Action2(const Action2& other); Action2(Action2&& other); virtual ~Action2(); Action2& operator=(const Action2& other); - Action2& operator=(std::nullptr_t other); + Action2& operator=(decltype(nullptr) other); Action2& operator=(Action2&& other); bool operator==(const Action2& other) const; bool operator!=(const Action2& other) const; @@ -2043,13 +2040,13 @@ namespace System { template<> struct Func3 : System::Object { - Func3(std::nullptr_t n); + Func3(decltype(nullptr) n); Func3(Plugin::InternalUse iu, int32_t handle); Func3(const Func3& other); Func3(Func3&& other); virtual ~Func3(); Func3& operator=(const Func3& other); - Func3& operator=(std::nullptr_t other); + Func3& operator=(decltype(nullptr) other); Func3& operator=(Func3&& other); bool operator==(const Func3& other) const; bool operator!=(const Func3& other) const; @@ -2067,13 +2064,13 @@ namespace System { template<> struct Func3 : System::Object { - Func3(std::nullptr_t n); + Func3(decltype(nullptr) n); Func3(Plugin::InternalUse iu, int32_t handle); Func3(const Func3& other); Func3(Func3&& other); virtual ~Func3(); Func3& operator=(const Func3& other); - Func3& operator=(std::nullptr_t other); + Func3& operator=(decltype(nullptr) other); Func3& operator=(Func3&& other); bool operator==(const Func3& other) const; bool operator!=(const Func3& other) const; @@ -2091,13 +2088,13 @@ namespace System { struct AppDomainInitializer : System::Object { - AppDomainInitializer(std::nullptr_t n); + AppDomainInitializer(decltype(nullptr) n); AppDomainInitializer(Plugin::InternalUse iu, int32_t handle); AppDomainInitializer(const AppDomainInitializer& other); AppDomainInitializer(AppDomainInitializer&& other); virtual ~AppDomainInitializer(); AppDomainInitializer& operator=(const AppDomainInitializer& other); - AppDomainInitializer& operator=(std::nullptr_t other); + AppDomainInitializer& operator=(decltype(nullptr) other); AppDomainInitializer& operator=(AppDomainInitializer&& other); bool operator==(const AppDomainInitializer& other) const; bool operator!=(const AppDomainInitializer& other) const; @@ -2117,13 +2114,13 @@ namespace UnityEngine { struct UnityAction : System::Object { - UnityAction(std::nullptr_t n); + UnityAction(decltype(nullptr) n); UnityAction(Plugin::InternalUse iu, int32_t handle); UnityAction(const UnityAction& other); UnityAction(UnityAction&& other); virtual ~UnityAction(); UnityAction& operator=(const UnityAction& other); - UnityAction& operator=(std::nullptr_t other); + UnityAction& operator=(decltype(nullptr) other); UnityAction& operator=(UnityAction&& other); bool operator==(const UnityAction& other) const; bool operator!=(const UnityAction& other) const; @@ -2144,13 +2141,13 @@ namespace UnityEngine { template<> struct UnityAction2 : System::Object { - UnityAction2(std::nullptr_t n); + UnityAction2(decltype(nullptr) n); UnityAction2(Plugin::InternalUse iu, int32_t handle); UnityAction2(const UnityAction2& other); UnityAction2(UnityAction2&& other); virtual ~UnityAction2(); UnityAction2& operator=(const UnityAction2& other); - UnityAction2& operator=(std::nullptr_t other); + UnityAction2& operator=(decltype(nullptr) other); UnityAction2& operator=(UnityAction2&& other); bool operator==(const UnityAction2& other) const; bool operator!=(const UnityAction2& other) const; From ffe00cf5cc1bdae3f2e70d08ae808d6664e3e280 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 11:12:07 -0800 Subject: [PATCH 07/65] Cache array lengths and rank in C++ --- .../NativeScript/Editor/GenerateBindings.cs | 295 +++++++++++++--- Unity/CppSource/NativeScript/Bindings.cpp | 321 +++++++++++++++++- Unity/CppSource/NativeScript/Bindings.h | 18 + 3 files changed, 574 insertions(+), 60 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index c252acd..d68fa90 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -1475,6 +1475,8 @@ static void AppendType( baseType.Namespace, baseType.GetGenericArguments(), isStatic, + (extraIndent, subject) => {}, + (extraIndent, subject) => {}, indent, builders.CppMethodDefinitions); @@ -3665,6 +3667,8 @@ static void AppendMonoBehaviour( "UnityEngine", null, false, + (extraIndent, subject) => {}, + (extraIndent, subject) => {}, cppIndent, builders.CppMethodDefinitions); AppendCppMethodDefinitionsEnd( @@ -4152,9 +4156,98 @@ static void AppendArray( "System", null, false, + (extraIndent, subject) => { + AppendIndent( + extraIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(subject); + builders.CppMethodDefinitions.Append( + "InternalLength = 0;\n"); + AppendIndent( + extraIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(subject); + builders.CppMethodDefinitions.Append( + "InternalRank = 0;\n"); + if (rank > 1) + { + for (int i = 0; i < rank; ++i) + { + AppendIndent( + extraIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(subject); + builders.CppMethodDefinitions.Append( + "InternalLengths["); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append( + "] = 0;\n"); + } + } + }, + (extraIndent, subject) => { + AppendIndent( + extraIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "InternalLength = "); + builders.CppMethodDefinitions.Append(subject); + builders.CppMethodDefinitions.Append( + "InternalLength;\n"); + AppendIndent( + extraIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "InternalRank = "); + builders.CppMethodDefinitions.Append(subject); + builders.CppMethodDefinitions.Append( + "InternalRank;\n"); + if (rank > 1) + { + for (int i = 0; i < rank; ++i) + { + AppendIndent( + extraIndent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "InternalLengths["); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append( + "] = "); + builders.CppMethodDefinitions.Append(subject); + builders.CppMethodDefinitions.Append( + "InternalLengths["); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append( + "];\n"); + } + } + }, indent, builders.CppMethodDefinitions); + // C++ fields + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append( + "int32_t InternalLength;\n"); + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append( + "int32_t InternalRank;\n"); + if (rank > 1) + { + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + builders.CppTypeDefinitions.Append( + "int32_t InternalLengths["); + builders.CppTypeDefinitions.Append(rank); + builders.CppTypeDefinitions.Append("];\n"); + } + AppendArrayConstructor( elementType, arrayType, @@ -4169,13 +4262,14 @@ static void AppendArray( indent, cppArrayTypeName, "GetLength", + "InternalLength", cppTypeParams, builders); // GetLength for multi-dimensional arrays if (rank > 1) { - AppendArrayGetLength( + AppendArrayMultidimensionalGetLength( elementType, arrayType, cppArrayTypeName, @@ -4189,6 +4283,7 @@ static void AppendArray( indent, cppArrayTypeName, "GetRank", + "InternalRank", cppTypeParams, builders); @@ -4923,6 +5018,42 @@ static void AppendArrayConstructor( "returnValue", builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append(";\n"); + if (rank > 1) + { + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("InternalLength = "); + for (int i = 0; i < rank; ++i) + { + builders.CppMethodDefinitions.Append("length"); + builders.CppMethodDefinitions.Append(i); + if (i != rank - 1) + { + builders.CppMethodDefinitions.Append(" * "); + } + } + builders.CppMethodDefinitions.Append(";\n"); + for (int i = 0; i < rank; ++i) + { + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("InternalLengths["); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append("] = length"); + builders.CppMethodDefinitions.Append(i); + builders.CppMethodDefinitions.Append(";\n"); + } + } + else + { + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "InternalLength = length0;\n"); + } AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -4942,9 +5073,9 @@ static void AppendArrayCppCallBaseGetIntFunction( int indent, string cppArrayTypeName, string baseFunctionName, + string memberVariableName, Type[] cppTypeParams, - StringBuilders builders - ) + StringBuilders builders) { ParameterInfo[] parameters = new ParameterInfo[0]; @@ -4972,19 +5103,54 @@ StringBuilders builders parameters, indent, builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); - AppendIndent(indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return Array::"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t returnVal = "); + builders.CppMethodDefinitions.Append(memberVariableName); + builders.CppMethodDefinitions.Append(";\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("if (returnVal == 0)\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("returnVal = Array::"); builders.CppMethodDefinitions.Append(baseFunctionName); builders.CppMethodDefinitions.Append("();\n"); - AppendIndent(indent, builders.CppMethodDefinitions); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(memberVariableName); + builders.CppMethodDefinitions.Append(" = returnVal;\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("};\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return returnVal;\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); - AppendIndent(indent, builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); } - static void AppendArrayGetLength( + static void AppendArrayMultidimensionalGetLength( Type elementType, Type arrayType, string cppArrayTypeName, @@ -5112,8 +5278,30 @@ static void AppendArrayGetLength( parameters, indent, builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("int32_t length = InternalLengths[dimension];\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("if (length)\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return length;\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); AppendCppPluginFunctionCall( false, cppArrayTypeName, @@ -5125,14 +5313,23 @@ static void AppendArrayGetLength( parameters, indent + 1, builders.CppMethodDefinitions); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "InternalLengths[dimension] = returnValue;\n"); AppendCppMethodReturn( typeof(int), TypeKind.Primitive, indent + 1, builders.CppMethodDefinitions); - AppendIndent(indent, builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append("}\n"); - AppendIndent(indent, builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); builders.CppMethodDefinitions.Append('\n'); } @@ -9117,7 +9314,7 @@ static void AppendCppTypeDefinitionBegin( { case TypeKind.Class: case TypeKind.ManagedStruct: - // Constructor from nullptr_t + // Constructor from nullptr AppendIndent(indent + 1, output); AppendTypeNameWithoutGenericSuffix( typeName, @@ -9200,7 +9397,7 @@ static void AppendCppTypeDefinitionBegin( output); output.Append("& other);\n"); - // Assignment operator to nullptr_t + // Assignment operator to nullptr AppendIndent(indent + 1, output); AppendTypeNameWithoutGenericSuffix( typeName, @@ -9282,6 +9479,8 @@ static int AppendCppMethodDefinitionsBegin( string baseTypeNamespace, Type[] baseTypeTypeParams, bool isStatic, + Action extraDefault, + Action extraCopy, int indent, StringBuilder output) { @@ -9298,7 +9497,7 @@ static int AppendCppMethodDefinitionsBegin( baseTypeNamespace = "System"; } - // Construct with nullptr_t + // Construct with nullptr AppendIndent(indent, output); AppendTypeNameWithoutGenericSuffix( enclosingTypeName, @@ -9319,11 +9518,13 @@ static int AppendCppMethodDefinitionsBegin( output.Append("(Plugin::InternalUse::Only, 0)\n"); AppendIndent(indent, output); output.Append("{\n"); + extraDefault(indent + 1, "this->"); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); output.Append("\n"); + // Handle constructor AppendIndent(indent, output); AppendTypeNameWithoutGenericSuffix( enclosingTypeName, @@ -9363,6 +9564,7 @@ static int AppendCppMethodDefinitionsBegin( output.Append(";\n"); AppendIndent(indent + 1, output); output.Append("}\n"); + extraDefault(indent + 1, "this->"); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); @@ -9396,6 +9598,7 @@ static int AppendCppMethodDefinitionsBegin( output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent(indent, output); output.Append("{\n"); + extraCopy(indent + 1, "other."); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); @@ -9431,11 +9634,14 @@ static int AppendCppMethodDefinitionsBegin( output.Append("{\n"); AppendIndent(indent + 1, output); output.Append("other.Handle = 0;\n"); + extraCopy(indent + 1, "other."); + extraDefault(indent + 1, "other."); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); output.Append("\n"); + // Destructor AppendIndent(indent, output); AppendTypeNameWithoutGenericSuffix( enclosingTypeName, @@ -9509,14 +9715,15 @@ static int AppendCppMethodDefinitionsBegin( "this", "other.Handle", output); - AppendIndent(indent, output); - output.Append("\treturn *this;\n"); + extraCopy(indent + 1, "other."); + AppendIndent(indent + 1, output); + output.Append("return *this;\n"); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); output.Append("\n"); - // Assignment operator to nullptr_t + // Assignment operator to nullptr AppendIndent(indent, output); AppendTypeNameWithoutGenericSuffix( enclosingTypeName, @@ -9534,12 +9741,11 @@ static int AppendCppMethodDefinitionsBegin( output.Append("::operator=(decltype(nullptr) other)\n"); AppendIndent(indent, output); output.Append("{\n"); - AppendIndent(indent, output); - output.Append("\tif (Handle)\n"); - AppendIndent(indent, output); - output.Append("\t{\n"); - AppendIndent(indent, output); - output.Append("\t\t"); + AppendIndent(indent + 1, output); + output.Append("if (Handle)\n"); + AppendIndent(indent + 1, output); + output.Append("{\n"); + AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeName, enclosingTypeNamespace, @@ -9548,12 +9754,12 @@ static int AppendCppMethodDefinitionsBegin( "Handle", output); output.Append(";\n"); - AppendIndent(indent, output); - output.Append("\t\tHandle = 0;\n"); - AppendIndent(indent, output); - output.Append("\t}\n"); - AppendIndent(indent, output); - output.Append("\treturn *this;\n"); + AppendIndent(indent + 2, output); + output.Append("Handle = 0;\n"); + AppendIndent(indent + 1, output); + output.Append("}\n"); + AppendIndent(indent + 1, output); + output.Append("return *this;\n"); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); @@ -9584,12 +9790,11 @@ static int AppendCppMethodDefinitionsBegin( output.Append("&& other)\n"); AppendIndent(indent, output); output.Append("{\n"); - AppendIndent(indent, output); - output.Append("\tif (Handle)\n"); - AppendIndent(indent, output); - output.Append("\t{\n"); - AppendIndent(indent, output); - output.Append("\t\t"); + AppendIndent(indent + 1, output); + output.Append("if (Handle)\n"); + AppendIndent(indent + 1, output); + output.Append("{\n"); + AppendIndent(indent + 2, output); AppendDereferenceManagedHandleFunctionCall( enclosingTypeName, enclosingTypeNamespace, @@ -9598,14 +9803,16 @@ static int AppendCppMethodDefinitionsBegin( "Handle", output); output.Append(";\n"); - AppendIndent(indent, output); - output.Append("\t}\n"); - AppendIndent(indent, output); - output.Append("\tHandle = other.Handle;\n"); - AppendIndent(indent, output); - output.Append("\tother.Handle = 0;\n"); - AppendIndent(indent, output); - output.Append("\treturn *this;\n"); + AppendIndent(indent + 1, output); + output.Append("}\n"); + AppendIndent(indent + 1, output); + output.Append("Handle = other.Handle;\n"); + extraCopy(indent + 1, "other."); + AppendIndent(indent + 1, output); + output.Append("other.Handle = 0;\n"); + extraDefault(indent + 1, "other."); + AppendIndent(indent + 1, output); + output.Append("return *this;\n"); AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index b0b52df..7dc8191 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -5839,6 +5839,8 @@ namespace System Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -5848,17 +5850,25 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + other.InternalLength = 0; + other.InternalRank = 0; } Array1::~Array1() @@ -5881,6 +5891,8 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; return *this; } @@ -5901,7 +5913,11 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; return *this; } @@ -5930,17 +5946,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } int32_t Array1::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array1::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6102,6 +6131,8 @@ namespace System Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6111,17 +6142,25 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + other.InternalLength = 0; + other.InternalRank = 0; } Array1::~Array1() @@ -6144,6 +6183,8 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; return *this; } @@ -6164,7 +6205,11 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; return *this; } @@ -6193,17 +6238,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } int32_t Array1::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array1::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6217,6 +6275,10 @@ namespace System Array2::Array2(decltype(nullptr) n) : Array2(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; } Array2::Array2(Plugin::InternalUse iu, int32_t handle) @@ -6226,17 +6288,33 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; } Array2::Array2(const Array2& other) : Array2(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + 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; + InternalRank = other.InternalRank; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; + other.InternalLength = 0; + other.InternalRank = 0; + other.InternalLengths[0] = 0; + other.InternalLengths[1] = 0; } Array2::~Array2() @@ -6259,6 +6337,10 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; return *this; } @@ -6279,7 +6361,15 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; + other.InternalLengths[0] = 0; + other.InternalLengths[1] = 0; return *this; } @@ -6308,16 +6398,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0 * length1; + InternalLengths[0] = length0; + InternalLengths[1] = length1; } } int32_t Array2::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array2::GetLength(int32_t dimension) { + int32_t length = InternalLengths[dimension]; + if (length) + { + return length; + } auto returnValue = Plugin::SystemSystemSingleArray2GetLength2(Handle, dimension); if (Plugin::unhandledCsharpException) { @@ -6326,12 +6430,19 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + InternalLengths[dimension] = returnValue; return returnValue; } int32_t Array2::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) @@ -6345,6 +6456,11 @@ namespace System Array3::Array3(decltype(nullptr) n) : Array3(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; + this->InternalLengths[2] = 0; } Array3::Array3(Plugin::InternalUse iu, int32_t handle) @@ -6354,17 +6470,37 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 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; + InternalRank = other.InternalRank; + 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; + InternalRank = other.InternalRank; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; + InternalLengths[2] = other.InternalLengths[2]; + other.InternalLength = 0; + other.InternalRank = 0; + other.InternalLengths[0] = 0; + other.InternalLengths[1] = 0; + other.InternalLengths[2] = 0; } Array3::~Array3() @@ -6387,6 +6523,11 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; + InternalLengths[2] = other.InternalLengths[2]; return *this; } @@ -6407,7 +6548,17 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; + InternalLengths[2] = other.InternalLengths[2]; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; + other.InternalLengths[0] = 0; + other.InternalLengths[1] = 0; + other.InternalLengths[2] = 0; return *this; } @@ -6436,16 +6587,31 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0 * length1 * length2; + InternalLengths[0] = length0; + InternalLengths[1] = length1; + InternalLengths[2] = length2; } } int32_t Array3::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array3::GetLength(int32_t dimension) { + int32_t length = InternalLengths[dimension]; + if (length) + { + return length; + } auto returnValue = Plugin::SystemSystemSingleArray3GetLength3(Handle, dimension); if (Plugin::unhandledCsharpException) { @@ -6454,12 +6620,19 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + InternalLengths[dimension] = returnValue; return returnValue; } int32_t Array3::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) @@ -6507,6 +6680,8 @@ namespace System Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6516,17 +6691,25 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + other.InternalLength = 0; + other.InternalRank = 0; } Array1::~Array1() @@ -6549,6 +6732,8 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; return *this; } @@ -6569,7 +6754,11 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; return *this; } @@ -6598,17 +6787,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } int32_t Array1::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array1::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6656,6 +6858,8 @@ namespace System Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6665,17 +6869,25 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + other.InternalLength = 0; + other.InternalRank = 0; } Array1::~Array1() @@ -6698,6 +6910,8 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; return *this; } @@ -6718,7 +6932,11 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; return *this; } @@ -6747,17 +6965,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } int32_t Array1::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array1::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6805,6 +7036,8 @@ namespace System Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6814,17 +7047,25 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + other.InternalLength = 0; + other.InternalRank = 0; } Array1::~Array1() @@ -6847,6 +7088,8 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; return *this; } @@ -6867,7 +7110,11 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; return *this; } @@ -6896,17 +7143,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } int32_t Array1::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array1::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6954,6 +7214,8 @@ namespace System Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6963,17 +7225,25 @@ namespace System { Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) : Array1(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; + other.InternalLength = 0; + other.InternalRank = 0; } Array1::~Array1() @@ -6996,6 +7266,8 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; return *this; } @@ -7016,7 +7288,11 @@ namespace System Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; + InternalLength = other.InternalLength; + InternalRank = other.InternalRank; other.Handle = 0; + other.InternalLength = 0; + other.InternalRank = 0; return *this; } @@ -7045,17 +7321,30 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } int32_t Array1::GetLength() { - return Array::GetLength(); + int32_t returnVal = InternalLength; + if (returnVal == 0) + { + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } int32_t Array1::GetRank() { - return Array::GetRank(); + int32_t returnVal = InternalRank; + if (returnVal == 0) + { + returnVal = Array::GetRank(); + InternalRank = returnVal; + }; + return returnVal; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index c737a55..2e4f3a9 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -1687,6 +1687,8 @@ namespace System Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; + int32_t InternalLength; + int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1781,6 +1783,8 @@ namespace System Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; + int32_t InternalLength; + int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1802,6 +1806,9 @@ namespace System Array2& operator=(Array2&& other); bool operator==(const Array2& other) const; bool operator!=(const Array2& other) const; + int32_t InternalLength; + int32_t InternalRank; + int32_t InternalLengths[2]; Array2(int32_t length0, int32_t length1); int32_t GetLength(); int32_t GetLength(int32_t dimension); @@ -1824,6 +1831,9 @@ namespace System Array3& operator=(Array3&& other); bool operator==(const Array3& other) const; bool operator!=(const Array3& other) const; + int32_t InternalLength; + int32_t InternalRank; + int32_t InternalLengths[3]; Array3(int32_t length0, int32_t length1, int32_t length2); int32_t GetLength(); int32_t GetLength(int32_t dimension); @@ -1858,6 +1868,8 @@ namespace System Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; + int32_t InternalLength; + int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1891,6 +1903,8 @@ namespace System Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; + int32_t InternalLength; + int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1924,6 +1938,8 @@ namespace System Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; + int32_t InternalLength; + int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1957,6 +1973,8 @@ namespace System Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; + int32_t InternalLength; + int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); From 2c1867dc79a8ca268a7fc36085fb5f08a5397afb Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 11:45:54 -0800 Subject: [PATCH 08/65] Pass Object parameters by const reference Fix a C linkage issue Update README --- README.md | 11 +- .../NativeScript/Editor/GenerateBindings.cs | 52 ++++- Unity/CppSource/Game/Game.cpp | 55 ++--- Unity/CppSource/NativeScript/Bindings.cpp | 210 +++++++++--------- Unity/CppSource/NativeScript/Bindings.h | 134 +++++------ 5 files changed, 246 insertions(+), 216 deletions(-) diff --git a/README.md b/README.md index 0128b59..71b8c4d 100644 --- a/README.md +++ b/README.md @@ -16,16 +16,16 @@ This project aims to give you a viable alternative to C#. Scripting in C++ isn't # Reasons to Prefer C++ Over C# # -## Fast Compile Times - -C++ [compiles much more quickly](https://github.com/jacksondunstan/cscppcompiletimes) than C#. Incremental builds when just one file changes-- the most common builds-- can be 15x faster than with C#. Faster compilation adds up over time to productivity gains. Quicker iteration times make it easier to stay in the "flow" of programming. - ## 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++. 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! +## Fast Compile Times + +C++ [compiles much more quickly](https://github.com/jacksondunstan/cscppcompiletimes) than C#. Incremental builds when just one file changes-- the most common builds-- can be 15x faster than with C#. Faster compilation adds up over time to productivity gains. Quicker iteration times make it easier to stay in the "flow" of programming. + ## No Garbage Collector Unity's garbage collector is mandatory and has a lot of problems. It's slow, runs on the main thread, collects all garbage at once, fragments the heap, and never shrinks the heap. So your game will experience "frame hitches" and eventually you'll run out of memory and crash. @@ -79,7 +79,8 @@ C++ is the standard language for video games as well as many other fields. By pr > void MyScript::Start() { - Debug::Log(String("MyScript has started")); + String message("MyScript has started"); + Debug::Log(message); } * Platform-dependent compilation via the [usual flags](https://docs.unity3d.com/Manual/PlatformDependentCompilation.html) (e.g. `#if UNITY_EDITOR`) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index d68fa90..5a83f1d 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -7157,6 +7157,16 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( { output.Append("void"); } + else if (method.ReturnType == typeof(bool)) + { + // C linkage requires us to use primitive types + output.Append("int32_t"); + } + else if (method.ReturnType == typeof(char)) + { + // C linkage requires us to use primitive types + output.Append("int16_t"); + } else { switch (methodReturnTypeKind) @@ -7221,6 +7231,26 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( indent + 1, output); output.Append("{\n"); + for (int i = 0; i < methodParams.Length; ++i) + { + ParameterInfo parameter = methodParams[i]; + if (parameter.Kind == TypeKind.Class || + parameter.Kind == TypeKind.ManagedStruct) + { + AppendIndent( + indent + 2, + output); + output.Append("auto param"); + output.Append(i); + output.Append(" = "); + AppendCppTypeName( + parameter.ParameterType, + output); + output.Append("(Plugin::InternalUse::Only, "); + output.Append(parameter.Name); + output.Append("Handle);\n"); + } + } AppendIndent( indent + 2, output); @@ -7239,12 +7269,8 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( if (parameter.Kind == TypeKind.Class || parameter.Kind == TypeKind.ManagedStruct) { - AppendCppTypeName( - parameter.ParameterType, - output); - output.Append("(Plugin::InternalUse::Only, "); - output.Append(parameter.Name); - output.Append("Handle)"); + output.Append("param"); + output.Append(i); } else { @@ -10515,6 +10541,17 @@ static void AppendCppParameterDeclaration( for (int i = 0; i < parameters.Length; ++i) { ParameterInfo param = parameters[i]; + + // Const qualifier if necessary + if ((!param.IsOut && !param.IsRef) && + (param.Kind == TypeKind.FullStruct || + param.Kind == TypeKind.ManagedStruct || + param.Kind == TypeKind.Class || + param.IsVirtual)) + { + output.Append("const "); + } + AppendCppTypeName( param.DereferencedParameterType, output); @@ -10526,6 +10563,8 @@ static void AppendCppParameterDeclaration( } else if ( param.Kind == TypeKind.FullStruct || + param.Kind == TypeKind.ManagedStruct || + param.Kind == TypeKind.Class || param.IsVirtual) { output.Append('&'); @@ -10879,6 +10918,7 @@ static void AppendCppFunctionPointer( } break; case TypeKind.FullStruct: + output.Append("const "); AppendCppTypeName( param.DereferencedParameterType, output); diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index 4d3c5c5..b78e177 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -19,26 +19,30 @@ void PrintPlatformDefines(); // This is mostly full of test code. Feel free to remove it all. void PluginMain() { - PrintPlatformDefines(); - Debug::Log(String("Game booted up")); + String message("Game booted up"); + Debug::Log(message); - GameObject go(String("GameObject with a TestScript")); + String name("GameObject with a TestScript"); + GameObject go(name); go.AddComponent(); } void MyGame::MonoBehaviours::TestScript::Awake() { - Debug::Log(String("C++ TestScript Awake")); + String message("C++ TestScript Awake"); + Debug::Log(message); } void MyGame::MonoBehaviours::TestScript::OnAnimatorIK(int32_t param0) { - Debug::Log(String("C++ TestScript OnAnimatorIK")); + String message("C++ TestScript OnAnimatorIK"); + Debug::Log(message); } -void MyGame::MonoBehaviours::TestScript::OnCollisionEnter(UnityEngine::Collision param0) +void MyGame::MonoBehaviours::TestScript::OnCollisionEnter(const UnityEngine::Collision& param0) { - Debug::Log(String("C++ TestScript OnCollisionEnter")); + String message("C++ TestScript OnCollisionEnter"); + Debug::Log(message); } void MyGame::MonoBehaviours::TestScript::Update() @@ -54,41 +58,8 @@ void MyGame::MonoBehaviours::TestScript::Update() numCreated++; if (numCreated == 10) { - Debug::Log(String("Done spawning game objects")); + String message("Done spawning game objects"); + Debug::Log(message); } } } - -void PrintPlatformDefines() -{ -#if defined(UNITY_EDITOR) - Debug::Log(String("UNITY_EDITOR")); -#endif -#if defined(UNITY_STANDALONE) - Debug::Log(String("UNITY_STANDALONE")); -#endif -#if defined(UNITY_IOS) - Debug::Log(String("UNITY_IOS")); -#endif -#if defined(UNITY_ANDROID) - Debug::Log(String("UNITY_ANDROID")); -#endif -#if defined(UNITY_EDITOR_WIN) - Debug::Log(String("UNITY_EDITOR_WIN")); -#endif -#if defined(UNITY_EDITOR_OSX) - Debug::Log(String("UNITY_EDITOR_OSX")); -#endif -#if defined(UNITY_EDITOR_LINUX) - Debug::Log(String("UNITY_EDITOR_LINUX")); -#endif -#if defined(UNITY_STANDALONE_OSX) - Debug::Log(String("UNITY_STANDALONE_OSX")); -#endif -#if defined(UNITY_STANDALONE_WIN) - Debug::Log(String("UNITY_STANDALONE_WIN")); -#endif -#if defined(UNITY_STANDALONE_LINUX) - Debug::Log(String("UNITY_STANDALONE_LINUX")); -#endif -} diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 7dc8191..4a531e8 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -55,7 +55,7 @@ namespace Plugin int32_t (*UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle); int32_t (*UnityEngineComponentPropertyGetTransform)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineTransformPropertyGetPosition)(int32_t thisHandle); - void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value); + void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, const UnityEngine::Vector3& value); void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle); System::Boolean (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value); @@ -67,17 +67,17 @@ namespace Plugin UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz); void (*UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ); - UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b); - UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a); - int32_t (*BoxVector3)(UnityEngine::Vector3& val); + UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& a, const UnityEngine::Vector3& b); + UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(const UnityEngine::Vector3& a); + int32_t (*BoxVector3)(const UnityEngine::Vector3& val); UnityEngine::Vector3 (*UnboxVector3)(int32_t valHandle); float (*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); + int32_t (*BoxMatrix4x4)(const UnityEngine::Matrix4x4& val); UnityEngine::Matrix4x4 (*UnboxMatrix4x4)(int32_t valHandle); void (*ReleaseUnityEngineRaycastHit)(int32_t handle); UnityEngine::Vector3 (*UnityEngineRaycastHitPropertyGetPoint)(int32_t thisHandle); - void (*UnityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, UnityEngine::Vector3& value); + void (*UnityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, const UnityEngine::Vector3& value); int32_t (*UnityEngineRaycastHitPropertyGetTransform)(int32_t thisHandle); int32_t (*BoxRaycastHit)(int32_t valHandle); int32_t (*UnboxRaycastHit)(int32_t valHandle); @@ -112,17 +112,17 @@ namespace Plugin void (*UnityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value); int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz); void (*UnityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value); - int32_t (*BoxResolution)(UnityEngine::Resolution& val); + int32_t (*BoxResolution)(const UnityEngine::Resolution& val); UnityEngine::Resolution (*UnboxResolution)(int32_t valHandle); int32_t (*UnityEngineScreenPropertyGetResolutions)(); - UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); - int32_t (*BoxRay)(UnityEngine::Ray& val); + UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction); + int32_t (*BoxRay)(const UnityEngine::Ray& val); UnityEngine::Ray (*UnboxRay)(int32_t valHandle); - int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle); - int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray); - int32_t (*BoxColor)(UnityEngine::Color& val); + int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(const UnityEngine::Ray& ray, int32_t resultsHandle); + int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(const UnityEngine::Ray& ray); + int32_t (*BoxColor)(const UnityEngine::Color& val); UnityEngine::Color (*UnboxColor)(int32_t valHandle); - int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); + int32_t (*BoxGradientColorKey)(const UnityEngine::GradientColorKey& val); UnityEngine::GradientColorKey (*UnboxGradientColorKey)(int32_t valHandle); int32_t (*UnityEngineGradientConstructor)(); int32_t (*UnityEngineGradientPropertyGetColorKeys)(int32_t thisHandle); @@ -134,7 +134,7 @@ namespace Plugin void (*UnityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle); - int32_t (*BoxScene)(UnityEngine::SceneManagement::Scene& val); + int32_t (*BoxScene)(const UnityEngine::SceneManagement::Scene& val); UnityEngine::SceneManagement::Scene (*UnboxScene)(int32_t valHandle); int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); @@ -189,13 +189,13 @@ namespace Plugin int32_t (*SystemStringArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle); int32_t (*UnityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0); UnityEngine::Resolution (*UnityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0); - int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item); + int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, const UnityEngine::Resolution& item); 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); + int32_t (*UnityEngineGradientColorKeyArray1SetItem1)(int32_t thisHandle, int32_t index0, const 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); @@ -235,7 +235,7 @@ namespace Plugin 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, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); /*END FUNCTION POINTERS*/ } @@ -1028,7 +1028,7 @@ namespace UnityEngine return System::String(Plugin::InternalUse::Only, returnValue); } - void Object::SetName(System::String value) + void Object::SetName(const System::String& value) { Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -1040,7 +1040,7 @@ namespace UnityEngine } } - System::Boolean Object::operator==(UnityEngine::Object x) + System::Boolean Object::operator==(const UnityEngine::Object& x) { auto returnValue = Plugin::UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(Handle, x.Handle); if (Plugin::unhandledCsharpException) @@ -1166,7 +1166,7 @@ namespace UnityEngine } } - GameObject::GameObject(System::String name) + GameObject::GameObject(const System::String& name) : UnityEngine::Object(nullptr) { auto returnValue = Plugin::UnityEngineGameObjectConstructorSystemString(name.Handle); @@ -1400,7 +1400,7 @@ namespace UnityEngine return returnValue; } - void Transform::SetPosition(UnityEngine::Vector3& value) + void Transform::SetPosition(const UnityEngine::Vector3& value) { Plugin::UnityEngineTransformPropertySetPosition(Handle, value); if (Plugin::unhandledCsharpException) @@ -1494,7 +1494,7 @@ namespace UnityEngine return Handle != other.Handle; } - void Debug::Log(System::Object message) + void Debug::Log(const System::Object& message) { Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle); if (Plugin::unhandledCsharpException) @@ -1536,7 +1536,7 @@ namespace UnityEngine } } - template<> void Assert::AreEqual(System::String expected, System::String actual) + template<> void Assert::AreEqual(const System::String& expected, const System::String& actual) { Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.Handle); if (Plugin::unhandledCsharpException) @@ -1548,7 +1548,7 @@ namespace UnityEngine } } - template<> void Assert::AreEqual(UnityEngine::GameObject expected, UnityEngine::GameObject actual) + template<> void Assert::AreEqual(const UnityEngine::GameObject& expected, const UnityEngine::GameObject& actual) { Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle); if (Plugin::unhandledCsharpException) @@ -2065,7 +2065,7 @@ namespace UnityEngine } } - UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a) + UnityEngine::Vector3 Vector3::operator+(const UnityEngine::Vector3& a) { auto returnValue = Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(*this, a); if (Plugin::unhandledCsharpException) @@ -2094,7 +2094,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::Vector3& val) + Object::Object(const UnityEngine::Vector3& val) { int32_t handle = Plugin::BoxVector3(val); if (Plugin::unhandledCsharpException) @@ -2159,7 +2159,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::Matrix4x4& val) + Object::Object(const UnityEngine::Matrix4x4& val) { int32_t handle = Plugin::BoxMatrix4x4(val); if (Plugin::unhandledCsharpException) @@ -2284,7 +2284,7 @@ namespace UnityEngine return returnValue; } - void RaycastHit::SetPoint(UnityEngine::Vector3& value) + void RaycastHit::SetPoint(const UnityEngine::Vector3& value) { Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); if (Plugin::unhandledCsharpException) @@ -2312,7 +2312,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::RaycastHit val) + Object::Object(const UnityEngine::RaycastHit& val) { int32_t handle = Plugin::BoxRaycastHit(val.Handle); if (Plugin::unhandledCsharpException) @@ -2461,7 +2461,7 @@ namespace System return Handle != other.Handle; } - KeyValuePair::KeyValuePair(System::String key, double value) + KeyValuePair::KeyValuePair(const System::String& key, double value) : System::ValueType(nullptr) { auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(key.Handle, value); @@ -2510,7 +2510,7 @@ namespace System namespace System { - Object::Object(System::Collections::Generic::KeyValuePair val) + Object::Object(const System::Collections::Generic::KeyValuePair& val) { int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(val.Handle); if (Plugin::unhandledCsharpException) @@ -2657,7 +2657,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - void List::SetItem(int32_t index, System::String value) + void List::SetItem(int32_t index, const System::String& value) { Plugin::SystemCollectionsGenericListSystemStringPropertySetItem(Handle, index, value.Handle); if (Plugin::unhandledCsharpException) @@ -2669,7 +2669,7 @@ namespace System } } - void List::Add(System::String item) + void List::Add(const System::String& item) { Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString(Handle, item.Handle); if (Plugin::unhandledCsharpException) @@ -2681,7 +2681,7 @@ namespace System } } - void List::Sort(System::Collections::Generic::IComparer comparer) + void List::Sort(const System::Collections::Generic::IComparer& comparer) { Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); if (Plugin::unhandledCsharpException) @@ -2836,7 +2836,7 @@ namespace System } } - void List::Sort(System::Collections::Generic::IComparer comparer) + void List::Sort(const System::Collections::Generic::IComparer& comparer) { Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); if (Plugin::unhandledCsharpException) @@ -2936,7 +2936,7 @@ namespace System return Handle != other.Handle; } - LinkedListNode::LinkedListNode(System::String value) + LinkedListNode::LinkedListNode(const System::String& value) : System::Object(nullptr) { auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(value.Handle); @@ -2967,7 +2967,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - void LinkedListNode::SetValue(System::String value) + void LinkedListNode::SetValue(const System::String& value) { Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -3067,7 +3067,7 @@ namespace System return Handle != other.Handle; } - StrongBox::StrongBox(System::String value) + StrongBox::StrongBox(const System::String& value) : System::Object(nullptr) { auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(value.Handle); @@ -3098,7 +3098,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - void StrongBox::SetValue(System::String value) + void StrongBox::SetValue(const System::String& value) { Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -3370,7 +3370,7 @@ namespace System return Handle != other.Handle; } - Exception::Exception(System::String message) + Exception::Exception(const System::String& message) : System::Object(nullptr) { auto returnValue = Plugin::SystemExceptionConstructorSystemString(message.Handle); @@ -3637,7 +3637,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::Resolution& val) + Object::Object(const UnityEngine::Resolution& val) { int32_t handle = Plugin::BoxResolution(val); if (Plugin::unhandledCsharpException) @@ -3769,7 +3769,7 @@ namespace UnityEngine { } - Ray::Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction) + Ray::Ray(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction) { auto returnValue = Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(origin, direction); if (Plugin::unhandledCsharpException) @@ -3785,7 +3785,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::Ray& val) + Object::Object(const UnityEngine::Ray& val) { int32_t handle = Plugin::BoxRay(val); if (Plugin::unhandledCsharpException) @@ -3897,7 +3897,7 @@ namespace UnityEngine return Handle != other.Handle; } - int32_t Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1 results) + int32_t Physics::RaycastNonAlloc(const UnityEngine::Ray& ray, const System::Array1& results) { auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ray, results.Handle); if (Plugin::unhandledCsharpException) @@ -3910,7 +3910,7 @@ namespace UnityEngine return returnValue; } - System::Array1 Physics::RaycastAll(UnityEngine::Ray& ray) + System::Array1 Physics::RaycastAll(const UnityEngine::Ray& ray) { auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ray); if (Plugin::unhandledCsharpException) @@ -3933,7 +3933,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::Color& val) + Object::Object(const UnityEngine::Color& val) { int32_t handle = Plugin::BoxColor(val); if (Plugin::unhandledCsharpException) @@ -3973,7 +3973,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::GradientColorKey& val) + Object::Object(const UnityEngine::GradientColorKey& val) { int32_t handle = Plugin::BoxGradientColorKey(val); if (Plugin::unhandledCsharpException) @@ -4116,7 +4116,7 @@ namespace UnityEngine return System::Array1(Plugin::InternalUse::Only, returnValue); } - void Gradient::SetColorKeys(System::Array1 value) + void Gradient::SetColorKeys(const System::Array1& value) { Plugin::UnityEngineGradientPropertySetColorKeys(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -4241,7 +4241,7 @@ namespace System return System::AppDomainInitializer(Plugin::InternalUse::Only, returnValue); } - void AppDomainSetup::SetAppDomainInitializer(System::AppDomainInitializer value) + void AppDomainSetup::SetAppDomainInitializer(const System::AppDomainInitializer& value) { Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -4335,7 +4335,7 @@ namespace UnityEngine return Handle != other.Handle; } - void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction del) + void Application::AddOnBeforeRender(const UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); if (Plugin::unhandledCsharpException) @@ -4347,7 +4347,7 @@ namespace UnityEngine } } - void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction del) + void Application::RemoveOnBeforeRender(const UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); if (Plugin::unhandledCsharpException) @@ -4443,7 +4443,7 @@ namespace UnityEngine return Handle != other.Handle; } - void SceneManager::AddSceneLoaded(UnityEngine::Events::UnityAction2 del) + void SceneManager::AddSceneLoaded(const UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(del.Handle); if (Plugin::unhandledCsharpException) @@ -4455,7 +4455,7 @@ namespace UnityEngine } } - void SceneManager::RemoveSceneLoaded(UnityEngine::Events::UnityAction2 del) + void SceneManager::RemoveSceneLoaded(const UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(del.Handle); if (Plugin::unhandledCsharpException) @@ -4481,7 +4481,7 @@ namespace UnityEngine namespace System { - Object::Object(UnityEngine::SceneManagement::Scene& val) + Object::Object(const UnityEngine::SceneManagement::Scene& val) { int32_t handle = Plugin::BoxScene(val); if (Plugin::unhandledCsharpException) @@ -4885,7 +4885,7 @@ namespace System return Handle != other.Handle; } - int32_t IComparer::Compare(System::String x, System::String y) + int32_t IComparer::Compare(const System::String& x, const System::String& y) { return {}; } @@ -4894,7 +4894,9 @@ namespace System { try { - return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(System::String(Plugin::InternalUse::Only, xHandle), System::String(Plugin::InternalUse::Only, yHandle)); + auto param0 = System::String(Plugin::InternalUse::Only, xHandle); + auto param1 = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(param0, param1); } catch (System::Exception ex) { @@ -5065,7 +5067,7 @@ namespace System return Handle != other.Handle; } - int32_t StringComparer::Compare(System::String x, System::String y) + int32_t StringComparer::Compare(const System::String& x, const System::String& y) { return {}; } @@ -5074,7 +5076,9 @@ namespace System { try { - return Plugin::GetSystemStringComparer(cppHandle)->Compare(System::String(Plugin::InternalUse::Only, xHandle), System::String(Plugin::InternalUse::Only, yHandle)); + auto param0 = System::String(Plugin::InternalUse::Only, xHandle); + auto param1 = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemStringComparer(cppHandle)->Compare(param0, param1); } catch (System::Exception ex) { @@ -5090,16 +5094,18 @@ namespace System } } - System::Boolean StringComparer::Equals(System::String x, System::String y) + System::Boolean StringComparer::Equals(const System::String& x, const System::String& y) { return {}; } - DLLEXPORT System::Boolean SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + DLLEXPORT int32_t SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) { try { - return Plugin::GetSystemStringComparer(cppHandle)->Equals(System::String(Plugin::InternalUse::Only, xHandle), System::String(Plugin::InternalUse::Only, yHandle)); + auto param0 = System::String(Plugin::InternalUse::Only, xHandle); + auto param1 = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemStringComparer(cppHandle)->Equals(param0, param1); } catch (System::Exception ex) { @@ -5115,7 +5121,7 @@ namespace System } } - int32_t StringComparer::GetHashCode(System::String obj) + int32_t StringComparer::GetHashCode(const System::String& obj) { return {}; } @@ -5124,7 +5130,8 @@ namespace System { try { - return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(System::String(Plugin::InternalUse::Only, objHandle)); + auto param0 = System::String(Plugin::InternalUse::Only, objHandle); + return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(param0); } catch (System::Exception ex) { @@ -7521,7 +7528,7 @@ namespace System return Handle != other.Handle; } - void Action::operator+=(System::Action& del) + void Action::operator+=(const System::Action& del) { Plugin::SystemActionAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7533,7 +7540,7 @@ namespace System } } - void Action::operator-=(System::Action& del) + void Action::operator-=(const System::Action& del) { Plugin::SystemActionRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7748,7 +7755,7 @@ namespace System return Handle != other.Handle; } - void Action1::operator+=(System::Action1& del) + void Action1::operator+=(const System::Action1& del) { Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7760,7 +7767,7 @@ namespace System } } - void Action1::operator-=(System::Action1& del) + void Action1::operator-=(const System::Action1& del) { Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7975,7 +7982,7 @@ namespace System return Handle != other.Handle; } - void Action2::operator+=(System::Action2& del) + void Action2::operator+=(const System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7987,7 +7994,7 @@ namespace System } } - void Action2::operator-=(System::Action2& del) + void Action2::operator-=(const System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8202,7 +8209,7 @@ namespace System return Handle != other.Handle; } - void Func3::operator+=(System::Func3& del) + void Func3::operator+=(const System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8214,7 +8221,7 @@ namespace System } } - void Func3::operator-=(System::Func3& del) + void Func3::operator-=(const System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8433,7 +8440,7 @@ namespace System return Handle != other.Handle; } - void Func3::operator+=(System::Func3& del) + void Func3::operator+=(const System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8445,7 +8452,7 @@ namespace System } } - void Func3::operator-=(System::Func3& del) + void Func3::operator-=(const System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8664,7 +8671,7 @@ namespace System return Handle != other.Handle; } - void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) + void AppDomainInitializer::operator+=(const System::AppDomainInitializer& del) { Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8676,7 +8683,7 @@ namespace System } } - void AppDomainInitializer::operator-=(System::AppDomainInitializer& del) + void AppDomainInitializer::operator-=(const System::AppDomainInitializer& del) { Plugin::SystemAppDomainInitializerRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8688,7 +8695,7 @@ namespace System } } - void AppDomainInitializer::operator()(System::Array1 args) + void AppDomainInitializer::operator()(const System::Array1& args) { } @@ -8696,7 +8703,8 @@ namespace System { try { - Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(System::Array1(Plugin::InternalUse::Only, argsHandle)); + auto param0 = System::Array1(Plugin::InternalUse::Only, argsHandle); + Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(param0); } catch (System::Exception ex) { @@ -8710,7 +8718,7 @@ namespace System } } - void AppDomainInitializer::Invoke(System::Array1 args) + void AppDomainInitializer::Invoke(const System::Array1& args) { Plugin::SystemAppDomainInitializerInvoke(Handle, args.Handle); if (Plugin::unhandledCsharpException) @@ -8893,7 +8901,7 @@ namespace UnityEngine return Handle != other.Handle; } - void UnityAction::operator+=(UnityEngine::Events::UnityAction& del) + void UnityAction::operator+=(const UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineEventsUnityActionAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8905,7 +8913,7 @@ namespace UnityEngine } } - void UnityAction::operator-=(UnityEngine::Events::UnityAction& del) + void UnityAction::operator-=(const UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineEventsUnityActionRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -9123,7 +9131,7 @@ namespace UnityEngine return Handle != other.Handle; } - void UnityAction2::operator+=(UnityEngine::Events::UnityAction2& del) + void UnityAction2::operator+=(const UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -9135,7 +9143,7 @@ namespace UnityEngine } } - void UnityAction2::operator-=(UnityEngine::Events::UnityAction2& del) + void UnityAction2::operator-=(const UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -9147,7 +9155,7 @@ namespace UnityEngine } } - void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void UnityAction2::operator()(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { } @@ -9169,7 +9177,7 @@ namespace UnityEngine } } - void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void UnityAction2::Invoke(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); if (Plugin::unhandledCsharpException) @@ -9240,7 +9248,7 @@ DLLEXPORT void Init( int32_t (*unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle), int32_t (*unityEngineComponentPropertyGetTransform)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineTransformPropertyGetPosition)(int32_t thisHandle), - void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value), + void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, const UnityEngine::Vector3& value), void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), System::Boolean (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value), @@ -9252,17 +9260,17 @@ DLLEXPORT void Init( UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), void (*unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ), - UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b), - UnityEngine::Vector3 (*unityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a), - int32_t (*boxVector3)(UnityEngine::Vector3& val), + UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& a, const UnityEngine::Vector3& b), + UnityEngine::Vector3 (*unityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(const UnityEngine::Vector3& a), + int32_t (*boxVector3)(const UnityEngine::Vector3& val), UnityEngine::Vector3 (*unboxVector3)(int32_t valHandle), float (*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), + int32_t (*boxMatrix4x4)(const UnityEngine::Matrix4x4& val), UnityEngine::Matrix4x4 (*unboxMatrix4x4)(int32_t valHandle), void (*releaseUnityEngineRaycastHit)(int32_t handle), UnityEngine::Vector3 (*unityEngineRaycastHitPropertyGetPoint)(int32_t thisHandle), - void (*unityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, UnityEngine::Vector3& value), + void (*unityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, const UnityEngine::Vector3& value), int32_t (*unityEngineRaycastHitPropertyGetTransform)(int32_t thisHandle), int32_t (*boxRaycastHit)(int32_t valHandle), int32_t (*unboxRaycastHit)(int32_t valHandle), @@ -9297,17 +9305,17 @@ DLLEXPORT void Init( void (*unityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value), int32_t (*unityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz), void (*unityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value), - int32_t (*boxResolution)(UnityEngine::Resolution& val), + int32_t (*boxResolution)(const UnityEngine::Resolution& val), UnityEngine::Resolution (*unboxResolution)(int32_t valHandle), int32_t (*unityEngineScreenPropertyGetResolutions)(), - UnityEngine::Ray (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), - int32_t (*boxRay)(UnityEngine::Ray& val), + UnityEngine::Ray (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction), + int32_t (*boxRay)(const UnityEngine::Ray& val), UnityEngine::Ray (*unboxRay)(int32_t valHandle), - int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle), - int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray), - int32_t (*boxColor)(UnityEngine::Color& val), + int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(const UnityEngine::Ray& ray, int32_t resultsHandle), + int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(const UnityEngine::Ray& ray), + int32_t (*boxColor)(const UnityEngine::Color& val), UnityEngine::Color (*unboxColor)(int32_t valHandle), - int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), + int32_t (*boxGradientColorKey)(const UnityEngine::GradientColorKey& val), UnityEngine::GradientColorKey (*unboxGradientColorKey)(int32_t valHandle), int32_t (*unityEngineGradientConstructor)(), int32_t (*unityEngineGradientPropertyGetColorKeys)(int32_t thisHandle), @@ -9319,7 +9327,7 @@ DLLEXPORT void Init( void (*unityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle), - int32_t (*boxScene)(UnityEngine::SceneManagement::Scene& val), + int32_t (*boxScene)(const UnityEngine::SceneManagement::Scene& val), UnityEngine::SceneManagement::Scene (*unboxScene)(int32_t valHandle), int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), @@ -9374,13 +9382,13 @@ DLLEXPORT void Init( int32_t (*systemStringArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle), int32_t (*unityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0), UnityEngine::Resolution (*unityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0), - int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item), + int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, const UnityEngine::Resolution& item), 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), + int32_t (*unityEngineGradientColorKeyArray1SetItem1)(int32_t thisHandle, int32_t index0, const 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), @@ -9420,7 +9428,7 @@ DLLEXPORT void Init( 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, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) /*END INIT PARAMS*/) { using namespace Plugin; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 2e4f3a9..37f505d 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -82,6 +82,11 @@ namespace System return (bool)Value; } + operator int32_t() const + { + return Value; + } + bool operator==(const Boolean other) const { return Value == other.Value; @@ -139,6 +144,11 @@ namespace System return (bool)Value; } + operator int16_t() const + { + return Value; + } + bool operator==(const Char other) const { return Value == other.Value; @@ -763,25 +773,25 @@ namespace System virtual void ThrowReferenceToThis(); /*BEGIN BOXING METHOD DECLARATIONS*/ - Object(UnityEngine::Vector3& val); + Object(const UnityEngine::Vector3& val); explicit operator UnityEngine::Vector3(); - Object(UnityEngine::Matrix4x4& val); + Object(const UnityEngine::Matrix4x4& val); explicit operator UnityEngine::Matrix4x4(); - Object(UnityEngine::RaycastHit val); + Object(const UnityEngine::RaycastHit& val); explicit operator UnityEngine::RaycastHit(); Object(UnityEngine::QueryTriggerInteraction val); explicit operator UnityEngine::QueryTriggerInteraction(); - Object(System::Collections::Generic::KeyValuePair val); + Object(const System::Collections::Generic::KeyValuePair& val); explicit operator System::Collections::Generic::KeyValuePair(); - Object(UnityEngine::Resolution& val); + Object(const UnityEngine::Resolution& val); explicit operator UnityEngine::Resolution(); - Object(UnityEngine::Ray& val); + Object(const UnityEngine::Ray& val); explicit operator UnityEngine::Ray(); - Object(UnityEngine::Color& val); + Object(const UnityEngine::Color& val); explicit operator UnityEngine::Color(); - Object(UnityEngine::GradientColorKey& val); + Object(const UnityEngine::GradientColorKey& val); explicit operator UnityEngine::GradientColorKey(); - Object(UnityEngine::SceneManagement::Scene& val); + Object(const UnityEngine::SceneManagement::Scene& val); explicit operator UnityEngine::SceneManagement::Scene(); Object(UnityEngine::SceneManagement::LoadSceneMode val); explicit operator UnityEngine::SceneManagement::LoadSceneMode(); @@ -882,8 +892,8 @@ namespace UnityEngine 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); + void SetName(const System::String& value); + System::Boolean operator==(const UnityEngine::Object& x); operator System::Boolean(); }; } @@ -903,7 +913,7 @@ namespace UnityEngine bool operator==(const GameObject& other) const; bool operator!=(const GameObject& other) const; GameObject(); - GameObject(System::String name); + GameObject(const System::String& name); UnityEngine::Transform GetTransform(); template MyGame::MonoBehaviours::TestScript AddComponent(); }; @@ -942,7 +952,7 @@ namespace UnityEngine bool operator==(const Transform& other) const; bool operator!=(const Transform& other) const; UnityEngine::Vector3 GetPosition(); - void SetPosition(UnityEngine::Vector3& value); + void SetPosition(const UnityEngine::Vector3& value); }; } @@ -960,7 +970,7 @@ namespace UnityEngine Debug& operator=(Debug&& other); bool operator==(const Debug& other) const; bool operator!=(const Debug& other) const; - static void Log(System::Object message); + static void Log(const System::Object& message); }; } @@ -972,8 +982,8 @@ namespace UnityEngine { System::Boolean GetRaiseExceptions(); void SetRaiseExceptions(System::Boolean value); - template void AreEqual(System::String expected, System::String actual); - template void AreEqual(UnityEngine::GameObject expected, UnityEngine::GameObject actual); + template void AreEqual(const System::String& expected, const System::String& actual); + template void AreEqual(const UnityEngine::GameObject& expected, const UnityEngine::GameObject& actual); } } } @@ -1080,7 +1090,7 @@ namespace UnityEngine float y; float z; void Set(float newX, float newY, float newZ); - UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); + UnityEngine::Vector3 operator+(const UnityEngine::Vector3& a); UnityEngine::Vector3 operator-(); }; } @@ -1126,7 +1136,7 @@ namespace UnityEngine bool operator==(const RaycastHit& other) const; bool operator!=(const RaycastHit& other) const; UnityEngine::Vector3 GetPoint(); - void SetPoint(UnityEngine::Vector3& value); + void SetPoint(const UnityEngine::Vector3& value); UnityEngine::Transform GetTransform(); }; } @@ -1149,7 +1159,7 @@ namespace System KeyValuePair& operator=(KeyValuePair&& other); bool operator==(const KeyValuePair& other) const; bool operator!=(const KeyValuePair& other) const; - KeyValuePair(System::String key, double value); + KeyValuePair(const System::String& key, double value); System::String GetKey(); double GetValue(); }; @@ -1177,9 +1187,9 @@ namespace System 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); + void SetItem(int32_t index, const System::String& value); + void Add(const System::String& item); + void Sort(const System::Collections::Generic::IComparer& comparer); }; } } @@ -1207,7 +1217,7 @@ namespace System 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); + void Sort(const System::Collections::Generic::IComparer& comparer); }; } } @@ -1231,9 +1241,9 @@ namespace System LinkedListNode& operator=(LinkedListNode&& other); bool operator==(const LinkedListNode& other) const; bool operator!=(const LinkedListNode& other) const; - LinkedListNode(System::String value); + LinkedListNode(const System::String& value); System::String GetValue(); - void SetValue(System::String value); + void SetValue(const System::String& value); }; } } @@ -1257,9 +1267,9 @@ namespace System StrongBox& operator=(StrongBox&& other); bool operator==(const StrongBox& other) const; bool operator!=(const StrongBox& other) const; - StrongBox(System::String value); + StrongBox(const System::String& value); System::String GetValue(); - void SetValue(System::String value); + void SetValue(const System::String& value); }; } } @@ -1325,7 +1335,7 @@ namespace System Exception& operator=(Exception&& other); bool operator==(const Exception& other) const; bool operator!=(const Exception& other) const; - Exception(System::String message); + Exception(const System::String& message); }; } @@ -1403,7 +1413,7 @@ namespace UnityEngine struct Ray { Ray(); - Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); + Ray(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction); UnityEngine::Vector3 m_Origin; UnityEngine::Vector3 m_Direction; }; @@ -1423,8 +1433,8 @@ namespace UnityEngine 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); + static int32_t RaycastNonAlloc(const UnityEngine::Ray& ray, const System::Array1& results); + static System::Array1 RaycastAll(const UnityEngine::Ray& ray); }; } @@ -1466,7 +1476,7 @@ namespace UnityEngine bool operator!=(const Gradient& other) const; Gradient(); System::Array1 GetColorKeys(); - void SetColorKeys(System::Array1 value); + void SetColorKeys(const System::Array1& value); }; } @@ -1486,7 +1496,7 @@ namespace System bool operator!=(const AppDomainSetup& other) const; AppDomainSetup(); System::AppDomainInitializer GetAppDomainInitializer(); - void SetAppDomainInitializer(System::AppDomainInitializer value); + void SetAppDomainInitializer(const System::AppDomainInitializer& value); }; } @@ -1504,8 +1514,8 @@ namespace UnityEngine 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); + static void AddOnBeforeRender(const UnityEngine::Events::UnityAction& del); + static void RemoveOnBeforeRender(const UnityEngine::Events::UnityAction& del); }; } @@ -1525,8 +1535,8 @@ namespace UnityEngine 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); + static void AddSceneLoaded(const UnityEngine::Events::UnityAction2& del); + static void RemoveSceneLoaded(const UnityEngine::Events::UnityAction2& del); }; } } @@ -1589,7 +1599,7 @@ namespace System bool operator!=(const IComparer& other) const; int32_t CppHandle; IComparer(); - virtual int32_t Compare(System::String x, System::String y); + virtual int32_t Compare(const System::String& x, const System::String& y); }; } } @@ -1611,9 +1621,9 @@ namespace System bool operator!=(const StringComparer& other) const; int32_t CppHandle; StringComparer(); - 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); + virtual int32_t Compare(const System::String& x, const System::String& y); + virtual System::Boolean Equals(const System::String& x, const System::String& y); + virtual int32_t GetHashCode(const System::String& obj); }; } @@ -1655,7 +1665,7 @@ namespace MyGame bool operator!=(const TestScript& other) const; void Awake(); void OnAnimatorIK(int32_t param0); - void OnCollisionEnter(UnityEngine::Collision param0); + void OnCollisionEnter(const UnityEngine::Collision& param0); void Update(); }; } @@ -1999,8 +2009,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action(); - void operator+=(System::Action& del); - void operator-=(System::Action& del); + void operator+=(const System::Action& del); + void operator-=(const System::Action& del); virtual void operator()(); void Invoke(); }; @@ -2023,8 +2033,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action1(); - void operator+=(System::Action1& del); - void operator-=(System::Action1& del); + void operator+=(const System::Action1& del); + void operator-=(const System::Action1& del); virtual void operator()(float obj); void Invoke(float obj); }; @@ -2047,8 +2057,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action2(); - void operator+=(System::Action2& del); - void operator-=(System::Action2& del); + void operator+=(const System::Action2& del); + void operator-=(const System::Action2& del); virtual void operator()(float arg1, float arg2); void Invoke(float arg1, float arg2); }; @@ -2071,8 +2081,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Func3(); - void operator+=(System::Func3& del); - void operator-=(System::Func3& del); + void operator+=(const System::Func3& del); + void operator-=(const System::Func3& del); virtual double operator()(int32_t arg1, float arg2); double Invoke(int32_t arg1, float arg2); }; @@ -2095,8 +2105,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Func3(); - void operator+=(System::Func3& del); - void operator-=(System::Func3& del); + void operator+=(const System::Func3& del); + void operator-=(const System::Func3& del); virtual System::String operator()(int16_t arg1, int32_t arg2); System::String Invoke(int16_t arg1, int32_t arg2); }; @@ -2119,10 +2129,10 @@ namespace System 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); + void operator+=(const System::AppDomainInitializer& del); + void operator-=(const System::AppDomainInitializer& del); + virtual void operator()(const System::Array1& args); + void Invoke(const System::Array1& args); }; } @@ -2145,8 +2155,8 @@ namespace UnityEngine int32_t CppHandle; int32_t ClassHandle; UnityAction(); - void operator+=(UnityEngine::Events::UnityAction& del); - void operator-=(UnityEngine::Events::UnityAction& del); + void operator+=(const UnityEngine::Events::UnityAction& del); + void operator-=(const UnityEngine::Events::UnityAction& del); virtual void operator()(); void Invoke(); }; @@ -2172,10 +2182,10 @@ namespace UnityEngine 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); + void operator+=(const UnityEngine::Events::UnityAction2& del); + void operator-=(const UnityEngine::Events::UnityAction2& del); + virtual void operator()(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + void Invoke(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); }; } } From 31c8826b78cc1bb3e3f95f358d8efcd82032d175 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 18:30:09 -0800 Subject: [PATCH 09/65] Remove const qualifier from object parameter references --- .../NativeScript/Editor/GenerateBindings.cs | 11 - Unity/CppSource/Game/Game.cpp | 2 +- Unity/CppSource/NativeScript/Bindings.cpp | 190 +++++++++--------- Unity/CppSource/NativeScript/Bindings.h | 124 ++++++------ 4 files changed, 158 insertions(+), 169 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 5a83f1d..6731bf1 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -10542,16 +10542,6 @@ static void AppendCppParameterDeclaration( { ParameterInfo param = parameters[i]; - // Const qualifier if necessary - if ((!param.IsOut && !param.IsRef) && - (param.Kind == TypeKind.FullStruct || - param.Kind == TypeKind.ManagedStruct || - param.Kind == TypeKind.Class || - param.IsVirtual)) - { - output.Append("const "); - } - AppendCppTypeName( param.DereferencedParameterType, output); @@ -10918,7 +10908,6 @@ static void AppendCppFunctionPointer( } break; case TypeKind.FullStruct: - output.Append("const "); AppendCppTypeName( param.DereferencedParameterType, output); diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index b78e177..c8c1285 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -39,7 +39,7 @@ void MyGame::MonoBehaviours::TestScript::OnAnimatorIK(int32_t param0) Debug::Log(message); } -void MyGame::MonoBehaviours::TestScript::OnCollisionEnter(const UnityEngine::Collision& param0) +void MyGame::MonoBehaviours::TestScript::OnCollisionEnter(UnityEngine::Collision& param0) { String message("C++ TestScript OnCollisionEnter"); Debug::Log(message); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 4a531e8..87b888a 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -55,7 +55,7 @@ namespace Plugin int32_t (*UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle); int32_t (*UnityEngineComponentPropertyGetTransform)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineTransformPropertyGetPosition)(int32_t thisHandle); - void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, const UnityEngine::Vector3& value); + void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value); void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle); System::Boolean (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value); @@ -67,17 +67,17 @@ namespace Plugin UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz); void (*UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ); - UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& a, const UnityEngine::Vector3& b); - UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(const UnityEngine::Vector3& a); - int32_t (*BoxVector3)(const UnityEngine::Vector3& val); + 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); float (*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)(const UnityEngine::Matrix4x4& val); + int32_t (*BoxMatrix4x4)(UnityEngine::Matrix4x4& val); UnityEngine::Matrix4x4 (*UnboxMatrix4x4)(int32_t valHandle); void (*ReleaseUnityEngineRaycastHit)(int32_t handle); UnityEngine::Vector3 (*UnityEngineRaycastHitPropertyGetPoint)(int32_t thisHandle); - void (*UnityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, const UnityEngine::Vector3& value); + 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); @@ -112,17 +112,17 @@ namespace Plugin void (*UnityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value); int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz); void (*UnityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value); - int32_t (*BoxResolution)(const UnityEngine::Resolution& val); + int32_t (*BoxResolution)(UnityEngine::Resolution& val); UnityEngine::Resolution (*UnboxResolution)(int32_t valHandle); int32_t (*UnityEngineScreenPropertyGetResolutions)(); - UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction); - int32_t (*BoxRay)(const UnityEngine::Ray& val); + UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); + int32_t (*BoxRay)(UnityEngine::Ray& val); UnityEngine::Ray (*UnboxRay)(int32_t valHandle); - int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(const UnityEngine::Ray& ray, int32_t resultsHandle); - int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(const UnityEngine::Ray& ray); - int32_t (*BoxColor)(const UnityEngine::Color& val); + int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle); + int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray); + int32_t (*BoxColor)(UnityEngine::Color& val); UnityEngine::Color (*UnboxColor)(int32_t valHandle); - int32_t (*BoxGradientColorKey)(const UnityEngine::GradientColorKey& val); + int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); UnityEngine::GradientColorKey (*UnboxGradientColorKey)(int32_t valHandle); int32_t (*UnityEngineGradientConstructor)(); int32_t (*UnityEngineGradientPropertyGetColorKeys)(int32_t thisHandle); @@ -134,7 +134,7 @@ namespace Plugin void (*UnityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle); - int32_t (*BoxScene)(const UnityEngine::SceneManagement::Scene& val); + int32_t (*BoxScene)(UnityEngine::SceneManagement::Scene& val); UnityEngine::SceneManagement::Scene (*UnboxScene)(int32_t valHandle); int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); @@ -189,13 +189,13 @@ namespace Plugin int32_t (*SystemStringArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle); int32_t (*UnityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0); UnityEngine::Resolution (*UnityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0); - int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, const UnityEngine::Resolution& item); + int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item); 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, const UnityEngine::GradientColorKey& item); + 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); @@ -235,7 +235,7 @@ namespace Plugin 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, const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); /*END FUNCTION POINTERS*/ } @@ -1028,7 +1028,7 @@ namespace UnityEngine return System::String(Plugin::InternalUse::Only, returnValue); } - void Object::SetName(const System::String& value) + void Object::SetName(System::String& value) { Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -1040,7 +1040,7 @@ namespace UnityEngine } } - System::Boolean Object::operator==(const UnityEngine::Object& x) + System::Boolean Object::operator==(UnityEngine::Object& x) { auto returnValue = Plugin::UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(Handle, x.Handle); if (Plugin::unhandledCsharpException) @@ -1166,7 +1166,7 @@ namespace UnityEngine } } - GameObject::GameObject(const System::String& name) + GameObject::GameObject(System::String& name) : UnityEngine::Object(nullptr) { auto returnValue = Plugin::UnityEngineGameObjectConstructorSystemString(name.Handle); @@ -1400,7 +1400,7 @@ namespace UnityEngine return returnValue; } - void Transform::SetPosition(const UnityEngine::Vector3& value) + void Transform::SetPosition(UnityEngine::Vector3& value) { Plugin::UnityEngineTransformPropertySetPosition(Handle, value); if (Plugin::unhandledCsharpException) @@ -1494,7 +1494,7 @@ namespace UnityEngine return Handle != other.Handle; } - void Debug::Log(const System::Object& message) + void Debug::Log(System::Object& message) { Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle); if (Plugin::unhandledCsharpException) @@ -1536,7 +1536,7 @@ namespace UnityEngine } } - template<> void Assert::AreEqual(const System::String& expected, const System::String& actual) + template<> void Assert::AreEqual(System::String& expected, System::String& actual) { Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.Handle); if (Plugin::unhandledCsharpException) @@ -1548,7 +1548,7 @@ namespace UnityEngine } } - template<> void Assert::AreEqual(const UnityEngine::GameObject& expected, const UnityEngine::GameObject& actual) + template<> void Assert::AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual) { Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle); if (Plugin::unhandledCsharpException) @@ -2065,7 +2065,7 @@ namespace UnityEngine } } - UnityEngine::Vector3 Vector3::operator+(const UnityEngine::Vector3& a) + UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a) { auto returnValue = Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(*this, a); if (Plugin::unhandledCsharpException) @@ -2094,7 +2094,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::Vector3& val) + Object::Object(UnityEngine::Vector3& val) { int32_t handle = Plugin::BoxVector3(val); if (Plugin::unhandledCsharpException) @@ -2159,7 +2159,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::Matrix4x4& val) + Object::Object(UnityEngine::Matrix4x4& val) { int32_t handle = Plugin::BoxMatrix4x4(val); if (Plugin::unhandledCsharpException) @@ -2284,7 +2284,7 @@ namespace UnityEngine return returnValue; } - void RaycastHit::SetPoint(const UnityEngine::Vector3& value) + void RaycastHit::SetPoint(UnityEngine::Vector3& value) { Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); if (Plugin::unhandledCsharpException) @@ -2312,7 +2312,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::RaycastHit& val) + Object::Object(UnityEngine::RaycastHit& val) { int32_t handle = Plugin::BoxRaycastHit(val.Handle); if (Plugin::unhandledCsharpException) @@ -2461,7 +2461,7 @@ namespace System return Handle != other.Handle; } - KeyValuePair::KeyValuePair(const System::String& key, double value) + KeyValuePair::KeyValuePair(System::String& key, double value) : System::ValueType(nullptr) { auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(key.Handle, value); @@ -2510,7 +2510,7 @@ namespace System namespace System { - Object::Object(const System::Collections::Generic::KeyValuePair& val) + Object::Object(System::Collections::Generic::KeyValuePair& val) { int32_t handle = Plugin::BoxKeyValuePairSystemString_SystemDouble(val.Handle); if (Plugin::unhandledCsharpException) @@ -2657,7 +2657,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - void List::SetItem(int32_t index, const System::String& value) + void List::SetItem(int32_t index, System::String& value) { Plugin::SystemCollectionsGenericListSystemStringPropertySetItem(Handle, index, value.Handle); if (Plugin::unhandledCsharpException) @@ -2669,7 +2669,7 @@ namespace System } } - void List::Add(const System::String& item) + void List::Add(System::String& item) { Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString(Handle, item.Handle); if (Plugin::unhandledCsharpException) @@ -2681,7 +2681,7 @@ namespace System } } - void List::Sort(const System::Collections::Generic::IComparer& comparer) + void List::Sort(System::Collections::Generic::IComparer& comparer) { Plugin::SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); if (Plugin::unhandledCsharpException) @@ -2836,7 +2836,7 @@ namespace System } } - void List::Sort(const System::Collections::Generic::IComparer& comparer) + void List::Sort(System::Collections::Generic::IComparer& comparer) { Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); if (Plugin::unhandledCsharpException) @@ -2936,7 +2936,7 @@ namespace System return Handle != other.Handle; } - LinkedListNode::LinkedListNode(const System::String& value) + LinkedListNode::LinkedListNode(System::String& value) : System::Object(nullptr) { auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(value.Handle); @@ -2967,7 +2967,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - void LinkedListNode::SetValue(const System::String& value) + void LinkedListNode::SetValue(System::String& value) { Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -3067,7 +3067,7 @@ namespace System return Handle != other.Handle; } - StrongBox::StrongBox(const System::String& value) + StrongBox::StrongBox(System::String& value) : System::Object(nullptr) { auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(value.Handle); @@ -3098,7 +3098,7 @@ namespace System return System::String(Plugin::InternalUse::Only, returnValue); } - void StrongBox::SetValue(const System::String& value) + void StrongBox::SetValue(System::String& value) { Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -3370,7 +3370,7 @@ namespace System return Handle != other.Handle; } - Exception::Exception(const System::String& message) + Exception::Exception(System::String& message) : System::Object(nullptr) { auto returnValue = Plugin::SystemExceptionConstructorSystemString(message.Handle); @@ -3637,7 +3637,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::Resolution& val) + Object::Object(UnityEngine::Resolution& val) { int32_t handle = Plugin::BoxResolution(val); if (Plugin::unhandledCsharpException) @@ -3769,7 +3769,7 @@ namespace UnityEngine { } - Ray::Ray(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction) + Ray::Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction) { auto returnValue = Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(origin, direction); if (Plugin::unhandledCsharpException) @@ -3785,7 +3785,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::Ray& val) + Object::Object(UnityEngine::Ray& val) { int32_t handle = Plugin::BoxRay(val); if (Plugin::unhandledCsharpException) @@ -3897,7 +3897,7 @@ namespace UnityEngine return Handle != other.Handle; } - int32_t Physics::RaycastNonAlloc(const UnityEngine::Ray& ray, const System::Array1& results) + int32_t Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results) { auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ray, results.Handle); if (Plugin::unhandledCsharpException) @@ -3910,7 +3910,7 @@ namespace UnityEngine return returnValue; } - System::Array1 Physics::RaycastAll(const UnityEngine::Ray& ray) + System::Array1 Physics::RaycastAll(UnityEngine::Ray& ray) { auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ray); if (Plugin::unhandledCsharpException) @@ -3933,7 +3933,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::Color& val) + Object::Object(UnityEngine::Color& val) { int32_t handle = Plugin::BoxColor(val); if (Plugin::unhandledCsharpException) @@ -3973,7 +3973,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::GradientColorKey& val) + Object::Object(UnityEngine::GradientColorKey& val) { int32_t handle = Plugin::BoxGradientColorKey(val); if (Plugin::unhandledCsharpException) @@ -4116,7 +4116,7 @@ namespace UnityEngine return System::Array1(Plugin::InternalUse::Only, returnValue); } - void Gradient::SetColorKeys(const System::Array1& value) + void Gradient::SetColorKeys(System::Array1& value) { Plugin::UnityEngineGradientPropertySetColorKeys(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -4241,7 +4241,7 @@ namespace System return System::AppDomainInitializer(Plugin::InternalUse::Only, returnValue); } - void AppDomainSetup::SetAppDomainInitializer(const System::AppDomainInitializer& value) + void AppDomainSetup::SetAppDomainInitializer(System::AppDomainInitializer& value) { Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer(Handle, value.Handle); if (Plugin::unhandledCsharpException) @@ -4335,7 +4335,7 @@ namespace UnityEngine return Handle != other.Handle; } - void Application::AddOnBeforeRender(const UnityEngine::Events::UnityAction& del) + void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); if (Plugin::unhandledCsharpException) @@ -4347,7 +4347,7 @@ namespace UnityEngine } } - void Application::RemoveOnBeforeRender(const UnityEngine::Events::UnityAction& del) + void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); if (Plugin::unhandledCsharpException) @@ -4443,7 +4443,7 @@ namespace UnityEngine return Handle != other.Handle; } - void SceneManager::AddSceneLoaded(const UnityEngine::Events::UnityAction2& del) + void SceneManager::AddSceneLoaded(UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(del.Handle); if (Plugin::unhandledCsharpException) @@ -4455,7 +4455,7 @@ namespace UnityEngine } } - void SceneManager::RemoveSceneLoaded(const UnityEngine::Events::UnityAction2& del) + void SceneManager::RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(del.Handle); if (Plugin::unhandledCsharpException) @@ -4481,7 +4481,7 @@ namespace UnityEngine namespace System { - Object::Object(const UnityEngine::SceneManagement::Scene& val) + Object::Object(UnityEngine::SceneManagement::Scene& val) { int32_t handle = Plugin::BoxScene(val); if (Plugin::unhandledCsharpException) @@ -4885,7 +4885,7 @@ namespace System return Handle != other.Handle; } - int32_t IComparer::Compare(const System::String& x, const System::String& y) + int32_t IComparer::Compare(System::String& x, System::String& y) { return {}; } @@ -5067,7 +5067,7 @@ namespace System return Handle != other.Handle; } - int32_t StringComparer::Compare(const System::String& x, const System::String& y) + int32_t StringComparer::Compare(System::String& x, System::String& y) { return {}; } @@ -5094,7 +5094,7 @@ namespace System } } - System::Boolean StringComparer::Equals(const System::String& x, const System::String& y) + System::Boolean StringComparer::Equals(System::String& x, System::String& y) { return {}; } @@ -5121,7 +5121,7 @@ namespace System } } - int32_t StringComparer::GetHashCode(const System::String& obj) + int32_t StringComparer::GetHashCode(System::String& obj) { return {}; } @@ -7528,7 +7528,7 @@ namespace System return Handle != other.Handle; } - void Action::operator+=(const System::Action& del) + void Action::operator+=(System::Action& del) { Plugin::SystemActionAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7540,7 +7540,7 @@ namespace System } } - void Action::operator-=(const System::Action& del) + void Action::operator-=(System::Action& del) { Plugin::SystemActionRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7755,7 +7755,7 @@ namespace System return Handle != other.Handle; } - void Action1::operator+=(const System::Action1& del) + void Action1::operator+=(System::Action1& del) { Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7767,7 +7767,7 @@ namespace System } } - void Action1::operator-=(const System::Action1& del) + void Action1::operator-=(System::Action1& del) { Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7982,7 +7982,7 @@ namespace System return Handle != other.Handle; } - void Action2::operator+=(const System::Action2& del) + void Action2::operator+=(System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -7994,7 +7994,7 @@ namespace System } } - void Action2::operator-=(const System::Action2& del) + void Action2::operator-=(System::Action2& del) { Plugin::SystemActionSystemSingle_SystemSingleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8209,7 +8209,7 @@ namespace System return Handle != other.Handle; } - void Func3::operator+=(const System::Func3& del) + void Func3::operator+=(System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8221,7 +8221,7 @@ namespace System } } - void Func3::operator-=(const System::Func3& del) + void Func3::operator-=(System::Func3& del) { Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8440,7 +8440,7 @@ namespace System return Handle != other.Handle; } - void Func3::operator+=(const System::Func3& del) + void Func3::operator+=(System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8452,7 +8452,7 @@ namespace System } } - void Func3::operator-=(const System::Func3& del) + void Func3::operator-=(System::Func3& del) { Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8671,7 +8671,7 @@ namespace System return Handle != other.Handle; } - void AppDomainInitializer::operator+=(const System::AppDomainInitializer& del) + void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) { Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8683,7 +8683,7 @@ namespace System } } - void AppDomainInitializer::operator-=(const System::AppDomainInitializer& del) + void AppDomainInitializer::operator-=(System::AppDomainInitializer& del) { Plugin::SystemAppDomainInitializerRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8695,7 +8695,7 @@ namespace System } } - void AppDomainInitializer::operator()(const System::Array1& args) + void AppDomainInitializer::operator()(System::Array1& args) { } @@ -8718,7 +8718,7 @@ namespace System } } - void AppDomainInitializer::Invoke(const System::Array1& args) + void AppDomainInitializer::Invoke(System::Array1& args) { Plugin::SystemAppDomainInitializerInvoke(Handle, args.Handle); if (Plugin::unhandledCsharpException) @@ -8901,7 +8901,7 @@ namespace UnityEngine return Handle != other.Handle; } - void UnityAction::operator+=(const UnityEngine::Events::UnityAction& del) + void UnityAction::operator+=(UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineEventsUnityActionAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -8913,7 +8913,7 @@ namespace UnityEngine } } - void UnityAction::operator-=(const UnityEngine::Events::UnityAction& del) + void UnityAction::operator-=(UnityEngine::Events::UnityAction& del) { Plugin::UnityEngineEventsUnityActionRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -9131,7 +9131,7 @@ namespace UnityEngine return Handle != other.Handle; } - void UnityAction2::operator+=(const UnityEngine::Events::UnityAction2& del) + void UnityAction2::operator+=(UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -9143,7 +9143,7 @@ namespace UnityEngine } } - void UnityAction2::operator-=(const UnityEngine::Events::UnityAction2& del) + void UnityAction2::operator-=(UnityEngine::Events::UnityAction2& del) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) @@ -9155,7 +9155,7 @@ namespace UnityEngine } } - void UnityAction2::operator()(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { } @@ -9177,7 +9177,7 @@ namespace UnityEngine } } - void UnityAction2::Invoke(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); if (Plugin::unhandledCsharpException) @@ -9248,7 +9248,7 @@ DLLEXPORT void Init( int32_t (*unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)(int32_t thisHandle), int32_t (*unityEngineComponentPropertyGetTransform)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineTransformPropertyGetPosition)(int32_t thisHandle), - void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, const UnityEngine::Vector3& value), + void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value), void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), System::Boolean (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value), @@ -9260,17 +9260,17 @@ DLLEXPORT void Init( UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), void (*unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ), - UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& a, const UnityEngine::Vector3& b), - UnityEngine::Vector3 (*unityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(const UnityEngine::Vector3& a), - int32_t (*boxVector3)(const UnityEngine::Vector3& val), + 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), float (*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)(const UnityEngine::Matrix4x4& val), + int32_t (*boxMatrix4x4)(UnityEngine::Matrix4x4& val), UnityEngine::Matrix4x4 (*unboxMatrix4x4)(int32_t valHandle), void (*releaseUnityEngineRaycastHit)(int32_t handle), UnityEngine::Vector3 (*unityEngineRaycastHitPropertyGetPoint)(int32_t thisHandle), - void (*unityEngineRaycastHitPropertySetPoint)(int32_t thisHandle, const UnityEngine::Vector3& value), + 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), @@ -9305,17 +9305,17 @@ DLLEXPORT void Init( void (*unityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value), int32_t (*unityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz), void (*unityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value), - int32_t (*boxResolution)(const UnityEngine::Resolution& val), + int32_t (*boxResolution)(UnityEngine::Resolution& val), UnityEngine::Resolution (*unboxResolution)(int32_t valHandle), int32_t (*unityEngineScreenPropertyGetResolutions)(), - UnityEngine::Ray (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction), - int32_t (*boxRay)(const UnityEngine::Ray& val), + UnityEngine::Ray (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), + int32_t (*boxRay)(UnityEngine::Ray& val), UnityEngine::Ray (*unboxRay)(int32_t valHandle), - int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(const UnityEngine::Ray& ray, int32_t resultsHandle), - int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(const UnityEngine::Ray& ray), - int32_t (*boxColor)(const UnityEngine::Color& val), + int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle), + int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray), + int32_t (*boxColor)(UnityEngine::Color& val), UnityEngine::Color (*unboxColor)(int32_t valHandle), - int32_t (*boxGradientColorKey)(const UnityEngine::GradientColorKey& val), + int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), UnityEngine::GradientColorKey (*unboxGradientColorKey)(int32_t valHandle), int32_t (*unityEngineGradientConstructor)(), int32_t (*unityEngineGradientPropertyGetColorKeys)(int32_t thisHandle), @@ -9327,7 +9327,7 @@ DLLEXPORT void Init( void (*unityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle), - int32_t (*boxScene)(const UnityEngine::SceneManagement::Scene& val), + int32_t (*boxScene)(UnityEngine::SceneManagement::Scene& val), UnityEngine::SceneManagement::Scene (*unboxScene)(int32_t valHandle), int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), @@ -9382,13 +9382,13 @@ DLLEXPORT void Init( int32_t (*systemStringArray1SetItem1)(int32_t thisHandle, int32_t index0, int32_t itemHandle), int32_t (*unityEngineUnityEngineResolutionArray1Constructor1)(int32_t length0), UnityEngine::Resolution (*unityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0), - int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, const UnityEngine::Resolution& item), + int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item), 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, const UnityEngine::GradientColorKey& item), + 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), @@ -9428,7 +9428,7 @@ DLLEXPORT void Init( 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, const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) /*END INIT PARAMS*/) { using namespace Plugin; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 37f505d..61dd7ca 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -773,25 +773,25 @@ namespace System virtual void ThrowReferenceToThis(); /*BEGIN BOXING METHOD DECLARATIONS*/ - Object(const UnityEngine::Vector3& val); + Object(UnityEngine::Vector3& val); explicit operator UnityEngine::Vector3(); - Object(const UnityEngine::Matrix4x4& val); + Object(UnityEngine::Matrix4x4& val); explicit operator UnityEngine::Matrix4x4(); - Object(const UnityEngine::RaycastHit& val); + Object(UnityEngine::RaycastHit& val); explicit operator UnityEngine::RaycastHit(); Object(UnityEngine::QueryTriggerInteraction val); explicit operator UnityEngine::QueryTriggerInteraction(); - Object(const System::Collections::Generic::KeyValuePair& val); + Object(System::Collections::Generic::KeyValuePair& val); explicit operator System::Collections::Generic::KeyValuePair(); - Object(const UnityEngine::Resolution& val); + Object(UnityEngine::Resolution& val); explicit operator UnityEngine::Resolution(); - Object(const UnityEngine::Ray& val); + Object(UnityEngine::Ray& val); explicit operator UnityEngine::Ray(); - Object(const UnityEngine::Color& val); + Object(UnityEngine::Color& val); explicit operator UnityEngine::Color(); - Object(const UnityEngine::GradientColorKey& val); + Object(UnityEngine::GradientColorKey& val); explicit operator UnityEngine::GradientColorKey(); - Object(const UnityEngine::SceneManagement::Scene& val); + Object(UnityEngine::SceneManagement::Scene& val); explicit operator UnityEngine::SceneManagement::Scene(); Object(UnityEngine::SceneManagement::LoadSceneMode val); explicit operator UnityEngine::SceneManagement::LoadSceneMode(); @@ -892,8 +892,8 @@ namespace UnityEngine bool operator==(const Object& other) const; bool operator!=(const Object& other) const; System::String GetName(); - void SetName(const System::String& value); - System::Boolean operator==(const UnityEngine::Object& x); + void SetName(System::String& value); + System::Boolean operator==(UnityEngine::Object& x); operator System::Boolean(); }; } @@ -913,7 +913,7 @@ namespace UnityEngine bool operator==(const GameObject& other) const; bool operator!=(const GameObject& other) const; GameObject(); - GameObject(const System::String& name); + GameObject(System::String& name); UnityEngine::Transform GetTransform(); template MyGame::MonoBehaviours::TestScript AddComponent(); }; @@ -952,7 +952,7 @@ namespace UnityEngine bool operator==(const Transform& other) const; bool operator!=(const Transform& other) const; UnityEngine::Vector3 GetPosition(); - void SetPosition(const UnityEngine::Vector3& value); + void SetPosition(UnityEngine::Vector3& value); }; } @@ -970,7 +970,7 @@ namespace UnityEngine Debug& operator=(Debug&& other); bool operator==(const Debug& other) const; bool operator!=(const Debug& other) const; - static void Log(const System::Object& message); + static void Log(System::Object& message); }; } @@ -982,8 +982,8 @@ namespace UnityEngine { System::Boolean GetRaiseExceptions(); void SetRaiseExceptions(System::Boolean value); - template void AreEqual(const System::String& expected, const System::String& actual); - template void AreEqual(const UnityEngine::GameObject& expected, const UnityEngine::GameObject& actual); + template void AreEqual(System::String& expected, System::String& actual); + template void AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual); } } } @@ -1090,7 +1090,7 @@ namespace UnityEngine float y; float z; void Set(float newX, float newY, float newZ); - UnityEngine::Vector3 operator+(const UnityEngine::Vector3& a); + UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); UnityEngine::Vector3 operator-(); }; } @@ -1136,7 +1136,7 @@ namespace UnityEngine bool operator==(const RaycastHit& other) const; bool operator!=(const RaycastHit& other) const; UnityEngine::Vector3 GetPoint(); - void SetPoint(const UnityEngine::Vector3& value); + void SetPoint(UnityEngine::Vector3& value); UnityEngine::Transform GetTransform(); }; } @@ -1159,7 +1159,7 @@ namespace System KeyValuePair& operator=(KeyValuePair&& other); bool operator==(const KeyValuePair& other) const; bool operator!=(const KeyValuePair& other) const; - KeyValuePair(const System::String& key, double value); + KeyValuePair(System::String& key, double value); System::String GetKey(); double GetValue(); }; @@ -1187,9 +1187,9 @@ namespace System bool operator!=(const List& other) const; List(); System::String GetItem(int32_t index); - void SetItem(int32_t index, const System::String& value); - void Add(const System::String& item); - void Sort(const System::Collections::Generic::IComparer& comparer); + void SetItem(int32_t index, System::String& value); + void Add(System::String& item); + void Sort(System::Collections::Generic::IComparer& comparer); }; } } @@ -1217,7 +1217,7 @@ namespace System int32_t GetItem(int32_t index); void SetItem(int32_t index, int32_t value); void Add(int32_t item); - void Sort(const System::Collections::Generic::IComparer& comparer); + void Sort(System::Collections::Generic::IComparer& comparer); }; } } @@ -1241,9 +1241,9 @@ namespace System LinkedListNode& operator=(LinkedListNode&& other); bool operator==(const LinkedListNode& other) const; bool operator!=(const LinkedListNode& other) const; - LinkedListNode(const System::String& value); + LinkedListNode(System::String& value); System::String GetValue(); - void SetValue(const System::String& value); + void SetValue(System::String& value); }; } } @@ -1267,9 +1267,9 @@ namespace System StrongBox& operator=(StrongBox&& other); bool operator==(const StrongBox& other) const; bool operator!=(const StrongBox& other) const; - StrongBox(const System::String& value); + StrongBox(System::String& value); System::String GetValue(); - void SetValue(const System::String& value); + void SetValue(System::String& value); }; } } @@ -1335,7 +1335,7 @@ namespace System Exception& operator=(Exception&& other); bool operator==(const Exception& other) const; bool operator!=(const Exception& other) const; - Exception(const System::String& message); + Exception(System::String& message); }; } @@ -1413,7 +1413,7 @@ namespace UnityEngine struct Ray { Ray(); - Ray(const UnityEngine::Vector3& origin, const UnityEngine::Vector3& direction); + Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); UnityEngine::Vector3 m_Origin; UnityEngine::Vector3 m_Direction; }; @@ -1433,8 +1433,8 @@ namespace UnityEngine Physics& operator=(Physics&& other); bool operator==(const Physics& other) const; bool operator!=(const Physics& other) const; - static int32_t RaycastNonAlloc(const UnityEngine::Ray& ray, const System::Array1& results); - static System::Array1 RaycastAll(const UnityEngine::Ray& ray); + static int32_t RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results); + static System::Array1 RaycastAll(UnityEngine::Ray& ray); }; } @@ -1476,7 +1476,7 @@ namespace UnityEngine bool operator!=(const Gradient& other) const; Gradient(); System::Array1 GetColorKeys(); - void SetColorKeys(const System::Array1& value); + void SetColorKeys(System::Array1& value); }; } @@ -1496,7 +1496,7 @@ namespace System bool operator!=(const AppDomainSetup& other) const; AppDomainSetup(); System::AppDomainInitializer GetAppDomainInitializer(); - void SetAppDomainInitializer(const System::AppDomainInitializer& value); + void SetAppDomainInitializer(System::AppDomainInitializer& value); }; } @@ -1514,8 +1514,8 @@ namespace UnityEngine Application& operator=(Application&& other); bool operator==(const Application& other) const; bool operator!=(const Application& other) const; - static void AddOnBeforeRender(const UnityEngine::Events::UnityAction& del); - static void RemoveOnBeforeRender(const UnityEngine::Events::UnityAction& del); + static void AddOnBeforeRender(UnityEngine::Events::UnityAction& del); + static void RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del); }; } @@ -1535,8 +1535,8 @@ namespace UnityEngine SceneManager& operator=(SceneManager&& other); bool operator==(const SceneManager& other) const; bool operator!=(const SceneManager& other) const; - static void AddSceneLoaded(const UnityEngine::Events::UnityAction2& del); - static void RemoveSceneLoaded(const UnityEngine::Events::UnityAction2& del); + static void AddSceneLoaded(UnityEngine::Events::UnityAction2& del); + static void RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del); }; } } @@ -1599,7 +1599,7 @@ namespace System bool operator!=(const IComparer& other) const; int32_t CppHandle; IComparer(); - virtual int32_t Compare(const System::String& x, const System::String& y); + virtual int32_t Compare(System::String& x, System::String& y); }; } } @@ -1621,9 +1621,9 @@ namespace System bool operator!=(const StringComparer& other) const; int32_t CppHandle; StringComparer(); - virtual int32_t Compare(const System::String& x, const System::String& y); - virtual System::Boolean Equals(const System::String& x, const System::String& y); - virtual int32_t GetHashCode(const System::String& obj); + 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); }; } @@ -1665,7 +1665,7 @@ namespace MyGame bool operator!=(const TestScript& other) const; void Awake(); void OnAnimatorIK(int32_t param0); - void OnCollisionEnter(const UnityEngine::Collision& param0); + void OnCollisionEnter(UnityEngine::Collision& param0); void Update(); }; } @@ -2009,8 +2009,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action(); - void operator+=(const System::Action& del); - void operator-=(const System::Action& del); + void operator+=(System::Action& del); + void operator-=(System::Action& del); virtual void operator()(); void Invoke(); }; @@ -2033,8 +2033,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action1(); - void operator+=(const System::Action1& del); - void operator-=(const System::Action1& del); + void operator+=(System::Action1& del); + void operator-=(System::Action1& del); virtual void operator()(float obj); void Invoke(float obj); }; @@ -2057,8 +2057,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Action2(); - void operator+=(const System::Action2& del); - void operator-=(const System::Action2& del); + void operator+=(System::Action2& del); + void operator-=(System::Action2& del); virtual void operator()(float arg1, float arg2); void Invoke(float arg1, float arg2); }; @@ -2081,8 +2081,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Func3(); - void operator+=(const System::Func3& del); - void operator-=(const System::Func3& del); + 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); }; @@ -2105,8 +2105,8 @@ namespace System int32_t CppHandle; int32_t ClassHandle; Func3(); - void operator+=(const System::Func3& del); - void operator-=(const System::Func3& del); + 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); }; @@ -2129,10 +2129,10 @@ namespace System int32_t CppHandle; int32_t ClassHandle; AppDomainInitializer(); - void operator+=(const System::AppDomainInitializer& del); - void operator-=(const System::AppDomainInitializer& del); - virtual void operator()(const System::Array1& args); - void Invoke(const System::Array1& args); + void operator+=(System::AppDomainInitializer& del); + void operator-=(System::AppDomainInitializer& del); + virtual void operator()(System::Array1& args); + void Invoke(System::Array1& args); }; } @@ -2155,8 +2155,8 @@ namespace UnityEngine int32_t CppHandle; int32_t ClassHandle; UnityAction(); - void operator+=(const UnityEngine::Events::UnityAction& del); - void operator-=(const UnityEngine::Events::UnityAction& del); + void operator+=(UnityEngine::Events::UnityAction& del); + void operator-=(UnityEngine::Events::UnityAction& del); virtual void operator()(); void Invoke(); }; @@ -2182,10 +2182,10 @@ namespace UnityEngine int32_t CppHandle; int32_t ClassHandle; UnityAction2(); - void operator+=(const UnityEngine::Events::UnityAction2& del); - void operator-=(const UnityEngine::Events::UnityAction2& del); - virtual void operator()(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); - void Invoke(const UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + 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); }; } } From 55b2bfbf78d8754669c83ec514927409696ff373 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 19:12:19 -0800 Subject: [PATCH 10/65] Return a constant from GetRank(). --- .../NativeScript/Editor/GenerateBindings.cs | 103 ++++++++------ Unity/CppSource/NativeScript/Bindings.cpp | 128 ++---------------- Unity/CppSource/NativeScript/Bindings.h | 8 -- 3 files changed, 73 insertions(+), 166 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 6731bf1..5e04057 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -4163,12 +4163,6 @@ static void AppendArray( builders.CppMethodDefinitions.Append(subject); builders.CppMethodDefinitions.Append( "InternalLength = 0;\n"); - AppendIndent( - extraIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(subject); - builders.CppMethodDefinitions.Append( - "InternalRank = 0;\n"); if (rank > 1) { for (int i = 0; i < rank; ++i) @@ -4194,14 +4188,6 @@ static void AppendArray( builders.CppMethodDefinitions.Append(subject); builders.CppMethodDefinitions.Append( "InternalLength;\n"); - AppendIndent( - extraIndent, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append( - "InternalRank = "); - builders.CppMethodDefinitions.Append(subject); - builders.CppMethodDefinitions.Append( - "InternalRank;\n"); if (rank > 1) { for (int i = 0; i < rank; ++i) @@ -4232,11 +4218,6 @@ static void AppendArray( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append( "int32_t InternalLength;\n"); - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); - builders.CppTypeDefinitions.Append( - "int32_t InternalRank;\n"); if (rank > 1) { AppendIndent( @@ -4258,11 +4239,9 @@ static void AppendArray( builders); // Base GetLength - AppendArrayCppCallBaseGetIntFunction( + AppendArrayCppGetLengthFunction( indent, cppArrayTypeName, - "GetLength", - "InternalLength", cppTypeParams, builders); @@ -4279,12 +4258,11 @@ static void AppendArray( builders); } - AppendArrayCppCallBaseGetIntFunction( + AppendArrayCppGetRankFunction( indent, cppArrayTypeName, - "GetRank", - "InternalRank", cppTypeParams, + rank, builders); AppendArrayGetItem( @@ -5069,11 +5047,9 @@ static void AppendArrayConstructor( builders.CppMethodDefinitions.Append("\n"); } - static void AppendArrayCppCallBaseGetIntFunction( + static void AppendArrayCppGetLengthFunction( int indent, string cppArrayTypeName, - string baseFunctionName, - string memberVariableName, Type[] cppTypeParams, StringBuilders builders) { @@ -5084,7 +5060,7 @@ static void AppendArrayCppCallBaseGetIntFunction( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - baseFunctionName, + "GetLength", false, false, false, @@ -5097,7 +5073,7 @@ static void AppendArrayCppCallBaseGetIntFunction( AppendCppMethodDefinitionBegin( cppArrayTypeName, typeof(int), - baseFunctionName, + "GetLength", cppTypeParams, null, parameters, @@ -5110,9 +5086,8 @@ static void AppendArrayCppCallBaseGetIntFunction( AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t returnVal = "); - builders.CppMethodDefinitions.Append(memberVariableName); - builders.CppMethodDefinitions.Append(";\n"); + builders.CppMethodDefinitions.Append( + "int32_t returnVal = InternalLength;\n"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -5124,14 +5099,13 @@ static void AppendArrayCppCallBaseGetIntFunction( AppendIndent( indent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("returnVal = Array::"); - builders.CppMethodDefinitions.Append(baseFunctionName); - builders.CppMethodDefinitions.Append("();\n"); + builders.CppMethodDefinitions.Append( + "returnVal = Array::GetLength();\n"); AppendIndent( indent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(memberVariableName); - builders.CppMethodDefinitions.Append(" = returnVal;\n"); + builders.CppMethodDefinitions.Append( + "InternalLength = returnVal;\n"); AppendIndent( indent + 1, builders.CppMethodDefinitions); @@ -5150,6 +5124,59 @@ static void AppendArrayCppCallBaseGetIntFunction( builders.CppMethodDefinitions.Append('\n'); } + static void AppendArrayCppGetRankFunction( + int indent, + string cppArrayTypeName, + Type[] cppTypeParams, + int rank, + StringBuilders builders) + { + ParameterInfo[] parameters = new ParameterInfo[0]; + + // C++ method declaration + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + "GetRank", + false, + false, + false, + typeof(int), + null, + parameters, + builders.CppTypeDefinitions); + + // C++ method definition + AppendCppMethodDefinitionBegin( + cppArrayTypeName, + typeof(int), + "GetRank", + cppTypeParams, + null, + parameters, + indent, + builders.CppMethodDefinitions); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("return "); + builders.CppMethodDefinitions.Append(rank); + builders.CppMethodDefinitions.Append(";\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append('\n'); + } + static void AppendArrayMultidimensionalGetLength( Type elementType, Type arrayType, diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 87b888a..a3c5fcf 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -5847,7 +5847,6 @@ namespace System : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -5858,14 +5857,12 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) @@ -5873,9 +5870,7 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.InternalLength = 0; - other.InternalRank = 0; } Array1::~Array1() @@ -5899,7 +5894,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; return *this; } @@ -5921,10 +5915,8 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; return *this; } @@ -5970,13 +5962,7 @@ namespace System int32_t Array1::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 1; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6139,7 +6125,6 @@ namespace System : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6150,14 +6135,12 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) @@ -6165,9 +6148,7 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.InternalLength = 0; - other.InternalRank = 0; } Array1::~Array1() @@ -6191,7 +6172,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; return *this; } @@ -6213,10 +6193,8 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; return *this; } @@ -6262,13 +6240,7 @@ namespace System int32_t Array1::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 1; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6283,7 +6255,6 @@ namespace System : Array2(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; this->InternalLengths[0] = 0; this->InternalLengths[1] = 0; } @@ -6296,7 +6267,6 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; this->InternalLengths[0] = 0; this->InternalLengths[1] = 0; } @@ -6305,7 +6275,6 @@ namespace System : Array2(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; } @@ -6315,11 +6284,9 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; other.InternalLength = 0; - other.InternalRank = 0; other.InternalLengths[0] = 0; other.InternalLengths[1] = 0; } @@ -6345,7 +6312,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; return *this; @@ -6369,12 +6335,10 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; other.InternalLengths[0] = 0; other.InternalLengths[1] = 0; return *this; @@ -6443,13 +6407,7 @@ namespace System int32_t Array2::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 2; } Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) @@ -6464,7 +6422,6 @@ namespace System : Array3(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; this->InternalLengths[0] = 0; this->InternalLengths[1] = 0; this->InternalLengths[2] = 0; @@ -6478,7 +6435,6 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; this->InternalLengths[0] = 0; this->InternalLengths[1] = 0; this->InternalLengths[2] = 0; @@ -6488,7 +6444,6 @@ namespace System : Array3(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; InternalLengths[2] = other.InternalLengths[2]; @@ -6499,12 +6454,10 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; InternalLengths[2] = other.InternalLengths[2]; other.InternalLength = 0; - other.InternalRank = 0; other.InternalLengths[0] = 0; other.InternalLengths[1] = 0; other.InternalLengths[2] = 0; @@ -6531,7 +6484,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; InternalLengths[2] = other.InternalLengths[2]; @@ -6556,13 +6508,11 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; InternalLengths[0] = other.InternalLengths[0]; InternalLengths[1] = other.InternalLengths[1]; InternalLengths[2] = other.InternalLengths[2]; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; other.InternalLengths[0] = 0; other.InternalLengths[1] = 0; other.InternalLengths[2] = 0; @@ -6633,13 +6583,7 @@ namespace System int32_t Array3::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 3; } Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) @@ -6688,7 +6632,6 @@ namespace System : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6699,14 +6642,12 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) @@ -6714,9 +6655,7 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.InternalLength = 0; - other.InternalRank = 0; } Array1::~Array1() @@ -6740,7 +6679,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; return *this; } @@ -6762,10 +6700,8 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; return *this; } @@ -6811,13 +6747,7 @@ namespace System int32_t Array1::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 1; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -6866,7 +6796,6 @@ namespace System : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -6877,14 +6806,12 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) @@ -6892,9 +6819,7 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.InternalLength = 0; - other.InternalRank = 0; } Array1::~Array1() @@ -6918,7 +6843,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; return *this; } @@ -6940,10 +6864,8 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; return *this; } @@ -6989,13 +6911,7 @@ namespace System int32_t Array1::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 1; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -7044,7 +6960,6 @@ namespace System : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -7055,14 +6970,12 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) @@ -7070,9 +6983,7 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.InternalLength = 0; - other.InternalRank = 0; } Array1::~Array1() @@ -7096,7 +7007,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; return *this; } @@ -7118,10 +7028,8 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; return *this; } @@ -7167,13 +7075,7 @@ namespace System int32_t Array1::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 1; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) @@ -7222,7 +7124,6 @@ namespace System : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(Plugin::InternalUse iu, int32_t handle) @@ -7233,14 +7134,12 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; - this->InternalRank = 0; } Array1::Array1(const Array1& other) : Array1(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; - InternalRank = other.InternalRank; } Array1::Array1(Array1&& other) @@ -7248,9 +7147,7 @@ namespace System { other.Handle = 0; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.InternalLength = 0; - other.InternalRank = 0; } Array1::~Array1() @@ -7274,7 +7171,6 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalRank = other.InternalRank; return *this; } @@ -7296,10 +7192,8 @@ namespace System } Handle = other.Handle; InternalLength = other.InternalLength; - InternalRank = other.InternalRank; other.Handle = 0; other.InternalLength = 0; - other.InternalRank = 0; return *this; } @@ -7345,13 +7239,7 @@ namespace System int32_t Array1::GetRank() { - int32_t returnVal = InternalRank; - if (returnVal == 0) - { - returnVal = Array::GetRank(); - InternalRank = returnVal; - }; - return returnVal; + return 1; } Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 61dd7ca..57d8b43 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -1698,7 +1698,6 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1794,7 +1793,6 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1817,7 +1815,6 @@ namespace System bool operator==(const Array2& other) const; bool operator!=(const Array2& other) const; int32_t InternalLength; - int32_t InternalRank; int32_t InternalLengths[2]; Array2(int32_t length0, int32_t length1); int32_t GetLength(); @@ -1842,7 +1839,6 @@ namespace System bool operator==(const Array3& other) const; bool operator!=(const Array3& other) const; int32_t InternalLength; - int32_t InternalRank; int32_t InternalLengths[3]; Array3(int32_t length0, int32_t length1, int32_t length2); int32_t GetLength(); @@ -1879,7 +1875,6 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1914,7 +1909,6 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1949,7 +1943,6 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); @@ -1984,7 +1977,6 @@ namespace System bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; int32_t InternalLength; - int32_t InternalRank; Array1(int32_t length0); int32_t GetLength(); int32_t GetRank(); From 9fe25b7a8773ee574f5956387fe983b74f62e7b2 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 19:21:48 -0800 Subject: [PATCH 11/65] Add an bounds-checking assert for GetLength(int32_t) Remove ArrayGetRank --- Unity/Assets/NativeScript/Bindings.cs | 10 ---------- Unity/Assets/NativeScript/Editor/GenerateBindings.cs | 10 +++++++++- Unity/CppSource/NativeScript/Bindings.cpp | 7 +++---- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 7822da0..8dfa908 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -273,7 +273,6 @@ delegate void InitDelegate( IntPtr stringNew, IntPtr setException, IntPtr arrayGetLength, - IntPtr arrayGetRank, /*BEGIN INIT PARAMS*/ IntPtr systemDiagnosticsStopwatchConstructor, IntPtr systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds, @@ -629,7 +628,6 @@ static extern void Init( IntPtr stringNew, IntPtr setException, IntPtr arrayGetLength, - IntPtr arrayGetRank, /*BEGIN INIT PARAMS*/ IntPtr systemDiagnosticsStopwatchConstructor, IntPtr systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds, @@ -895,7 +893,6 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate int StringNewDelegate(string chars); delegate void SetExceptionDelegate(int handle); delegate int ArrayGetLengthDelegate(int handle); - delegate int ArrayGetRankDelegate(int handle); /*BEGIN DELEGATE TYPES*/ delegate int SystemDiagnosticsStopwatchConstructorDelegate(); @@ -1157,7 +1154,6 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new StringNewDelegate(StringNew)), Marshal.GetFunctionPointerForDelegate(new SetExceptionDelegate(SetException)), Marshal.GetFunctionPointerForDelegate(new ArrayGetLengthDelegate(ArrayGetLength)), - Marshal.GetFunctionPointerForDelegate(new ArrayGetRankDelegate(ArrayGetRank)), /*BEGIN INIT CALL*/ Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchConstructorDelegate(SystemDiagnosticsStopwatchConstructor)), Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate(SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)), @@ -1409,12 +1405,6 @@ static int ArrayGetLength(int handle) return ((Array)ObjectStore.Get(handle)).Length; } - [MonoPInvokeCallback(typeof(ArrayGetRankDelegate))] - static int ArrayGetRank(int handle) - { - return ((Array)ObjectStore.Get(handle)).Rank; - } - /*BEGIN BASE TYPES*/ class SystemCollectionsGenericIComparerSystemInt32 : System.Collections.Generic.IComparer { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 5e04057..cdcb7fb 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -5312,7 +5312,15 @@ static void AppendArrayMultidimensionalGetLength( AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("int32_t length = InternalLengths[dimension];\n"); + builders.CppMethodDefinitions.Append( + "assert(dimension >= 0 && dimension < "); + builders.CppMethodDefinitions.Append(rank); + builders.CppMethodDefinitions.Append(");\n"); + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append( + "int32_t length = InternalLengths[dimension];\n"); AppendIndent( indent + 1, builders.CppMethodDefinitions); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index a3c5fcf..716cc36 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -38,7 +38,6 @@ namespace Plugin int32_t (*StringNew)(const char* chars); void (*SetException)(int32_t handle); int32_t (*ArrayGetLength)(int32_t handle); - int32_t (*ArrayGetRank)(int32_t handle); /*BEGIN FUNCTION POINTERS*/ int32_t (*SystemDiagnosticsStopwatchConstructor)(); @@ -789,7 +788,7 @@ namespace System int32_t Array::GetRank() { - return Plugin::ArrayGetRank(Handle); + return 0; } } @@ -6388,6 +6387,7 @@ namespace System int32_t Array2::GetLength(int32_t dimension) { + assert(dimension >= 0 && dimension < 2); int32_t length = InternalLengths[dimension]; if (length) { @@ -6564,6 +6564,7 @@ namespace System int32_t Array3::GetLength(int32_t dimension) { + assert(dimension >= 0 && dimension < 3); int32_t length = InternalLengths[dimension]; if (length) { @@ -9120,7 +9121,6 @@ DLLEXPORT void Init( int32_t (*stringNew)(const char* chars), void (*setException)(int32_t handle), int32_t (*arrayGetLength)(int32_t handle), - int32_t (*arrayGetRank)(int32_t handle), /*BEGIN INIT PARAMS*/ int32_t (*systemDiagnosticsStopwatchConstructor)(), int64_t (*systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle), @@ -9330,7 +9330,6 @@ DLLEXPORT void Init( Plugin::ReleaseObject = releaseObject; Plugin::SetException = setException; Plugin::ArrayGetLength = arrayGetLength; - Plugin::ArrayGetRank = arrayGetRank; /*BEGIN INIT BODY*/ Plugin::SystemDiagnosticsStopwatchConstructor = systemDiagnosticsStopwatchConstructor; Plugin::SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds = systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds; From 6db6efab77cc8b93b0b93931494fb9263061c5c5 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 19 Nov 2017 19:55:24 -0800 Subject: [PATCH 12/65] Update README --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 71b8c4d..2f47bdd 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ C++ [compiles much more quickly](https://github.com/jacksondunstan/cscppcompilet Unity's garbage collector is mandatory and has a lot of problems. It's slow, runs on the main thread, collects all garbage at once, fragments the heap, and never shrinks the heap. So your game will experience "frame hitches" and eventually you'll run out of memory and crash. -A significant amount of effort is required to work around the GC and the resulting code is difficult to maintain and slow. This includes techniques like [object pools](http://jacksondunstan.com/articles/3829), which essentially make memory management manual. You've also got to avoid boxing value types like `int` to to managed types like `object`, not use `foreach` loops in some situations, and various other [gotchas](http://jacksondunstan.com/articles/3850). +A significant amount of effort is required to work around the GC and the resulting code is difficult to maintain and slow. This includes techniques like [object pools](https://jacksondunstan.com/articles/3829), which essentially make memory management manual. You've also got to avoid boxing value types like `int` to to managed types like `object`, not use `foreach` loops in some situations, and various other [gotchas](https://jacksondunstan.com/articles/3850). C++ has no required garbage collector and features optional automatic memory management via "smart pointer" types like [shared_ptr](http://en.cppreference.com/w/cpp/memory/shared_ptr). It offers excellent alternatives to Unity's primitive garbage collector. @@ -38,7 +38,7 @@ While using some .NET APIs will still involve garbage creation, the problem is c ## Total Control -By using C++ directly, you gain complete control over the code the CPU will execute. It's much easier to generate optimal code with a C++ compiler than with a C# compiler, IL2CPP, and finally a C++ compiler. Cut out the middle-man and you can take advantage of compiler intrinsics or assembly to directly write machine code using powerful CPU features like [SIMD](http://jacksondunstan.com/articles/3890) and hardware AES encryption for massive performance gains. +By using C++ directly, you gain complete control over the code the CPU will execute. It's much easier to generate optimal code with a C++ compiler than with a C# compiler, IL2CPP, and finally a C++ compiler. Cut out the middle-man and you can take advantage of compiler intrinsics or assembly to directly write machine code using powerful CPU features like [SIMD](https://jacksondunstan.com/articles/3890) and hardware AES encryption for massive performance gains. ## More Features @@ -54,7 +54,7 @@ C++ is a much larger language than C# and some developers will prefer having mor ## No IL2CPP Surprises -While IL2CPP transforms C# into C++ already, it generates a lot of overhead. There are many [surprises](http://jacksondunstan.com/articles/3916) if you read through the generated C++. For example, there's overhead for any function using a static variable and an extra two pointers are stored at the beginning of every class. The same goes for all sorts of features such as `sizeof()`, mandatory null checks, and so forth. Instead, you could write C++ directly and not need to work around IL2CPP. +While IL2CPP transforms C# into C++ already, it generates a lot of overhead. There are many [surprises](https://jacksondunstan.com/articles/3916) if you read through the generated C++. For example, there's overhead for any function using a static variable and an extra two pointers are stored at the beginning of every class. The same goes for all sorts of features such as `sizeof()`, mandatory null checks, and so forth. Instead, you could write C++ directly and not need to work around IL2CPP. ## Industry Standard Language @@ -108,7 +108,7 @@ C++ is the standard language for video games as well as many other fields. By pr Almost all projects will see a net performance win by reducing garbage collection, eliminating IL2CPP overhead, and access to compiler intrinsics and assembly. Calls from C++ into C# incur only a minor performance penalty. In the rare case that almost all of your code is calls to .NET APIs then you may experience a net performance loss. -[Testing and benchmarks article](http://jacksondunstan.com/articles/3952) +[Testing and benchmarks article](https://jacksondunstan.com/articles/3952) # Project Structure @@ -213,11 +213,11 @@ To update to a new version of this project, overwrite your Unity project's `Asse # Reference -[Articles](http://jacksondunstan.com/articles/3938) by the author describing the development of this project. +[Articles](https://jacksondunstan.com/articles/3938) by the author describing the development of this project. # Author -[Jackson Dunstan](http://jacksondunstan.com) +[Jackson Dunstan](https://jacksondunstan.com) # Contributing From ee8fed78bee7f23606dd5531caed445da9134fb1 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 26 Nov 2017 22:11:30 -0800 Subject: [PATCH 13/65] Support overriding C# properties and indexers from C++ Update README --- README.md | 2 +- Unity/Assets/NativeScript/Bindings.cs | 793 ++++++++++ .../NativeScript/Editor/GenerateBindings.cs | 784 ++++++++-- Unity/Assets/NativeScriptTypes.json | 32 + Unity/CppSource/Game/Game.cpp | 2 - Unity/CppSource/NativeScript/Bindings.cpp | 1377 ++++++++++++++++- Unity/CppSource/NativeScript/Bindings.h | 142 ++ 7 files changed, 2888 insertions(+), 244 deletions(-) diff --git a/README.md b/README.md index 2f47bdd..72e395c 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ Note that the code generator does not support (yet): * `Array` methods (e.g. `IndexOf`) * `string` methods (e.g. `Substring`) * Default parameters -* Overriding properties, events, and indexers +* Overriding events * Deriving from classes without a default constructor * `decimal` * C# pointers diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 8dfa908..aad32f6 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -371,6 +371,8 @@ delegate void InitDelegate( IntPtr unboxScene, IntPtr boxLoadSceneMode, IntPtr unboxLoadSceneMode, + IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, + IntPtr systemCollectionsIEnumeratorMethodMoveNext, IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, IntPtr releaseSystemCollectionsGenericIComparerSystemString, @@ -379,6 +381,12 @@ delegate void InitDelegate( IntPtr systemStringComparerConstructor, IntPtr releaseSystemEventArgs, IntPtr systemEventArgsConstructor, + IntPtr releaseSystemCollectionsICollection, + IntPtr systemCollectionsICollectionConstructor, + IntPtr releaseSystemCollectionsIList, + IntPtr systemCollectionsIListConstructor, + IntPtr releaseSystemCollectionsQueue, + IntPtr systemCollectionsQueueConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -492,6 +500,72 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc public delegate int SystemEventArgsToStringDelegate(int thisHandle); public static SystemEventArgsToStringDelegate SystemEventArgsToString; + public delegate void SystemCollectionsICollectionCopyToDelegate(int thisHandle, int param0, int param1); + public static SystemCollectionsICollectionCopyToDelegate SystemCollectionsICollectionCopyTo; + + public delegate int SystemCollectionsICollectionGetEnumeratorDelegate(int thisHandle); + public static SystemCollectionsICollectionGetEnumeratorDelegate SystemCollectionsICollectionGetEnumerator; + + public delegate int SystemCollectionsICollectionGetCountDelegate(int thisHandle); + public static SystemCollectionsICollectionGetCountDelegate SystemCollectionsICollectionGetCount; + + public delegate bool SystemCollectionsICollectionGetIsSynchronizedDelegate(int thisHandle); + public static SystemCollectionsICollectionGetIsSynchronizedDelegate SystemCollectionsICollectionGetIsSynchronized; + + public delegate int SystemCollectionsICollectionGetSyncRootDelegate(int thisHandle); + public static SystemCollectionsICollectionGetSyncRootDelegate SystemCollectionsICollectionGetSyncRoot; + + public delegate int SystemCollectionsIListAddDelegate(int thisHandle, int param0); + public static SystemCollectionsIListAddDelegate SystemCollectionsIListAdd; + + public delegate void SystemCollectionsIListClearDelegate(int thisHandle); + public static SystemCollectionsIListClearDelegate SystemCollectionsIListClear; + + public delegate bool SystemCollectionsIListContainsDelegate(int thisHandle, int param0); + public static SystemCollectionsIListContainsDelegate SystemCollectionsIListContains; + + public delegate int SystemCollectionsIListIndexOfDelegate(int thisHandle, int param0); + public static SystemCollectionsIListIndexOfDelegate SystemCollectionsIListIndexOf; + + public delegate void SystemCollectionsIListInsertDelegate(int thisHandle, int param0, int param1); + public static SystemCollectionsIListInsertDelegate SystemCollectionsIListInsert; + + public delegate void SystemCollectionsIListRemoveDelegate(int thisHandle, int param0); + public static SystemCollectionsIListRemoveDelegate SystemCollectionsIListRemove; + + public delegate void SystemCollectionsIListRemoveAtDelegate(int thisHandle, int param0); + public static SystemCollectionsIListRemoveAtDelegate SystemCollectionsIListRemoveAt; + + public delegate int SystemCollectionsIListGetEnumeratorDelegate(int thisHandle); + public static SystemCollectionsIListGetEnumeratorDelegate SystemCollectionsIListGetEnumerator; + + public delegate void SystemCollectionsIListCopyToDelegate(int thisHandle, int param0, int param1); + public static SystemCollectionsIListCopyToDelegate SystemCollectionsIListCopyTo; + + public delegate bool SystemCollectionsIListGetIsFixedSizeDelegate(int thisHandle); + public static SystemCollectionsIListGetIsFixedSizeDelegate SystemCollectionsIListGetIsFixedSize; + + public delegate bool SystemCollectionsIListGetIsReadOnlyDelegate(int thisHandle); + public static SystemCollectionsIListGetIsReadOnlyDelegate SystemCollectionsIListGetIsReadOnly; + + public delegate int SystemCollectionsIListGetItemDelegate(int thisHandle, int param0); + public static SystemCollectionsIListGetItemDelegate SystemCollectionsIListGetItem; + + public delegate void SystemCollectionsIListSetItemDelegate(int thisHandle, int param0, int param1); + public static SystemCollectionsIListSetItemDelegate SystemCollectionsIListSetItem; + + public delegate int SystemCollectionsIListGetCountDelegate(int thisHandle); + public static SystemCollectionsIListGetCountDelegate SystemCollectionsIListGetCount; + + public delegate bool SystemCollectionsIListGetIsSynchronizedDelegate(int thisHandle); + public static SystemCollectionsIListGetIsSynchronizedDelegate SystemCollectionsIListGetIsSynchronized; + + public delegate int SystemCollectionsIListGetSyncRootDelegate(int thisHandle); + public static SystemCollectionsIListGetSyncRootDelegate SystemCollectionsIListGetSyncRoot; + + public delegate int SystemCollectionsQueueGetCountDelegate(int thisHandle); + public static SystemCollectionsQueueGetCountDelegate SystemCollectionsQueueGetCount; + public delegate void MyGameMonoBehavioursTestScriptAwakeDelegate(int thisHandle); public static MyGameMonoBehavioursTestScriptAwakeDelegate MyGameMonoBehavioursTestScriptAwake; @@ -726,6 +800,8 @@ static extern void Init( IntPtr unboxScene, IntPtr boxLoadSceneMode, IntPtr unboxLoadSceneMode, + IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, + IntPtr systemCollectionsIEnumeratorMethodMoveNext, IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, IntPtr releaseSystemCollectionsGenericIComparerSystemString, @@ -734,6 +810,12 @@ static extern void Init( IntPtr systemStringComparerConstructor, IntPtr releaseSystemEventArgs, IntPtr systemEventArgsConstructor, + IntPtr releaseSystemCollectionsICollection, + IntPtr systemCollectionsICollectionConstructor, + IntPtr releaseSystemCollectionsIList, + IntPtr systemCollectionsIListConstructor, + IntPtr releaseSystemCollectionsQueue, + IntPtr systemCollectionsQueueConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -848,6 +930,72 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc [DllImport(Constants.PluginName)] public static extern void SystemEventArgsToString(int thisHandle); + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsICollectionCopyTo(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsICollectionGetEnumerator(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsICollectionGetCount(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsICollectionGetIsSynchronized(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsICollectionGetSyncRoot(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListAdd(int thisHandle, int param0); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListClear(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListContains(int thisHandle, int param0); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListIndexOf(int thisHandle, int param0); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListInsert(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListRemove(int thisHandle, int param0); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListRemoveAt(int thisHandle, int param0); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetEnumerator(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListCopyTo(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetIsFixedSize(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetIsReadOnly(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetItem(int thisHandle, int param0); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListSetItem(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetCount(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetIsSynchronized(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsIListGetSyncRoot(int thisHandle); + + [DllImport(Constants.PluginName)] + public static extern void SystemCollectionsQueueGetCount(int thisHandle); + [DllImport(Constants.PluginName)] public static extern void MyGameMonoBehavioursTestScriptAwake(int thisHandle); @@ -992,6 +1140,8 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate UnityEngine.SceneManagement.Scene UnboxSceneDelegate(int valHandle); delegate int BoxLoadSceneModeDelegate(UnityEngine.SceneManagement.LoadSceneMode val); delegate UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneModeDelegate(int valHandle); + delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); + delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegate(int thisHandle); delegate void SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(int handle); delegate void SystemCollectionsGenericIComparerSystemStringConstructorDelegate(int cppHandle, ref int handle); @@ -1000,6 +1150,12 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate void ReleaseSystemStringComparerDelegate(int handle); delegate void SystemEventArgsConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemEventArgsDelegate(int handle); + delegate void SystemCollectionsICollectionConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsICollectionDelegate(int handle); + delegate void SystemCollectionsIListConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsIListDelegate(int handle); + delegate void SystemCollectionsQueueConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsQueueDelegate(int handle); delegate int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1130,6 +1286,28 @@ public static void Open( SystemStringComparerEquals = GetDelegate(libraryHandle, "SystemStringComparerEquals"); SystemStringComparerGetHashCode = GetDelegate(libraryHandle, "SystemStringComparerGetHashCode"); SystemEventArgsToString = GetDelegate(libraryHandle, "SystemEventArgsToString"); + SystemCollectionsICollectionCopyTo = GetDelegate(libraryHandle, "SystemCollectionsICollectionCopyTo"); + SystemCollectionsICollectionGetEnumerator = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetEnumerator"); + SystemCollectionsICollectionGetCount = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetCount"); + SystemCollectionsICollectionGetIsSynchronized = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetIsSynchronized"); + SystemCollectionsICollectionGetSyncRoot = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetSyncRoot"); + SystemCollectionsIListAdd = GetDelegate(libraryHandle, "SystemCollectionsIListAdd"); + SystemCollectionsIListClear = GetDelegate(libraryHandle, "SystemCollectionsIListClear"); + SystemCollectionsIListContains = GetDelegate(libraryHandle, "SystemCollectionsIListContains"); + SystemCollectionsIListIndexOf = GetDelegate(libraryHandle, "SystemCollectionsIListIndexOf"); + SystemCollectionsIListInsert = GetDelegate(libraryHandle, "SystemCollectionsIListInsert"); + SystemCollectionsIListRemove = GetDelegate(libraryHandle, "SystemCollectionsIListRemove"); + SystemCollectionsIListRemoveAt = GetDelegate(libraryHandle, "SystemCollectionsIListRemoveAt"); + SystemCollectionsIListGetEnumerator = GetDelegate(libraryHandle, "SystemCollectionsIListGetEnumerator"); + SystemCollectionsIListCopyTo = GetDelegate(libraryHandle, "SystemCollectionsIListCopyTo"); + SystemCollectionsIListGetIsFixedSize = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsFixedSize"); + SystemCollectionsIListGetIsReadOnly = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsReadOnly"); + SystemCollectionsIListGetItem = GetDelegate(libraryHandle, "SystemCollectionsIListGetItem"); + SystemCollectionsIListSetItem = GetDelegate(libraryHandle, "SystemCollectionsIListSetItem"); + SystemCollectionsIListGetCount = GetDelegate(libraryHandle, "SystemCollectionsIListGetCount"); + SystemCollectionsIListGetIsSynchronized = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsSynchronized"); + SystemCollectionsIListGetSyncRoot = GetDelegate(libraryHandle, "SystemCollectionsIListGetSyncRoot"); + SystemCollectionsQueueGetCount = GetDelegate(libraryHandle, "SystemCollectionsQueueGetCount"); MyGameMonoBehavioursTestScriptAwake = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptAwake"); MyGameMonoBehavioursTestScriptOnAnimatorIK = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnAnimatorIK"); MyGameMonoBehavioursTestScriptOnCollisionEnter = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnCollisionEnter"); @@ -1252,6 +1430,8 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnboxSceneDelegate(UnboxScene)), Marshal.GetFunctionPointerForDelegate(new BoxLoadSceneModeDelegate(BoxLoadSceneMode)), Marshal.GetFunctionPointerForDelegate(new UnboxLoadSceneModeDelegate(UnboxLoadSceneMode)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(SystemCollectionsIEnumeratorPropertyGetCurrent)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorMethodMoveNextDelegate(SystemCollectionsIEnumeratorMethodMoveNext)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(ReleaseSystemCollectionsGenericIComparerSystemInt32)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(SystemCollectionsGenericIComparerSystemInt32Constructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(ReleaseSystemCollectionsGenericIComparerSystemString)), @@ -1260,6 +1440,12 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemStringComparerConstructorDelegate(SystemStringComparerConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemEventArgsDelegate(ReleaseSystemEventArgs)), Marshal.GetFunctionPointerForDelegate(new SystemEventArgsConstructorDelegate(SystemEventArgsConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsICollectionDelegate(ReleaseSystemCollectionsICollection)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsICollectionConstructorDelegate(SystemCollectionsICollectionConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsIListDelegate(ReleaseSystemCollectionsIList)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIListConstructorDelegate(SystemCollectionsIListConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsQueueDelegate(ReleaseSystemCollectionsQueue)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsQueueConstructorDelegate(SystemCollectionsQueueConstructor)), Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -1431,6 +1617,7 @@ public int Compare(int x, int y) } return default(int); } + } class SystemCollectionsGenericIComparerSystemString : System.Collections.Generic.IComparer @@ -1460,6 +1647,7 @@ public int Compare(string x, string y) } return default(int); } + } class SystemStringComparer : System.StringComparer @@ -1489,6 +1677,7 @@ public override int Compare(string x, string y) } return default(int); } + public override bool Equals(string x, string y) { if (CppHandle != 0) @@ -1507,6 +1696,7 @@ public override bool Equals(string x, string y) } return default(bool); } + public override int GetHashCode(string obj) { if (CppHandle != 0) @@ -1524,6 +1714,7 @@ public override int GetHashCode(string obj) } return default(int); } + } class SystemEventArgs : System.EventArgs @@ -1551,6 +1742,437 @@ public override string ToString() } return default(string); } + + } + + class SystemCollectionsICollection : System.Collections.ICollection + { + public int CppHandle; + + public SystemCollectionsICollection(int cppHandle) + { + CppHandle = cppHandle; + } + + public void CopyTo(System.Array array, int index) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int arrayHandle = NativeScript.Bindings.ObjectStore.GetHandle(array); + NativeScript.Bindings.SystemCollectionsICollectionCopyTo(thisHandle, arrayHandle, index); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + + public System.Collections.IEnumerator GetEnumerator() + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetEnumerator(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(returnVal); + } + return default(System.Collections.IEnumerator); + } + + public int Count + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetCount(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(int); + } + } + + public bool IsSynchronized + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetIsSynchronized(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(bool); + } + } + + public object SyncRoot + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetSyncRoot(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return NativeScript.Bindings.ObjectStore.Get(returnVal); + } + return default(object); + } + } + + } + + class SystemCollectionsIList : System.Collections.IList + { + public int CppHandle; + + public SystemCollectionsIList(int cppHandle) + { + CppHandle = cppHandle; + } + + public int Add(object value) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); + var returnVal = NativeScript.Bindings.SystemCollectionsIListAdd(thisHandle, valueHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(int); + } + + public void Clear() + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + NativeScript.Bindings.SystemCollectionsIListClear(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + + public bool Contains(object value) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); + var returnVal = NativeScript.Bindings.SystemCollectionsIListContains(thisHandle, valueHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(bool); + } + + public int IndexOf(object value) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); + var returnVal = NativeScript.Bindings.SystemCollectionsIListIndexOf(thisHandle, valueHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(int); + } + + public void Insert(int index, object value) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); + NativeScript.Bindings.SystemCollectionsIListInsert(thisHandle, index, valueHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + + public void Remove(object value) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); + NativeScript.Bindings.SystemCollectionsIListRemove(thisHandle, valueHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + + public void RemoveAt(int index) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + NativeScript.Bindings.SystemCollectionsIListRemoveAt(thisHandle, index); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + + public System.Collections.IEnumerator GetEnumerator() + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetEnumerator(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(returnVal); + } + return default(System.Collections.IEnumerator); + } + + public void CopyTo(System.Array array, int index) + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int arrayHandle = NativeScript.Bindings.ObjectStore.GetHandle(array); + NativeScript.Bindings.SystemCollectionsIListCopyTo(thisHandle, arrayHandle, index); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + + public bool IsFixedSize + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetIsFixedSize(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(bool); + } + } + + public bool IsReadOnly + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetIsReadOnly(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(bool); + } + } + + public object this[int index] + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetItem(thisHandle, index); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return NativeScript.Bindings.ObjectStore.Get(returnVal); + } + return default(object); + } + set + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); + NativeScript.Bindings.SystemCollectionsIListSetItem(thisHandle, index, valueHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + } + + public int Count + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetCount(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(int); + } + } + + public bool IsSynchronized + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetIsSynchronized(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return returnVal; + } + return default(bool); + } + } + + public object SyncRoot + { + get + { + if (CppHandle != 0) + { + int thisHandle = CppHandle; + var returnVal = NativeScript.Bindings.SystemCollectionsIListGetSyncRoot(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + return NativeScript.Bindings.ObjectStore.Get(returnVal); + } + return default(object); + } + } + + } + + class SystemCollectionsQueue : System.Collections.Queue + { + public int CppHandle; + + public SystemCollectionsQueue(int cppHandle) + { + CppHandle = cppHandle; + } + + 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 SystemAction @@ -1578,6 +2200,7 @@ public void NativeInvoke() } } } + } class SystemActionSystemSingle @@ -1605,6 +2228,7 @@ public void NativeInvoke(float obj) } } } + } class SystemActionSystemSingle_SystemSingle @@ -1632,6 +2256,7 @@ public void NativeInvoke(float arg1, float arg2) } } } + } class SystemFuncSystemInt32_SystemSingle_SystemDouble @@ -1661,6 +2286,7 @@ public double NativeInvoke(int arg1, float arg2) } return default(double); } + } class SystemFuncSystemInt16_SystemInt32_SystemString @@ -1690,6 +2316,7 @@ public string NativeInvoke(short arg1, int arg2) } return default(string); } + } class SystemAppDomainInitializer @@ -1718,6 +2345,7 @@ public void NativeInvoke(string[] args) } } } + } class UnityEngineEventsUnityAction @@ -1745,6 +2373,7 @@ public void NativeInvoke() } } } + } class UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode @@ -1772,6 +2401,7 @@ public void NativeInvoke(UnityEngine.SceneManagement.Scene arg0, UnityEngine.Sce } } } + } /*END BASE TYPES*/ @@ -3892,6 +4522,52 @@ static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandl } } + [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(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) { @@ -4048,6 +4724,123 @@ static void ReleaseSystemEventArgs(int handle) } } + [MonoPInvokeCallback(typeof(SystemCollectionsICollectionConstructorDelegate))] + static void SystemCollectionsICollectionConstructor(int cppHandle, ref int handle) + { + try + { + var thiz = new SystemCollectionsICollection(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(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(ReleaseSystemCollectionsICollectionDelegate))] + static void ReleaseSystemCollectionsICollection(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(SystemCollectionsIListConstructorDelegate))] + static void SystemCollectionsIListConstructor(int cppHandle, ref int handle) + { + try + { + var thiz = new SystemCollectionsIList(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(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(ReleaseSystemCollectionsIListDelegate))] + static void ReleaseSystemCollectionsIList(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(SystemCollectionsQueueConstructorDelegate))] + static void SystemCollectionsQueueConstructor(int cppHandle, ref int handle) + { + try + { + var thiz = new SystemCollectionsQueue(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(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(ReleaseSystemCollectionsQueueDelegate))] + static void ReleaseSystemCollectionsQueue(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(BoxBooleanDelegate))] static int BoxBoolean(bool val) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index cdcb7fb..888569b 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -101,6 +101,7 @@ class JsonBaseType public JsonGenericParams[] GenericParams; public int MaxSimultaneous; public JsonMethod[] OverrideMethods; + public JsonProperty[] OverrideProperties; } [Serializable] @@ -1009,11 +1010,13 @@ static void AppendNamespace( } static ParameterInfo[] ConvertParameters( - System.Reflection.ParameterInfo[] reflectionParameters) + System.Reflection.ParameterInfo[] reflectionParameters, + int start = 0, + int count = -1) { - int num = reflectionParameters.Length; + int num = reflectionParameters.Length - start; ParameterInfo[] parameters = new ParameterInfo[num]; - for (int i = 0; i < num; ++i) + for (int i = start; i < num; ++i) { var reflectionInfo = reflectionParameters[i]; ParameterInfo info = new ParameterInfo(); @@ -1025,7 +1028,7 @@ static ParameterInfo[] ConvertParameters( reflectionInfo); info.Kind = GetTypeKind( info.DereferencedParameterType); - parameters[i] = info; + parameters[i - start] = info; } return parameters; } @@ -1067,6 +1070,16 @@ static bool IsStatic(Type type) return type.IsAbstract && type.IsSealed; } + static bool IsDelegate(Type type) + { + return typeof(Delegate).IsAssignableFrom(type); + } + + static bool IsNonDelegateClass(Type type) + { + return type.IsClass && !IsDelegate(type); + } + static bool IsManagedValueType(Type type) { return type.IsValueType && !IsFullValueType(type); @@ -5594,11 +5607,11 @@ static void AppendDelegate( builders.TempStrBuilder); builders.TempStrBuilder.Append( jsonGenericParams.Types.Length); - string numberedTypeName = builders.TempStrBuilder.ToString(); + string cppTypeName = builders.TempStrBuilder.ToString(); // C++ template declaration AppendCppTemplateDeclaration( - numberedTypeName, + cppTypeName, type.Namespace, genericArgTypes.Length, builders.CppTypeDeclarations); @@ -5619,7 +5632,7 @@ static void AppendDelegate( builders.TempStrBuilder); builders.TempStrBuilder.Append( jsonGenericParams.Types.Length); - string numberedTypeName = builders.TempStrBuilder.ToString(); + string cppTypeName = builders.TempStrBuilder.ToString(); // Max simultaneous handles of this type int? maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 @@ -5630,7 +5643,7 @@ static void AppendDelegate( AppendDelegate( genericType, - numberedTypeName, + cppTypeName, typeParams, maxSimultaneous, builders); @@ -5652,7 +5665,7 @@ static void AppendDelegate( static void AppendDelegate( Type type, - string numberedTypeName, + string cppTypeName, Type[] typeParams, int? maxSimultaneous, StringBuilders builders) @@ -5709,7 +5722,7 @@ static void AppendDelegate( // C++ type declaration int indent = AppendCppTypeDeclaration( type.Namespace, - numberedTypeName, + cppTypeName, false, typeParams, builders.CppTypeDeclarations); @@ -5788,7 +5801,7 @@ static void AppendDelegate( // C++ type definition (begin) AppendCppTypeDefinitionBegin( - numberedTypeName, + cppTypeName, type.Namespace, TypeKind.Class, typeParams, @@ -5814,7 +5827,7 @@ static void AppendDelegate( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - numberedTypeName, + cppTypeName, false, false, false, @@ -5972,7 +5985,7 @@ static void AppendDelegate( AppendCppBaseTypeDefaultConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, true, constructorFuncName, @@ -5981,7 +5994,7 @@ static void AppendDelegate( AppendCppBaseTypeNullptrConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, true, cppMethodDefinitionsIndent, @@ -5989,14 +6002,14 @@ static void AppendDelegate( AppendCppBaseTypeCopyConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeMoveConstructor( - numberedTypeName, + cppTypeName, typeParams, true, cppMethodDefinitionsIndent, @@ -6004,7 +6017,7 @@ static void AppendDelegate( AppendCppBaseTypeHandleConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, true, cppMethodDefinitionsIndent, @@ -6012,7 +6025,7 @@ static void AppendDelegate( AppendCppBaseTypeDestructor( typeName, - numberedTypeName, + cppTypeName, typeParams, true, releaseFuncName, @@ -6021,14 +6034,14 @@ static void AppendDelegate( AppendCppBaseTypeAssignmentOperatorSameType( type, - numberedTypeName, + cppTypeName, typeParams, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorNullptr( - numberedTypeName, + cppTypeName, typeParams, true, releaseFuncName, @@ -6037,7 +6050,7 @@ static void AppendDelegate( AppendCppBaseTypeMoveAssignmentOperator( typeName, - numberedTypeName, + cppTypeName, typeParams, true, releaseFuncName, @@ -6045,20 +6058,20 @@ static void AppendDelegate( builders.CppMethodDefinitions); AppendCppBaseTypeEqualityOperator( - numberedTypeName, + cppTypeName, typeParams, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( - numberedTypeName, + cppTypeName, typeParams, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); // C++ add AppendCppMethodDefinitionBegin( - numberedTypeName, + cppTypeName, typeof(void), "operator+=", typeParams, @@ -6090,7 +6103,7 @@ static void AppendDelegate( // C++ remove AppendCppMethodDefinitionBegin( - numberedTypeName, + cppTypeName, typeof(void), "operator-=", typeParams, @@ -6153,14 +6166,25 @@ static void AppendDelegate( builders.CsharpBaseTypes.Append("\t\t\t}\n"); builders.CsharpBaseTypes.Append("\t\t\t\n"); + // Build the name of the C++ binding function that C# calls + builders.TempStrBuilder.Length = 0; + AppendNativeInvokeFuncName( + type, + typeParams, + "NativeInvoke", + builders.TempStrBuilder); + string nativeInvokeFuncName = builders.TempStrBuilder.ToString(); + // operator() is how C# forwards the delegate invocation to C++ + MethodInfo invokeMethod = type.GetMethod("Invoke"); AppendBaseTypeCppMethodCall( type, typeName, - numberedTypeName, + cppTypeName, typeParams, - type.GetMethod("Invoke"), + invokeMethod, "NativeInvoke", + nativeInvokeFuncName, "operator()", false, indent, @@ -6171,11 +6195,10 @@ static void AppendDelegate( builders.CsharpBaseTypes.Append("\t\t\n"); // Invoke() is how C++ invokes the delegate - MethodInfo invokeMethod = type.GetMethod("Invoke"); AppendBaseTypeMethodCallsCsharpMethod( type, typeName, - numberedTypeName, + cppTypeName, typeParams, invokeMethod, "Invoke", @@ -6290,7 +6313,7 @@ static void AppendDelegate( static void AppendBaseType( Type type, JsonBaseType jsonBaseType, - string numberedTypeName, + string cppTypeName, Type[] typeParams, int? maxSimultaneous, StringBuilders builders) @@ -6329,7 +6352,7 @@ static void AppendBaseType( // C++ type declaration int indent = AppendCppTypeDeclaration( type.Namespace, - numberedTypeName, + cppTypeName, false, typeParams, builders.CppTypeDeclarations); @@ -6378,7 +6401,7 @@ static void AppendBaseType( // C++ type definition (begin) AppendCppTypeDefinitionBegin( - numberedTypeName, + cppTypeName, type.Namespace, TypeKind.Class, typeParams, @@ -6400,7 +6423,7 @@ static void AppendBaseType( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - numberedTypeName, + cppTypeName, false, false, false, @@ -6478,7 +6501,7 @@ static void AppendBaseType( AppendCppBaseTypeDefaultConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, false, constructorFuncName, @@ -6487,7 +6510,7 @@ static void AppendBaseType( AppendCppBaseTypeNullptrConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, false, cppMethodDefinitionsIndent, @@ -6495,14 +6518,14 @@ static void AppendBaseType( AppendCppBaseTypeCopyConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeMoveConstructor( - numberedTypeName, + cppTypeName, typeParams, false, cppMethodDefinitionsIndent, @@ -6510,7 +6533,7 @@ static void AppendBaseType( AppendCppBaseTypeHandleConstructor( typeName, - numberedTypeName, + cppTypeName, typeParams, false, cppMethodDefinitionsIndent, @@ -6518,7 +6541,7 @@ static void AppendBaseType( AppendCppBaseTypeDestructor( typeName, - numberedTypeName, + cppTypeName, typeParams, false, releaseFuncName, @@ -6527,14 +6550,14 @@ static void AppendBaseType( AppendCppBaseTypeAssignmentOperatorSameType( type, - numberedTypeName, + cppTypeName, typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorNullptr( - numberedTypeName, + cppTypeName, typeParams, false, releaseFuncName, @@ -6543,7 +6566,7 @@ static void AppendBaseType( AppendCppBaseTypeMoveAssignmentOperator( typeName, - numberedTypeName, + cppTypeName, typeParams, false, releaseFuncName, @@ -6551,13 +6574,13 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeEqualityOperator( - numberedTypeName, + cppTypeName, typeParams, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( - numberedTypeName, + cppTypeName, typeParams, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6627,19 +6650,43 @@ static void AppendBaseType( // All abstract methods foreach (MethodInfo methodInfo in type.GetMethods()) { - if (methodInfo.IsAbstract) + // Property methods like "get_X" have a "special name" + if (methodInfo.IsAbstract && !methodInfo.IsSpecialName) { AppendBaseTypeNativeMethod( type, typeName, typeParams, - numberedTypeName, + cppTypeName, methodInfo, indent, builders); } } + // All interface methods + if (type.IsInterface) + { + foreach (Type interfaceType in type.GetInterfaces()) + { + foreach (MethodInfo methodInfo in interfaceType.GetMethods()) + { + // Property methods like "get_X" have a "special name" + if (methodInfo.IsAbstract && !methodInfo.IsSpecialName) + { + AppendBaseTypeNativeMethod( + type, + typeName, + typeParams, + cppTypeName, + methodInfo, + indent, + builders); + } + } + } + } + // Specified virtual methods if (jsonBaseType.OverrideMethods != null) { @@ -6657,13 +6704,123 @@ static void AppendBaseType( type, typeName, typeParams, - numberedTypeName, + cppTypeName, methodInfo, indent, builders); } } + // All abstract properties + foreach (PropertyInfo propertyInfo in type.GetProperties()) + { + MethodInfo getMethodInfo = propertyInfo.GetGetMethod(); + MethodInfo setMethodInfo = propertyInfo.GetSetMethod(); + if ((getMethodInfo == null || !getMethodInfo.IsAbstract) && + (setMethodInfo == null || !setMethodInfo.IsAbstract)) + { + continue; + } + AppendBaseTypeProperty( + type, + typeName, + cppTypeName, + typeParams, + propertyInfo, + getMethodInfo, + setMethodInfo, + indent, + builders); + } + + // All interface properties + if (type.IsInterface) + { + foreach (Type interfaceType in type.GetInterfaces()) + { + foreach (PropertyInfo propertyInfo in + interfaceType.GetProperties()) + { + MethodInfo getMethodInfo = propertyInfo.GetGetMethod(); + MethodInfo setMethodInfo = propertyInfo.GetSetMethod(); + if ((getMethodInfo == null || !getMethodInfo.IsAbstract) && + (setMethodInfo == null || !setMethodInfo.IsAbstract)) + { + continue; + } + AppendBaseTypeProperty( + type, + typeName, + cppTypeName, + typeParams, + propertyInfo, + getMethodInfo, + setMethodInfo, + indent, + builders); + } + } + } + + // Specified virtual properties + if (jsonBaseType.OverrideProperties != null) + { + PropertyInfo[] properties = type.GetProperties(); + foreach (JsonProperty jsonProperty in jsonBaseType.OverrideProperties) + { + PropertyInfo propertyInfo = null; + foreach (PropertyInfo curPropertyInfo in properties) + { + if (curPropertyInfo.Name == jsonProperty.Name) + { + propertyInfo = curPropertyInfo; + break; + } + } + if (propertyInfo == null) + { + // Throw an exception so the user knows what to fix in the JSON + StringBuilder errorBuilder = new StringBuilder(1024); + errorBuilder.Append("Property \""); + AppendCsharpTypeName( + type, + errorBuilder); + errorBuilder.Append('.'); + errorBuilder.Append(jsonProperty.Name); + errorBuilder.Append(")\" not found"); + throw new Exception(errorBuilder.ToString()); + } + + MethodInfo getMethodInfo = propertyInfo.GetGetMethod(); + MethodInfo setMethodInfo = propertyInfo.GetSetMethod(); + if ((getMethodInfo == null || !getMethodInfo.IsVirtual) && + (setMethodInfo == null || !setMethodInfo.IsVirtual)) + { + // Throw an exception so the user knows what to fix in the JSON + StringBuilder errorBuilder = new StringBuilder(1024); + errorBuilder.Append("Property \""); + AppendCsharpTypeName( + type, + errorBuilder); + errorBuilder.Append('.'); + errorBuilder.Append(jsonProperty.Name); + errorBuilder.Append( + ")\" doesn't have either a virtual 'get' or 'set' to override"); + throw new Exception(errorBuilder.ToString()); + } + AppendBaseTypeProperty( + type, + typeName, + cppTypeName, + typeParams, + propertyInfo, + getMethodInfo, + setMethodInfo, + indent, + builders); + } + } + // C# class (ending) builders.CsharpBaseTypes.Append("\t\t}\n"); builders.CsharpBaseTypes.Append("\t\t\n"); @@ -6696,6 +6853,15 @@ static void AppendBaseTypeNativeMethod( methodInfo.Name, builders.CsharpGetDelegateCalls); + // Build the name of the C++ binding function that C# calls + builders.TempStrBuilder.Length = 0; + AppendNativeInvokeFuncName( + type, + typeParams, + methodInfo.Name, + builders.TempStrBuilder); + string nativeInvokeFuncName = builders.TempStrBuilder.ToString(); + AppendBaseTypeCppMethodCall( type, typeName, @@ -6703,11 +6869,187 @@ static void AppendBaseTypeNativeMethod( typeParams, methodInfo, methodInfo.Name, + nativeInvokeFuncName, methodInfo.Name, - !type.IsInterface, + IsNonDelegateClass(type), indent, builders); } + + static void AppendBaseTypeProperty( + Type type, + string typeName, + string cppTypeName, + Type[] typeParams, + PropertyInfo propertyInfo, + MethodInfo getMethodInfo, + MethodInfo setMethodInfo, + int indent, + StringBuilders builders) + { + bool isOverride = IsNonDelegateClass(type); + + ParameterInfo[] parameters; + if (getMethodInfo != null && getMethodInfo.IsVirtual) + { + parameters = ConvertParameters( + getMethodInfo.GetParameters()); + } + else + { + System.Reflection.ParameterInfo[] setParams = + setMethodInfo.GetParameters(); + parameters = ConvertParameters( + setParams, + 1, + setParams.Length - 1); + } + + builders.CsharpBaseTypes.Append("\t\t\tpublic "); + if (isOverride) + { + builders.CsharpBaseTypes.Append("override "); + } + AppendCsharpTypeName( + propertyInfo.PropertyType, + builders.CsharpBaseTypes); + builders.CsharpBaseTypes.Append(' '); + if (parameters.Length == 0) + { + builders.CsharpBaseTypes.Append(propertyInfo.Name); + } + else + { + builders.CsharpBaseTypes.Append("this["); + AppendCsharpParams( + parameters, + builders.CsharpBaseTypes); + builders.CsharpBaseTypes.Append(']'); + } + builders.CsharpBaseTypes.Append('\n'); + builders.CsharpBaseTypes.Append("\t\t\t{\n"); + + if (getMethodInfo != null && getMethodInfo.IsVirtual) + { + AppendBaseTypeNativeProperty( + type, + typeName, + typeParams, + cppTypeName, + propertyInfo, + getMethodInfo, + "Get", + isOverride, + indent, + builders); + } + + if (setMethodInfo != null && setMethodInfo.IsVirtual) + { + AppendBaseTypeNativeProperty( + type, + typeName, + typeParams, + cppTypeName, + propertyInfo, + setMethodInfo, + "Set", + isOverride, + indent, + builders); + } + + builders.CsharpBaseTypes.Append("\t\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\t\n"); + } + + static void AppendBaseTypeNativeProperty( + Type type, + string typeName, + Type[] typeParams, + string cppTypeName, + PropertyInfo propertyInfo, + MethodInfo methodInfo, + string operationType, + bool isOverride, + int indent, + StringBuilders builders) + { + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append(operationType); + builders.TempStrBuilder.Append(propertyInfo.Name); + string funcName = builders.TempStrBuilder.ToString(); + + AppendCsharpGetDelegateCall( + type.Name, + type.Namespace, + typeParams, + funcName, + builders.CsharpGetDelegateCalls); + + // Build the name of the C++ binding function that C# calls + builders.TempStrBuilder.Length = 0; + AppendNativeInvokeFuncName( + type, + typeParams, + funcName, + builders.TempStrBuilder); + string nativeInvokeFuncName = builders.TempStrBuilder.ToString(); + + ParameterInfo[] invokeParams = AppendBaseTypeCppNativeInvokeCall( + type, + typeName, + cppTypeName, + typeParams, + methodInfo, + funcName, + nativeInvokeFuncName, + funcName, + isOverride, + indent, + builders); + + // C# method that calls the C++ binding function + ParameterInfo[] invokeParamsWithThis = PrependThisParameter( + invokeParams); + TypeKind invokeReturnTypeKind = GetTypeKind( + propertyInfo.PropertyType); + builders.CsharpBaseTypes.Append("\t\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"); + AppendCsharpBaseTypeCppMethodCallMethodBody( + methodInfo, + nativeInvokeFuncName, + invokeParamsWithThis, + invokeReturnTypeKind, + 5, + builders.CsharpBaseTypes); + builders.CsharpBaseTypes.Append("\t\t\t\t}\n"); + } + + static void AppendCsharpParams( + ParameterInfo[] parameters, + StringBuilder output) + { + for (int i = 0; i < parameters.Length; ++i) + { + ParameterInfo param = parameters[i]; + AppendCsharpTypeName( + param.ParameterType, + output); + output.Append(' '); + output.Append(param.Name); + if (i != parameters.Length - 1) + { + output.Append(", "); + } + } + } static void AppendBaseTypeMethodCallsCsharpMethod( Type type, @@ -6875,33 +7217,80 @@ static void AppendBaseTypeMethodCallsCsharpMethod( builders.CsharpFunctions); } + static void AppendNativeInvokeFuncName( + Type type, + Type[] typeParams, + string funcName, + StringBuilder output) + { + AppendNamespace( + type.Namespace, + string.Empty, + output); + AppendTypeNameWithoutSuffixes( + type.Name, + output); + AppendTypeNames( + typeParams, + output); + output.Append(funcName); + } + static void AppendBaseTypeCppMethodCall( Type type, string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, MethodInfo invokeMethod, string funcName, + string nativeInvokeFuncName, string methodName, bool isOverride, int indent, StringBuilders builders) { - // Build the name of the C++ binding function that C# calls - builders.TempStrBuilder.Length = 0; - AppendNamespace( - type.Namespace, - string.Empty, - builders.TempStrBuilder); - AppendTypeNameWithoutSuffixes( - type.Name, - builders.TempStrBuilder); - AppendTypeNames( + ParameterInfo[] invokeParams = AppendBaseTypeCppNativeInvokeCall( + type, + typeName, + cppTypeName, typeParams, - builders.TempStrBuilder); - builders.TempStrBuilder.Append(funcName); - string nativeInvokeFuncName = builders.TempStrBuilder.ToString(); + invokeMethod, + funcName, + nativeInvokeFuncName, + methodName, + isOverride, + indent, + builders); + // C# method that calls the C++ binding function + ParameterInfo[] invokeParamsWithThis = PrependThisParameter( + invokeParams); + TypeKind invokeReturnTypeKind = GetTypeKind( + invokeMethod.ReturnType); + AppendCsharpBaseTypeCppMethodCallMethod( + isOverride, + invokeMethod, + funcName, + invokeParams, + nativeInvokeFuncName, + invokeParamsWithThis, + invokeReturnTypeKind, + builders.CsharpBaseTypes); + } + + static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( + Type type, + string typeName, + string cppTypeName, + Type[] typeParams, + MethodInfo invokeMethod, + string funcName, + string nativeInvokeFuncName, + string methodName, + bool isOverride, + int indent, + StringBuilders builders) + { // C++ method declaration ParameterInfo[] invokeParams = ConvertParameters( invokeMethod.GetParameters()); @@ -6920,7 +7309,7 @@ static void AppendBaseTypeCppMethodCall( // C++ method definition. This is a no-op that game code overrides. AppendCppMethodDefinitionBegin( - numberedTypeName, + cppTypeName, invokeMethod.ReturnType, methodName, typeParams, @@ -6934,10 +7323,19 @@ static void AppendBaseTypeCppMethodCall( builders.CppMethodDefinitions.Append("{\n"); if (invokeMethod.ReturnType != typeof(void)) { + TypeKind returnTypeKind = GetTypeKind(invokeMethod.ReturnType); AppendIndent( indent + 1, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("return {};\n"); + if (returnTypeKind == TypeKind.Class || + returnTypeKind == TypeKind.ManagedStruct) + { + builders.CppMethodDefinitions.Append("return nullptr;\n"); + } + else + { + builders.CppMethodDefinitions.Append("return {};\n"); + } } AppendIndent( indent, @@ -6963,31 +7361,6 @@ static void AppendBaseTypeCppMethodCall( typeName, builders.CppMethodDefinitions); - // C# method that calls the C++ binding function - ParameterInfo[] invokeParamsWithThis = new ParameterInfo[ - invokeParams.Length + 1]; - for (int i = 0; i < invokeParams.Length; ++i) - { - invokeParamsWithThis[i+1] = invokeParams[i]; - } - invokeParamsWithThis[0] = new ParameterInfo { - Name = "thisHandle", - ParameterType = typeof(int), - DereferencedParameterType = typeof(int), - IsOut = false, - IsRef = false, - Kind = TypeKind.Primitive - }; - AppendCsharpBaseTypeCppMethodCallMethod( - isOverride, - invokeMethod, - funcName, - invokeParams, - nativeInvokeFuncName, - invokeParamsWithThis, - invokeReturnTypeKind, - builders.CsharpBaseTypes); - // C# delegate for the C++ binding function AppendCsharpDelegate( false, @@ -7008,6 +7381,28 @@ static void AppendBaseTypeCppMethodCall( funcName, invokeParams, builders.CsharpImports); + + return invokeParams; + } + + static ParameterInfo[] PrependThisParameter( + ParameterInfo[] invokeParams) + { + ParameterInfo[] invokeParamsWithThis = new ParameterInfo[ + invokeParams.Length + 1]; + for (int i = 0; i < invokeParams.Length; ++i) + { + invokeParamsWithThis[i+1] = invokeParams[i]; + } + invokeParamsWithThis[0] = new ParameterInfo { + Name = "thisHandle", + ParameterType = typeof(int), + DereferencedParameterType = typeof(int), + IsOut = false, + IsRef = false, + Kind = TypeKind.Primitive + }; + return invokeParamsWithThis; } static void AppendCsharpBaseTypeReleaseFunction( @@ -7070,34 +7465,55 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( output.Append(" "); output.Append(funcName); output.Append("("); - for (int i = 0; i < invokeParams.Length; ++i) - { - ParameterInfo param = invokeParams[i]; - AppendCsharpTypeName( - param.ParameterType, - output); - output.Append(' '); - output.Append(param.Name); - if (i != invokeParams.Length - 1) - { - output.Append(", "); - } - } + AppendCsharpParams( + invokeParams, + output); output.Append(")\n"); output.Append("\t\t\t{\n"); - output.Append("\t\t\t\tif (CppHandle != 0)\n"); - output.Append("\t\t\t\t{\n"); - output.Append("\t\t\t\t\tint thisHandle = CppHandle;\n"); + AppendCsharpBaseTypeCppMethodCallMethodBody( + invokeMethod, + nativeInvokeFuncName, + invokeParamsWithThis, + invokeReturnTypeKind, + 4, + output); + output.Append("\t\t\t}\n"); + output.Append("\t\t\t\n"); + } + + private static void AppendCsharpBaseTypeCppMethodCallMethodBody( + MethodInfo invokeMethod, + string nativeInvokeFuncName, + ParameterInfo[] invokeParamsWithThis, + TypeKind invokeReturnTypeKind, + int indent, + StringBuilder output) + { + AppendIndent( + indent, + output); + output.Append("if (CppHandle != 0)\n"); + AppendIndent( + indent, + output); + output.Append("{\n"); + AppendIndent( + indent + 1, + output); + output.Append("int thisHandle = CppHandle;\n"); AppendCppFunctionCall( nativeInvokeFuncName, invokeParamsWithThis, invokeMethod.ReturnType, true, - 5, + indent + 1, output); if (invokeMethod.ReturnType != typeof(void)) { - output.Append("\t\t\t\t\treturn "); + AppendIndent( + indent + 1, + output); + output.Append("return "); switch (invokeReturnTypeKind) { case TypeKind.Class: @@ -7120,16 +7536,21 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( break; } } - output.Append("\t\t\t\t}\n"); + AppendIndent( + indent, + output); + output.Append("}\n"); if (invokeMethod.ReturnType != typeof(void)) { - output.Append("\t\t\t\treturn default("); + AppendIndent( + indent, + output); + output.Append("return default("); AppendCsharpTypeName( invokeMethod.ReturnType, output); output.Append(");\n"); } - output.Append("\t\t\t}\n"); } private static void AppendCsharpBaseTypeConstructorFunction( @@ -7405,7 +7826,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( } static void AppendCppBaseTypeInequalityOperator( - string numberedTypeName, + string cppTypeName, Type[] typeParams, int cppMethodDefinitionsIndent, StringBuilder output) @@ -7415,14 +7836,14 @@ static void AppendCppBaseTypeInequalityOperator( output); output.Append("bool "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::operator!=(const "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -7448,7 +7869,7 @@ static void AppendCppBaseTypeInequalityOperator( } static void AppendCppBaseTypeEqualityOperator( - string numberedTypeName, + string cppTypeName, Type[] typeParams, int cppMethodDefinitionsIndent, StringBuilder output) @@ -7458,14 +7879,14 @@ static void AppendCppBaseTypeEqualityOperator( output); output.Append("bool "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::operator==(const "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -7492,7 +7913,7 @@ static void AppendCppBaseTypeEqualityOperator( static void AppendCppBaseTypeMoveAssignmentOperator( string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, string releaseFuncName, @@ -7503,21 +7924,21 @@ static void AppendCppBaseTypeMoveAssignmentOperator( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("& "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::operator=("); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -7633,7 +8054,7 @@ static void AppendCppBaseTypeMoveAssignmentOperator( } static void AppendCppBaseTypeAssignmentOperatorNullptr( - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, string releaseFuncName, @@ -7644,14 +8065,14 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("& "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -7750,7 +8171,7 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( static void AppendCppBaseTypeAssignmentOperatorSameType( Type type, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -7760,21 +8181,21 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("& "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::operator=(const "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -7785,7 +8206,7 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( output); output.Append("{\n"); AppendSetHandle( - numberedTypeName, + cppTypeName, type.Namespace, TypeKind.Class, typeParams, @@ -7817,7 +8238,7 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( static void AppendCppBaseTypeDestructor( string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, string releaseFuncName, @@ -7828,14 +8249,14 @@ static void AppendCppBaseTypeDestructor( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::~"); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); output.Append("()\n"); AppendIndent( @@ -7925,7 +8346,7 @@ static void AppendCppBaseTypeDestructor( static void AppendCppBaseTypeHandleConstructor( string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -7935,14 +8356,14 @@ static void AppendCppBaseTypeHandleConstructor( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); output.Append( "(Plugin::InternalUse iu, int32_t handle)\n"); @@ -7997,7 +8418,7 @@ static void AppendCppBaseTypeHandleConstructor( } static void AppendCppBaseTypeMoveConstructor( - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -8007,18 +8428,18 @@ static void AppendCppBaseTypeMoveConstructor( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); output.Append("("); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -8073,7 +8494,7 @@ static void AppendCppBaseTypeMoveConstructor( static void AppendCppBaseTypeCopyConstructor( string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -8083,18 +8504,18 @@ static void AppendCppBaseTypeCopyConstructor( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); output.Append("(const "); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, @@ -8152,7 +8573,7 @@ static void AppendCppBaseTypeCopyConstructor( static void AppendCppBaseTypeNullptrConstructor( string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, @@ -8162,14 +8583,14 @@ static void AppendCppBaseTypeNullptrConstructor( cppMethodDefinitionsIndent, output); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); AppendCppTypeParameters( typeParams, output); output.Append("::"); AppendTypeNameWithoutGenericSuffix( - numberedTypeName, + cppTypeName, output); output.Append("(decltype(nullptr) n)\n"); AppendIndent( @@ -8206,7 +8627,7 @@ static void AppendCppBaseTypeNullptrConstructor( static void AppendCppBaseTypeDefaultConstructor( string typeName, - string numberedTypeName, + string cppTypeName, Type[] typeParams, bool typeIsDelegate, string constructorFuncName, @@ -8214,9 +8635,9 @@ static void AppendCppBaseTypeDefaultConstructor( StringBuilder output) { AppendCppMethodDefinitionBegin( - numberedTypeName, + cppTypeName, null, - numberedTypeName, + cppTypeName, typeParams, null, new ParameterInfo[0], @@ -8876,19 +9297,14 @@ static void AppendGetter( // Build uppercase function name builders.TempStrBuilder.Length = 0; - AppendNamespace( - enclosingType.Namespace, - string.Empty, - builders.TempStrBuilder); - AppendTypeNameWithoutGenericSuffix( + AppendFieldPropertyFuncName( enclosingType.Name, - builders.TempStrBuilder); - AppendTypeNames( + enclosingType.Namespace, enclosingTypeParams, + syntaxType, + "Get", + fieldName, builders.TempStrBuilder); - builders.TempStrBuilder.Append(syntaxType); - builders.TempStrBuilder.Append("Get"); - builders.TempStrBuilder.Append(fieldNameUpper); string funcName = builders.TempStrBuilder.ToString(); // Build lowercase function name @@ -9070,19 +9486,14 @@ static void AppendSetter( // Build uppercase function name builders.TempStrBuilder.Length = 0; - AppendNamespace( - enclosingType.Namespace, - string.Empty, - builders.TempStrBuilder); - AppendTypeNameWithoutGenericSuffix( + AppendFieldPropertyFuncName( enclosingType.Name, - builders.TempStrBuilder); - AppendTypeNames( + enclosingType.Namespace, enclosingTypeParams, + syntaxType, + "Set", + fieldName, builders.TempStrBuilder); - builders.TempStrBuilder.Append(syntaxType); - builders.TempStrBuilder.Append("Set"); - builders.TempStrBuilder.Append(fieldNameUpper); string funcName = builders.TempStrBuilder.ToString(); // Build lowercase function name @@ -9237,6 +9648,31 @@ static void AppendSetter( builders.CppInitBody); } + static void AppendFieldPropertyFuncName( + string enclosingTypeName, + string enclosingTypeNamespace, + Type[] enclosingTypeParams, + string syntaxType, + string operationType, + string fieldName, + StringBuilder output) + { + AppendNamespace( + enclosingTypeNamespace, + string.Empty, + output); + AppendTypeNameWithoutGenericSuffix( + enclosingTypeName, + output); + AppendTypeNames( + enclosingTypeParams, + output); + output.Append(syntaxType); + output.Append(operationType); + output.Append(char.ToUpper(fieldName[0])); + output.Append(fieldName, 1, fieldName.Length-1); + } + static void AppendCppTemplateDeclaration( string typeName, string typeNamespace, @@ -10167,7 +10603,7 @@ static void AppendCsharpDelegateType( output.Append(", "); } } - AppendCsharpParameterDeclaration( + AppendCsharpBindingParameterDeclaration( parameters, output); output.Append(");\n"); @@ -10226,7 +10662,7 @@ static void AppendCsharpFunctionBeginning( output.Append(", "); } } - AppendCsharpParameterDeclaration( + AppendCsharpBindingParameterDeclaration( parameters, output); output.Append(")\n\t\t{\n\t\t\t"); @@ -10505,7 +10941,7 @@ StringBuilder output } } - static void AppendCsharpParameterDeclaration( + static void AppendCsharpBindingParameterDeclaration( ParameterInfo[] parameters, StringBuilder output) { @@ -11109,6 +11545,10 @@ static void AppendCsharpTypeName( { output.Append("string"); } + else if (type == typeof(object)) + { + output.Append("object"); + } else if (type.IsArray) { AppendCsharpTypeName( @@ -11211,7 +11651,7 @@ static void AppendCppTypeName( } output.Append('>'); } - else if (typeof(Delegate).IsAssignableFrom(type)) + else if (IsDelegate(type)) { AppendCppTypeName( type.Namespace, diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 1d9522a..35a3cb7 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -538,6 +538,22 @@ }, { "Name": "UnityEngine.SceneManagement.LoadSceneMode" + }, + { + "Name": "System.Collections.IEnumerator", + "Methods": [ + { + "Name": "MoveNext", + "ParamTypes": [] + } + ], + "Properties": [ + { + "Name": "Current", + "Get": {}, + "Set": {} + } + ] } ], "BaseTypes": [ @@ -567,6 +583,22 @@ "ParamTypes": [] } ] + }, + { + "Name": "System.Collections.ICollection" + }, + { + "Name": "System.Collections.IList" + }, + { + "Name": "System.Collections.Queue", + "OverrideProperties": [ + { + "Name": "Count", + "Get": {}, + "Set": {} + } + ] } ], "MonoBehaviours": [ diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index c8c1285..8526d53 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -13,8 +13,6 @@ using namespace System; using namespace UnityEngine; -void PrintPlatformDefines(); - // Called when the plugin is initialized // This is mostly full of test code. Feel free to remove it all. void PluginMain() diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 716cc36..d6a52cc 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -137,6 +137,8 @@ namespace Plugin UnityEngine::SceneManagement::Scene (*UnboxScene)(int32_t valHandle); int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); + int32_t (*SystemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle); + System::Boolean (*SystemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle); void (*ReleaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle); void (*SystemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemCollectionsGenericIComparerSystemString)(int32_t handle); @@ -145,6 +147,12 @@ namespace Plugin void (*SystemStringComparerConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemEventArgs)(int32_t handle); void (*SystemEventArgsConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemCollectionsICollection)(int32_t handle); + void (*SystemCollectionsICollectionConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemCollectionsIList)(int32_t handle); + void (*SystemCollectionsIListConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemCollectionsQueue)(int32_t handle); + void (*SystemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle); int32_t (*BoxBoolean)(System::Boolean val); System::Boolean (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -434,6 +442,81 @@ namespace Plugin *pRelease = (System::EventArgs*)NextFreeSystemEventArgs; NextFreeSystemEventArgs = pRelease; } + int32_t SystemCollectionsICollectionFreeListSize; + System::Collections::ICollection** SystemCollectionsICollectionFreeList; + System::Collections::ICollection** NextFreeSystemCollectionsICollection; + + int32_t StoreSystemCollectionsICollection(System::Collections::ICollection* del) + { + assert(NextFreeSystemCollectionsICollection != nullptr); + System::Collections::ICollection** pNext = NextFreeSystemCollectionsICollection; + NextFreeSystemCollectionsICollection = (System::Collections::ICollection**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsICollectionFreeList); + } + + System::Collections::ICollection* GetSystemCollectionsICollection(int32_t handle) + { + assert(handle >= 0 && handle < SystemCollectionsICollectionFreeListSize); + return SystemCollectionsICollectionFreeList[handle]; + } + + void RemoveSystemCollectionsICollection(int32_t handle) + { + System::Collections::ICollection** pRelease = SystemCollectionsICollectionFreeList + handle; + *pRelease = (System::Collections::ICollection*)NextFreeSystemCollectionsICollection; + NextFreeSystemCollectionsICollection = pRelease; + } + int32_t SystemCollectionsIListFreeListSize; + System::Collections::IList** SystemCollectionsIListFreeList; + System::Collections::IList** NextFreeSystemCollectionsIList; + + int32_t StoreSystemCollectionsIList(System::Collections::IList* del) + { + assert(NextFreeSystemCollectionsIList != nullptr); + System::Collections::IList** pNext = NextFreeSystemCollectionsIList; + NextFreeSystemCollectionsIList = (System::Collections::IList**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsIListFreeList); + } + + System::Collections::IList* GetSystemCollectionsIList(int32_t handle) + { + assert(handle >= 0 && handle < SystemCollectionsIListFreeListSize); + return SystemCollectionsIListFreeList[handle]; + } + + void RemoveSystemCollectionsIList(int32_t handle) + { + System::Collections::IList** pRelease = SystemCollectionsIListFreeList + handle; + *pRelease = (System::Collections::IList*)NextFreeSystemCollectionsIList; + NextFreeSystemCollectionsIList = pRelease; + } + int32_t SystemCollectionsQueueFreeListSize; + System::Collections::Queue** SystemCollectionsQueueFreeList; + System::Collections::Queue** NextFreeSystemCollectionsQueue; + + int32_t StoreSystemCollectionsQueue(System::Collections::Queue* del) + { + assert(NextFreeSystemCollectionsQueue != nullptr); + System::Collections::Queue** pNext = NextFreeSystemCollectionsQueue; + NextFreeSystemCollectionsQueue = (System::Collections::Queue**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemCollectionsQueueFreeList); + } + + System::Collections::Queue* GetSystemCollectionsQueue(int32_t handle) + { + assert(handle >= 0 && handle < SystemCollectionsQueueFreeListSize); + return SystemCollectionsQueueFreeList[handle]; + } + + void RemoveSystemCollectionsQueue(int32_t handle) + { + System::Collections::Queue** pRelease = SystemCollectionsQueueFreeList + handle; + *pRelease = (System::Collections::Queue*)NextFreeSystemCollectionsQueue; + NextFreeSystemCollectionsQueue = pRelease; + } int32_t SystemActionFreeListSize; System::Action** SystemActionFreeList; System::Action** NextFreeSystemAction; @@ -4544,6 +4627,117 @@ namespace System } } +namespace System +{ + namespace Collections + { + IEnumerator::IEnumerator(decltype(nullptr) n) + : IEnumerator(Plugin::InternalUse::Only, 0) + { + } + + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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 Collections @@ -5301,7 +5495,7 @@ namespace System System::String EventArgs::ToString() { - return {}; + return nullptr; } DLLEXPORT int32_t SystemEventArgsToString(int32_t cppHandle) @@ -5327,89 +5521,1094 @@ namespace System namespace System { - Object::Object(System::Boolean val) + namespace Collections { - int32_t handle = Plugin::BoxBoolean(val); - if (Plugin::unhandledCsharpException) + ICollection::ICollection() + : System::Object(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreSystemCollectionsICollection(this); + Plugin::SystemCollectionsICollectionConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsICollection(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - if (handle) + + ICollection::ICollection(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsICollection(this); } - } - - Object::operator System::Boolean() - { - System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); - if (Plugin::unhandledCsharpException) + + ICollection::ICollection(const ICollection& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreSystemCollectionsICollection(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - return returnVal; - } -} - -namespace System -{ - Object::Object(int8_t val) - { - int32_t handle = Plugin::BoxSByte(val); - if (Plugin::unhandledCsharpException) + + ICollection::ICollection(ICollection&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; } - if (handle) + + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsICollection(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - Object::operator int8_t() - { - int8_t returnVal(Plugin::UnboxSByte(Handle)); - if (Plugin::unhandledCsharpException) + + ICollection::~ICollection() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::RemoveSystemCollectionsICollection(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsICollection(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } } - return returnVal; - } -} - -namespace System -{ - Object::Object(uint8_t val) - { - int32_t handle = Plugin::BoxByte(val); - if (Plugin::unhandledCsharpException) + + ICollection& ICollection::operator=(const ICollection& 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; } - if (handle) + + ICollection& ICollection::operator=(decltype(nullptr) other) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } - } - + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsICollection(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + ICollection& ICollection::operator=(ICollection&& other) + { + Plugin::RemoveSystemCollectionsICollection(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsICollection(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 ICollection::operator==(const ICollection& other) const + { + return Handle == other.Handle; + } + + bool ICollection::operator!=(const ICollection& other) const + { + return Handle != other.Handle; + } + + void ICollection::CopyTo(System::Array& array, int32_t index) + { + } + + DLLEXPORT void SystemCollectionsICollectionCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) + { + try + { + auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); + Plugin::GetSystemCollectionsICollection(cppHandle)->CopyTo(param0, index); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + System::Collections::IEnumerator ICollection::GetEnumerator() + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsICollectionGetEnumerator(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetEnumerator().Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + int32_t ICollection::GetCount() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsICollectionGetCount(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetCount(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Boolean ICollection::GetIsSynchronized() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsICollectionGetIsSynchronized(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetIsSynchronized(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Object ICollection::GetSyncRoot() + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsICollectionGetSyncRoot(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetSyncRoot().Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } +} + +namespace System +{ + namespace Collections + { + IList::IList() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + Plugin::SystemCollectionsIListConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + IList::IList(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + } + + IList::IList(const IList& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IList::IList(IList&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + IList::IList(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IList::~IList() + { + Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsIList(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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) other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsIList(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + IList& IList::operator=(IList&& other) + { + Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsIList(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 IList::operator==(const IList& other) const + { + return Handle == other.Handle; + } + + bool IList::operator!=(const IList& other) const + { + return Handle != other.Handle; + } + + int32_t IList::Add(System::Object& value) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListAdd(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->Add(param0); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + void IList::Clear() + { + } + + DLLEXPORT void SystemCollectionsIListClear(int32_t cppHandle) + { + try + { + Plugin::GetSystemCollectionsIList(cppHandle)->Clear(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + System::Boolean IList::Contains(System::Object& value) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListContains(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->Contains(param0); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + int32_t IList::IndexOf(System::Object& value) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListIndexOf(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->IndexOf(param0); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + void IList::Insert(int32_t index, System::Object& value) + { + } + + DLLEXPORT void SystemCollectionsIListInsert(int32_t cppHandle, int32_t index, int32_t valueHandle) + { + try + { + auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->Insert(index, param1); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void IList::Remove(System::Object& value) + { + } + + DLLEXPORT void SystemCollectionsIListRemove(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->Remove(param0); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + void IList::RemoveAt(int32_t index) + { + } + + DLLEXPORT void SystemCollectionsIListRemoveAt(int32_t cppHandle, int32_t index) + { + try + { + Plugin::GetSystemCollectionsIList(cppHandle)->RemoveAt(index); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + System::Collections::IEnumerator IList::GetEnumerator() + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsIListGetEnumerator(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetEnumerator().Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + void IList::CopyTo(System::Array& array, int32_t index) + { + } + + DLLEXPORT void SystemCollectionsIListCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) + { + try + { + auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->CopyTo(param0, index); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + System::Boolean IList::GetIsFixedSize() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListGetIsFixedSize(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsFixedSize(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Boolean IList::GetIsReadOnly() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListGetIsReadOnly(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsReadOnly(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Object IList::GetItem(int32_t index) + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsIListGetItem(int32_t cppHandle, int32_t index) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetItem(index).Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + void IList::SetItem(int32_t index, System::Object& value) + { + } + + DLLEXPORT void SystemCollectionsIListSetItem(int32_t cppHandle, int32_t index, int32_t valueHandle) + { + try + { + auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->SetItem(index, param1); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + int32_t IList::GetCount() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListGetCount(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetCount(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Boolean IList::GetIsSynchronized() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListGetIsSynchronized(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsSynchronized(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Object IList::GetSyncRoot() + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsIListGetSyncRoot(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetSyncRoot().Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } +} + +namespace System +{ + namespace Collections + { + Queue::Queue() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsQueue(this); + Plugin::SystemCollectionsQueueConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsQueue(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + Queue::Queue(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemCollectionsQueue(this); + } + + Queue::Queue(const Queue& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsQueue(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + Queue::Queue(Queue&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + Queue::Queue(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsQueue(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + Queue::~Queue() + { + Plugin::RemoveSystemCollectionsQueue(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsQueue(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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) other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsQueue(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + Queue& Queue::operator=(Queue&& other) + { + Plugin::RemoveSystemCollectionsQueue(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsQueue(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 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() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsQueueGetCount(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsQueue(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 +{ + Object::Object(System::Boolean val) + { + int32_t handle = Plugin::BoxBoolean(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::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::Object(int8_t val) + { + int32_t handle = Plugin::BoxSByte(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 int8_t() + { + int8_t returnVal(Plugin::UnboxSByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() { uint8_t returnVal(Plugin::UnboxByte(Handle)); @@ -8355,7 +9554,7 @@ namespace System System::String Func3::operator()(int16_t arg1, int32_t arg2) { - return {}; + return nullptr; } DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) @@ -9219,6 +10418,8 @@ DLLEXPORT void Init( UnityEngine::SceneManagement::Scene (*unboxScene)(int32_t valHandle), int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), + int32_t (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), + System::Boolean (*systemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle), void (*releaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle), void (*systemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemCollectionsGenericIComparerSystemString)(int32_t handle), @@ -9227,6 +10428,12 @@ DLLEXPORT void Init( void (*systemStringComparerConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemEventArgs)(int32_t handle), void (*systemEventArgsConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemCollectionsICollection)(int32_t handle), + void (*systemCollectionsICollectionConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemCollectionsIList)(int32_t handle), + void (*systemCollectionsIListConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemCollectionsQueue)(int32_t handle), + void (*systemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle), int32_t (*boxBoolean)(System::Boolean val), System::Boolean (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -9430,6 +10637,8 @@ DLLEXPORT void Init( Plugin::UnboxScene = unboxScene; Plugin::BoxLoadSceneMode = boxLoadSceneMode; Plugin::UnboxLoadSceneMode = unboxLoadSceneMode; + Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = systemCollectionsIEnumeratorPropertyGetCurrent; + Plugin::SystemCollectionsIEnumeratorMethodMoveNext = systemCollectionsIEnumeratorMethodMoveNext; SystemCollectionsGenericIComparerSystemInt32FreeListSize = maxManagedObjects; SystemCollectionsGenericIComparerSystemInt32FreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemInt32FreeListSize]; for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1; i < end; ++i) @@ -9470,6 +10679,36 @@ DLLEXPORT void Init( NextFreeSystemEventArgs = SystemEventArgsFreeList + 1; Plugin::ReleaseSystemEventArgs = releaseSystemEventArgs; Plugin::SystemEventArgsConstructor = systemEventArgsConstructor; + SystemCollectionsICollectionFreeListSize = maxManagedObjects; + SystemCollectionsICollectionFreeList = new System::Collections::ICollection*[SystemCollectionsICollectionFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsICollectionFreeListSize - 1; i < end; ++i) + { + SystemCollectionsICollectionFreeList[i] = (System::Collections::ICollection*)(SystemCollectionsICollectionFreeList + i + 1); + } + SystemCollectionsICollectionFreeList[SystemCollectionsICollectionFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsICollection = SystemCollectionsICollectionFreeList + 1; + Plugin::ReleaseSystemCollectionsICollection = releaseSystemCollectionsICollection; + Plugin::SystemCollectionsICollectionConstructor = systemCollectionsICollectionConstructor; + SystemCollectionsIListFreeListSize = maxManagedObjects; + SystemCollectionsIListFreeList = new System::Collections::IList*[SystemCollectionsIListFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsIListFreeListSize - 1; i < end; ++i) + { + SystemCollectionsIListFreeList[i] = (System::Collections::IList*)(SystemCollectionsIListFreeList + i + 1); + } + SystemCollectionsIListFreeList[SystemCollectionsIListFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsIList = SystemCollectionsIListFreeList + 1; + Plugin::ReleaseSystemCollectionsIList = releaseSystemCollectionsIList; + Plugin::SystemCollectionsIListConstructor = systemCollectionsIListConstructor; + SystemCollectionsQueueFreeListSize = maxManagedObjects; + SystemCollectionsQueueFreeList = new System::Collections::Queue*[SystemCollectionsQueueFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsQueueFreeListSize - 1; i < end; ++i) + { + SystemCollectionsQueueFreeList[i] = (System::Collections::Queue*)(SystemCollectionsQueueFreeList + i + 1); + } + SystemCollectionsQueueFreeList[SystemCollectionsQueueFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsQueue = SystemCollectionsQueueFreeList + 1; + Plugin::ReleaseSystemCollectionsQueue = releaseSystemCollectionsQueue; + Plugin::SystemCollectionsQueueConstructor = systemCollectionsQueueConstructor; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 57d8b43..fbf5e52 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -535,6 +535,14 @@ namespace UnityEngine } } +namespace System +{ + namespace Collections + { + struct IEnumerator; + } +} + namespace System { namespace Collections @@ -578,6 +586,30 @@ namespace System struct EventArgs; } +namespace System +{ + namespace Collections + { + struct ICollection; + } +} + +namespace System +{ + namespace Collections + { + struct IList; + } +} + +namespace System +{ + namespace Collections + { + struct Queue; + } +} + namespace MyGame { namespace MonoBehaviours @@ -1553,6 +1585,28 @@ namespace UnityEngine } } +namespace System +{ + namespace Collections + { + struct IEnumerator : System::Object + { + IEnumerator(decltype(nullptr) n); + 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) other); + 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 Collections @@ -1647,6 +1701,94 @@ namespace System }; } +namespace System +{ + namespace Collections + { + struct ICollection : System::Object + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + int32_t CppHandle; + ICollection(); + virtual void CopyTo(System::Array& array, int32_t index); + virtual System::Collections::IEnumerator GetEnumerator(); + virtual int32_t GetCount(); + virtual System::Boolean GetIsSynchronized(); + virtual System::Object GetSyncRoot(); + }; + } +} + +namespace System +{ + namespace Collections + { + struct IList : System::Object + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + int32_t CppHandle; + IList(); + virtual int32_t Add(System::Object& value); + virtual void Clear(); + virtual System::Boolean Contains(System::Object& value); + virtual int32_t IndexOf(System::Object& value); + virtual void Insert(int32_t index, System::Object& value); + virtual void Remove(System::Object& value); + virtual void RemoveAt(int32_t index); + virtual System::Collections::IEnumerator GetEnumerator(); + virtual void CopyTo(System::Array& array, int32_t index); + virtual System::Boolean GetIsFixedSize(); + virtual System::Boolean GetIsReadOnly(); + virtual System::Object GetItem(int32_t index); + virtual void SetItem(int32_t index, System::Object& value); + virtual int32_t GetCount(); + virtual System::Boolean GetIsSynchronized(); + virtual System::Object GetSyncRoot(); + }; + } +} + +namespace System +{ + namespace Collections + { + struct Queue : System::Object + { + Queue(decltype(nullptr) n); + 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) other); + Queue& operator=(Queue&& other); + bool operator==(const Queue& other) const; + bool operator!=(const Queue& other) const; + int32_t CppHandle; + Queue(); + virtual int32_t GetCount(); + }; + } +} + namespace MyGame { namespace MonoBehaviours From 8599cf8da1cb6a6b40b064f210700cb0112636dc Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 3 Dec 2017 14:00:49 -0800 Subject: [PATCH 14/65] Support overriding events --- README.md | 1 - Unity/Assets/NativeScript/Bindings.cs | 3340 +++++--- .../NativeScript/Editor/GenerateBindings.cs | 200 +- Unity/Assets/NativeScriptTypes.json | 42 +- Unity/CppSource/NativeScript/Bindings.cpp | 7620 +++++++++++------ Unity/CppSource/NativeScript/Bindings.h | 427 +- 6 files changed, 7616 insertions(+), 4014 deletions(-) diff --git a/README.md b/README.md index 72e395c..5280b7a 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,6 @@ Note that the code generator does not support (yet): * `Array` methods (e.g. `IndexOf`) * `string` methods (e.g. `Substring`) * Default parameters -* Overriding events * Deriving from classes without a default constructor * `decimal` * C# pointers diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index aad32f6..b6fd6c0 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -379,14 +379,14 @@ delegate void InitDelegate( IntPtr systemCollectionsGenericIComparerSystemStringConstructor, IntPtr releaseSystemStringComparer, IntPtr systemStringComparerConstructor, - IntPtr releaseSystemEventArgs, - IntPtr systemEventArgsConstructor, IntPtr releaseSystemCollectionsICollection, IntPtr systemCollectionsICollectionConstructor, IntPtr releaseSystemCollectionsIList, IntPtr systemCollectionsIListConstructor, IntPtr releaseSystemCollectionsQueue, IntPtr systemCollectionsQueueConstructor, + IntPtr releaseSystemComponentModelDesignIComponentChangeService, + IntPtr systemComponentModelDesignIComponentChangeServiceConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -476,7 +476,27 @@ delegate void InitDelegate( IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke + 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 /*END INIT PARAMS*/); public delegate void SetCsharpExceptionDelegate(int handle); @@ -497,9 +517,6 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc public delegate int SystemStringComparerGetHashCodeDelegate(int thisHandle, int param0); public static SystemStringComparerGetHashCodeDelegate SystemStringComparerGetHashCode; - public delegate int SystemEventArgsToStringDelegate(int thisHandle); - public static SystemEventArgsToStringDelegate SystemEventArgsToString; - public delegate void SystemCollectionsICollectionCopyToDelegate(int thisHandle, int param0, int param1); public static SystemCollectionsICollectionCopyToDelegate SystemCollectionsICollectionCopyTo; @@ -566,6 +583,54 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc 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; + public delegate void MyGameMonoBehavioursTestScriptAwakeDelegate(int thisHandle); public static MyGameMonoBehavioursTestScriptAwakeDelegate MyGameMonoBehavioursTestScriptAwake; @@ -602,6 +667,18 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc public delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvokeDelegate(int thisHandle, UnityEngine.SceneManagement.Scene 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 SetCsharpExceptionSystemNullReferenceExceptionDelegate(int param0); public static SetCsharpExceptionSystemNullReferenceExceptionDelegate SetCsharpExceptionSystemNullReferenceException; /*END MONOBEHAVIOUR DELEGATES*/ @@ -808,14 +885,14 @@ static extern void Init( IntPtr systemCollectionsGenericIComparerSystemStringConstructor, IntPtr releaseSystemStringComparer, IntPtr systemStringComparerConstructor, - IntPtr releaseSystemEventArgs, - IntPtr systemEventArgsConstructor, IntPtr releaseSystemCollectionsICollection, IntPtr systemCollectionsICollectionConstructor, IntPtr releaseSystemCollectionsIList, IntPtr systemCollectionsIListConstructor, IntPtr releaseSystemCollectionsQueue, IntPtr systemCollectionsQueueConstructor, + IntPtr releaseSystemComponentModelDesignIComponentChangeService, + IntPtr systemComponentModelDesignIComponentChangeServiceConstructor, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -905,7 +982,27 @@ static extern void Init( IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd, IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove, - IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke + 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 /*END INIT PARAMS*/); [DllImport(PluginName)] @@ -927,9 +1024,6 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc [DllImport(Constants.PluginName)] public static extern void SystemStringComparerGetHashCode(int thisHandle, int param0); - [DllImport(Constants.PluginName)] - public static extern void SystemEventArgsToString(int thisHandle); - [DllImport(Constants.PluginName)] public static extern void SystemCollectionsICollectionCopyTo(int thisHandle, int param0, int param1); @@ -996,6 +1090,54 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc [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 MyGameMonoBehavioursTestScriptAwake(int thisHandle); @@ -1032,6 +1174,18 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc [DllImport(Constants.PluginName)] public static extern void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int thisHandle, UnityEngine.SceneManagement.Scene param0, int param1); + [DllImport(Constants.PluginName)] + public static extern void SystemComponentModelDesignComponentEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemComponentModelDesignComponentChangingEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + + [DllImport(Constants.PluginName)] + public static extern void SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke(int thisHandle, int param0, int param1); + [DllImport(Constants.PluginName)] public static extern void SetCsharpExceptionSystemNullReferenceException(int thisHandle, int param0); /*END MONOBEHAVIOUR IMPORTS*/ @@ -1148,14 +1302,14 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc delegate void ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(int handle); delegate void SystemStringComparerConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemStringComparerDelegate(int handle); - delegate void SystemEventArgsConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemEventArgsDelegate(int handle); delegate void SystemCollectionsICollectionConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsICollectionDelegate(int handle); delegate void SystemCollectionsIListConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsIListDelegate(int handle); delegate void SystemCollectionsQueueConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsQueueDelegate(int handle); + delegate void SystemComponentModelDesignIComponentChangeServiceConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate(int handle); delegate int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1246,6 +1400,26 @@ IntPtr unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSc 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*/ public static Exception UnhandledCppException; @@ -1285,7 +1459,6 @@ public static void Open( SystemStringComparerCompare = GetDelegate(libraryHandle, "SystemStringComparerCompare"); SystemStringComparerEquals = GetDelegate(libraryHandle, "SystemStringComparerEquals"); SystemStringComparerGetHashCode = GetDelegate(libraryHandle, "SystemStringComparerGetHashCode"); - SystemEventArgsToString = GetDelegate(libraryHandle, "SystemEventArgsToString"); SystemCollectionsICollectionCopyTo = GetDelegate(libraryHandle, "SystemCollectionsICollectionCopyTo"); SystemCollectionsICollectionGetEnumerator = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetEnumerator"); SystemCollectionsICollectionGetCount = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetCount"); @@ -1308,6 +1481,22 @@ public static void Open( SystemCollectionsIListGetIsSynchronized = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsSynchronized"); SystemCollectionsIListGetSyncRoot = GetDelegate(libraryHandle, "SystemCollectionsIListGetSyncRoot"); 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"); MyGameMonoBehavioursTestScriptAwake = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptAwake"); MyGameMonoBehavioursTestScriptOnAnimatorIK = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnAnimatorIK"); MyGameMonoBehavioursTestScriptOnCollisionEnter = GetDelegate(libraryHandle, "MyGameMonoBehavioursTestScriptOnCollisionEnter"); @@ -1320,6 +1509,10 @@ public static void Open( 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"); SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); /*END MONOBEHAVIOUR GETDELEGATE CALLS*/ @@ -1438,14 +1631,14 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemStringConstructorDelegate(SystemCollectionsGenericIComparerSystemStringConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemStringComparerDelegate(ReleaseSystemStringComparer)), Marshal.GetFunctionPointerForDelegate(new SystemStringComparerConstructorDelegate(SystemStringComparerConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemEventArgsDelegate(ReleaseSystemEventArgs)), - Marshal.GetFunctionPointerForDelegate(new SystemEventArgsConstructorDelegate(SystemEventArgsConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsICollectionDelegate(ReleaseSystemCollectionsICollection)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsICollectionConstructorDelegate(SystemCollectionsICollectionConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsIListDelegate(ReleaseSystemCollectionsIList)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIListConstructorDelegate(SystemCollectionsIListConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsQueueDelegate(ReleaseSystemCollectionsQueue)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsQueueConstructorDelegate(SystemCollectionsQueueConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate(ReleaseSystemComponentModelDesignIComponentChangeService)), + Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignIComponentChangeServiceConstructorDelegate(SystemComponentModelDesignIComponentChangeServiceConstructor)), Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -1535,7 +1728,27 @@ public static void Open( 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 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)) /*END INIT CALL*/ ); if (UnhandledCppException != null) @@ -1717,34 +1930,6 @@ public override int GetHashCode(string obj) } - class SystemEventArgs : System.EventArgs - { - public int CppHandle; - - public SystemEventArgs(int cppHandle) - { - CppHandle = cppHandle; - } - - public override string ToString() - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemEventArgsToString(thisHandle); - 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 SystemCollectionsICollection : System.Collections.ICollection { public int CppHandle; @@ -2175,23 +2360,25 @@ public override int Count } - class SystemAction + class SystemComponentModelDesignIComponentChangeService : System.ComponentModel.Design.IComponentChangeService { public int CppHandle; - public System.Action Delegate; - public SystemAction(int cppHandle) + public SystemComponentModelDesignIComponentChangeService(int cppHandle) { CppHandle = cppHandle; - Delegate = NativeInvoke; } - public void NativeInvoke() + public void OnComponentChanged(object component, System.ComponentModel.MemberDescriptor member, object oldValue, object newValue) { if (CppHandle != 0) { int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionNativeInvoke(thisHandle); + 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; @@ -2201,25 +2388,14 @@ public void NativeInvoke() } } - } - - class SystemActionSystemSingle - { - public int CppHandle; - public System.Action Delegate; - - public SystemActionSystemSingle(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke(float obj) + public void OnComponentChanging(object component, System.ComponentModel.MemberDescriptor member) { if (CppHandle != 0) { int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionSystemSingleNativeInvoke(thisHandle, obj); + 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; @@ -2229,142 +2405,584 @@ public void NativeInvoke(float obj) } } - } - - 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) + public event System.ComponentModel.Design.ComponentEventHandler ComponentAdded { - if (CppHandle != 0) + add { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemActionSystemSingle_SystemSingleNativeInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) + if (CppHandle != 0) { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; + 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; + } } } - } - - } - - 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) + remove { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) + if (CppHandle != 0) { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; + 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; + } } - 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) + public event System.ComponentModel.Design.ComponentEventHandler ComponentAdding { - if (CppHandle != 0) + add { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(thisHandle, arg1, arg2); - if (NativeScript.Bindings.UnhandledCppException != null) + if (CppHandle != 0) { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; + 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; + } } - 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) + remove { - int thisHandle = CppHandle; - int argsHandle = NativeScript.Bindings.ObjectStore.GetHandle(args); - NativeScript.Bindings.SystemAppDomainInitializerNativeInvoke(thisHandle, argsHandle); - if (NativeScript.Bindings.UnhandledCppException != null) + if (CppHandle != 0) { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; + 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; + } } } } - } - - class UnityEngineEventsUnityAction - { - public int CppHandle; - public UnityEngine.Events.UnityAction Delegate; - - public UnityEngineEventsUnityAction(int cppHandle) - { - CppHandle = cppHandle; - Delegate = NativeInvoke; - } - - public void NativeInvoke() + public event System.ComponentModel.Design.ComponentChangedEventHandler ComponentChanged { - if (CppHandle != 0) + add { - int thisHandle = CppHandle; - NativeScript.Bindings.UnityEngineEventsUnityActionNativeInvoke(thisHandle); + 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 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; + NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(thisHandle, arg0, 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; @@ -2373,46 +2991,286 @@ public void NativeInvoke() } } } - + + } + /*END BASE TYPES*/ + + /*BEGIN FUNCTIONS*/ + [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(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(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); + } } - class UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate))] + static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(int thisHandle) { - public int CppHandle; - public UnityEngine.Events.UnityAction Delegate; - - public UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int cppHandle) + try { - CppHandle = cppHandle; - Delegate = NativeInvoke; + var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.AddComponent(); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } - - public void NativeInvoke(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) + catch (System.NullReferenceException ex) { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(thisHandle, arg0, arg1); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw 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); } - } - /*END BASE TYPES*/ - /*BEGIN FUNCTIONS*/ - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] - static int SystemDiagnosticsStopwatchConstructor() + [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegate))] + static int UnityEngineComponentPropertyGetTransform(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); - return returnValue; + var thiz = (UnityEngine.Component)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.transform; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -2428,36 +3286,36 @@ static int SystemDiagnosticsStopwatchConstructor() } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] - static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] + static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.ElapsedMilliseconds; + 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(long); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] - static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegate))] + static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEngine.Vector3 value) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Start(); + var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.position = value; } catch (System.NullReferenceException ex) { @@ -2471,57 +3329,219 @@ static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodResetDelegate))] - static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] + static void UnityEngineDebugMethodLogSystemObject(int messageHandle) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Reset(); + 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(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)); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + } + + [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)); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + } + + [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(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(UnityEngineObjectPropertyGetNameDelegate))] - static int UnityEngineObjectPropertyGetName(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineVector3PropertyGetMagnitudeDelegate))] + static float UnityEngineVector3PropertyGetMagnitude(ref UnityEngine.Vector3 thiz) { try { - var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.name; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = thiz.magnitude; + 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(UnityEngineObjectPropertySetNameDelegate))] - static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate))] + static void UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(ref UnityEngine.Vector3 thiz, float newX, float newY, float newZ) { try { - var thiz = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.name = value; + thiz.Set(newX, newY, newZ); } catch (System.NullReferenceException ex) { @@ -2535,59 +3555,56 @@ static void UnityEngineObjectPropertySetName(int thisHandle, int valueHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObjectDelegate))] - static bool UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(int xHandle, int yHandle) + [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] + static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) { try { - var x = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(xHandle); - var y = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(yHandle); - var returnValue = x == y; + var returnValue = a + b; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(UnityEngineObjectMethodop_ImplicitUnityEngineObjectDelegate))] - static bool UnityEngineObjectMethodop_ImplicitUnityEngineObject(int existsHandle) + [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate))] + static UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(ref UnityEngine.Vector3 a) { try { - var exists = (UnityEngine.Object)NativeScript.Bindings.ObjectStore.Get(existsHandle); - var returnValue = exists; + var returnValue = -a; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorDelegate))] - static int UnityEngineGameObjectConstructor() + [MonoPInvokeCallback(typeof(BoxVector3Delegate))] + static int BoxVector3(ref UnityEngine.Vector3 val) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject()); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -2604,83 +3621,77 @@ static int UnityEngineGameObjectConstructor() } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorSystemStringDelegate))] - static int UnityEngineGameObjectConstructorSystemString(int nameHandle) + [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] + static UnityEngine.Vector3 UnboxVector3(int valHandle) { try { - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject(name)); + 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(int); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectPropertyGetTransformDelegate))] - static int UnityEngineGameObjectPropertyGetTransform(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.transform; - 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(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate))] - static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(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(UnityEngineComponentPropertyGetTransformDelegate))] - static int UnityEngineComponentPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] + static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) { try { - var thiz = (UnityEngine.Component)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -2696,36 +3707,38 @@ static int UnityEngineComponentPropertyGetTransform(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] - static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxMatrix4x4Delegate))] + static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) { try { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.position; + 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.Vector3); + return default(UnityEngine.Matrix4x4); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(UnityEngine.Matrix4x4); } } - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegate))] - static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEngine.Vector3 value) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineRaycastHitDelegate))] + static void ReleaseUnityEngineRaycastHit(int handle) { try { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.position = value; + if (handle != 0) + { + NativeScript.Bindings.StructStore.Remove(handle); + } } catch (System.NullReferenceException ex) { @@ -2739,156 +3752,173 @@ static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEng } } - [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] - static void UnityEngineDebugMethodLogSystemObject(int messageHandle) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetPointDelegate))] + static UnityEngine.Vector3 UnityEngineRaycastHitPropertyGetPoint(int thisHandle) { try { - var message = NativeScript.Bindings.ObjectStore.Get(messageHandle); - UnityEngine.Debug.Log(message); + 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(UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate))] - static bool UnityEngineAssertionsAssertFieldGetRaiseExceptions() + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertySetPointDelegate))] + static void UnityEngineRaycastHitPropertySetPoint(int thisHandle, ref UnityEngine.Vector3 value) { try { - var returnValue = UnityEngine.Assertions.Assert.raiseExceptions; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetTransformDelegate))] + static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) { try { - UnityEngine.Assertions.Assert.raiseExceptions = value; + 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(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(int expectedHandle, int actualHandle) + [MonoPInvokeCallback(typeof(BoxRaycastHitDelegate))] + static int BoxRaycastHit(int valHandle) { try { - var expected = (string)NativeScript.Bindings.ObjectStore.Get(expectedHandle); - var actual = (string)NativeScript.Bindings.ObjectStore.Get(actualHandle); - UnityEngine.Assertions.Assert.AreEqual(expected, actual); + 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(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(int expectedHandle, int actualHandle) + [MonoPInvokeCallback(typeof(UnboxRaycastHitDelegate))] + static int UnboxRaycastHit(int valHandle) { 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 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(UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate))] - static void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(ref int bufferLength, ref int numBuffers) + [MonoPInvokeCallback(typeof(BoxQueryTriggerInteractionDelegate))] + static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) { try { - UnityEngine.AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); + 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(UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByteDelegate))] - static void UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte(int hostId, ref int addressHandle, ref int port, ref byte error) + [MonoPInvokeCallback(typeof(UnboxQueryTriggerInteractionDelegate))] + static UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteraction(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 = 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(UnityEngineNetworkingNetworkTransportMethodInitDelegate))] - static void UnityEngineNetworkingNetworkTransportMethodInit() + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate))] + static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int handle) { try { - UnityEngine.Networking.NetworkTransport.Init(); + if (handle != 0) + { + NativeScript.Bindings.StructStore>.Remove(handle); + } } catch (System.NullReferenceException ex) { @@ -2902,119 +3932,127 @@ static void UnityEngineNetworkingNetworkTransportMethodInit() } } - [MonoPInvokeCallback(typeof(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate))] - static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(float x, float y, float z) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] + static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) { try { - var returnValue = new UnityEngine.Vector3(x, y, z); + 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(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineVector3PropertyGetMagnitudeDelegate))] - static float UnityEngineVector3PropertyGetMagnitude(ref UnityEngine.Vector3 thiz) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] + static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) { try { - var returnValue = thiz.magnitude; - return returnValue; + 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(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(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate))] - static void UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(ref UnityEngine.Vector3 thiz, float newX, float newY, float newZ) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] + static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) { try { - thiz.Set(newX, newY, newZ); + 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(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] - static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) + [MonoPInvokeCallback(typeof(BoxKeyValuePairSystemString_SystemDoubleDelegate))] + static int BoxKeyValuePairSystemString_SystemDouble(int valHandle) { try { - var returnValue = a + b; + 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(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate))] - static UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(ref UnityEngine.Vector3 a) + [MonoPInvokeCallback(typeof(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] + static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) { try { - var returnValue = -a; + 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(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxVector3Delegate))] - static int BoxVector3(ref UnityEngine.Vector3 val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] + static int SystemCollectionsGenericListSystemStringConstructor() { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); return returnValue; } catch (System.NullReferenceException ex) @@ -3031,57 +4069,58 @@ static int BoxVector3(ref UnityEngine.Vector3 val) } } - [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] - static UnityEngine.Vector3 UnboxVector3(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Vector3)val; - return returnValue; + 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(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertyGetItemDelegate))] - static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) { try { - var returnValue = thiz[row, row]; - 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(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(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] + static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) { try { - thiz[row, column] = column; + 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) { @@ -3095,104 +4134,99 @@ static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, } } - [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] - static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 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(UnboxMatrix4x4Delegate))] - static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] + static int SystemCollectionsGenericListSystemInt32Constructor() { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Matrix4x4)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.Matrix4x4); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Matrix4x4); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineRaycastHitDelegate))] - static void ReleaseUnityEngineRaycastHit(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(UnityEngineRaycastHitPropertyGetPointDelegate))] - static UnityEngine.Vector3 UnityEngineRaycastHitPropertyGetPoint(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) { try { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.point; - 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)); - 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) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] + static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) { try { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.point = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.Add(item); } catch (System.NullReferenceException ex) { @@ -3206,36 +4240,34 @@ static void UnityEngineRaycastHitPropertySetPoint(int thisHandle, ref UnityEngin } } - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetTransformDelegate))] - static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] + static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) { try { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(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(BoxRaycastHitDelegate))] - static int BoxRaycastHit(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] + static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) { try { - var val = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(valHandle); - 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) @@ -3252,14 +4284,14 @@ static int BoxRaycastHit(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxRaycastHitDelegate))] - static int UnboxRaycastHit(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] + static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.RaycastHit)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) { @@ -3275,104 +4307,102 @@ static int UnboxRaycastHit(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxQueryTriggerInteractionDelegate))] - static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] + static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - 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(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) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] + static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.QueryTriggerInteraction)val; + 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(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(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] + static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore>.Remove(handle); - } + 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(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] + static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) { try { - var key = (string)NativeScript.Bindings.ObjectStore.Get(keyHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store(new System.Collections.Generic.KeyValuePair(key, value)); - 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(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) + [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] + static int SystemExceptionConstructorSystemString(int messageHandle) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Key; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3388,59 +4418,53 @@ static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleProperty } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] - static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetWidthDelegate))] + static int UnityEngineResolutionPropertyGetWidth(ref UnityEngine.Resolution thiz) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Value; + var returnValue = thiz.width; 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(UnityEngineResolutionPropertySetWidthDelegate))] + static void UnityEngineResolutionPropertySetWidth(ref UnityEngine.Resolution thiz, int value) { try { - var val = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + thiz.width = 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(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] - static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetHeightDelegate))] + static int UnityEngineResolutionPropertyGetHeight(ref UnityEngine.Resolution thiz) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store((System.Collections.Generic.KeyValuePair)val); + var returnValue = thiz.height; return returnValue; } catch (System.NullReferenceException ex) @@ -3457,36 +4481,32 @@ static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] - static int SystemCollectionsGenericListSystemStringConstructor() + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetHeightDelegate))] + static void UnityEngineResolutionPropertySetHeight(ref UnityEngine.Resolution thiz, int value) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); - return returnValue; + thiz.height = 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(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetRefreshRateDelegate))] + static int UnityEngineResolutionPropertyGetRefreshRate(ref UnityEngine.Resolution thiz) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = thiz.refreshRate; + return returnValue; } catch (System.NullReferenceException ex) { @@ -3502,14 +4522,12 @@ static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandl } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetRefreshRateDelegate))] + static void UnityEngineResolutionPropertySetRefreshRate(ref UnityEngine.Resolution thiz, int value) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz[index] = value; + thiz.refreshRate = value; } catch (System.NullReferenceException ex) { @@ -3523,55 +4541,58 @@ static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHand } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] - static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) + [MonoPInvokeCallback(typeof(BoxResolutionDelegate))] + static int BoxResolution(ref UnityEngine.Resolution val) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); - thiz.Add(item); + 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(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) + + [MonoPInvokeCallback(typeof(UnboxResolutionDelegate))] + static UnityEngine.Resolution UnboxResolution(int valHandle) { 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 val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Resolution)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Resolution); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Resolution); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] - static int SystemCollectionsGenericListSystemInt32Constructor() + [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] + static int UnityEngineScreenPropertyGetResolutions() { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); - return returnValue; + var returnValue = UnityEngine.Screen.resolutions; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -3587,98 +4608,103 @@ static int SystemCollectionsGenericListSystemInt32Constructor() } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] + static UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; + var returnValue = 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); + return default(UnityEngine.Ray); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Ray); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) + [MonoPInvokeCallback(typeof(BoxRayDelegate))] + static int BoxRay(ref UnityEngine.Ray val) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index] = 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(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] - static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) + [MonoPInvokeCallback(typeof(UnboxRayDelegate))] + static UnityEngine.Ray UnboxRay(int valHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Add(item); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.Ray)val; + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Ray); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(UnityEngine.Ray); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate))] + static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ref UnityEngine.Ray ray, int resultsHandle) { 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 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(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] + static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ref UnityEngine.Ray ray) { try { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.LinkedListNode(value)); - return returnValue; + var returnValue = UnityEngine.Physics.RaycastAll(ray); + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -3694,14 +4720,13 @@ static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemSt } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(BoxColorDelegate))] + static int BoxColor(ref UnityEngine.Color val) { try { - var thiz = (System.Collections.Generic.LinkedListNode)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) { @@ -3717,34 +4742,35 @@ static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(in } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] - static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnboxColorDelegate))] + static UnityEngine.Color UnboxColor(int valHandle) { try { - var thiz = (System.Collections.Generic.LinkedListNode)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.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(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) + [MonoPInvokeCallback(typeof(BoxGradientColorKeyDelegate))] + static int BoxGradientColorKey(ref UnityEngine.GradientColorKey val) { try { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Runtime.CompilerServices.StrongBox(value)); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -3761,58 +4787,59 @@ static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemSt } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxGradientColorKeyDelegate))] + static UnityEngine.GradientColorKey UnboxGradientColorKey(int valHandle) { try { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Value; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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(int); + return default(UnityEngine.GradientColorKey); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.GradientColorKey); } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] - static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnityEngineGradientConstructorDelegate))] + static int UnityEngineGradientConstructor() { try { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.Value = value; + 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(SystemExceptionConstructorSystemStringDelegate))] - static int SystemExceptionConstructorSystemString(int messageHandle) + [MonoPInvokeCallback(typeof(UnityEngineGradientPropertyGetColorKeysDelegate))] + static int UnityEngineGradientPropertyGetColorKeys(int thisHandle) { try { - var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); - 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) { @@ -3828,54 +4855,57 @@ static int SystemExceptionConstructorSystemString(int messageHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetWidthDelegate))] - static int UnityEngineResolutionPropertyGetWidth(ref UnityEngine.Resolution thiz) + [MonoPInvokeCallback(typeof(UnityEngineGradientPropertySetColorKeysDelegate))] + static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHandle) { try { - var returnValue = thiz.width; - return 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(UnityEngineResolutionPropertySetWidthDelegate))] - static void UnityEngineResolutionPropertySetWidth(ref UnityEngine.Resolution thiz, int value) + [MonoPInvokeCallback(typeof(SystemAppDomainSetupConstructorDelegate))] + static int SystemAppDomainSetupConstructor() { try { - thiz.width = 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(UnityEngineResolutionPropertyGetHeightDelegate))] - static int UnityEngineResolutionPropertyGetHeight(ref UnityEngine.Resolution thiz) + [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertyGetAppDomainInitializerDelegate))] + static int SystemAppDomainSetupPropertyGetAppDomainInitializer(int thisHandle) { try { - var returnValue = thiz.height; - return returnValue; + var thiz = (System.AppDomainSetup)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.AppDomainInitializer; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -3891,12 +4921,14 @@ static int UnityEngineResolutionPropertyGetHeight(ref UnityEngine.Resolution thi } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetHeightDelegate))] - static void UnityEngineResolutionPropertySetHeight(ref UnityEngine.Resolution thiz, int value) + [MonoPInvokeCallback(typeof(SystemAppDomainSetupPropertySetAppDomainInitializerDelegate))] + static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, int valueHandle) { try { - thiz.height = value; + 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) { @@ -3910,34 +4942,33 @@ static void UnityEngineResolutionPropertySetHeight(ref UnityEngine.Resolution th } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetRefreshRateDelegate))] - static int UnityEngineResolutionPropertyGetRefreshRate(ref UnityEngine.Resolution thiz) + [MonoPInvokeCallback(typeof(UnityEngineApplicationAddEventOnBeforeRenderDelegate))] + static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) { try { - var returnValue = thiz.refreshRate; - 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(UnityEngineResolutionPropertySetRefreshRateDelegate))] - static void UnityEngineResolutionPropertySetRefreshRate(ref UnityEngine.Resolution thiz, int value) + [MonoPInvokeCallback(typeof(UnityEngineApplicationRemoveEventOnBeforeRenderDelegate))] + static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) { try { - thiz.refreshRate = value; + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + UnityEngine.Application.onBeforeRender += del; } catch (System.NullReferenceException ex) { @@ -3951,58 +4982,53 @@ static void UnityEngineResolutionPropertySetRefreshRate(ref UnityEngine.Resoluti } } - [MonoPInvokeCallback(typeof(BoxResolutionDelegate))] - static int BoxResolution(ref UnityEngine.Resolution val) + [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] + static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + 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)); - 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 UnityEngine.Resolution UnboxResolution(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] + static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Resolution)val; - return returnValue; + 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)); - return default(UnityEngine.Resolution); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Resolution); } } - [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] - static int UnityEngineScreenPropertyGetResolutions() + [MonoPInvokeCallback(typeof(BoxSceneDelegate))] + static int BoxScene(ref UnityEngine.SceneManagement.Scene 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) { @@ -4018,30 +5044,31 @@ static int UnityEngineScreenPropertyGetResolutions() } } - [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] - static UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) + [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] + static UnityEngine.SceneManagement.Scene UnboxScene(int valHandle) { try { - var returnValue = new UnityEngine.Ray(origin, direction); + var val = NativeScript.Bindings.ObjectStore.Get(valHandle); + var returnValue = (UnityEngine.SceneManagement.Scene)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(UnityEngine.SceneManagement.Scene); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(UnityEngine.SceneManagement.Scene); } } - [MonoPInvokeCallback(typeof(BoxRayDelegate))] - static int BoxRay(ref UnityEngine.Ray val) + [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] + static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) { try { @@ -4062,37 +5089,37 @@ static int BoxRay(ref UnityEngine.Ray val) } } - [MonoPInvokeCallback(typeof(UnboxRayDelegate))] - static UnityEngine.Ray UnboxRay(int valHandle) + [MonoPInvokeCallback(typeof(UnboxLoadSceneModeDelegate))] + static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Ray)val; + 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.Ray); + return default(UnityEngine.SceneManagement.LoadSceneMode); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(UnityEngine.SceneManagement.LoadSceneMode); } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate))] - static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ref UnityEngine.Ray ray, int resultsHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorPropertyGetCurrentDelegate))] + static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) { try { - var results = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(resultsHandle); - var returnValue = UnityEngine.Physics.RaycastNonAlloc(ray, results); - return returnValue; + var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.Current; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -4108,171 +5135,153 @@ static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRayc } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] - static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ref UnityEngine.Ray ray) + [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorMethodMoveNextDelegate))] + static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) { try { - var returnValue = UnityEngine.Physics.RaycastAll(ray); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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(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(BoxColorDelegate))] - static int BoxColor(ref UnityEngine.Color val) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] + static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = new SystemCollectionsGenericIComparerSystemInt32(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); } 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) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate))] + static void ReleaseSystemCollectionsGenericIComparerSystemInt32(int handle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Color)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(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) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemStringConstructorDelegate))] + static void SystemCollectionsGenericIComparerSystemStringConstructor(int cppHandle, ref int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + var thiz = new SystemCollectionsGenericIComparerSystemString(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); } 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) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemStringDelegate))] + static void ReleaseSystemCollectionsGenericIComparerSystemString(int handle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.GradientColorKey)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(UnityEngine.GradientColorKey); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.GradientColorKey); } } - [MonoPInvokeCallback(typeof(UnityEngineGradientConstructorDelegate))] - static int UnityEngineGradientConstructor() + [MonoPInvokeCallback(typeof(SystemStringComparerConstructorDelegate))] + static void SystemStringComparerConstructor(int cppHandle, ref int handle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Gradient()); - return returnValue; + var thiz = new SystemStringComparer(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); } 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(ReleaseSystemStringComparerDelegate))] + static void ReleaseSystemStringComparer(int handle) { try { - var thiz = (UnityEngine.Gradient)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.colorKeys; - return NativeScript.Bindings.ObjectStore.GetHandle(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(UnityEngineGradientPropertySetColorKeysDelegate))] - static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsICollectionConstructorDelegate))] + static void SystemCollectionsICollectionConstructor(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 SystemCollectionsICollection(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4286,59 +5295,51 @@ static void UnityEngineGradientPropertySetColorKeys(int thisHandle, int valueHan } } - [MonoPInvokeCallback(typeof(SystemAppDomainSetupConstructorDelegate))] - static int SystemAppDomainSetupConstructor() + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsICollectionDelegate))] + static void ReleaseSystemCollectionsICollection(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(SystemCollectionsIListConstructorDelegate))] + static void SystemCollectionsIListConstructor(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 SystemCollectionsIList(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); } 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) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsIListDelegate))] + static void ReleaseSystemCollectionsIList(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) { @@ -4352,13 +5353,13 @@ static void SystemAppDomainSetupPropertySetAppDomainInitializer(int thisHandle, } } - [MonoPInvokeCallback(typeof(UnityEngineApplicationAddEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsQueueConstructorDelegate))] + static void SystemCollectionsQueueConstructor(int cppHandle, ref int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; + var thiz = new SystemCollectionsQueue(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4372,13 +5373,12 @@ static void UnityEngineApplicationAddEventOnBeforeRender(int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineApplicationRemoveEventOnBeforeRenderDelegate))] - static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsQueueDelegate))] + static void ReleaseSystemCollectionsQueue(int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.Application.onBeforeRender += del; + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -4392,13 +5392,13 @@ static void UnityEngineApplicationRemoveEventOnBeforeRender(int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignIComponentChangeServiceConstructorDelegate))] + static void SystemComponentModelDesignIComponentChangeServiceConstructor(int cppHandle, ref int handle) { try { - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); - UnityEngine.SceneManagement.SceneManager.sceneLoaded += del; + var thiz = new SystemComponentModelDesignIComponentChangeService(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -4412,13 +5412,12 @@ static void UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(int delHan } } - [MonoPInvokeCallback(typeof(UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate))] - static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int delHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate))] + static void ReleaseSystemComponentModelDesignIComponentChangeService(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) { @@ -4432,8 +5431,8 @@ static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int del } } - [MonoPInvokeCallback(typeof(BoxSceneDelegate))] - static int BoxScene(ref UnityEngine.SceneManagement.Scene val) + [MonoPInvokeCallback(typeof(BoxBooleanDelegate))] + static int BoxBoolean(bool val) { try { @@ -4454,31 +5453,31 @@ static int BoxScene(ref UnityEngine.SceneManagement.Scene val) } } - [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] - static UnityEngine.SceneManagement.Scene UnboxScene(int valHandle) + [MonoPInvokeCallback(typeof(UnboxBooleanDelegate))] + static bool UnboxBoolean(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.Scene)val; + var returnValue = (bool)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.Scene); + return default(bool); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.Scene); + return default(bool); } } - [MonoPInvokeCallback(typeof(BoxLoadSceneModeDelegate))] - static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) + [MonoPInvokeCallback(typeof(BoxSByteDelegate))] + static int BoxSByte(sbyte val) { try { @@ -4499,37 +5498,36 @@ static int BoxLoadSceneMode(UnityEngine.SceneManagement.LoadSceneMode val) } } - [MonoPInvokeCallback(typeof(UnboxLoadSceneModeDelegate))] - static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandle) + [MonoPInvokeCallback(typeof(UnboxSByteDelegate))] + static sbyte UnboxSByte(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.LoadSceneMode)val; + var returnValue = (sbyte)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); + return default(sbyte); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.LoadSceneMode); + return default(sbyte); } } - [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorPropertyGetCurrentDelegate))] - static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) + [MonoPInvokeCallback(typeof(BoxByteDelegate))] + static int BoxByte(byte val) { try { - var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Current; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -4545,304 +5543,346 @@ static int SystemCollectionsIEnumeratorPropertyGetCurrent(int thisHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsIEnumeratorMethodMoveNextDelegate))] - static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxByteDelegate))] + static byte UnboxByte(int valHandle) { try { - var thiz = (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.MoveNext(); + 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(bool); + return default(byte); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(byte); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] - static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxInt16Delegate))] + static int BoxInt16(short val) { try { - var thiz = new SystemCollectionsGenericIComparerSystemInt32(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate))] - static void ReleaseSystemCollectionsGenericIComparerSystemInt32(int handle) + [MonoPInvokeCallback(typeof(UnboxInt16Delegate))] + static short UnboxInt16(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + 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(SystemCollectionsGenericIComparerSystemStringConstructorDelegate))] - static void SystemCollectionsGenericIComparerSystemStringConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxUInt16Delegate))] + static int BoxUInt16(ushort val) { try { - var thiz = new SystemCollectionsGenericIComparerSystemString(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemStringDelegate))] - static void ReleaseSystemCollectionsGenericIComparerSystemString(int handle) + [MonoPInvokeCallback(typeof(UnboxUInt16Delegate))] + static ushort UnboxUInt16(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + 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(SystemStringComparerConstructorDelegate))] - static void SystemStringComparerConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxInt32Delegate))] + static int BoxInt32(int val) { try { - var thiz = new SystemStringComparer(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemStringComparerDelegate))] - static void ReleaseSystemStringComparer(int handle) + [MonoPInvokeCallback(typeof(UnboxInt32Delegate))] + static int UnboxInt32(int valHandle) { try { - 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(SystemEventArgsConstructorDelegate))] - static void SystemEventArgsConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxUInt32Delegate))] + static int BoxUInt32(uint val) { try { - var thiz = new SystemEventArgs(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemEventArgsDelegate))] - static void ReleaseSystemEventArgs(int handle) + [MonoPInvokeCallback(typeof(UnboxUInt32Delegate))] + static uint UnboxUInt32(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + 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(SystemCollectionsICollectionConstructorDelegate))] - static void SystemCollectionsICollectionConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxInt64Delegate))] + static int BoxInt64(long val) { try { - var thiz = new SystemCollectionsICollection(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsICollectionDelegate))] - static void ReleaseSystemCollectionsICollection(int handle) + [MonoPInvokeCallback(typeof(UnboxInt64Delegate))] + static long UnboxInt64(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + 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(SystemCollectionsIListConstructorDelegate))] - static void SystemCollectionsIListConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxUInt64Delegate))] + static int BoxUInt64(ulong val) { try { - var thiz = new SystemCollectionsIList(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsIListDelegate))] - static void ReleaseSystemCollectionsIList(int handle) + [MonoPInvokeCallback(typeof(UnboxUInt64Delegate))] + static ulong UnboxUInt64(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + 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(SystemCollectionsQueueConstructorDelegate))] - static void SystemCollectionsQueueConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(BoxCharDelegate))] + static int BoxChar(char val) { try { - var thiz = new SystemCollectionsQueue(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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsQueueDelegate))] - static void ReleaseSystemCollectionsQueue(int handle) + [MonoPInvokeCallback(typeof(UnboxCharDelegate))] + static char UnboxChar(int valHandle) { try { - NativeScript.Bindings.ObjectStore.Remove(handle); + 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(BoxBooleanDelegate))] - static int BoxBoolean(bool val) + [MonoPInvokeCallback(typeof(BoxSingleDelegate))] + static int BoxSingle(float val) { try { @@ -4863,31 +5903,31 @@ static int BoxBoolean(bool val) } } - [MonoPInvokeCallback(typeof(UnboxBooleanDelegate))] - static bool UnboxBoolean(int valHandle) + [MonoPInvokeCallback(typeof(UnboxSingleDelegate))] + static float UnboxSingle(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (bool)val; + var returnValue = (float)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(float); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(bool); + return default(float); } } - [MonoPInvokeCallback(typeof(BoxSByteDelegate))] - static int BoxSByte(sbyte val) + [MonoPInvokeCallback(typeof(BoxDoubleDelegate))] + static int BoxDouble(double val) { try { @@ -4908,35 +5948,35 @@ static int BoxSByte(sbyte val) } } - [MonoPInvokeCallback(typeof(UnboxSByteDelegate))] - static sbyte UnboxSByte(int valHandle) + [MonoPInvokeCallback(typeof(UnboxDoubleDelegate))] + static double UnboxDouble(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (sbyte)val; + var returnValue = (double)val; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(sbyte); + return default(double); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(sbyte); + return default(double); } } - [MonoPInvokeCallback(typeof(BoxByteDelegate))] - static int BoxByte(byte val) + [MonoPInvokeCallback(typeof(SystemSystemInt32Array1Constructor1Delegate))] + static int SystemSystemInt32Array1Constructor1(int length0) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new int[length0]); return returnValue; } catch (System.NullReferenceException ex) @@ -4953,125 +5993,120 @@ static int BoxByte(byte val) } } - [MonoPInvokeCallback(typeof(UnboxByteDelegate))] - static byte UnboxByte(int valHandle) + [MonoPInvokeCallback(typeof(SystemInt32Array1GetItem1Delegate))] + static int SystemInt32Array1GetItem1(int thisHandle, int index0) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (byte)val; + 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(byte); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(byte); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxInt16Delegate))] - static int BoxInt16(short val) + [MonoPInvokeCallback(typeof(SystemInt32Array1SetItem1Delegate))] + static void SystemInt32Array1SetItem1(int thisHandle, int index0, int item) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray1Constructor1Delegate))] + static int SystemSystemSingleArray1Constructor1(int length0) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (short)val; + 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(short); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(short); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxUInt16Delegate))] - static int BoxUInt16(ushort val) + [MonoPInvokeCallback(typeof(SystemSingleArray1GetItem1Delegate))] + static float SystemSingleArray1GetItem1(int thisHandle, int index0) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + 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(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(UnboxUInt16Delegate))] - static ushort UnboxUInt16(int valHandle) + [MonoPInvokeCallback(typeof(SystemSingleArray1SetItem1Delegate))] + static void SystemSingleArray1SetItem1(int thisHandle, int index0, float item) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (ushort)val; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray2Constructor2Delegate))] + static int SystemSystemSingleArray2Constructor2(int length0, int length1) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0, length1]); return returnValue; } catch (System.NullReferenceException ex) @@ -5088,13 +6123,13 @@ static int BoxInt32(int val) } } - [MonoPInvokeCallback(typeof(UnboxInt32Delegate))] - static int UnboxInt32(int valHandle) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray2GetLength2Delegate))] + static int SystemSystemSingleArray2GetLength2(int thisHandle, int dimension) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (int)val; + var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.GetLength(dimension); return returnValue; } catch (System.NullReferenceException ex) @@ -5111,57 +6146,55 @@ static int UnboxInt32(int valHandle) } } - [MonoPInvokeCallback(typeof(BoxUInt32Delegate))] - static int BoxUInt32(uint val) + [MonoPInvokeCallback(typeof(SystemSingleArray2GetItem2Delegate))] + static float SystemSingleArray2GetItem2(int thisHandle, int index0, int index1) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + 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(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(UnboxUInt32Delegate))] - static uint UnboxUInt32(int valHandle) + [MonoPInvokeCallback(typeof(SystemSingleArray2SetItem2Delegate))] + static void SystemSingleArray2SetItem2(int thisHandle, int index0, int index1, float item) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (uint)val; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray3Constructor3Delegate))] + static int SystemSystemSingleArray3Constructor3(int length0, int length1, int length2) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0, length1, length2]); return returnValue; } catch (System.NullReferenceException ex) @@ -5178,80 +6211,78 @@ static int BoxInt64(long val) } } - [MonoPInvokeCallback(typeof(UnboxInt64Delegate))] - static long UnboxInt64(int valHandle) + [MonoPInvokeCallback(typeof(SystemSystemSingleArray3GetLength3Delegate))] + static int SystemSystemSingleArray3GetLength3(int thisHandle, int dimension) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (long)val; + 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(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(BoxUInt64Delegate))] - static int BoxUInt64(ulong val) + [MonoPInvokeCallback(typeof(SystemSingleArray3GetItem3Delegate))] + static float SystemSingleArray3GetItem3(int thisHandle, int index0, int index1, int index2) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + 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(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(UnboxUInt64Delegate))] - static ulong UnboxUInt64(int valHandle) + [MonoPInvokeCallback(typeof(SystemSingleArray3SetItem3Delegate))] + static void SystemSingleArray3SetItem3(int thisHandle, int index0, int index1, int index2, float item) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (ulong)val; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemSystemStringArray1Constructor1Delegate))] + static int SystemSystemStringArray1Constructor1(int length0) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new string[length0]); return returnValue; } catch (System.NullReferenceException ex) @@ -5268,125 +6299,121 @@ static int BoxChar(char val) } } - [MonoPInvokeCallback(typeof(UnboxCharDelegate))] - static char UnboxChar(int valHandle) + [MonoPInvokeCallback(typeof(SystemStringArray1GetItem1Delegate))] + static int SystemStringArray1GetItem1(int thisHandle, int index0) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (char)val; - return returnValue; + 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(char); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(char); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxSingleDelegate))] - static int BoxSingle(float val) + [MonoPInvokeCallback(typeof(SystemStringArray1SetItem1Delegate))] + static void SystemStringArray1SetItem1(int thisHandle, int index0, int itemHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(UnityEngineUnityEngineResolutionArray1Constructor1Delegate))] + static int UnityEngineUnityEngineResolutionArray1Constructor1(int length0) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (float)val; + 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(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(BoxDoubleDelegate))] - static int BoxDouble(double val) + [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1GetItem1Delegate))] + static UnityEngine.Resolution UnityEngineResolutionArray1GetItem1(int thisHandle, int index0) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var thiz = (UnityEngine.Resolution[])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); + return default(UnityEngine.Resolution); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Resolution); } } - [MonoPInvokeCallback(typeof(UnboxDoubleDelegate))] - static double UnboxDouble(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1SetItem1Delegate))] + static void UnityEngineResolutionArray1SetItem1(int thisHandle, int index0, ref UnityEngine.Resolution item) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (double)val; - return returnValue; + var thiz = (UnityEngine.Resolution[])NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz[index0] = item; } 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) + [MonoPInvokeCallback(typeof(UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate))] + static int UnityEngineUnityEngineRaycastHitArray1Constructor1(int length0) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new int[length0]); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.RaycastHit[length0]); return returnValue; } catch (System.NullReferenceException ex) @@ -5403,14 +6430,14 @@ static int SystemSystemInt32Array1Constructor1(int length0) } } - [MonoPInvokeCallback(typeof(SystemInt32Array1GetItem1Delegate))] - static int SystemInt32Array1GetItem1(int thisHandle, int index0) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitArray1GetItem1Delegate))] + static int UnityEngineRaycastHitArray1GetItem1(int thisHandle, int index0) { try { - var thiz = (int[])NativeScript.Bindings.ObjectStore.Get(thisHandle); + var thiz = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(thisHandle); var returnValue = thiz[index0]; - return returnValue; + return NativeScript.Bindings.StructStore.Store(returnValue); } catch (System.NullReferenceException ex) { @@ -5426,12 +6453,13 @@ static int SystemInt32Array1GetItem1(int thisHandle, int index0) } } - [MonoPInvokeCallback(typeof(SystemInt32Array1SetItem1Delegate))] - static void SystemInt32Array1SetItem1(int thisHandle, int index0, int item) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitArray1SetItem1Delegate))] + static void UnityEngineRaycastHitArray1SetItem1(int thisHandle, int index0, int itemHandle) { try { - var thiz = (int[])NativeScript.Bindings.ObjectStore.Get(thisHandle); + 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) @@ -5446,12 +6474,12 @@ static void SystemInt32Array1SetItem1(int thisHandle, int index0, int item) } } - [MonoPInvokeCallback(typeof(SystemSystemSingleArray1Constructor1Delegate))] - static int SystemSystemSingleArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate))] + static int UnityEngineUnityEngineGradientColorKeyArray1Constructor1(int length0) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0]); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GradientColorKey[length0]); return returnValue; } catch (System.NullReferenceException ex) @@ -5468,12 +6496,12 @@ static int SystemSystemSingleArray1Constructor1(int length0) } } - [MonoPInvokeCallback(typeof(SystemSingleArray1GetItem1Delegate))] - static float SystemSingleArray1GetItem1(int thisHandle, int index0) + [MonoPInvokeCallback(typeof(UnityEngineGradientColorKeyArray1GetItem1Delegate))] + static UnityEngine.GradientColorKey UnityEngineGradientColorKeyArray1GetItem1(int thisHandle, int index0) { try { - var thiz = (float[])NativeScript.Bindings.ObjectStore.Get(thisHandle); + var thiz = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(thisHandle); var returnValue = thiz[index0]; return returnValue; } @@ -5481,22 +6509,22 @@ static float SystemSingleArray1GetItem1(int thisHandle, int index0) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); + return default(UnityEngine.GradientColorKey); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(float); + return default(UnityEngine.GradientColorKey); } } - [MonoPInvokeCallback(typeof(SystemSingleArray1SetItem1Delegate))] - static void SystemSingleArray1SetItem1(int thisHandle, int index0, float item) + [MonoPInvokeCallback(typeof(UnityEngineGradientColorKeyArray1SetItem1Delegate))] + static void UnityEngineGradientColorKeyArray1SetItem1(int thisHandle, int index0, ref UnityEngine.GradientColorKey item) { try { - var thiz = (float[])NativeScript.Bindings.ObjectStore.Get(thisHandle); + var thiz = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(thisHandle); thiz[index0] = item; } catch (System.NullReferenceException ex) @@ -5511,81 +6539,77 @@ static void SystemSingleArray1SetItem1(int thisHandle, int index0, float item) } } - [MonoPInvokeCallback(typeof(SystemSystemSingleArray2Constructor2Delegate))] - static int SystemSystemSingleArray2Constructor2(int length0, int length1) + [MonoPInvokeCallback(typeof(SystemActionInvokeDelegate))] + static void SystemActionInvoke(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0, length1]); - return returnValue; + ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); } 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) + [MonoPInvokeCallback(typeof(SystemActionConstructorDelegate))] + static void SystemActionConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetLength(dimension); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(ReleaseSystemActionDelegate))] + static void ReleaseSystemAction(int handle, int classHandle) { try { - var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0, index1]; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemActionAddDelegate))] + static void SystemActionAdd(int thisHandle, int delHandle) { try { - var thiz = (float[,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0, index1] = item; + var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + thiz += del; } catch (System.NullReferenceException ex) { @@ -5599,81 +6623,77 @@ static void SystemSingleArray2SetItem2(int thisHandle, int index0, int index1, f } } - [MonoPInvokeCallback(typeof(SystemSystemSingleArray3Constructor3Delegate))] - static int SystemSystemSingleArray3Constructor3(int length0, int length1, int length2) + [MonoPInvokeCallback(typeof(SystemActionRemoveDelegate))] + static void SystemActionRemove(int thisHandle, int delHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new float[length0, length1, length2]); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemActionSystemSingleInvokeDelegate))] + static void SystemActionSystemSingleInvoke(int thisHandle, float obj) { try { - var thiz = (float[,,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.GetLength(dimension); - return returnValue; + ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(obj); } 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) + [MonoPInvokeCallback(typeof(SystemActionSystemSingleConstructorDelegate))] + static void SystemActionSystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = (float[,,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0, index1, index2]; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingleDelegate))] + static void ReleaseSystemActionSystemSingle(int handle, int classHandle) { try { - var thiz = (float[,,])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0, index1, index2] = item; + if (classHandle != 0) + { + var thiz = (SystemActionSystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); + thiz.CppHandle = 0; + } + NativeScript.Bindings.ObjectStore.Remove(handle); } catch (System.NullReferenceException ex) { @@ -5687,59 +6707,54 @@ static void SystemSingleArray3SetItem3(int thisHandle, int index0, int index1, i } } - [MonoPInvokeCallback(typeof(SystemSystemStringArray1Constructor1Delegate))] - static int SystemSystemStringArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(SystemActionSystemSingleAddDelegate))] + static void SystemActionSystemSingleAdd(int thisHandle, int delHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new string[length0]); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemActionSystemSingleRemoveDelegate))] + static void SystemActionSystemSingleRemove(int thisHandle, int delHandle) { try { - var thiz = (string[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleInvokeDelegate))] + static void SystemActionSystemSingle_SystemSingleInvoke(int thisHandle, float arg1, float arg2) { try { - var thiz = (string[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); - thiz[index0] = item; + ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); } catch (System.NullReferenceException ex) { @@ -5753,58 +6768,58 @@ static void SystemStringArray1SetItem1(int thisHandle, int index0, int itemHandl } } - [MonoPInvokeCallback(typeof(UnityEngineUnityEngineResolutionArray1Constructor1Delegate))] - static int UnityEngineUnityEngineResolutionArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleConstructorDelegate))] + static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.Resolution[length0]); - return returnValue; + var thiz = new SystemActionSystemSingle_SystemSingle(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); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1GetItem1Delegate))] - static UnityEngine.Resolution UnityEngineResolutionArray1GetItem1(int thisHandle, int index0) + [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingle_SystemSingleDelegate))] + static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHandle) { try { - var thiz = (UnityEngine.Resolution[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return returnValue; + if (classHandle != 0) + { + var thiz = (SystemActionSystemSingle_SystemSingle)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)); - return default(UnityEngine.Resolution); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Resolution); } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1SetItem1Delegate))] - static void UnityEngineResolutionArray1SetItem1(int thisHandle, int index0, ref UnityEngine.Resolution item) + [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleAddDelegate))] + static void SystemActionSystemSingle_SystemSingleAdd(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.Resolution[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0] = item; + var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + thiz += del; } catch (System.NullReferenceException ex) { @@ -5818,59 +6833,56 @@ static void UnityEngineResolutionArray1SetItem1(int thisHandle, int index0, ref } } - [MonoPInvokeCallback(typeof(UnityEngineUnityEngineRaycastHitArray1Constructor1Delegate))] - static int UnityEngineUnityEngineRaycastHitArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleRemoveDelegate))] + static void SystemActionSystemSingle_SystemSingleRemove(int thisHandle, int delHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.RaycastHit[length0]); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate))] + static double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(int thisHandle, int arg1, float arg2) { try { - var thiz = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return NativeScript.Bindings.StructStore.Store(returnValue); + var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(double); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(double); } } - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitArray1SetItem1Delegate))] - static void UnityEngineRaycastHitArray1SetItem1(int thisHandle, int index0, int itemHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructorDelegate))] + static void SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = (UnityEngine.RaycastHit[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(itemHandle); - thiz[index0] = item; + var thiz = new SystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle); + handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) { @@ -5884,58 +6896,59 @@ static void UnityEngineRaycastHitArray1SetItem1(int thisHandle, int index0, int } } - [MonoPInvokeCallback(typeof(UnityEngineUnityEngineGradientColorKeyArray1Constructor1Delegate))] - static int UnityEngineUnityEngineGradientColorKeyArray1Constructor1(int length0) + [MonoPInvokeCallback(typeof(ReleaseSystemFuncSystemInt32_SystemSingle_SystemDoubleDelegate))] + static void ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(int handle, int classHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GradientColorKey[length0]); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate))] + static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index0]; - return returnValue; + 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.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) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate))] + static void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.GradientColorKey[])NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index0] = item; + var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); + thiz -= del; } catch (System.NullReferenceException ex) { @@ -5949,31 +6962,34 @@ static void UnityEngineGradientColorKeyArray1SetItem1(int thisHandle, int index0 } } - [MonoPInvokeCallback(typeof(SystemActionInvokeDelegate))] - static void SystemActionInvoke(int thisHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringInvokeDelegate))] + static int SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(int thisHandle, short arg1, int arg2) { try { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); + var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + 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(SystemActionConstructorDelegate))] - static void SystemActionConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringConstructorDelegate))] + static void SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new SystemAction(cppHandle); + var thiz = new SystemFuncSystemInt16_SystemInt32_SystemString(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5988,14 +7004,14 @@ static void SystemActionConstructor(int cppHandle, ref int handle, ref int class } } - [MonoPInvokeCallback(typeof(ReleaseSystemActionDelegate))] - static void ReleaseSystemAction(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemFuncSystemInt16_SystemInt32_SystemStringDelegate))] + static void ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (SystemAction)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (SystemFuncSystemInt16_SystemInt32_SystemString)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6012,13 +7028,13 @@ static void ReleaseSystemAction(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(SystemActionAddDelegate))] - static void SystemActionAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate))] + static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, int delHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6033,13 +7049,13 @@ static void SystemActionAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemActionRemoveDelegate))] - static void SystemActionRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringRemoveDelegate))] + static void SystemFuncSystemInt16_SystemInt32_SystemStringRemove(int thisHandle, int delHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6054,12 +7070,13 @@ static void SystemActionRemove(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingleInvokeDelegate))] - static void SystemActionSystemSingleInvoke(int thisHandle, float obj) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerInvokeDelegate))] + static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) { try { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(obj); + var args = (string[])NativeScript.Bindings.ObjectStore.Get(argsHandle); + ((System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle))(args); } catch (System.NullReferenceException ex) { @@ -6073,12 +7090,12 @@ static void SystemActionSystemSingleInvoke(int thisHandle, float obj) } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingleConstructorDelegate))] - static void SystemActionSystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerConstructorDelegate))] + static void SystemAppDomainInitializerConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new SystemActionSystemSingle(cppHandle); + var thiz = new SystemAppDomainInitializer(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6093,14 +7110,14 @@ static void SystemActionSystemSingleConstructor(int cppHandle, ref int handle, r } } - [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingleDelegate))] - static void ReleaseSystemActionSystemSingle(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemAppDomainInitializerDelegate))] + static void ReleaseSystemAppDomainInitializer(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (SystemActionSystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (SystemAppDomainInitializer)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6117,13 +7134,13 @@ static void ReleaseSystemActionSystemSingle(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingleAddDelegate))] - static void SystemActionSystemSingleAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerAddDelegate))] + static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6138,13 +7155,13 @@ static void SystemActionSystemSingleAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingleRemoveDelegate))] - static void SystemActionSystemSingleRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemAppDomainInitializerRemoveDelegate))] + static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6159,12 +7176,12 @@ static void SystemActionSystemSingleRemove(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleInvokeDelegate))] - static void SystemActionSystemSingle_SystemSingleInvoke(int thisHandle, float arg1, float arg2) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionInvokeDelegate))] + static void UnityEngineEventsUnityActionInvoke(int thisHandle) { try { - ((System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); + ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); } catch (System.NullReferenceException ex) { @@ -6178,12 +7195,12 @@ static void SystemActionSystemSingle_SystemSingleInvoke(int thisHandle, float ar } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleConstructorDelegate))] - static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionConstructorDelegate))] + static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new SystemActionSystemSingle_SystemSingle(cppHandle); + var thiz = new UnityEngineEventsUnityAction(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6198,14 +7215,14 @@ static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref } } - [MonoPInvokeCallback(typeof(ReleaseSystemActionSystemSingle_SystemSingleDelegate))] - static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineEventsUnityActionDelegate))] + static void ReleaseUnityEngineEventsUnityAction(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (SystemActionSystemSingle_SystemSingle)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (UnityEngineEventsUnityAction)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6222,13 +7239,13 @@ static void ReleaseSystemActionSystemSingle_SystemSingle(int handle, int classHa } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleAddDelegate))] - static void SystemActionSystemSingle_SystemSingleAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionAddDelegate))] + static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6243,13 +7260,13 @@ static void SystemActionSystemSingle_SystemSingleAdd(int thisHandle, int delHand } } - [MonoPInvokeCallback(typeof(SystemActionSystemSingle_SystemSingleRemoveDelegate))] - static void SystemActionSystemSingle_SystemSingleRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionRemoveDelegate))] + static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) { try { - var thiz = (System.Action)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Action)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6264,34 +7281,31 @@ static void SystemActionSystemSingle_SystemSingleRemove(int thisHandle, int delH } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleInvokeDelegate))] - static double SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(int thisHandle, int arg1, float arg2) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) { try { - var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); - return returnValue; + ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); } 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) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new SystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle); + var thiz = new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6306,14 +7320,14 @@ static void SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(int cppHa } } - [MonoPInvokeCallback(typeof(ReleaseSystemFuncSystemInt32_SystemSingle_SystemDoubleDelegate))] - static void ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate))] + static void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (SystemFuncSystemInt32_SystemSingle_SystemDouble)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6330,13 +7344,13 @@ static void ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(int handle, i } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleAddDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(int thisHandle, int delHandle) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6351,13 +7365,13 @@ static void SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(int thisHandle, i } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt32_SystemSingle_SystemDoubleRemoveDelegate))] - static void SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate))] + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(int thisHandle, int delHandle) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6372,34 +7386,33 @@ 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(SystemComponentModelDesignComponentEventHandlerInvokeDelegate))] + static void SystemComponentModelDesignComponentEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) { try { - var returnValue = ((System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg1, arg2); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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); } 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(SystemFuncSystemInt16_SystemInt32_SystemStringConstructorDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerConstructorDelegate))] + static void SystemComponentModelDesignComponentEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new SystemFuncSystemInt16_SystemInt32_SystemString(cppHandle); + var thiz = new SystemComponentModelDesignComponentEventHandler(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6414,14 +7427,14 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(int cppHan } } - [MonoPInvokeCallback(typeof(ReleaseSystemFuncSystemInt16_SystemInt32_SystemStringDelegate))] - static void ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentEventHandlerDelegate))] + static void ReleaseSystemComponentModelDesignComponentEventHandler(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (SystemFuncSystemInt16_SystemInt32_SystemString)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (SystemComponentModelDesignComponentEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6438,13 +7451,13 @@ static void ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(int handle, in } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringAddDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerAddDelegate))] + static void SystemComponentModelDesignComponentEventHandlerAdd(int thisHandle, int delHandle) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6459,13 +7472,13 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringAdd(int thisHandle, in } } - [MonoPInvokeCallback(typeof(SystemFuncSystemInt16_SystemInt32_SystemStringRemoveDelegate))] - static void SystemFuncSystemInt16_SystemInt32_SystemStringRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentEventHandlerRemoveDelegate))] + static void SystemComponentModelDesignComponentEventHandlerRemove(int thisHandle, int delHandle) { try { - var thiz = (System.Func)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.Func)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6480,13 +7493,14 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringRemove(int thisHandle, } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerInvokeDelegate))] - static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerInvokeDelegate))] + static void SystemComponentModelDesignComponentChangingEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) { try { - var args = (string[])NativeScript.Bindings.ObjectStore.Get(argsHandle); - ((System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle))(args); + 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); } catch (System.NullReferenceException ex) { @@ -6500,12 +7514,12 @@ static void SystemAppDomainInitializerInvoke(int thisHandle, int argsHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerConstructorDelegate))] - static void SystemAppDomainInitializerConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerConstructorDelegate))] + static void SystemComponentModelDesignComponentChangingEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new SystemAppDomainInitializer(cppHandle); + var thiz = new SystemComponentModelDesignComponentChangingEventHandler(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6520,14 +7534,14 @@ static void SystemAppDomainInitializerConstructor(int cppHandle, ref int handle, } } - [MonoPInvokeCallback(typeof(ReleaseSystemAppDomainInitializerDelegate))] - static void ReleaseSystemAppDomainInitializer(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentChangingEventHandlerDelegate))] + static void ReleaseSystemComponentModelDesignComponentChangingEventHandler(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (SystemAppDomainInitializer)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (SystemComponentModelDesignComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6544,13 +7558,13 @@ static void ReleaseSystemAppDomainInitializer(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerAddDelegate))] - static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerAddDelegate))] + static void SystemComponentModelDesignComponentChangingEventHandlerAdd(int thisHandle, int delHandle) { try { - var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6565,13 +7579,13 @@ static void SystemAppDomainInitializerAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(SystemAppDomainInitializerRemoveDelegate))] - static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangingEventHandlerRemoveDelegate))] + static void SystemComponentModelDesignComponentChangingEventHandlerRemove(int thisHandle, int delHandle) { try { - var thiz = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (System.AppDomainInitializer)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentChangingEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6586,12 +7600,14 @@ static void SystemAppDomainInitializerRemove(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionInvokeDelegate))] - static void UnityEngineEventsUnityActionInvoke(int thisHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerInvokeDelegate))] + static void SystemComponentModelDesignComponentChangedEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) { try { - ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(); + 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); } catch (System.NullReferenceException ex) { @@ -6605,12 +7621,12 @@ static void UnityEngineEventsUnityActionInvoke(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionConstructorDelegate))] - static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerConstructorDelegate))] + static void SystemComponentModelDesignComponentChangedEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new UnityEngineEventsUnityAction(cppHandle); + var thiz = new SystemComponentModelDesignComponentChangedEventHandler(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6625,14 +7641,14 @@ static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handl } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineEventsUnityActionDelegate))] - static void ReleaseUnityEngineEventsUnityAction(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentChangedEventHandlerDelegate))] + static void ReleaseSystemComponentModelDesignComponentChangedEventHandler(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (UnityEngineEventsUnityAction)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (SystemComponentModelDesignComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6649,13 +7665,13 @@ static void ReleaseUnityEngineEventsUnityAction(int handle, int classHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionAddDelegate))] - static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerAddDelegate))] + static void SystemComponentModelDesignComponentChangedEventHandlerAdd(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6670,13 +7686,13 @@ static void UnityEngineEventsUnityActionAdd(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionRemoveDelegate))] - static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentChangedEventHandlerRemoveDelegate))] + static void SystemComponentModelDesignComponentChangedEventHandlerRemove(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentChangedEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) @@ -6691,12 +7707,14 @@ static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerInvokeDelegate))] + static void SystemComponentModelDesignComponentRenameEventHandlerInvoke(int thisHandle, int senderHandle, int eHandle) { try { - ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); + 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); } catch (System.NullReferenceException ex) { @@ -6710,12 +7728,12 @@ static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEng } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructorDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(int cppHandle, ref int handle, ref int classHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerConstructorDelegate))] + static void SystemComponentModelDesignComponentRenameEventHandlerConstructor(int cppHandle, ref int handle, ref int classHandle) { try { - var thiz = new UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle); + var thiz = new SystemComponentModelDesignComponentRenameEventHandler(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -6730,14 +7748,14 @@ static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEng } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeDelegate))] - static void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(int handle, int classHandle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignComponentRenameEventHandlerDelegate))] + static void ReleaseSystemComponentModelDesignComponentRenameEventHandler(int handle, int classHandle) { try { if (classHandle != 0) { - var thiz = (UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode)NativeScript.Bindings.ObjectStore.Remove(classHandle); + var thiz = (SystemComponentModelDesignComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Remove(classHandle); thiz.CppHandle = 0; } NativeScript.Bindings.ObjectStore.Remove(handle); @@ -6754,13 +7772,13 @@ static void ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_U } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAddDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerAddDelegate))] + static void SystemComponentModelDesignComponentRenameEventHandlerAdd(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz += del; } catch (System.NullReferenceException ex) @@ -6775,13 +7793,13 @@ static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEng } } - [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemoveDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(int thisHandle, int delHandle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignComponentRenameEventHandlerRemoveDelegate))] + static void SystemComponentModelDesignComponentRenameEventHandlerRemove(int thisHandle, int delHandle) { try { - var thiz = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var del = (UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(delHandle); + var thiz = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var del = (System.ComponentModel.Design.ComponentRenameEventHandler)NativeScript.Bindings.ObjectStore.Get(delHandle); thiz -= del; } catch (System.NullReferenceException ex) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 888569b..1f8ce78 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -102,6 +102,7 @@ class JsonBaseType public int MaxSimultaneous; public JsonMethod[] OverrideMethods; public JsonProperty[] OverrideProperties; + public JsonEvent[] OverrideEvents; } [Serializable] @@ -6821,6 +6822,115 @@ static void AppendBaseType( } } + // All abstract events + foreach (EventInfo eventInfo in type.GetEvents()) + { + MethodInfo addMethodInfo = eventInfo.GetAddMethod(); + MethodInfo removeMethodInfo = eventInfo.GetRemoveMethod(); + if ((addMethodInfo == null || !addMethodInfo.IsAbstract) && + (removeMethodInfo == null || !removeMethodInfo.IsAbstract)) + { + continue; + } + AppendBaseTypeEvent( + type, + typeName, + cppTypeName, + typeParams, + eventInfo, + addMethodInfo, + removeMethodInfo, + indent, + builders); + } + + // All interface events + if (type.IsInterface) + { + foreach (Type interfaceType in type.GetInterfaces()) + { + foreach (EventInfo eventInfo in interfaceType.GetEvents()) + { + MethodInfo addMethodInfo = eventInfo.GetAddMethod(); + MethodInfo removeMethodInfo = eventInfo.GetRemoveMethod(); + if ((addMethodInfo == null || !addMethodInfo.IsAbstract) && + (removeMethodInfo == null || !removeMethodInfo.IsAbstract)) + { + continue; + } + AppendBaseTypeEvent( + type, + typeName, + cppTypeName, + typeParams, + eventInfo, + addMethodInfo, + removeMethodInfo, + indent, + builders); + } + } + } + + // Specified virtual events + if (jsonBaseType.OverrideEvents != null) + { + EventInfo[] events = type.GetEvents(); + foreach (JsonEvent jsonEvent in jsonBaseType.OverrideEvents) + { + EventInfo eventInfo = null; + foreach (EventInfo curEventInfo in events) + { + if (curEventInfo.Name == jsonEvent.Name) + { + eventInfo = curEventInfo; + break; + } + } + if (eventInfo == null) + { + // Throw an exception so the user knows what to fix in the JSON + StringBuilder errorBuilder = new StringBuilder(1024); + errorBuilder.Append("Event \""); + AppendCsharpTypeName( + type, + errorBuilder); + errorBuilder.Append('.'); + errorBuilder.Append(jsonEvent.Name); + errorBuilder.Append(")\" not found"); + throw new Exception(errorBuilder.ToString()); + } + + MethodInfo addMethodInfo = eventInfo.GetAddMethod(); + MethodInfo removeMethodInfo = eventInfo.GetRemoveMethod(); + if ((addMethodInfo == null || !addMethodInfo.IsVirtual) && + (removeMethodInfo == null || !removeMethodInfo.IsVirtual)) + { + // Throw an exception so the user knows what to fix in the JSON + StringBuilder errorBuilder = new StringBuilder(1024); + errorBuilder.Append("Event \""); + AppendCsharpTypeName( + type, + errorBuilder); + errorBuilder.Append('.'); + errorBuilder.Append(jsonEvent.Name); + errorBuilder.Append( + ")\" doesn't have either a virtual 'add' or 'remove' to override"); + throw new Exception(errorBuilder.ToString()); + } + AppendBaseTypeEvent( + type, + typeName, + cppTypeName, + typeParams, + eventInfo, + addMethodInfo, + removeMethodInfo, + indent, + builders); + } + } + // C# class (ending) builders.CsharpBaseTypes.Append("\t\t}\n"); builders.CsharpBaseTypes.Append("\t\t\n"); @@ -6929,14 +7039,18 @@ static void AppendBaseTypeProperty( builders.CsharpBaseTypes.Append('\n'); builders.CsharpBaseTypes.Append("\t\t\t{\n"); + TypeKind propertyTypeKind = GetTypeKind( + propertyInfo.PropertyType); + if (getMethodInfo != null && getMethodInfo.IsVirtual) { - AppendBaseTypeNativeProperty( + AppendBaseTypeNativePropertyOrEvent( type, typeName, typeParams, cppTypeName, - propertyInfo, + propertyInfo.Name, + propertyTypeKind, getMethodInfo, "Get", isOverride, @@ -6946,12 +7060,13 @@ static void AppendBaseTypeProperty( if (setMethodInfo != null && setMethodInfo.IsVirtual) { - AppendBaseTypeNativeProperty( + AppendBaseTypeNativePropertyOrEvent( type, typeName, typeParams, cppTypeName, - propertyInfo, + propertyInfo.Name, + propertyTypeKind, setMethodInfo, "Set", isOverride, @@ -6963,12 +7078,79 @@ static void AppendBaseTypeProperty( builders.CsharpBaseTypes.Append("\t\t\t\n"); } - static void AppendBaseTypeNativeProperty( + static void AppendBaseTypeEvent( + Type type, + string typeName, + string cppTypeName, + Type[] typeParams, + EventInfo eventInfo, + MethodInfo addMethodInfo, + MethodInfo removeMethodInfo, + int indent, + StringBuilders builders) + { + bool isOverride = IsNonDelegateClass(type); + + builders.CsharpBaseTypes.Append("\t\t\tpublic "); + if (isOverride) + { + builders.CsharpBaseTypes.Append("override "); + } + builders.CsharpBaseTypes.Append("event "); + AppendCsharpTypeName( + eventInfo.EventHandlerType, + builders.CsharpBaseTypes); + builders.CsharpBaseTypes.Append(' '); + builders.CsharpBaseTypes.Append(eventInfo.Name); + builders.CsharpBaseTypes.Append('\n'); + builders.CsharpBaseTypes.Append("\t\t\t{\n"); + + TypeKind eventHandlerTypeKind = GetTypeKind( + eventInfo.EventHandlerType); + + if (addMethodInfo != null && addMethodInfo.IsVirtual) + { + AppendBaseTypeNativePropertyOrEvent( + type, + typeName, + typeParams, + cppTypeName, + eventInfo.Name, + eventHandlerTypeKind, + addMethodInfo, + "Add", + isOverride, + indent, + builders); + } + + if (removeMethodInfo != null && removeMethodInfo.IsVirtual) + { + AppendBaseTypeNativePropertyOrEvent( + type, + typeName, + typeParams, + cppTypeName, + eventInfo.Name, + eventHandlerTypeKind, + removeMethodInfo, + "Remove", + isOverride, + indent, + builders); + } + + builders.CsharpBaseTypes.Append("\t\t\t}\n"); + builders.CsharpBaseTypes.Append("\t\t\t\n"); + } + + static void AppendBaseTypeNativePropertyOrEvent( Type type, string typeName, Type[] typeParams, string cppTypeName, - PropertyInfo propertyInfo, + string propertyOrEventName, + TypeKind propertyOrEventTypeKind, MethodInfo methodInfo, string operationType, bool isOverride, @@ -6977,7 +7159,7 @@ static void AppendBaseTypeNativeProperty( { builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append(operationType); - builders.TempStrBuilder.Append(propertyInfo.Name); + builders.TempStrBuilder.Append(propertyOrEventName); string funcName = builders.TempStrBuilder.ToString(); AppendCsharpGetDelegateCall( @@ -7012,8 +7194,6 @@ static void AppendBaseTypeNativeProperty( // C# method that calls the C++ binding function ParameterInfo[] invokeParamsWithThis = PrependThisParameter( invokeParams); - TypeKind invokeReturnTypeKind = GetTypeKind( - propertyInfo.PropertyType); builders.CsharpBaseTypes.Append("\t\t\t\t"); builders.CsharpBaseTypes.Append(char.ToLower(operationType[0])); builders.CsharpBaseTypes.Append( @@ -7026,7 +7206,7 @@ static void AppendBaseTypeNativeProperty( methodInfo, nativeInvokeFuncName, invokeParamsWithThis, - invokeReturnTypeKind, + propertyOrEventTypeKind, 5, builders.CsharpBaseTypes); builders.CsharpBaseTypes.Append("\t\t\t\t}\n"); diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 35a3cb7..fa0d271 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -554,6 +554,24 @@ "Set": {} } ] + }, + { + "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" } ], "BaseTypes": [ @@ -575,15 +593,6 @@ { "Name": "System.StringComparer" }, - { - "Name": "System.EventArgs", - "OverrideMethods": [ - { - "Name": "ToString", - "ParamTypes": [] - } - ] - }, { "Name": "System.Collections.ICollection" }, @@ -599,6 +608,9 @@ "Set": {} } ] + }, + { + "Name": "System.ComponentModel.Design.IComponentChangeService" } ], "MonoBehaviours": [ @@ -697,6 +709,18 @@ "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/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index d6a52cc..c99a94c 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -145,14 +145,14 @@ namespace Plugin void (*SystemCollectionsGenericIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemStringComparer)(int32_t handle); void (*SystemStringComparerConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemEventArgs)(int32_t handle); - void (*SystemEventArgsConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemCollectionsICollection)(int32_t handle); void (*SystemCollectionsICollectionConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemCollectionsIList)(int32_t handle); void (*SystemCollectionsIListConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemCollectionsQueue)(int32_t handle); void (*SystemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemComponentModelDesignIComponentChangeService)(int32_t handle); + void (*SystemComponentModelDesignIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle); int32_t (*BoxBoolean)(System::Boolean val); System::Boolean (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -243,6 +243,26 @@ namespace Plugin void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd)(int32_t thisHandle, int32_t delHandle); void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove)(int32_t thisHandle, int32_t delHandle); void (*UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, 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*/ } @@ -417,31 +437,6 @@ namespace Plugin *pRelease = (System::StringComparer*)NextFreeSystemStringComparer; NextFreeSystemStringComparer = pRelease; } - int32_t SystemEventArgsFreeListSize; - System::EventArgs** SystemEventArgsFreeList; - System::EventArgs** NextFreeSystemEventArgs; - - int32_t StoreSystemEventArgs(System::EventArgs* del) - { - assert(NextFreeSystemEventArgs != nullptr); - System::EventArgs** pNext = NextFreeSystemEventArgs; - NextFreeSystemEventArgs = (System::EventArgs**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemEventArgsFreeList); - } - - System::EventArgs* GetSystemEventArgs(int32_t handle) - { - assert(handle >= 0 && handle < SystemEventArgsFreeListSize); - return SystemEventArgsFreeList[handle]; - } - - void RemoveSystemEventArgs(int32_t handle) - { - System::EventArgs** pRelease = SystemEventArgsFreeList + handle; - *pRelease = (System::EventArgs*)NextFreeSystemEventArgs; - NextFreeSystemEventArgs = pRelease; - } int32_t SystemCollectionsICollectionFreeListSize; System::Collections::ICollection** SystemCollectionsICollectionFreeList; System::Collections::ICollection** NextFreeSystemCollectionsICollection; @@ -517,6 +512,31 @@ namespace Plugin *pRelease = (System::Collections::Queue*)NextFreeSystemCollectionsQueue; NextFreeSystemCollectionsQueue = pRelease; } + int32_t SystemComponentModelDesignIComponentChangeServiceFreeListSize; + System::ComponentModel::Design::IComponentChangeService** SystemComponentModelDesignIComponentChangeServiceFreeList; + System::ComponentModel::Design::IComponentChangeService** NextFreeSystemComponentModelDesignIComponentChangeService; + + int32_t StoreSystemComponentModelDesignIComponentChangeService(System::ComponentModel::Design::IComponentChangeService* del) + { + assert(NextFreeSystemComponentModelDesignIComponentChangeService != nullptr); + System::ComponentModel::Design::IComponentChangeService** pNext = NextFreeSystemComponentModelDesignIComponentChangeService; + NextFreeSystemComponentModelDesignIComponentChangeService = (System::ComponentModel::Design::IComponentChangeService**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignIComponentChangeServiceFreeList); + } + + System::ComponentModel::Design::IComponentChangeService* GetSystemComponentModelDesignIComponentChangeService(int32_t handle) + { + assert(handle >= 0 && handle < SystemComponentModelDesignIComponentChangeServiceFreeListSize); + return SystemComponentModelDesignIComponentChangeServiceFreeList[handle]; + } + + void RemoveSystemComponentModelDesignIComponentChangeService(int32_t handle) + { + System::ComponentModel::Design::IComponentChangeService** pRelease = SystemComponentModelDesignIComponentChangeServiceFreeList + handle; + *pRelease = (System::ComponentModel::Design::IComponentChangeService*)NextFreeSystemComponentModelDesignIComponentChangeService; + NextFreeSystemComponentModelDesignIComponentChangeService = pRelease; + } int32_t SystemActionFreeListSize; System::Action** SystemActionFreeList; System::Action** NextFreeSystemAction; @@ -717,6 +737,106 @@ namespace Plugin *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) + { + 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) + { + assert(handle >= 0 && handle < SystemComponentModelDesignComponentEventHandlerFreeListSize); + return SystemComponentModelDesignComponentEventHandlerFreeList[handle]; + } + + void RemoveSystemComponentModelDesignComponentEventHandler(int32_t handle) + { + 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; + + int32_t StoreSystemComponentModelDesignComponentChangingEventHandler(System::ComponentModel::Design::ComponentChangingEventHandler* del) + { + assert(NextFreeSystemComponentModelDesignComponentChangingEventHandler != nullptr); + System::ComponentModel::Design::ComponentChangingEventHandler** pNext = NextFreeSystemComponentModelDesignComponentChangingEventHandler; + NextFreeSystemComponentModelDesignComponentChangingEventHandler = (System::ComponentModel::Design::ComponentChangingEventHandler**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemComponentModelDesignComponentChangingEventHandlerFreeList); + } + + System::ComponentModel::Design::ComponentChangingEventHandler* GetSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) + { + assert(handle >= 0 && handle < SystemComponentModelDesignComponentChangingEventHandlerFreeListSize); + return SystemComponentModelDesignComponentChangingEventHandlerFreeList[handle]; + } + + void RemoveSystemComponentModelDesignComponentChangingEventHandler(int32_t handle) + { + System::ComponentModel::Design::ComponentChangingEventHandler** pRelease = SystemComponentModelDesignComponentChangingEventHandlerFreeList + handle; + *pRelease = (System::ComponentModel::Design::ComponentChangingEventHandler*)NextFreeSystemComponentModelDesignComponentChangingEventHandler; + NextFreeSystemComponentModelDesignComponentChangingEventHandler = pRelease; + } + int32_t SystemComponentModelDesignComponentChangedEventHandlerFreeListSize; + System::ComponentModel::Design::ComponentChangedEventHandler** SystemComponentModelDesignComponentChangedEventHandlerFreeList; + System::ComponentModel::Design::ComponentChangedEventHandler** NextFreeSystemComponentModelDesignComponentChangedEventHandler; + + int32_t StoreSystemComponentModelDesignComponentChangedEventHandler(System::ComponentModel::Design::ComponentChangedEventHandler* del) + { + 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) + { + 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*/ } @@ -4740,90 +4860,127 @@ namespace System namespace System { - namespace Collections + EventArgs::EventArgs(decltype(nullptr) n) + : EventArgs(Plugin::InternalUse::Only, 0) { - namespace Generic + } + + EventArgs::EventArgs(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + if (handle) { - IComparer::IComparer() - : System::Object(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); - Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor(CppHandle, &Handle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - IComparer::IComparer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + 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) other) + { + 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) n) + : ComponentEventArgs(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); } - IComparer::IComparer(const IComparer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + ComponentEventArgs::ComponentEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); - if (Handle) + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - IComparer::IComparer(IComparer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + ComponentEventArgs::ComponentEventArgs(const ComponentEventArgs& other) + : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + ComponentEventArgs::ComponentEventArgs(ComponentEventArgs&& other) + : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - IComparer::~IComparer() + ComponentEventArgs::~ComponentEventArgs() { - Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } } - IComparer& IComparer::operator=(const IComparer& other) + ComponentEventArgs& ComponentEventArgs::operator=(const ComponentEventArgs& other) { if (this->Handle) { @@ -4837,177 +4994,169 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr) other) { if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } - Handle = 0; return *this; } - IComparer& IComparer::operator=(IComparer&& other) + ComponentEventArgs& ComponentEventArgs::operator=(ComponentEventArgs&& other) { - Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(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 IComparer::operator==(const IComparer& other) const + bool ComponentEventArgs::operator==(const ComponentEventArgs& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool ComponentEventArgs::operator!=(const ComponentEventArgs& other) const { return Handle != other.Handle; } - - int32_t IComparer::Compare(int32_t x, int32_t y) + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr) n) + : ComponentChangingEventArgs(Plugin::InternalUse::Only, 0) { - return {}; } - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) + ComponentChangingEventArgs::ComponentChangingEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(iu, handle) { - try + if (handle) { - return Plugin::GetSystemCollectionsGenericIComparerSystemInt32(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 {}; + Plugin::ReferenceManagedClass(handle); } } - } - } -} - -namespace System -{ - namespace Collections - { - namespace Generic - { - IComparer::IComparer() - : System::Object(nullptr) + + 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() { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); - Plugin::SystemCollectionsGenericIComparerSystemStringConstructor(CppHandle, &Handle); if (Handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - else + } + + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(const ComponentChangingEventArgs& other) + { + if (this->Handle) { - Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); - CppHandle = 0; + Plugin::DereferenceManagedClass(this->Handle); } - if (Plugin::unhandledCsharpException) + this->Handle = other.Handle; + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(this->Handle); } + return *this; } - IComparer::IComparer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr) other) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - IComparer::IComparer(const IComparer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(ComponentChangingEventArgs&& other) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); if (Handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - IComparer::IComparer(IComparer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + bool ComponentChangingEventArgs::operator==(const ComponentChangingEventArgs& other) const { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; + return Handle == other.Handle; } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + bool ComponentChangingEventArgs::operator!=(const ComponentChangingEventArgs& other) const { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); - if (Handle) + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr) n) + : ComponentChangedEventArgs(Plugin::InternalUse::Only, 0) + { + } + + ComponentChangedEventArgs::ComponentChangedEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(iu, handle) + { + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - IComparer::~IComparer() + 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() { - Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } } - IComparer& IComparer::operator=(const IComparer& other) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(const ComponentChangedEventArgs& other) { if (this->Handle) { @@ -5021,88 +5170,123 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr) other) { if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(Handle); Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } - Handle = 0; return *this; } - IComparer& IComparer::operator=(IComparer&& other) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(ComponentChangedEventArgs&& other) { - Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(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 IComparer::operator==(const IComparer& other) const + bool ComponentChangedEventArgs::operator==(const ComponentChangedEventArgs& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool ComponentChangedEventArgs::operator!=(const ComponentChangedEventArgs& other) const { return Handle != other.Handle; } + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr) n) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, 0) + { + } - int32_t IComparer::Compare(System::String& x, System::String& y) + ComponentRenameEventArgs::ComponentRenameEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(iu, handle) { - return {}; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + ComponentRenameEventArgs::ComponentRenameEventArgs(const ComponentRenameEventArgs& other) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) { - try + } + + ComponentRenameEventArgs::ComponentRenameEventArgs(ComponentRenameEventArgs&& other) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ComponentRenameEventArgs::~ComponentRenameEventArgs() + { + if (Handle) { - auto param0 = System::String(Plugin::InternalUse::Only, xHandle); - auto param1 = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(param0, param1); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - catch (System::Exception ex) + } + + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(const ComponentRenameEventArgs& other) + { + if (this->Handle) { - Plugin::SetException(ex.Handle); - return {}; + Plugin::DereferenceManagedClass(this->Handle); } - catch (...) + this->Handle = other.Handle; + if (this->Handle) { - System::String msg = "Unhandled exception invoking System::Collections::Generic::IComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr) other) + { + 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; } } } @@ -5110,108 +5294,109 @@ namespace System namespace System { - StringComparer::StringComparer() - : System::Object(nullptr) + namespace ComponentModel { - CppHandle = Plugin::StoreSystemStringComparer(this); - Plugin::SystemStringComparerConstructor(CppHandle, &Handle); - if (Handle) + MemberDescriptor::MemberDescriptor(decltype(nullptr) n) + : MemberDescriptor(Plugin::InternalUse::Only, 0) { - Plugin::ReferenceManagedClass(Handle); } - else + + MemberDescriptor::MemberDescriptor(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - Plugin::RemoveSystemStringComparer(CppHandle); - CppHandle = 0; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - if (Plugin::unhandledCsharpException) + + MemberDescriptor::MemberDescriptor(const MemberDescriptor& other) + : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - } - - StringComparer::StringComparer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemStringComparer(this); - } - - StringComparer::StringComparer(const StringComparer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemStringComparer(this); - if (Handle) + + MemberDescriptor::MemberDescriptor(MemberDescriptor&& other) + : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); + other.Handle = 0; } - } - - StringComparer::StringComparer(StringComparer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreSystemStringComparer(this); - if (Handle) + + MemberDescriptor::~MemberDescriptor() { - Plugin::ReferenceManagedClass(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - } - - StringComparer::~StringComparer() - { - Plugin::RemoveSystemStringComparer(CppHandle); - CppHandle = 0; - if (Handle) + + MemberDescriptor& MemberDescriptor::operator=(const MemberDescriptor& other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (this->Handle) { - Plugin::ReleaseSystemStringComparer(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; } - } - - StringComparer& StringComparer::operator=(const StringComparer& other) - { - if (this->Handle) + + MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr) other) { - Plugin::DereferenceManagedClass(this->Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - this->Handle = other.Handle; - if (this->Handle) + + MemberDescriptor& MemberDescriptor::operator=(MemberDescriptor&& other) { - Plugin::ReferenceManagedClass(this->Handle); + 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; } - return *this; } - - StringComparer& StringComparer::operator=(decltype(nullptr) other) +} + +namespace System +{ + namespace Collections { - if (Handle) + namespace Generic { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + IComparer::IComparer() + : System::Object(nullptr) { - Plugin::ReleaseSystemStringComparer(handle); + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5220,255 +5405,182 @@ namespace System delete ex; } } - } - Handle = 0; - return *this; - } - - StringComparer& StringComparer::operator=(StringComparer&& other) - { - Plugin::RemoveSystemStringComparer(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + + IComparer::IComparer(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::ReleaseSystemStringComparer(handle); - if (Plugin::unhandledCsharpException) + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + } + + IComparer::IComparer(const IComparer& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(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; - } - - int32_t StringComparer::Compare(System::String& x, System::String& y) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) - { - try - { - auto param0 = System::String(Plugin::InternalUse::Only, xHandle); - auto param1 = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemStringComparer(cppHandle)->Compare(param0, param1); - } - 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 StringComparer::Equals(System::String& x, System::String& y) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) - { - try - { - auto param0 = System::String(Plugin::InternalUse::Only, xHandle); - auto param1 = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemStringComparer(cppHandle)->Equals(param0, param1); - } - 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 {}; - } - } - - int32_t StringComparer::GetHashCode(System::String& obj) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) - { - try - { - auto param0 = System::String(Plugin::InternalUse::Only, objHandle); - return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(param0); - } - 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 -{ - EventArgs::EventArgs() - : System::Object(nullptr) - { - CppHandle = Plugin::StoreSystemEventArgs(this); - Plugin::SystemEventArgsConstructor(CppHandle, &Handle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemEventArgs(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - EventArgs::EventArgs(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemEventArgs(this); - } - - EventArgs::EventArgs(const EventArgs& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemEventArgs(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - EventArgs::EventArgs(EventArgs&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - EventArgs::EventArgs(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreSystemEventArgs(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - } - - EventArgs::~EventArgs() - { - Plugin::RemoveSystemEventArgs(CppHandle); - CppHandle = 0; - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + + IComparer::IComparer(IComparer&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReleaseSystemEventArgs(handle); - if (Plugin::unhandledCsharpException) + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(Handle); } } - } - } - - 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) other) - { - if (Handle) - { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + + IComparer::~IComparer() { - Plugin::ReleaseSystemEventArgs(handle); - if (Plugin::unhandledCsharpException) + Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + CppHandle = 0; + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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) other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + IComparer& IComparer::operator=(IComparer&& other) + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(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 IComparer::operator==(const IComparer& other) const + { + return Handle == other.Handle; + } + + bool IComparer::operator!=(const IComparer& other) const + { + return Handle != other.Handle; + } + + int32_t IComparer::Compare(int32_t x, int32_t y) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) + { + try + { + return Plugin::GetSystemCollectionsGenericIComparerSystemInt32(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 {}; } } } - Handle = 0; - return *this; } - - EventArgs& EventArgs::operator=(EventArgs&& other) +} + +namespace System +{ + namespace Collections { - Plugin::RemoveSystemEventArgs(CppHandle); - CppHandle = 0; - if (Handle) + namespace Generic { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + IComparer::IComparer() + : System::Object(nullptr) { - Plugin::ReleaseSystemEventArgs(handle); + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + Plugin::SystemCollectionsGenericIComparerSystemStringConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5477,391 +5589,461 @@ namespace System delete ex; } } - } - 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; - } - - System::String EventArgs::ToString() - { - return nullptr; - } - - DLLEXPORT int32_t SystemEventArgsToString(int32_t cppHandle) - { - try - { - return Plugin::GetSystemEventArgs(cppHandle)->ToString().Handle; - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::EventArgs"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } -} - -namespace System -{ - namespace Collections - { - ICollection::ICollection() - : System::Object(nullptr) - { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); - Plugin::SystemCollectionsICollectionConstructor(CppHandle, &Handle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else + + IComparer::IComparer(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::RemoveSystemCollectionsICollection(CppHandle); - CppHandle = 0; + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); } - if (Plugin::unhandledCsharpException) + + IComparer::IComparer(const IComparer& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - ICollection::ICollection(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); - } - - ICollection::ICollection(const ICollection& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); - if (Handle) + + IComparer::IComparer(IComparer&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; } - } - - ICollection::ICollection(ICollection&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); - if (Handle) + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - ICollection::~ICollection() - { - Plugin::RemoveSystemCollectionsICollection(CppHandle); - CppHandle = 0; - if (Handle) + + IComparer::~IComparer() { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseSystemCollectionsICollection(handle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } } - } - - ICollection& ICollection::operator=(const ICollection& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + + IComparer& IComparer::operator=(const IComparer& 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; - } - - ICollection& ICollection::operator=(decltype(nullptr) other) - { - if (Handle) + + IComparer& IComparer::operator=(decltype(nullptr) other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseSystemCollectionsICollection(handle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } + Handle = 0; + return *this; } - Handle = 0; - return *this; - } - - ICollection& ICollection::operator=(ICollection&& other) - { - Plugin::RemoveSystemCollectionsICollection(CppHandle); - CppHandle = 0; - if (Handle) + + IComparer& IComparer::operator=(IComparer&& other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseSystemCollectionsICollection(handle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } + Handle = other.Handle; + other.Handle = 0; + return *this; } - 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; - } - - void ICollection::CopyTo(System::Array& array, int32_t index) - { - } - - DLLEXPORT void SystemCollectionsICollectionCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) - { - try + + bool IComparer::operator==(const IComparer& other) const { - auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsICollection(cppHandle)->CopyTo(param0, index); + return Handle == other.Handle; } - catch (System::Exception ex) + + bool IComparer::operator!=(const IComparer& other) const { - Plugin::SetException(ex.Handle); + return Handle != other.Handle; } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } - } - - System::Collections::IEnumerator ICollection::GetEnumerator() - { - return nullptr; - } - - DLLEXPORT int32_t SystemCollectionsICollectionGetEnumerator(int32_t cppHandle) - { - try - { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetEnumerator().Handle; - } - catch (System::Exception ex) + + int32_t IComparer::Compare(System::String& x, System::String& y) { - Plugin::SetException(ex.Handle); return {}; } - catch (...) + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + try + { + auto param0 = System::String(Plugin::InternalUse::Only, xHandle); + auto param1 = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(param0, param1); + } + 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 {}; + } } } - - int32_t ICollection::GetCount() + } +} + +namespace System +{ + StringComparer::StringComparer() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + Plugin::SystemStringComparerConstructor(CppHandle, &Handle); + if (Handle) { - return {}; + Plugin::ReferenceManagedClass(Handle); } - - DLLEXPORT int32_t SystemCollectionsICollectionGetCount(int32_t cppHandle) + else { - try - { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetCount(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + Plugin::RemoveSystemStringComparer(CppHandle); + CppHandle = 0; } - - System::Boolean ICollection::GetIsSynchronized() + if (Plugin::unhandledCsharpException) { - return {}; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - DLLEXPORT int32_t SystemCollectionsICollectionGetIsSynchronized(int32_t cppHandle) + } + + StringComparer::StringComparer(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + } + + StringComparer::StringComparer(const StringComparer& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + if (Handle) { - try - { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetIsSynchronized(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + Plugin::ReferenceManagedClass(Handle); } - - System::Object ICollection::GetSyncRoot() + } + + StringComparer::StringComparer(StringComparer&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemStringComparer(this); + if (Handle) { - return nullptr; + Plugin::ReferenceManagedClass(Handle); } - - DLLEXPORT int32_t SystemCollectionsICollectionGetSyncRoot(int32_t cppHandle) + } + + StringComparer::~StringComparer() + { + Plugin::RemoveSystemStringComparer(CppHandle); + CppHandle = 0; + if (Handle) { - try - { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetSyncRoot().Handle; - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + Plugin::ReleaseSystemStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } } -} - -namespace System -{ - namespace Collections + + StringComparer& StringComparer::operator=(const StringComparer& other) { - IList::IList() - : System::Object(nullptr) + if (this->Handle) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); - Plugin::SystemCollectionsIListConstructor(CppHandle, &Handle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveSystemCollectionsIList(CppHandle); - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::DereferenceManagedClass(this->Handle); } - - IList::IList(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + this->Handle = other.Handle; + if (this->Handle) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); + Plugin::ReferenceManagedClass(this->Handle); } - - IList::IList(const IList& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + return *this; + } + + StringComparer& StringComparer::operator=(decltype(nullptr) other) + { + if (Handle) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); - if (Handle) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReleaseSystemStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } - - IList::IList(IList&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + Handle = 0; + return *this; + } + + StringComparer& StringComparer::operator=(StringComparer&& other) + { + Plugin::RemoveSystemStringComparer(CppHandle); + CppHandle = 0; + if (Handle) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemStringComparer(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 StringComparer::operator==(const StringComparer& other) const + { + return Handle == other.Handle; + } + + bool StringComparer::operator!=(const StringComparer& other) const + { + return Handle != other.Handle; + } + + int32_t StringComparer::Compare(System::String& x, System::String& y) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + auto param0 = System::String(Plugin::InternalUse::Only, xHandle); + auto param1 = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemStringComparer(cppHandle)->Compare(param0, param1); + } + 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 StringComparer::Equals(System::String& x, System::String& y) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerEquals(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + { + try + { + auto param0 = System::String(Plugin::InternalUse::Only, xHandle); + auto param1 = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemStringComparer(cppHandle)->Equals(param0, param1); + } + 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 {}; + } + } + + int32_t StringComparer::GetHashCode(System::String& obj) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) + { + try + { + auto param0 = System::String(Plugin::InternalUse::Only, objHandle); + return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(param0); + } + 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 + { + ICollection::ICollection() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsICollection(this); + Plugin::SystemCollectionsICollectionConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsICollection(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + ICollection::ICollection(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemCollectionsICollection(this); + } + + ICollection::ICollection(const ICollection& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsICollection(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IList::~IList() + ICollection::ICollection(ICollection&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsICollection(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + ICollection::~ICollection() + { + Plugin::RemoveSystemCollectionsICollection(CppHandle); CppHandle = 0; if (Handle) { @@ -5869,7 +6051,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsIList(handle); + Plugin::ReleaseSystemCollectionsICollection(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5881,7 +6063,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -5895,7 +6077,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + ICollection& ICollection::operator=(decltype(nullptr) other) { if (Handle) { @@ -5903,7 +6085,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsIList(handle); + Plugin::ReleaseSystemCollectionsICollection(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5917,9 +6099,9 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + ICollection& ICollection::operator=(ICollection&& other) { - Plugin::RemoveSystemCollectionsIList(CppHandle); + Plugin::RemoveSystemCollectionsICollection(CppHandle); CppHandle = 0; if (Handle) { @@ -5927,7 +6109,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsIList(handle); + Plugin::ReleaseSystemCollectionsICollection(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5942,75 +6124,74 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } - int32_t IList::Add(System::Object& value) + void ICollection::CopyTo(System::Array& array, int32_t index) { - return {}; } - DLLEXPORT int32_t SystemCollectionsIListAdd(int32_t cppHandle, int32_t valueHandle) + DLLEXPORT void SystemCollectionsICollectionCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->Add(param0); + auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); + Plugin::GetSystemCollectionsICollection(cppHandle)->CopyTo(param0, index); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); - return {}; } catch (...) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; System::Exception ex(msg); Plugin::SetException(ex.Handle); - return {}; } } - void IList::Clear() + System::Collections::IEnumerator ICollection::GetEnumerator() { + return nullptr; } - DLLEXPORT void SystemCollectionsIListClear(int32_t cppHandle) + DLLEXPORT int32_t SystemCollectionsICollectionGetEnumerator(int32_t cppHandle) { try { - Plugin::GetSystemCollectionsIList(cppHandle)->Clear(); + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetEnumerator().Handle; } catch (System::Exception ex) { Plugin::SetException(ex.Handle); + return {}; } catch (...) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - System::Boolean IList::Contains(System::Object& value) + int32_t ICollection::GetCount() { return {}; } - DLLEXPORT int32_t SystemCollectionsIListContains(int32_t cppHandle, int32_t valueHandle) + DLLEXPORT int32_t SystemCollectionsICollectionGetCount(int32_t cppHandle) { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->Contains(param0); + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetCount(); } catch (System::Exception ex) { @@ -6019,24 +6200,23 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; System::Exception ex(msg); Plugin::SetException(ex.Handle); return {}; } } - int32_t IList::IndexOf(System::Object& value) + System::Boolean ICollection::GetIsSynchronized() { return {}; } - DLLEXPORT int32_t SystemCollectionsIListIndexOf(int32_t cppHandle, int32_t valueHandle) + DLLEXPORT int32_t SystemCollectionsICollectionGetIsSynchronized(int32_t cppHandle) { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->IndexOf(param0); + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetIsSynchronized(); } catch (System::Exception ex) { @@ -6045,68 +6225,229 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; System::Exception ex(msg); Plugin::SetException(ex.Handle); return {}; } } - void IList::Insert(int32_t index, System::Object& value) + System::Object ICollection::GetSyncRoot() { + return nullptr; } - DLLEXPORT void SystemCollectionsIListInsert(int32_t cppHandle, int32_t index, int32_t valueHandle) + DLLEXPORT int32_t SystemCollectionsICollectionGetSyncRoot(int32_t cppHandle) { try { - auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->Insert(index, param1); + return Plugin::GetSystemCollectionsICollection(cppHandle)->GetSyncRoot().Handle; } catch (System::Exception ex) { Plugin::SetException(ex.Handle); + return {}; } catch (...) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::String msg = "Unhandled exception invoking System::Collections::ICollection"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - - void IList::Remove(System::Object& value) - { - } - - DLLEXPORT void SystemCollectionsIListRemove(int32_t cppHandle, int32_t valueHandle) + } +} + +namespace System +{ + namespace Collections + { + IList::IList() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + Plugin::SystemCollectionsIListConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + IList::IList(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + } + + IList::IList(const IList& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IList::IList(IList&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + IList::IList(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemCollectionsIList(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IList::~IList() + { + Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsIList(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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) other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsIList(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + IList& IList::operator=(IList&& other) + { + Plugin::RemoveSystemCollectionsIList(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemCollectionsIList(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 IList::operator==(const IList& other) const + { + return Handle == other.Handle; + } + + bool IList::operator!=(const IList& other) const + { + return Handle != other.Handle; + } + + int32_t IList::Add(System::Object& value) + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListAdd(int32_t cppHandle, int32_t valueHandle) { try { auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->Remove(param0); + return Plugin::GetSystemCollectionsIList(cppHandle)->Add(param0); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); + return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - void IList::RemoveAt(int32_t index) + void IList::Clear() { } - DLLEXPORT void SystemCollectionsIListRemoveAt(int32_t cppHandle, int32_t index) + DLLEXPORT void SystemCollectionsIListClear(int32_t cppHandle) { try { - Plugin::GetSystemCollectionsIList(cppHandle)->RemoveAt(index); + Plugin::GetSystemCollectionsIList(cppHandle)->Clear(); } catch (System::Exception ex) { @@ -6120,16 +6461,17 @@ namespace System } } - System::Collections::IEnumerator IList::GetEnumerator() + System::Boolean IList::Contains(System::Object& value) { - return nullptr; + return {}; } - DLLEXPORT int32_t SystemCollectionsIListGetEnumerator(int32_t cppHandle) + DLLEXPORT int32_t SystemCollectionsIListContains(int32_t cppHandle, int32_t valueHandle) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetEnumerator().Handle; + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->Contains(param0); } catch (System::Exception ex) { @@ -6145,162 +6487,158 @@ namespace System } } - void IList::CopyTo(System::Array& array, int32_t index) + int32_t IList::IndexOf(System::Object& value) { + return {}; } - DLLEXPORT void SystemCollectionsIListCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) + DLLEXPORT int32_t SystemCollectionsIListIndexOf(int32_t cppHandle, int32_t valueHandle) { try { - auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->CopyTo(param0, index); + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->IndexOf(param0); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); + return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - System::Boolean IList::GetIsFixedSize() + void IList::Insert(int32_t index, System::Object& value) { - return {}; } - DLLEXPORT int32_t SystemCollectionsIListGetIsFixedSize(int32_t cppHandle) + DLLEXPORT void SystemCollectionsIListInsert(int32_t cppHandle, int32_t index, int32_t valueHandle) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsFixedSize(); + auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->Insert(index, param1); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); - return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); - return {}; } } - System::Boolean IList::GetIsReadOnly() + void IList::Remove(System::Object& value) { - return {}; } - DLLEXPORT int32_t SystemCollectionsIListGetIsReadOnly(int32_t cppHandle) + DLLEXPORT void SystemCollectionsIListRemove(int32_t cppHandle, int32_t valueHandle) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsReadOnly(); + auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->Remove(param0); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); - return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); - return {}; } } - System::Object IList::GetItem(int32_t index) + void IList::RemoveAt(int32_t index) { - return nullptr; } - DLLEXPORT int32_t SystemCollectionsIListGetItem(int32_t cppHandle, int32_t index) + DLLEXPORT void SystemCollectionsIListRemoveAt(int32_t cppHandle, int32_t index) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetItem(index).Handle; + Plugin::GetSystemCollectionsIList(cppHandle)->RemoveAt(index); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); - return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); - return {}; } } - void IList::SetItem(int32_t index, System::Object& value) + System::Collections::IEnumerator IList::GetEnumerator() { + return nullptr; } - DLLEXPORT void SystemCollectionsIListSetItem(int32_t cppHandle, int32_t index, int32_t valueHandle) + DLLEXPORT int32_t SystemCollectionsIListGetEnumerator(int32_t cppHandle) { try { - auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->SetItem(index, param1); + return Plugin::GetSystemCollectionsIList(cppHandle)->GetEnumerator().Handle; } catch (System::Exception ex) { Plugin::SetException(ex.Handle); + return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - int32_t IList::GetCount() + void IList::CopyTo(System::Array& array, int32_t index) { - return {}; } - DLLEXPORT int32_t SystemCollectionsIListGetCount(int32_t cppHandle) + DLLEXPORT void SystemCollectionsIListCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetCount(); + auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->CopyTo(param0, index); } catch (System::Exception ex) { Plugin::SetException(ex.Handle); - return {}; } catch (...) { System::String msg = "Unhandled exception invoking System::Collections::IList"; System::Exception ex(msg); Plugin::SetException(ex.Handle); - return {}; } } - System::Boolean IList::GetIsSynchronized() + System::Boolean IList::GetIsFixedSize() { return {}; } - DLLEXPORT int32_t SystemCollectionsIListGetIsSynchronized(int32_t cppHandle) + DLLEXPORT int32_t SystemCollectionsIListGetIsFixedSize(int32_t cppHandle) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsSynchronized(); + return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsFixedSize(); } catch (System::Exception ex) { @@ -6316,16 +6654,16 @@ namespace System } } - System::Object IList::GetSyncRoot() + System::Boolean IList::GetIsReadOnly() { - return nullptr; + return {}; } - DLLEXPORT int32_t SystemCollectionsIListGetSyncRoot(int32_t cppHandle) + DLLEXPORT int32_t SystemCollectionsIListGetIsReadOnly(int32_t cppHandle) { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetSyncRoot().Handle; + return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsReadOnly(); } catch (System::Exception ex) { @@ -6340,15 +6678,138 @@ namespace System return {}; } } - } -} - -namespace System -{ - namespace Collections - { - Queue::Queue() - : System::Object(nullptr) + + System::Object IList::GetItem(int32_t index) + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsIListGetItem(int32_t cppHandle, int32_t index) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetItem(index).Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + void IList::SetItem(int32_t index, System::Object& value) + { + } + + DLLEXPORT void SystemCollectionsIListSetItem(int32_t cppHandle, int32_t index, int32_t valueHandle) + { + try + { + auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->SetItem(index, param1); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + } + } + + int32_t IList::GetCount() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListGetCount(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetCount(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Boolean IList::GetIsSynchronized() + { + return {}; + } + + DLLEXPORT int32_t SystemCollectionsIListGetIsSynchronized(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsSynchronized(); + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + System::Object IList::GetSyncRoot() + { + return nullptr; + } + + DLLEXPORT int32_t SystemCollectionsIListGetSyncRoot(int32_t cppHandle) + { + try + { + return Plugin::GetSystemCollectionsIList(cppHandle)->GetSyncRoot().Handle; + } + catch (System::Exception ex) + { + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } +} + +namespace System +{ + namespace Collections + { + Queue::Queue() + : System::Object(nullptr) { CppHandle = Plugin::StoreSystemCollectionsQueue(this); Plugin::SystemCollectionsQueueConstructor(CppHandle, &Handle); @@ -6526,141 +6987,1027 @@ namespace System namespace System { - Object::Object(System::Boolean val) - { - int32_t handle = Plugin::BoxBoolean(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::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::Object(int8_t val) - { - int32_t handle = Plugin::BoxSByte(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 int8_t() - { - int8_t returnVal(Plugin::UnboxSByte(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -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() - { - uint8_t returnVal(Plugin::UnboxByte(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -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() + namespace ComponentModel { - int16_t returnVal(Plugin::UnboxInt16(Handle)); - if (Plugin::unhandledCsharpException) + namespace Design { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + IComponentChangeService::IComponentChangeService() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor(CppHandle, &Handle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemComponentModelDesignIComponentChangeService(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + IComponentChangeService::IComponentChangeService(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + } + + IComponentChangeService::IComponentChangeService(const IComponentChangeService& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IComponentChangeService::IComponentChangeService(IComponentChangeService&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + IComponentChangeService::IComponentChangeService(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + IComponentChangeService::~IComponentChangeService() + { + Plugin::RemoveSystemComponentModelDesignIComponentChangeService(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemComponentModelDesignIComponentChangeService(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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) other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemComponentModelDesignIComponentChangeService(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + IComponentChangeService& IComponentChangeService::operator=(IComponentChangeService&& other) + { + Plugin::RemoveSystemComponentModelDesignIComponentChangeService(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemComponentModelDesignIComponentChangeService(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 IComponentChangeService::operator==(const IComponentChangeService& other) const + { + return Handle == other.Handle; + } + + bool IComponentChangeService::operator!=(const IComponentChangeService& other) const + { + return Handle != other.Handle; + } + + void IComponentChangeService::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 param0 = System::Object(Plugin::InternalUse::Only, componentHandle); + auto param1 = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); + auto param2 = System::Object(Plugin::InternalUse::Only, oldValueHandle); + auto param3 = System::Object(Plugin::InternalUse::Only, newValueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanged(param0, param1, param2, param3); + } + 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 IComponentChangeService::OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceOnComponentChanging(int32_t cppHandle, int32_t componentHandle, int32_t memberHandle) + { + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, componentHandle); + auto param1 = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanging(param0, param1); + } + 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 IComponentChangeService::AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdded(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdded(param0); + } + 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 IComponentChangeService::RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdded(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdded(param0); + } + 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 IComponentChangeService::AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentAdding(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdding(param0); + } + 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 IComponentChangeService::RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentAdding(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdding(param0); + } + 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 IComponentChangeService::AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanged(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanged(param0); + } + 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 IComponentChangeService::RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanged(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanged(param0); + } + 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 IComponentChangeService::AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentChanging(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanging(param0); + } + 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 IComponentChangeService::RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentChanging(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanging(param0); + } + 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 IComponentChangeService::AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoved(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoved(param0); + } + 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 IComponentChangeService::RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoved(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoved(param0); + } + 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 IComponentChangeService::AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRemoving(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoving(param0); + } + 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 IComponentChangeService::RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRemoving(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoving(param0); + } + 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 IComponentChangeService::AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceAddComponentRename(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRename(param0); + } + 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 IComponentChangeService::RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + { + } + + DLLEXPORT void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename(int32_t cppHandle, int32_t valueHandle) + { + try + { + auto param0 = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRename(param0); + } + 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 +{ + Object::Object(System::Boolean val) + { + int32_t handle = Plugin::BoxBoolean(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::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::Object(int8_t val) + { + int32_t handle = Plugin::BoxSByte(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 int8_t() + { + int8_t returnVal(Plugin::UnboxSByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint8_t returnVal(Plugin::UnboxByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int16_t returnVal(Plugin::UnboxInt16(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint16_t returnVal(Plugin::UnboxUInt16(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int32_t returnVal(Plugin::UnboxInt32(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint32_t returnVal(Plugin::UnboxUInt32(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int64_t returnVal(Plugin::UnboxInt64(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint64_t returnVal(Plugin::UnboxUInt64(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::Object(System::Char val) + { + int32_t handle = Plugin::BoxChar(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::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::Object(float val) + { + 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)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + double returnVal(Plugin::UnboxDouble(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } return returnVal; } } -namespace System +namespace MyGame +{ + namespace MonoBehaviours + { + TestScript::TestScript(decltype(nullptr) n) + : TestScript(Plugin::InternalUse::Only, 0) + { + } + + TestScript::TestScript(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::MonoBehaviour(iu, handle) + { + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } + } + + TestScript::TestScript(const TestScript& other) + : TestScript(Plugin::InternalUse::Only, other.Handle) + { + } + + TestScript::TestScript(TestScript&& other) + : TestScript(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + TestScript::~TestScript() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + } + + TestScript& TestScript::operator=(const TestScript& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + TestScript& TestScript::operator=(decltype(nullptr) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + TestScript& TestScript::operator=(TestScript&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool TestScript::operator==(const TestScript& other) const + { + return Handle == other.Handle; + } + + bool TestScript::operator!=(const TestScript& other) const + { + return Handle != other.Handle; + } + } +} + +namespace Plugin { - Object::Object(uint16_t val) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) { - int32_t handle = Plugin::BoxUInt16(val); + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(int32_t item) + { + Plugin::SystemInt32Array1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6668,16 +8015,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } } - Object::operator uint16_t() + ArrayElementProxy1_1::operator int32_t() { - uint16_t returnVal(Plugin::UnboxUInt16(Handle)); + auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6685,81 +8027,103 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; + return returnValue; } } namespace System { - Object::Object(int32_t val) + Array1::Array1(decltype(nullptr) n) + : Array1(Plugin::InternalUse::Only, 0) + { + this->InternalLength = 0; + } + + Array1::Array1(Plugin::InternalUse iu, int32_t handle) + : System::Array(iu, handle) { - 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; } + this->InternalLength = 0; } - Object::operator int32_t() + Array1::Array1(const Array1& other) + : Array1(Plugin::InternalUse::Only, other.Handle) { - int32_t returnVal(Plugin::UnboxInt32(Handle)); - if (Plugin::unhandledCsharpException) + 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) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return returnVal; } -} - -namespace System -{ - Object::Object(uint32_t val) + + Array1& Array1::operator=(const Array1& other) { - int32_t handle = Plugin::BoxUInt32(val); - 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); } + InternalLength = other.InternalLength; + return *this; } - Object::operator uint32_t() + Array1& Array1::operator=(decltype(nullptr) other) { - uint32_t returnVal(Plugin::UnboxUInt32(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; } -} - -namespace System -{ - Object::Object(int64_t val) + + Array1& Array1::operator=(Array1&& other) { - int32_t handle = Plugin::BoxInt64(val); + 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(int32_t length0) + : System::Array(nullptr) + { + auto returnValue = Plugin::SystemSystemInt32Array1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6767,32 +8131,47 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (handle) + Handle = returnValue; + if (returnValue) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; } } - Object::operator int64_t() + int32_t Array1::GetLength() { - int64_t returnVal(Plugin::UnboxInt64(Handle)); - if (Plugin::unhandledCsharpException) + int32_t returnVal = InternalLength; + if (returnVal == 0) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; return returnVal; } + + int32_t Array1::GetRank() + { + return 1; + } + + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + { + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + } } -namespace System +namespace Plugin { - Object::Object(uint64_t val) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) { - int32_t handle = Plugin::BoxUInt64(val); + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(float item) + { + Plugin::SystemSingleArray1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6800,16 +8179,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } } - Object::operator uint64_t() + ArrayElementProxy1_1::operator float() { - uint64_t returnVal(Plugin::UnboxUInt64(Handle)); + auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6817,48 +8191,36 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; + return returnValue; } } -namespace System +namespace Plugin { - Object::Object(System::Char val) + ArrayElementProxy1_2::ArrayElementProxy1_2(Plugin::InternalUse iu, int32_t handle, int32_t index0) { - int32_t handle = Plugin::BoxChar(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } + Handle = handle; + Index0 = index0; } - Object::operator System::Char() + Plugin::ArrayElementProxy2_2 Plugin::ArrayElementProxy1_2::operator[](int32_t index) { - System::Char returnVal(Plugin::UnboxChar(Handle)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; + return Plugin::ArrayElementProxy2_2(Plugin::InternalUse::Only, Handle, Index0, index); } } -namespace System +namespace Plugin { - Object::Object(float val) + ArrayElementProxy2_2::ArrayElementProxy2_2(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1) + { + Handle = handle; + Index0 = index0; + Index1 = index1; + } + + void ArrayElementProxy2_2::operator=(float item) { - int32_t handle = Plugin::BoxSingle(val); + Plugin::SystemSingleArray2SetItem2(Handle, Index0, Index1, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6866,16 +8228,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } } - Object::operator float() + ArrayElementProxy2_2::operator float() { - float returnVal(Plugin::UnboxSingle(Handle)); + auto returnValue = Plugin::SystemSingleArray2GetItem2(Handle, Index0, Index1); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6883,15 +8240,52 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; + return returnValue; } } -namespace System +namespace Plugin { - Object::Object(double val) + ArrayElementProxy1_3::ArrayElementProxy1_3(Plugin::InternalUse iu, int32_t handle, int32_t index0) { - int32_t handle = Plugin::BoxDouble(val); + 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 iu, 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 iu, int32_t handle, int32_t index0, int32_t index1, int32_t index2) + { + Handle = handle; + Index0 = index0; + Index1 = index1; + Index2 = index2; + } + + void ArrayElementProxy3_3::operator=(float item) + { + Plugin::SystemSingleArray3SetItem3(Handle, Index0, Index1, Index2, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6899,16 +8293,11 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (handle) - { - Plugin::ReferenceManagedClass(handle); - Handle = handle; - } } - Object::operator double() + ArrayElementProxy3_3::operator float() { - double returnVal(Plugin::UnboxDouble(Handle)); + auto returnValue = Plugin::SystemSingleArray3GetItem3(Handle, Index0, Index1, Index2); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6916,106 +8305,103 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - return returnVal; + return returnValue; } } -namespace MyGame +namespace System { - namespace MonoBehaviours + Array1::Array1(decltype(nullptr) n) + : Array1(Plugin::InternalUse::Only, 0) { - TestScript::TestScript(decltype(nullptr) n) - : TestScript(Plugin::InternalUse::Only, 0) - { - } - - TestScript::TestScript(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::MonoBehaviour(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - TestScript::TestScript(const TestScript& other) - : TestScript(Plugin::InternalUse::Only, other.Handle) - { - } - - TestScript::TestScript(TestScript&& other) - : TestScript(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - TestScript::~TestScript() + this->InternalLength = 0; + } + + Array1::Array1(Plugin::InternalUse iu, int32_t handle) + : System::Array(iu, handle) + { + if (handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + Plugin::ReferenceManagedClass(handle); } - - TestScript& TestScript::operator=(const TestScript& other) + 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) { - 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; } - - TestScript& TestScript::operator=(decltype(nullptr) other) + } + + Array1& Array1::operator=(const Array1& other) + { + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + Plugin::DereferenceManagedClass(this->Handle); } - - TestScript& TestScript::operator=(TestScript&& other) + this->Handle = other.Handle; + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + Plugin::ReferenceManagedClass(this->Handle); } - - bool TestScript::operator==(const TestScript& other) const + InternalLength = other.InternalLength; + return *this; + } + + Array1& Array1::operator=(decltype(nullptr) other) + { + if (Handle) { - return Handle == other.Handle; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - bool TestScript::operator!=(const TestScript& other) const + return *this; + } + + Array1& Array1::operator=(Array1&& other) + { + if (Handle) { - return Handle != other.Handle; + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + InternalLength = other.InternalLength; + other.Handle = 0; + other.InternalLength = 0; + return *this; } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + + bool Array1::operator==(const Array1& other) const { - Handle = handle; - Index0 = index0; + return Handle == other.Handle; } - void ArrayElementProxy1_1::operator=(int32_t item) + bool Array1::operator!=(const Array1& other) const { - Plugin::SystemInt32Array1SetItem1(Handle, Index0, item); + return Handle != other.Handle; + } + + Array1::Array1(int32_t length0) + : System::Array(nullptr) + { + auto returnValue = Plugin::SystemSystemSingleArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7023,31 +8409,47 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0; + } } - ArrayElementProxy1_1::operator int32_t() + int32_t Array1::GetLength() { - auto returnValue = Plugin::SystemInt32Array1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) + int32_t returnVal = InternalLength; + if (returnVal == 0) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; + } + + int32_t Array1::GetRank() + { + return 1; + } + + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + { + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); } } namespace System { - Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + Array2::Array2(decltype(nullptr) n) + : Array2(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array2::Array2(Plugin::InternalUse iu, int32_t handle) : System::Array(iu, handle) { if (handle) @@ -7055,23 +8457,31 @@ namespace System Plugin::ReferenceManagedClass(handle); } this->InternalLength = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; } - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Array2::Array2(const Array2& other) + : Array2(Plugin::InternalUse::Only, other.Handle) { InternalLength = other.InternalLength; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; } - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + 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; } - Array1::~Array1() + Array2::~Array2() { if (Handle) { @@ -7080,7 +8490,7 @@ namespace System } } - Array1& Array1::operator=(const Array1& other) + Array2& Array2::operator=(const Array2& other) { if (this->Handle) { @@ -7092,10 +8502,12 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; + InternalLengths[0] = other.InternalLengths[0]; + InternalLengths[1] = other.InternalLengths[1]; return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array2& Array2::operator=(decltype(nullptr) other) { if (Handle) { @@ -7105,7 +8517,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Array2& Array2::operator=(Array2&& other) { if (Handle) { @@ -7113,25 +8525,29 @@ namespace System } 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 Array1::operator==(const Array1& other) const + bool Array2::operator==(const Array2& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Array2::operator!=(const Array2& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) + Array2::Array2(int32_t length0, int32_t length1) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSystemInt32Array1Constructor1(length0); + auto returnValue = Plugin::SystemSystemSingleArray2Constructor2(length0, length1); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7143,11 +8559,13 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; + InternalLength = length0 * length1; + InternalLengths[0] = length0; + InternalLengths[1] = length1; } } - int32_t Array1::GetLength() + int32_t Array2::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -7158,77 +8576,154 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + int32_t Array2::GetLength(int32_t dimension) { - return 1; + 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; } - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + int32_t Array2::GetRank() { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + return 2; + } + + Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) + { + return Plugin::ArrayElementProxy1_2(Plugin::InternalUse::Only, Handle, index); } } -namespace Plugin +namespace System { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + Array3::Array3(decltype(nullptr) n) + : Array3(Plugin::InternalUse::Only, 0) { - Handle = handle; - Index0 = index0; + this->InternalLength = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; + this->InternalLengths[2] = 0; } - void ArrayElementProxy1_1::operator=(float item) + Array3::Array3(Plugin::InternalUse iu, int32_t handle) + : System::Array(iu, handle) { - Plugin::SystemSingleArray1SetItem1(Handle, Index0, item); - if (Plugin::unhandledCsharpException) + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(handle); } + this->InternalLength = 0; + this->InternalLengths[0] = 0; + this->InternalLengths[1] = 0; + this->InternalLengths[2] = 0; } - ArrayElementProxy1_1::operator float() + Array3::Array3(const Array3& other) + : Array3(Plugin::InternalUse::Only, other.Handle) { - auto returnValue = Plugin::SystemSingleArray1GetItem1(Handle, Index0); - if (Plugin::unhandledCsharpException) + 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) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return returnValue; } -} - -namespace Plugin -{ - ArrayElementProxy1_2::ArrayElementProxy1_2(Plugin::InternalUse iu, int32_t handle, int32_t index0) + + Array3& Array3::operator=(const Array3& other) { - Handle = handle; - Index0 = index0; + 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; } - Plugin::ArrayElementProxy2_2 Plugin::ArrayElementProxy1_2::operator[](int32_t index) + Array3& Array3::operator=(decltype(nullptr) other) { - return Plugin::ArrayElementProxy2_2(Plugin::InternalUse::Only, Handle, Index0, index); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } -} - -namespace Plugin -{ - ArrayElementProxy2_2::ArrayElementProxy2_2(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1) + + Array3& Array3::operator=(Array3&& other) { - Handle = handle; - Index0 = index0; - Index1 = index1; + 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; } - void ArrayElementProxy2_2::operator=(float item) + bool Array3::operator==(const Array3& other) const { - Plugin::SystemSingleArray2SetItem2(Handle, Index0, Index1, item); + return Handle == other.Handle; + } + + bool Array3::operator!=(const Array3& other) const + { + return Handle != other.Handle; + } + + Array3::Array3(int32_t length0, int32_t length1, int32_t length2) + : System::Array(nullptr) + { + auto returnValue = Plugin::SystemSystemSingleArray3Constructor3(length0, length1, length2); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7236,64 +8731,70 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + InternalLength = length0 * length1 * length2; + InternalLengths[0] = length0; + InternalLengths[1] = length1; + InternalLengths[2] = length2; + } } - ArrayElementProxy2_2::operator float() + int32_t Array3::GetLength() { - auto returnValue = Plugin::SystemSingleArray2GetItem2(Handle, Index0, Index1); - if (Plugin::unhandledCsharpException) + int32_t returnVal = InternalLength; + if (returnVal == 0) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; + returnVal = Array::GetLength(); + InternalLength = returnVal; + }; + return returnVal; } -} - -namespace Plugin -{ - ArrayElementProxy1_3::ArrayElementProxy1_3(Plugin::InternalUse iu, int32_t handle, int32_t index0) + + int32_t Array3::GetLength(int32_t dimension) { - Handle = handle; - Index0 = index0; + 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; } - 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 iu, int32_t handle, int32_t index0, int32_t index1) + int32_t Array3::GetRank() { - Handle = handle; - Index0 = index0; - Index1 = index1; + return 3; } - Plugin::ArrayElementProxy3_3 Plugin::ArrayElementProxy2_3::operator[](int32_t index) + Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) { - return Plugin::ArrayElementProxy3_3(Plugin::InternalUse::Only, Handle, Index0, Index1, index); + return Plugin::ArrayElementProxy1_3(Plugin::InternalUse::Only, Handle, index); } } namespace Plugin { - ArrayElementProxy3_3::ArrayElementProxy3_3(Plugin::InternalUse iu, int32_t handle, int32_t index0, int32_t index1, int32_t index2) + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; - Index1 = index1; - Index2 = index2; } - void ArrayElementProxy3_3::operator=(float item) + void ArrayElementProxy1_1::operator=(System::String item) { - Plugin::SystemSingleArray3SetItem3(Handle, Index0, Index1, Index2, item); + Plugin::SystemStringArray1SetItem1(Handle, Index0, item.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7303,9 +8804,9 @@ namespace Plugin } } - ArrayElementProxy3_3::operator float() + ArrayElementProxy1_1::operator System::String() { - auto returnValue = Plugin::SystemSingleArray3GetItem3(Handle, Index0, Index1, Index2); + auto returnValue = Plugin::SystemStringArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7313,19 +8814,19 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } - return returnValue; + return System::String(Plugin::InternalUse::Only, returnValue); } } namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse iu, int32_t handle) : System::Array(iu, handle) { if (handle) @@ -7335,13 +8836,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; @@ -7349,7 +8850,7 @@ namespace System other.InternalLength = 0; } - Array1::~Array1() + Array1::~Array1() { if (Handle) { @@ -7358,7 +8859,7 @@ namespace System } } - Array1& Array1::operator=(const Array1& other) + Array1& Array1::operator=(const Array1& other) { if (this->Handle) { @@ -7373,7 +8874,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -7383,7 +8884,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -7396,20 +8897,20 @@ 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(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSystemSingleArray1Constructor1(length0); + auto returnValue = Plugin::SystemSystemStringArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7425,7 +8926,7 @@ namespace System } } - int32_t Array1::GetLength() + int32_t Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -7436,28 +8937,60 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + int32_t 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 +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + { + Handle = handle; + Index0 = index0; + } + + void ArrayElementProxy1_1::operator=(UnityEngine::Resolution item) + { + Plugin::UnityEngineResolutionArray1SetItem1(Handle, Index0, item); + 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 returnValue; } } namespace System { - Array2::Array2(decltype(nullptr) n) - : Array2(Plugin::InternalUse::Only, 0) + Array1::Array1(decltype(nullptr) n) + : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalLengths[0] = 0; - this->InternalLengths[1] = 0; } - Array2::Array2(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse iu, int32_t handle) : System::Array(iu, handle) { if (handle) @@ -7465,31 +8998,23 @@ namespace System 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) + Array1::Array1(const Array1& other) + : Array1(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) + Array1::Array1(Array1&& other) + : Array1(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() + Array1::~Array1() { if (Handle) { @@ -7498,7 +9023,7 @@ namespace System } } - Array2& Array2::operator=(const Array2& other) + Array1& Array1::operator=(const Array1& other) { if (this->Handle) { @@ -7510,12 +9035,10 @@ namespace System Plugin::ReferenceManagedClass(this->Handle); } InternalLength = other.InternalLength; - InternalLengths[0] = other.InternalLengths[0]; - InternalLengths[1] = other.InternalLengths[1]; return *this; } - Array2& Array2::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -7525,7 +9048,7 @@ namespace System return *this; } - Array2& Array2::operator=(Array2&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -7533,29 +9056,25 @@ namespace System } 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 + bool Array1::operator==(const Array1& other) const { return Handle == other.Handle; } - bool Array2::operator!=(const Array2& other) const + bool Array1::operator!=(const Array1& other) const { return Handle != other.Handle; } - Array2::Array2(int32_t length0, int32_t length1) + Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSystemSingleArray2Constructor2(length0, length1); + auto returnValue = Plugin::UnityEngineUnityEngineResolutionArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7567,13 +9086,11 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0 * length1; - InternalLengths[0] = length0; - InternalLengths[1] = length1; + InternalLength = length0; } } - int32_t Array2::GetLength() + int32_t Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -7584,15 +9101,28 @@ namespace System return returnVal; } - int32_t Array2::GetLength(int32_t dimension) + int32_t Array1::GetRank() { - assert(dimension >= 0 && dimension < 2); - int32_t length = InternalLengths[dimension]; - if (length) - { - return length; - } - auto returnValue = Plugin::SystemSystemSingleArray2GetLength2(Handle, dimension); + return 1; + } + + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + { + return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + } +} + +namespace Plugin +{ + ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, 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; @@ -7600,33 +9130,31 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - InternalLengths[dimension] = returnValue; - return returnValue; - } - - int32_t Array2::GetRank() - { - return 2; } - Plugin::ArrayElementProxy1_2 System::Array2::operator[](int32_t index) + ArrayElementProxy1_1::operator UnityEngine::RaycastHit() { - return Plugin::ArrayElementProxy1_2(Plugin::InternalUse::Only, Handle, index); + 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 { - Array3::Array3(decltype(nullptr) n) - : Array3(Plugin::InternalUse::Only, 0) + Array1::Array1(decltype(nullptr) n) + : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; - this->InternalLengths[0] = 0; - this->InternalLengths[1] = 0; - this->InternalLengths[2] = 0; } - Array3::Array3(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse iu, int32_t handle) : System::Array(iu, handle) { if (handle) @@ -7634,35 +9162,23 @@ namespace System 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) + Array1::Array1(const Array1& other) + : Array1(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) + Array1::Array1(Array1&& other) + : Array1(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() + Array1::~Array1() { if (Handle) { @@ -7671,7 +9187,7 @@ namespace System } } - Array3& Array3::operator=(const Array3& other) + Array1& Array1::operator=(const Array1& other) { if (this->Handle) { @@ -7683,13 +9199,10 @@ namespace System 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) other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -7699,7 +9212,7 @@ namespace System return *this; } - Array3& Array3::operator=(Array3&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -7707,31 +9220,25 @@ namespace System } 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 + bool Array1::operator==(const Array1& other) const { return Handle == other.Handle; } - bool Array3::operator!=(const Array3& other) const + bool Array1::operator!=(const Array1& other) const { return Handle != other.Handle; } - Array3::Array3(int32_t length0, int32_t length1, int32_t length2) + Array1::Array1(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSystemSingleArray3Constructor3(length0, length1, length2); + auto returnValue = Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7743,14 +9250,11 @@ namespace System if (returnValue) { Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0 * length1 * length2; - InternalLengths[0] = length0; - InternalLengths[1] = length1; - InternalLengths[2] = length2; + InternalLength = length0; } } - int32_t Array3::GetLength() + int32_t Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -7761,48 +9265,28 @@ namespace System return returnVal; } - int32_t Array3::GetLength(int32_t 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; - } - - int32_t Array3::GetRank() + int32_t Array1::GetRank() { - return 3; + return 1; } - Plugin::ArrayElementProxy1_3 System::Array3::operator[](int32_t index) + Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) { - return Plugin::ArrayElementProxy1_3(Plugin::InternalUse::Only, Handle, index); + return Plugin::ArrayElementProxy1_1(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 iu, int32_t handle, int32_t index0) { Handle = handle; Index0 = index0; } - void ArrayElementProxy1_1::operator=(System::String item) + void ArrayElementProxy1_1::operator=(UnityEngine::GradientColorKey item) { - Plugin::SystemStringArray1SetItem1(Handle, Index0, item.Handle); + Plugin::UnityEngineGradientColorKeyArray1SetItem1(Handle, Index0, item); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7812,9 +9296,9 @@ namespace Plugin } } - ArrayElementProxy1_1::operator System::String() + ArrayElementProxy1_1::operator UnityEngine::GradientColorKey() { - auto returnValue = Plugin::SystemStringArray1GetItem1(Handle, Index0); + auto returnValue = Plugin::UnityEngineGradientColorKeyArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7822,19 +9306,19 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } - return System::String(Plugin::InternalUse::Only, returnValue); + return returnValue; } } namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr) n) : Array1(Plugin::InternalUse::Only, 0) { this->InternalLength = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) + Array1::Array1(Plugin::InternalUse iu, int32_t handle) : System::Array(iu, handle) { if (handle) @@ -7844,13 +9328,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; @@ -7858,7 +9342,7 @@ namespace System other.InternalLength = 0; } - Array1::~Array1() + Array1::~Array1() { if (Handle) { @@ -7867,7 +9351,7 @@ namespace System } } - Array1& Array1::operator=(const Array1& other) + Array1& Array1::operator=(const Array1& other) { if (this->Handle) { @@ -7882,7 +9366,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr) other) { if (Handle) { @@ -7892,7 +9376,7 @@ namespace System return *this; } - Array1& Array1::operator=(Array1&& other) + Array1& Array1::operator=(Array1&& other) { if (Handle) { @@ -7905,20 +9389,20 @@ 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(int32_t length0) : System::Array(nullptr) { - auto returnValue = Plugin::SystemSystemStringArray1Constructor1(length0); + auto returnValue = Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1(length0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7934,7 +9418,7 @@ namespace System } } - int32_t Array1::GetLength() + int32_t Array1::GetLength() { int32_t returnVal = InternalLength; if (returnVal == 0) @@ -7945,40 +9429,34 @@ namespace System return returnVal; } - int32_t Array1::GetRank() + int32_t 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 +namespace System { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(UnityEngine::Resolution item) + Action::Action() + : System::Object(nullptr) { - Plugin::UnityEngineResolutionArray1SetItem1(Handle, Index0, item); - if (Plugin::unhandledCsharpException) + CppHandle = Plugin::StoreSystemAction(this); + Plugin::SystemActionConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemAction(CppHandle); + ClassHandle = 0; + CppHandle = 0; } - } - - ArrayElementProxy1_1::operator UnityEngine::Resolution() - { - auto returnValue = Plugin::UnityEngineResolutionArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7986,52 +9464,72 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } - return returnValue; } -} - -namespace System -{ - Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + + Action::Action(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - this->InternalLength = 0; + CppHandle = Plugin::StoreSystemAction(this); + ClassHandle = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, handle) + Action::Action(const Action& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - if (handle) + CppHandle = Plugin::StoreSystemAction(this); + if (Handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedClass(Handle); } - this->InternalLength = 0; + ClassHandle = other.ClassHandle; } - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Action::Action(Action&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - InternalLength = other.InternalLength; + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Action::Action(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; + CppHandle = Plugin::StoreSystemAction(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; } - Array1::~Array1() + Action::~Action() { + Plugin::RemoveSystemAction(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; + } + } } } - Array1& Array1::operator=(const Array1& other) + Action& Action::operator=(const Action& other) { if (this->Handle) { @@ -8042,95 +9540,123 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } - InternalLength = other.InternalLength; + ClassHandle = other.ClassHandle; return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Action& Action::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedClass(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; } - Array1& Array1::operator=(Array1&& other) + Action& Action::operator=(Action&& other) { + Plugin::RemoveSystemAction(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; - InternalLength = other.InternalLength; other.Handle = 0; - other.InternalLength = 0; return *this; } - bool Array1::operator==(const Array1& other) const + bool Action::operator==(const Action& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Action::operator!=(const Action& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) - : System::Array(nullptr) + void Action::operator+=(System::Action& del) { - auto returnValue = Plugin::UnityEngineUnityEngineResolutionArray1Constructor1(length0); + Plugin::SystemActionAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; - } - } - - int32_t Array1::GetLength() - { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; + ex->ThrowReferenceToThis(); + delete ex; + } } - int32_t Array1::GetRank() + void Action::operator-=(System::Action& del) { - return 1; + Plugin::SystemActionRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + void Action::operator()() { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); } -} - -namespace Plugin -{ - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) + + DLLEXPORT void SystemActionNativeInvoke(int32_t cppHandle) { - Handle = handle; - Index0 = index0; + 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 ArrayElementProxy1_1::operator=(UnityEngine::RaycastHit item) + void Action::Invoke() { - Plugin::UnityEngineRaycastHitArray1SetItem1(Handle, Index0, item.Handle); + Plugin::SystemActionInvoke(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8139,10 +9665,25 @@ namespace Plugin delete ex; } } - - ArrayElementProxy1_1::operator UnityEngine::RaycastHit() +} + +namespace System +{ + Action1::Action1() + : System::Object(nullptr) { - auto returnValue = Plugin::UnityEngineRaycastHitArray1GetItem1(Handle, Index0); + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + Plugin::SystemActionSystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemActionSystemSingle(CppHandle); + ClassHandle = 0; + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8150,52 +9691,72 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::RaycastHit(Plugin::InternalUse::Only, returnValue); } -} - -namespace System -{ - Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + + Action1::Action1(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - this->InternalLength = 0; + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + ClassHandle = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, handle) + Action1::Action1(const Action1& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - if (handle) + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + if (Handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedClass(Handle); } - this->InternalLength = 0; + ClassHandle = other.ClassHandle; } - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Action1::Action1(Action1&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - InternalLength = other.InternalLength; + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Action1::Action1(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; + CppHandle = Plugin::StoreSystemActionSystemSingle(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; } - Array1::~Array1() + Action1::~Action1() { + Plugin::RemoveSystemActionSystemSingle(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; + } + } } } - Array1& Array1::operator=(const Array1& other) + Action1& Action1::operator=(const Action1& other) { if (this->Handle) { @@ -8206,47 +9767,77 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } - InternalLength = other.InternalLength; + ClassHandle = other.ClassHandle; return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Action1& Action1::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedClass(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; } - Array1& Array1::operator=(Array1&& other) + Action1& Action1::operator=(Action1&& other) { + Plugin::RemoveSystemActionSystemSingle(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; - InternalLength = other.InternalLength; other.Handle = 0; - other.InternalLength = 0; return *this; } - bool Array1::operator==(const Array1& other) const + bool Action1::operator==(const Action1& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Action1::operator!=(const Action1& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) - : System::Array(nullptr) + void Action1::operator+=(System::Action1& del) { - auto returnValue = Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1(length0); + Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8254,59 +9845,72 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - Handle = returnValue; - if (returnValue) + } + + void Action1::operator-=(System::Action1& del) + { + Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } - int32_t Array1::GetLength() + void Action1::operator()(float obj) { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; } - int32_t Array1::GetRank() + DLLEXPORT void SystemActionSystemSingleNativeInvoke(int32_t cppHandle, float obj) { - return 1; + 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); + } } - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + void Action1::Invoke(float obj) { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + Plugin::SystemActionSystemSingleInvoke(Handle, obj); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } -namespace Plugin +namespace System { - ArrayElementProxy1_1::ArrayElementProxy1_1(Plugin::InternalUse iu, int32_t handle, int32_t index0) - { - Handle = handle; - Index0 = index0; - } - - void ArrayElementProxy1_1::operator=(UnityEngine::GradientColorKey item) + Action2::Action2() + : System::Object(nullptr) { - Plugin::UnityEngineGradientColorKeyArray1SetItem1(Handle, Index0, item); - if (Plugin::unhandledCsharpException) + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + Plugin::SystemActionSystemSingle_SystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + ClassHandle = 0; + CppHandle = 0; } - } - - ArrayElementProxy1_1::operator UnityEngine::GradientColorKey() - { - auto returnValue = Plugin::UnityEngineGradientColorKeyArray1GetItem1(Handle, Index0); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8314,52 +9918,72 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } - return returnValue; } -} - -namespace System -{ - Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + + Action2::Action2(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - this->InternalLength = 0; + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + ClassHandle = 0; } - Array1::Array1(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, handle) + Action2::Action2(const Action2& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - if (handle) + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + if (Handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedClass(Handle); } - this->InternalLength = 0; + ClassHandle = other.ClassHandle; } - Array1::Array1(const Array1& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Action2::Action2(Action2&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - InternalLength = other.InternalLength; + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - Array1::Array1(Array1&& other) - : Array1(Plugin::InternalUse::Only, other.Handle) + Action2::Action2(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - other.Handle = 0; - InternalLength = other.InternalLength; - other.InternalLength = 0; + CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; } - Array1::~Array1() + Action2::~Action2() { + Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; + } + } } } - Array1& Array1::operator=(const Array1& other) + Action2& Action2::operator=(const Action2& other) { if (this->Handle) { @@ -8370,47 +9994,77 @@ namespace System { Plugin::ReferenceManagedClass(this->Handle); } - InternalLength = other.InternalLength; + ClassHandle = other.ClassHandle; return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Action2& Action2::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedClass(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; } - Array1& Array1::operator=(Array1&& other) + Action2& Action2::operator=(Action2&& other) { + Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + CppHandle = 0; if (Handle) { - Plugin::DereferenceManagedClass(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; - InternalLength = other.InternalLength; other.Handle = 0; - other.InternalLength = 0; return *this; } - bool Array1::operator==(const Array1& other) const + bool Action2::operator==(const Action2& other) const { return Handle == other.Handle; } - bool Array1::operator!=(const Array1& other) const + bool Action2::operator!=(const Action2& other) const { return Handle != other.Handle; } - Array1::Array1(int32_t length0) - : System::Array(nullptr) + void Action2::operator+=(System::Action2& del) { - auto returnValue = Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1(length0); + Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8418,50 +10072,69 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - Handle = returnValue; - if (returnValue) + } + + void Action2::operator-=(System::Action2& del) + { + Plugin::SystemActionSystemSingle_SystemSingleRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(returnValue); - InternalLength = length0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } - int32_t Array1::GetLength() + void Action2::operator()(float arg1, float arg2) { - int32_t returnVal = InternalLength; - if (returnVal == 0) - { - returnVal = Array::GetLength(); - InternalLength = returnVal; - }; - return returnVal; } - int32_t Array1::GetRank() + DLLEXPORT void SystemActionSystemSingle_SystemSingleNativeInvoke(int32_t cppHandle, float arg1, float arg2) { - return 1; + 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); + } } - Plugin::ArrayElementProxy1_1 System::Array1::operator[](int32_t index) + void Action2::Invoke(float arg1, float arg2) { - return Plugin::ArrayElementProxy1_1(Plugin::InternalUse::Only, Handle, index); + Plugin::SystemActionSystemSingle_SystemSingleInvoke(Handle, arg1, arg2); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } namespace System { - Action::Action() + Func3::Func3() : System::Object(nullptr) { - CppHandle = Plugin::StoreSystemAction(this); - Plugin::SystemActionConstructor(CppHandle, &Handle, &ClassHandle); + CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(CppHandle, &Handle, &ClassHandle); if (Handle) { Plugin::ReferenceManagedClass(Handle); } else { - Plugin::RemoveSystemAction(CppHandle); + Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); ClassHandle = 0; CppHandle = 0; } @@ -8474,17 +10147,17 @@ namespace System } } - Action::Action(decltype(nullptr) n) + Func3::Func3(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemAction(this); + CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); ClassHandle = 0; } - Action::Action(const Action& other) + Func3::Func3(const Func3& other) : System::Object(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemAction(this); + CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -8492,7 +10165,7 @@ namespace System ClassHandle = other.ClassHandle; } - Action::Action(Action&& other) + Func3::Func3(Func3&& other) : System::Object(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; @@ -8502,10 +10175,10 @@ namespace System other.ClassHandle = 0; } - Action::Action(Plugin::InternalUse iu, int32_t handle) + Func3::Func3(Plugin::InternalUse iu, int32_t handle) : System::Object(iu, handle) { - CppHandle = Plugin::StoreSystemAction(this); + CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -8513,9 +10186,9 @@ namespace System ClassHandle = 0; } - Action::~Action() + Func3::~Func3() { - Plugin::RemoveSystemAction(CppHandle); + Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); CppHandle = 0; if (Handle) { @@ -8525,7 +10198,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemAction(handle, classHandle); + Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8537,7 +10210,7 @@ namespace System } } - Action& Action::operator=(const Action& other) + Func3& Func3::operator=(const Func3& other) { if (this->Handle) { @@ -8552,7 +10225,7 @@ namespace System return *this; } - Action& Action::operator=(decltype(nullptr) other) + Func3& Func3::operator=(decltype(nullptr) other) { if (Handle) { @@ -8562,7 +10235,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemAction(handle, classHandle); + Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8577,9 +10250,9 @@ namespace System return *this; } - Action& Action::operator=(Action&& other) + Func3& Func3::operator=(Func3&& other) { - Plugin::RemoveSystemAction(CppHandle); + Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); CppHandle = 0; if (Handle) { @@ -8589,7 +10262,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemAction(handle, classHandle); + Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8606,19 +10279,19 @@ namespace System return *this; } - bool Action::operator==(const Action& other) const + bool Func3::operator==(const Func3& other) const { return Handle == other.Handle; } - bool Action::operator!=(const Action& other) const + bool Func3::operator!=(const Func3& other) const { return Handle != other.Handle; } - void Action::operator+=(System::Action& del) + void Func3::operator+=(System::Func3& del) { - Plugin::SystemActionAdd(Handle, del.Handle); + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8628,9 +10301,9 @@ namespace System } } - void Action::operator-=(System::Action& del) + void Func3::operator-=(System::Func3& del) { - Plugin::SystemActionRemove(Handle, del.Handle); + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8640,31 +10313,34 @@ namespace System } } - void Action::operator()() + double Func3::operator()(int32_t arg1, float arg2) { + return {}; } - DLLEXPORT void SystemActionNativeInvoke(int32_t cppHandle) + DLLEXPORT double SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(int32_t cppHandle, int32_t arg1, float arg2) { try { - Plugin::GetSystemAction(cppHandle)->operator()(); + 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::Action"; + System::String msg = "Unhandled exception invoking System::Func3"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - void Action::Invoke() + double Func3::Invoke(int32_t arg1, float arg2) { - Plugin::SystemActionInvoke(Handle); + auto returnValue = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(Handle, arg1, arg2); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8672,23 +10348,24 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return returnValue; } } namespace System { - Action1::Action1() + Func3::Func3() : System::Object(nullptr) { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); - Plugin::SystemActionSystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(CppHandle, &Handle, &ClassHandle); if (Handle) { Plugin::ReferenceManagedClass(Handle); } else { - Plugin::RemoveSystemActionSystemSingle(CppHandle); + Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); ClassHandle = 0; CppHandle = 0; } @@ -8701,17 +10378,17 @@ namespace System } } - Action1::Action1(decltype(nullptr) n) + Func3::Func3(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); ClassHandle = 0; } - Action1::Action1(const Action1& other) + Func3::Func3(const Func3& other) : System::Object(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -8719,7 +10396,7 @@ namespace System ClassHandle = other.ClassHandle; } - Action1::Action1(Action1&& other) + Func3::Func3(Func3&& other) : System::Object(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; @@ -8729,10 +10406,10 @@ namespace System other.ClassHandle = 0; } - Action1::Action1(Plugin::InternalUse iu, int32_t handle) + Func3::Func3(Plugin::InternalUse iu, int32_t handle) : System::Object(iu, handle) { - CppHandle = Plugin::StoreSystemActionSystemSingle(this); + CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -8740,9 +10417,9 @@ namespace System ClassHandle = 0; } - Action1::~Action1() + Func3::~Func3() { - Plugin::RemoveSystemActionSystemSingle(CppHandle); + Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); CppHandle = 0; if (Handle) { @@ -8752,7 +10429,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemActionSystemSingle(handle, classHandle); + Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8764,7 +10441,7 @@ namespace System } } - Action1& Action1::operator=(const Action1& other) + Func3& Func3::operator=(const Func3& other) { if (this->Handle) { @@ -8779,7 +10456,7 @@ namespace System return *this; } - Action1& Action1::operator=(decltype(nullptr) other) + Func3& Func3::operator=(decltype(nullptr) other) { if (Handle) { @@ -8789,7 +10466,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemActionSystemSingle(handle, classHandle); + Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8804,9 +10481,9 @@ namespace System return *this; } - Action1& Action1::operator=(Action1&& other) + Func3& Func3::operator=(Func3&& other) { - Plugin::RemoveSystemActionSystemSingle(CppHandle); + Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); CppHandle = 0; if (Handle) { @@ -8816,7 +10493,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemActionSystemSingle(handle, classHandle); + Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8833,19 +10510,19 @@ namespace System return *this; } - bool Action1::operator==(const Action1& other) const + bool Func3::operator==(const Func3& other) const { return Handle == other.Handle; } - bool Action1::operator!=(const Action1& other) const + bool Func3::operator!=(const Func3& other) const { return Handle != other.Handle; } - void Action1::operator+=(System::Action1& del) + void Func3::operator+=(System::Func3& del) { - Plugin::SystemActionSystemSingleAdd(Handle, del.Handle); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8855,9 +10532,9 @@ namespace System } } - void Action1::operator-=(System::Action1& del) + void Func3::operator-=(System::Func3& del) { - Plugin::SystemActionSystemSingleRemove(Handle, del.Handle); + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8867,31 +10544,34 @@ namespace System } } - void Action1::operator()(float obj) + System::String Func3::operator()(int16_t arg1, int32_t arg2) { + return nullptr; } - DLLEXPORT void SystemActionSystemSingleNativeInvoke(int32_t cppHandle, float obj) + DLLEXPORT int32_t SystemFuncSystemInt16_SystemInt32_SystemStringNativeInvoke(int32_t cppHandle, int16_t arg1, int32_t arg2) { try { - Plugin::GetSystemActionSystemSingle(cppHandle)->operator()(obj); + 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::Action1"; + System::String msg = "Unhandled exception invoking System::Func3"; System::Exception ex(msg); Plugin::SetException(ex.Handle); + return {}; } } - void Action1::Invoke(float obj) + System::String Func3::Invoke(int16_t arg1, int32_t arg2) { - Plugin::SystemActionSystemSingleInvoke(Handle, obj); + auto returnValue = Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringInvoke(Handle, arg1, arg2); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8899,23 +10579,24 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return System::String(Plugin::InternalUse::Only, returnValue); } } namespace System { - Action2::Action2() + AppDomainInitializer::AppDomainInitializer() : System::Object(nullptr) { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - Plugin::SystemActionSystemSingle_SystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); + Plugin::SystemAppDomainInitializerConstructor(CppHandle, &Handle, &ClassHandle); if (Handle) { Plugin::ReferenceManagedClass(Handle); } else { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + Plugin::RemoveSystemAppDomainInitializer(CppHandle); ClassHandle = 0; CppHandle = 0; } @@ -8928,17 +10609,17 @@ namespace System } } - Action2::Action2(decltype(nullptr) n) + AppDomainInitializer::AppDomainInitializer(decltype(nullptr) n) : System::Object(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); ClassHandle = 0; } - Action2::Action2(const Action2& other) + AppDomainInitializer::AppDomainInitializer(const AppDomainInitializer& other) : System::Object(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -8946,7 +10627,7 @@ namespace System ClassHandle = other.ClassHandle; } - Action2::Action2(Action2&& other) + AppDomainInitializer::AppDomainInitializer(AppDomainInitializer&& other) : System::Object(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; @@ -8956,10 +10637,10 @@ namespace System other.ClassHandle = 0; } - Action2::Action2(Plugin::InternalUse iu, int32_t handle) + AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse iu, int32_t handle) : System::Object(iu, handle) { - CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); + CppHandle = Plugin::StoreSystemAppDomainInitializer(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -8967,9 +10648,9 @@ namespace System ClassHandle = 0; } - Action2::~Action2() + AppDomainInitializer::~AppDomainInitializer() { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + Plugin::RemoveSystemAppDomainInitializer(CppHandle); CppHandle = 0; if (Handle) { @@ -8979,7 +10660,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(handle, classHandle); + Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8991,7 +10672,7 @@ namespace System } } - Action2& Action2::operator=(const Action2& other) + AppDomainInitializer& AppDomainInitializer::operator=(const AppDomainInitializer& other) { if (this->Handle) { @@ -9006,7 +10687,7 @@ namespace System return *this; } - Action2& Action2::operator=(decltype(nullptr) other) + AppDomainInitializer& AppDomainInitializer::operator=(decltype(nullptr) other) { if (Handle) { @@ -9016,7 +10697,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(handle, classHandle); + Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9031,9 +10712,9 @@ namespace System return *this; } - Action2& Action2::operator=(Action2&& other) + AppDomainInitializer& AppDomainInitializer::operator=(AppDomainInitializer&& other) { - Plugin::RemoveSystemActionSystemSingle_SystemSingle(CppHandle); + Plugin::RemoveSystemAppDomainInitializer(CppHandle); CppHandle = 0; if (Handle) { @@ -9043,7 +10724,7 @@ namespace System ClassHandle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemActionSystemSingle_SystemSingle(handle, classHandle); + Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9060,19 +10741,19 @@ namespace System return *this; } - bool Action2::operator==(const Action2& other) const + bool AppDomainInitializer::operator==(const AppDomainInitializer& other) const { return Handle == other.Handle; } - bool Action2::operator!=(const Action2& other) const + bool AppDomainInitializer::operator!=(const AppDomainInitializer& other) const { return Handle != other.Handle; } - void Action2::operator+=(System::Action2& del) + void AppDomainInitializer::operator+=(System::AppDomainInitializer& del) { - Plugin::SystemActionSystemSingle_SystemSingleAdd(Handle, del.Handle); + Plugin::SystemAppDomainInitializerAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9082,9 +10763,9 @@ namespace System } } - void Action2::operator-=(System::Action2& del) + void AppDomainInitializer::operator-=(System::AppDomainInitializer& del) { - Plugin::SystemActionSystemSingle_SystemSingleRemove(Handle, del.Handle); + Plugin::SystemAppDomainInitializerRemove(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9094,15 +10775,16 @@ namespace System } } - void Action2::operator()(float arg1, float arg2) + void AppDomainInitializer::operator()(System::Array1& args) { } - DLLEXPORT void SystemActionSystemSingle_SystemSingleNativeInvoke(int32_t cppHandle, float arg1, float arg2) + DLLEXPORT void SystemAppDomainInitializerNativeInvoke(int32_t cppHandle, int32_t argsHandle) { try { - Plugin::GetSystemActionSystemSingle_SystemSingle(cppHandle)->operator()(arg1, arg2); + auto param0 = System::Array1(Plugin::InternalUse::Only, argsHandle); + Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(param0); } catch (System::Exception ex) { @@ -9110,15 +10792,15 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Action2"; + System::String msg = "Unhandled exception invoking System::AppDomainInitializer"; System::Exception ex(msg); Plugin::SetException(ex.Handle); } } - void Action2::Invoke(float arg1, float arg2) + void AppDomainInitializer::Invoke(System::Array1& args) { - Plugin::SystemActionSystemSingle_SystemSingleInvoke(Handle, arg1, arg2); + Plugin::SystemAppDomainInitializerInvoke(Handle, args.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9129,352 +10811,487 @@ namespace System } } -namespace System +namespace UnityEngine { - Func3::Func3() - : System::Object(nullptr) + namespace Events { - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) + UnityAction::UnityAction() + : System::Object(nullptr) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); + Plugin::UnityEngineEventsUnityActionConstructor(CppHandle, &Handle, &ClassHandle); + 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; + } } - else + + UnityAction::UnityAction(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); + CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); ClassHandle = 0; - CppHandle = 0; } - if (Plugin::unhandledCsharpException) + + UnityAction::UnityAction(const UnityAction& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } - } - - Func3::Func3(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - ClassHandle = 0; - } - - Func3::Func3(const Func3& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - if (Handle) + + UnityAction::UnityAction(UnityAction&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - ClassHandle = other.ClassHandle; - } - - Func3::Func3(Func3&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Func3::Func3(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - if (Handle) + + UnityAction::UnityAction(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) { - Plugin::ReferenceManagedClass(Handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + ClassHandle = other.ClassHandle; + return *this; } - ClassHandle = 0; - } - - Func3::~Func3() - { - Plugin::RemoveSystemFuncSystemInt32_SystemSingle_SystemDouble(CppHandle); - CppHandle = 0; - if (Handle) + + UnityAction& UnityAction::operator=(decltype(nullptr) other) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 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 = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Handle = 0; + return *this; + } + + UnityAction& UnityAction::operator=(UnityAction&& other) + { + Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; } - } - - Func3& Func3::operator=(const Func3& other) - { - if (this->Handle) + + bool UnityAction::operator==(const UnityAction& other) const { - Plugin::DereferenceManagedClass(this->Handle); + return Handle == other.Handle; } - this->Handle = other.Handle; - if (this->Handle) + + bool UnityAction::operator!=(const UnityAction& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle != other.Handle; } - ClassHandle = other.ClassHandle; - return *this; - } - - Func3& Func3::operator=(decltype(nullptr) other) - { - if (Handle) + + void UnityAction::operator+=(UnityEngine::Events::UnityAction& del) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::UnityEngineEventsUnityActionAdd(Handle, del.Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + 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) + + void UnityAction::operator-=(UnityEngine::Events::UnityAction& del) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::UnityEngineEventsUnityActionRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReleaseSystemFuncSystemInt32_SystemSingle_SystemDouble(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + 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) + + void UnityAction::operator()() { - 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) + + DLLEXPORT void UnityEngineEventsUnityActionNativeInvoke(int32_t cppHandle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; + } } } - - double Func3::operator()(int32_t arg1, float arg2) - { - return {}; - } - - DLLEXPORT double SystemFuncSystemInt32_SystemSingle_SystemDoubleNativeInvoke(int32_t cppHandle, int32_t arg1, float arg2) +} + +namespace UnityEngine +{ + namespace Events { - try + UnityAction2::UnityAction2() + : System::Object(nullptr) + { + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(CppHandle, &Handle, &ClassHandle); + 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) n) + : System::Object(Plugin::InternalUse::Only, 0) { - return Plugin::GetSystemFuncSystemInt32_SystemSingle_SystemDouble(cppHandle)->operator()(arg1, arg2); + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + ClassHandle = 0; } - catch (System::Exception ex) + + UnityAction2::UnityAction2(const UnityAction2& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::SetException(ex.Handle); - return {}; + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } - catch (...) + + UnityAction2::UnityAction2(UnityAction2&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - System::String msg = "Unhandled exception invoking System::Func3"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - } - - double Func3::Invoke(int32_t arg1, float arg2) - { - auto returnValue = Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleInvoke(Handle, arg1, arg2); - if (Plugin::unhandledCsharpException) + + UnityAction2::UnityAction2(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; } - return returnValue; - } -} - -namespace System -{ - Func3::Func3() - : System::Object(nullptr) - { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) + + UnityAction2::~UnityAction2() { - Plugin::ReferenceManagedClass(Handle); + 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; + } + } + } } - else + + UnityAction2& UnityAction2::operator=(const UnityAction2& other) { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); + 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) other) + { + 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; } - if (Plugin::unhandledCsharpException) + + bool UnityAction2::operator==(const UnityAction2& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; } - } - - Func3::Func3(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - ClassHandle = 0; - } - - Func3::Func3(const Func3& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - if (Handle) + + bool UnityAction2::operator!=(const UnityAction2& other) const { - Plugin::ReferenceManagedClass(Handle); + return Handle != other.Handle; } - ClassHandle = other.ClassHandle; - } - - Func3::Func3(Func3&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - Func3::Func3(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - if (Handle) + + void UnityAction2::operator+=(UnityEngine::Events::UnityAction2& del) { - Plugin::ReferenceManagedClass(Handle); + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd(Handle, del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - ClassHandle = 0; - } - - Func3::~Func3() - { - Plugin::RemoveSystemFuncSystemInt16_SystemInt32_SystemString(CppHandle); - CppHandle = 0; - if (Handle) + + void UnityAction2::operator-=(UnityEngine::Events::UnityAction2& del) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } - } - - Func3& Func3::operator=(const Func3& other) - { - if (this->Handle) + + void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int32_t cppHandle, UnityEngine::SceneManagement::Scene arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + { + try + { + 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::ReferenceManagedClass(this->Handle); + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - ClassHandle = other.ClassHandle; - return *this; } - - Func3& Func3::operator=(decltype(nullptr) other) +} + +namespace System +{ + namespace ComponentModel { - if (Handle) + namespace Design { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + ComponentEventHandler::ComponentEventHandler() + : System::Object(nullptr) { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); + Plugin::SystemComponentModelDesignComponentEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemComponentModelDesignComponentEventHandler(CppHandle); + ClassHandle = 0; + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9483,25 +11300,200 @@ namespace System 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)) + + ComponentEventHandler::ComponentEventHandler(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::ReleaseSystemFuncSystemInt16_SystemInt32_SystemString(handle, classHandle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); + ClassHandle = 0; + } + + ComponentEventHandler::ComponentEventHandler(const ComponentEventHandler& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; + } + + ComponentEventHandler::ComponentEventHandler(ComponentEventHandler&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; + } + + ComponentEventHandler::ComponentEventHandler(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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 param0 = System::Object(Plugin::InternalUse::Only, senderHandle); + auto param1 = System::ComponentModel::Design::ComponentEventArgs(Plugin::InternalUse::Only, eHandle); + Plugin::GetSystemComponentModelDesignComponentEventHandler(cppHandle)->operator()(param0, param1); + } + 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; @@ -9511,164 +11503,30 @@ namespace System } } } - 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()(int16_t arg1, int32_t 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(int16_t arg1, int32_t 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() - : System::Object(nullptr) - { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - Plugin::SystemAppDomainInitializerConstructor(CppHandle, &Handle, &ClassHandle); - 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) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - ClassHandle = 0; - } - - AppDomainInitializer::AppDomainInitializer(const AppDomainInitializer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - AppDomainInitializer::AppDomainInitializer(AppDomainInitializer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = 0; - } - - AppDomainInitializer::~AppDomainInitializer() + namespace ComponentModel { - Plugin::RemoveSystemAppDomainInitializer(CppHandle); - CppHandle = 0; - if (Handle) + namespace Design { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + ComponentChangingEventHandler::ComponentChangingEventHandler() + : System::Object(nullptr) { - Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); + Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + else + { + Plugin::RemoveSystemComponentModelDesignComponentChangingEventHandler(CppHandle); + ClassHandle = 0; + CppHandle = 0; + } if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9677,35 +11535,152 @@ namespace System 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) other) - { - if (Handle) - { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + + ComponentChangingEventHandler::ComponentChangingEventHandler(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); + ClassHandle = 0; + } + + ComponentChangingEventHandler::ComponentChangingEventHandler(const ComponentChangingEventHandler& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; + } + + ComponentChangingEventHandler::ComponentChangingEventHandler(ComponentChangingEventHandler&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; + } + + ComponentChangingEventHandler::ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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::ReleaseSystemAppDomainInitializer(handle, classHandle); + Plugin::SystemComponentModelDesignComponentChangingEventHandlerAdd(Handle, del.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9714,25 +11689,46 @@ namespace System 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)) + + void ComponentChangingEventHandler::operator-=(System::ComponentModel::Design::ComponentChangingEventHandler& del) { - Plugin::ReleaseSystemAppDomainInitializer(handle, classHandle); + 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 param0 = System::Object(Plugin::InternalUse::Only, senderHandle); + auto param1 = System::ComponentModel::Design::ComponentChangingEventArgs(Plugin::InternalUse::Only, eHandle); + Plugin::GetSystemComponentModelDesignComponentChangingEventHandler(cppHandle)->operator()(param0, param1); + } + 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; @@ -9741,539 +11737,475 @@ namespace System 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 param0 = System::Array1(Plugin::InternalUse::Only, argsHandle); - Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(param0); - } - 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 System { - namespace Events + namespace ComponentModel { - UnityAction::UnityAction() - : System::Object(nullptr) + namespace Design { - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - Plugin::UnityEngineEventsUnityActionConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) + ComponentChangedEventHandler::ComponentChangedEventHandler() + : System::Object(nullptr) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); + Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + 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; + } } - else + + ComponentChangedEventHandler::ComponentChangedEventHandler(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); ClassHandle = 0; - CppHandle = 0; } - if (Plugin::unhandledCsharpException) + + ComponentChangedEventHandler::ComponentChangedEventHandler(const ComponentChangedEventHandler& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } - } - - UnityAction::UnityAction(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - ClassHandle = 0; - } - - UnityAction::UnityAction(const UnityAction& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - if (Handle) + + ComponentChangedEventHandler::ComponentChangedEventHandler(ComponentChangedEventHandler&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; } - ClassHandle = other.ClassHandle; - } - - UnityAction::UnityAction(UnityAction&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - UnityAction::UnityAction(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - if (Handle) + + ComponentChangedEventHandler::ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = 0; } - ClassHandle = 0; - } - - UnityAction::~UnityAction() - { - Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); - CppHandle = 0; - if (Handle) + + ComponentChangedEventHandler::~ComponentChangedEventHandler() { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::RemoveSystemComponentModelDesignComponentChangedEventHandler(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseUnityEngineEventsUnityAction(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemComponentModelDesignComponentChangedEventHandler(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) + + ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(const ComponentChangedEventHandler& other) { - Plugin::ReferenceManagedClass(this->Handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + ClassHandle = other.ClassHandle; + return *this; } - ClassHandle = other.ClassHandle; - return *this; - } - - UnityAction& UnityAction::operator=(decltype(nullptr) other) - { - if (Handle) + + ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(decltype(nullptr) other) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseUnityEngineEventsUnityAction(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; } - ClassHandle = 0; - Handle = 0; - return *this; - } - - UnityAction& UnityAction::operator=(UnityAction&& other) - { - Plugin::RemoveUnityEngineEventsUnityAction(CppHandle); - CppHandle = 0; - if (Handle) + + ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(ComponentChangedEventHandler&& other) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::RemoveSystemComponentModelDesignComponentChangedEventHandler(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseUnityEngineEventsUnityAction(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; } - 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) + + bool ComponentChangedEventHandler::operator==(const ComponentChangedEventHandler& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; } - } - - void UnityAction::operator-=(UnityEngine::Events::UnityAction& del) - { - Plugin::UnityEngineEventsUnityActionRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) + + bool ComponentChangedEventHandler::operator!=(const ComponentChangedEventHandler& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle != other.Handle; } - } - - void UnityAction::operator()() - { - } - - DLLEXPORT void UnityEngineEventsUnityActionNativeInvoke(int32_t cppHandle) - { - try + + void ComponentChangedEventHandler::operator+=(System::ComponentModel::Design::ComponentChangedEventHandler& del) { - Plugin::GetUnityEngineEventsUnityAction(cppHandle)->operator()(); + Plugin::SystemComponentModelDesignComponentChangedEventHandlerAdd(Handle, del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - catch (System::Exception ex) + + void ComponentChangedEventHandler::operator-=(System::ComponentModel::Design::ComponentChangedEventHandler& del) { - Plugin::SetException(ex.Handle); + Plugin::SystemComponentModelDesignComponentChangedEventHandlerRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - catch (...) + + void ComponentChangedEventHandler::operator()(System::Object& sender, System::ComponentModel::Design::ComponentChangedEventArgs& e) { - 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) + + DLLEXPORT void SystemComponentModelDesignComponentChangedEventHandlerNativeInvoke(int32_t cppHandle, int32_t senderHandle, int32_t eHandle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, senderHandle); + auto param1 = System::ComponentModel::Design::ComponentChangedEventArgs(Plugin::InternalUse::Only, eHandle); + Plugin::GetSystemComponentModelDesignComponentChangedEventHandler(cppHandle)->operator()(param0, param1); + } + 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 UnityEngine +namespace System { - namespace Events + namespace ComponentModel { - UnityAction2::UnityAction2() - : System::Object(nullptr) + namespace Design { - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(CppHandle, &Handle, &ClassHandle); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else - { - Plugin::RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(CppHandle); - ClassHandle = 0; - CppHandle = 0; - } - if (Plugin::unhandledCsharpException) + ComponentRenameEventHandler::ComponentRenameEventHandler() + : System::Object(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); + Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + 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; + } } - } - - UnityAction2::UnityAction2(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - ClassHandle = 0; - } - - UnityAction2::UnityAction2(const UnityAction2& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - if (Handle) + + ComponentRenameEventHandler::ComponentRenameEventHandler(decltype(nullptr) n) + : System::Object(Plugin::InternalUse::Only, 0) { - Plugin::ReferenceManagedClass(Handle); - } - ClassHandle = other.ClassHandle; - } - - UnityAction2::UnityAction2(UnityAction2&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - ClassHandle = other.ClassHandle; - other.Handle = 0; - other.CppHandle = 0; - other.ClassHandle = 0; - } - - UnityAction2::UnityAction2(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - if (Handle) + CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); + ClassHandle = 0; + } + + ComponentRenameEventHandler::ComponentRenameEventHandler(const ComponentRenameEventHandler& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(Handle); + CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + ClassHandle = other.ClassHandle; } - ClassHandle = 0; - } - - UnityAction2::~UnityAction2() - { - Plugin::RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(CppHandle); - CppHandle = 0; - if (Handle) + + ComponentRenameEventHandler::ComponentRenameEventHandler(ComponentRenameEventHandler&& other) + : System::Object(Plugin::InternalUse::Only, other.Handle) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; + CppHandle = other.CppHandle; + ClassHandle = other.ClassHandle; + other.Handle = 0; + other.CppHandle = 0; + other.ClassHandle = 0; + } + + ComponentRenameEventHandler::ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) + { + CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + } + + ComponentRenameEventHandler::~ComponentRenameEventHandler() + { + Plugin::RemoveSystemComponentModelDesignComponentRenameEventHandler(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemComponentModelDesignComponentRenameEventHandler(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) + + ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(const ComponentRenameEventHandler& other) { - Plugin::ReferenceManagedClass(this->Handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + ClassHandle = other.ClassHandle; + return *this; } - ClassHandle = other.ClassHandle; - return *this; - } - - UnityAction2& UnityAction2::operator=(decltype(nullptr) other) - { - if (Handle) + + ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(decltype(nullptr) other) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; } - ClassHandle = 0; - Handle = 0; - return *this; - } - - UnityAction2& UnityAction2::operator=(UnityAction2&& other) - { - Plugin::RemoveUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(CppHandle); - CppHandle = 0; - if (Handle) + + ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(ComponentRenameEventHandler&& other) { - int32_t handle = Handle; - int32_t classHandle = ClassHandle; - Handle = 0; - ClassHandle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::RemoveSystemComponentModelDesignComponentRenameEventHandler(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(handle, classHandle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + int32_t classHandle = ClassHandle; + Handle = 0; + ClassHandle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + 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; } - 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) + + bool ComponentRenameEventHandler::operator==(const ComponentRenameEventHandler& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; } - } - - void UnityAction2::operator-=(UnityEngine::Events::UnityAction2& del) - { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove(Handle, del.Handle); - if (Plugin::unhandledCsharpException) + + bool ComponentRenameEventHandler::operator!=(const ComponentRenameEventHandler& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle != other.Handle; } - } - - void UnityAction2::operator()(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - } - - DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int32_t cppHandle, UnityEngine::SceneManagement::Scene arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) - { - try + + void ComponentRenameEventHandler::operator+=(System::ComponentModel::Design::ComponentRenameEventHandler& del) { - Plugin::GetUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(cppHandle)->operator()(arg0, arg1); + Plugin::SystemComponentModelDesignComponentRenameEventHandlerAdd(Handle, del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - catch (System::Exception ex) + + void ComponentRenameEventHandler::operator-=(System::ComponentModel::Design::ComponentRenameEventHandler& del) { - Plugin::SetException(ex.Handle); + Plugin::SystemComponentModelDesignComponentRenameEventHandlerRemove(Handle, del.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - catch (...) + + void ComponentRenameEventHandler::operator()(System::Object& sender, System::ComponentModel::Design::ComponentRenameEventArgs& e) { - 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, arg1); - if (Plugin::unhandledCsharpException) + + DLLEXPORT void SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke(int32_t cppHandle, int32_t senderHandle, int32_t eHandle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + try + { + auto param0 = System::Object(Plugin::InternalUse::Only, senderHandle); + auto param1 = System::ComponentModel::Design::ComponentRenameEventArgs(Plugin::InternalUse::Only, eHandle); + Plugin::GetSystemComponentModelDesignComponentRenameEventHandler(cppHandle)->operator()(param0, param1); + } + 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; + } } } } @@ -10426,14 +12358,14 @@ DLLEXPORT void Init( void (*systemCollectionsGenericIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemStringComparer)(int32_t handle), void (*systemStringComparerConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemEventArgs)(int32_t handle), - void (*systemEventArgsConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemCollectionsICollection)(int32_t handle), void (*systemCollectionsICollectionConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemCollectionsIList)(int32_t handle), void (*systemCollectionsIListConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemCollectionsQueue)(int32_t handle), void (*systemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemComponentModelDesignIComponentChangeService)(int32_t handle), + void (*systemComponentModelDesignIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle), int32_t (*boxBoolean)(System::Boolean val), System::Boolean (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -10523,7 +12455,27 @@ DLLEXPORT void Init( 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, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) + void (*unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke)(int32_t thisHandle, UnityEngine::SceneManagement::Scene& arg0, 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 INIT PARAMS*/) { using namespace Plugin; @@ -10669,16 +12621,6 @@ DLLEXPORT void Init( NextFreeSystemStringComparer = SystemStringComparerFreeList + 1; Plugin::ReleaseSystemStringComparer = releaseSystemStringComparer; Plugin::SystemStringComparerConstructor = systemStringComparerConstructor; - SystemEventArgsFreeListSize = maxManagedObjects; - SystemEventArgsFreeList = new System::EventArgs*[SystemEventArgsFreeListSize]; - for (int32_t i = 0, end = SystemEventArgsFreeListSize - 1; i < end; ++i) - { - SystemEventArgsFreeList[i] = (System::EventArgs*)(SystemEventArgsFreeList + i + 1); - } - SystemEventArgsFreeList[SystemEventArgsFreeListSize - 1] = nullptr; - NextFreeSystemEventArgs = SystemEventArgsFreeList + 1; - Plugin::ReleaseSystemEventArgs = releaseSystemEventArgs; - Plugin::SystemEventArgsConstructor = systemEventArgsConstructor; SystemCollectionsICollectionFreeListSize = maxManagedObjects; SystemCollectionsICollectionFreeList = new System::Collections::ICollection*[SystemCollectionsICollectionFreeListSize]; for (int32_t i = 0, end = SystemCollectionsICollectionFreeListSize - 1; i < end; ++i) @@ -10709,6 +12651,16 @@ DLLEXPORT void Init( NextFreeSystemCollectionsQueue = SystemCollectionsQueueFreeList + 1; Plugin::ReleaseSystemCollectionsQueue = releaseSystemCollectionsQueue; Plugin::SystemCollectionsQueueConstructor = systemCollectionsQueueConstructor; + SystemComponentModelDesignIComponentChangeServiceFreeListSize = maxManagedObjects; + SystemComponentModelDesignIComponentChangeServiceFreeList = new System::ComponentModel::Design::IComponentChangeService*[SystemComponentModelDesignIComponentChangeServiceFreeListSize]; + for (int32_t i = 0, end = SystemComponentModelDesignIComponentChangeServiceFreeListSize - 1; i < end; ++i) + { + SystemComponentModelDesignIComponentChangeServiceFreeList[i] = (System::ComponentModel::Design::IComponentChangeService*)(SystemComponentModelDesignIComponentChangeServiceFreeList + i + 1); + } + SystemComponentModelDesignIComponentChangeServiceFreeList[SystemComponentModelDesignIComponentChangeServiceFreeListSize - 1] = nullptr; + NextFreeSystemComponentModelDesignIComponentChangeService = SystemComponentModelDesignIComponentChangeServiceFreeList + 1; + Plugin::ReleaseSystemComponentModelDesignIComponentChangeService = releaseSystemComponentModelDesignIComponentChangeService; + Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor = systemComponentModelDesignIComponentChangeServiceConstructor; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; @@ -10863,6 +12815,58 @@ DLLEXPORT void Init( Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeAdd; Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeRemove; Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke = unityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke; + SystemComponentModelDesignComponentEventHandlerFreeListSize = maxManagedObjects; + SystemComponentModelDesignComponentEventHandlerFreeList = new System::ComponentModel::Design::ComponentEventHandler*[SystemComponentModelDesignComponentEventHandlerFreeListSize]; + for (int32_t i = 0, end = SystemComponentModelDesignComponentEventHandlerFreeListSize - 1; i < end; ++i) + { + SystemComponentModelDesignComponentEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentEventHandler*)(SystemComponentModelDesignComponentEventHandlerFreeList + i + 1); + } + SystemComponentModelDesignComponentEventHandlerFreeList[SystemComponentModelDesignComponentEventHandlerFreeListSize - 1] = nullptr; + NextFreeSystemComponentModelDesignComponentEventHandler = SystemComponentModelDesignComponentEventHandlerFreeList + 1; + Plugin::ReleaseSystemComponentModelDesignComponentEventHandler = releaseSystemComponentModelDesignComponentEventHandler; + Plugin::SystemComponentModelDesignComponentEventHandlerConstructor = systemComponentModelDesignComponentEventHandlerConstructor; + Plugin::SystemComponentModelDesignComponentEventHandlerAdd = systemComponentModelDesignComponentEventHandlerAdd; + Plugin::SystemComponentModelDesignComponentEventHandlerRemove = systemComponentModelDesignComponentEventHandlerRemove; + Plugin::SystemComponentModelDesignComponentEventHandlerInvoke = systemComponentModelDesignComponentEventHandlerInvoke; + SystemComponentModelDesignComponentChangingEventHandlerFreeListSize = maxManagedObjects; + SystemComponentModelDesignComponentChangingEventHandlerFreeList = new System::ComponentModel::Design::ComponentChangingEventHandler*[SystemComponentModelDesignComponentChangingEventHandlerFreeListSize]; + for (int32_t i = 0, end = SystemComponentModelDesignComponentChangingEventHandlerFreeListSize - 1; i < end; ++i) + { + SystemComponentModelDesignComponentChangingEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangingEventHandler*)(SystemComponentModelDesignComponentChangingEventHandlerFreeList + i + 1); + } + SystemComponentModelDesignComponentChangingEventHandlerFreeList[SystemComponentModelDesignComponentChangingEventHandlerFreeListSize - 1] = nullptr; + NextFreeSystemComponentModelDesignComponentChangingEventHandler = SystemComponentModelDesignComponentChangingEventHandlerFreeList + 1; + Plugin::ReleaseSystemComponentModelDesignComponentChangingEventHandler = releaseSystemComponentModelDesignComponentChangingEventHandler; + Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor = systemComponentModelDesignComponentChangingEventHandlerConstructor; + Plugin::SystemComponentModelDesignComponentChangingEventHandlerAdd = systemComponentModelDesignComponentChangingEventHandlerAdd; + Plugin::SystemComponentModelDesignComponentChangingEventHandlerRemove = systemComponentModelDesignComponentChangingEventHandlerRemove; + Plugin::SystemComponentModelDesignComponentChangingEventHandlerInvoke = systemComponentModelDesignComponentChangingEventHandlerInvoke; + SystemComponentModelDesignComponentChangedEventHandlerFreeListSize = maxManagedObjects; + SystemComponentModelDesignComponentChangedEventHandlerFreeList = new System::ComponentModel::Design::ComponentChangedEventHandler*[SystemComponentModelDesignComponentChangedEventHandlerFreeListSize]; + for (int32_t i = 0, end = SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1; i < end; ++i) + { + SystemComponentModelDesignComponentChangedEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangedEventHandler*)(SystemComponentModelDesignComponentChangedEventHandlerFreeList + i + 1); + } + SystemComponentModelDesignComponentChangedEventHandlerFreeList[SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1] = nullptr; + NextFreeSystemComponentModelDesignComponentChangedEventHandler = SystemComponentModelDesignComponentChangedEventHandlerFreeList + 1; + Plugin::ReleaseSystemComponentModelDesignComponentChangedEventHandler = releaseSystemComponentModelDesignComponentChangedEventHandler; + Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor = systemComponentModelDesignComponentChangedEventHandlerConstructor; + Plugin::SystemComponentModelDesignComponentChangedEventHandlerAdd = systemComponentModelDesignComponentChangedEventHandlerAdd; + Plugin::SystemComponentModelDesignComponentChangedEventHandlerRemove = systemComponentModelDesignComponentChangedEventHandlerRemove; + Plugin::SystemComponentModelDesignComponentChangedEventHandlerInvoke = systemComponentModelDesignComponentChangedEventHandlerInvoke; + SystemComponentModelDesignComponentRenameEventHandlerFreeListSize = maxManagedObjects; + SystemComponentModelDesignComponentRenameEventHandlerFreeList = new System::ComponentModel::Design::ComponentRenameEventHandler*[SystemComponentModelDesignComponentRenameEventHandlerFreeListSize]; + for (int32_t i = 0, end = SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1; i < end; ++i) + { + SystemComponentModelDesignComponentRenameEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentRenameEventHandler*)(SystemComponentModelDesignComponentRenameEventHandlerFreeList + i + 1); + } + SystemComponentModelDesignComponentRenameEventHandlerFreeList[SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1] = nullptr; + NextFreeSystemComponentModelDesignComponentRenameEventHandler = SystemComponentModelDesignComponentRenameEventHandlerFreeList + 1; + Plugin::ReleaseSystemComponentModelDesignComponentRenameEventHandler = releaseSystemComponentModelDesignComponentRenameEventHandler; + Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor = systemComponentModelDesignComponentRenameEventHandlerConstructor; + Plugin::SystemComponentModelDesignComponentRenameEventHandlerAdd = systemComponentModelDesignComponentRenameEventHandlerAdd; + Plugin::SystemComponentModelDesignComponentRenameEventHandlerRemove = systemComponentModelDesignComponentRenameEventHandlerRemove; + Plugin::SystemComponentModelDesignComponentRenameEventHandlerInvoke = systemComponentModelDesignComponentRenameEventHandlerInvoke; /*END INIT BODY*/ try diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index fbf5e52..890fbc6 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -543,6 +543,63 @@ namespace System } } +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 System { namespace Collections @@ -581,11 +638,6 @@ namespace System struct StringComparer; } -namespace System -{ - struct EventArgs; -} - namespace System { namespace Collections @@ -610,6 +662,17 @@ namespace System } } +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct IComponentChangeService; + } + } +} + namespace MyGame { namespace MonoBehaviours @@ -786,6 +849,50 @@ namespace UnityEngine template<> struct UnityAction2; } } + +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*/ //////////////////////////////////////////////////////////////// @@ -1607,6 +1714,135 @@ namespace System } } +namespace System +{ + struct EventArgs : System::Object + { + EventArgs(decltype(nullptr) n); + 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) other); + EventArgs& operator=(EventArgs&& other); + bool operator==(const EventArgs& other) const; + bool operator!=(const EventArgs& other) const; + }; +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentEventArgs : System::EventArgs + { + ComponentEventArgs(decltype(nullptr) n); + 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) other); + ComponentEventArgs& operator=(ComponentEventArgs&& other); + bool operator==(const ComponentEventArgs& other) const; + bool operator!=(const ComponentEventArgs& other) const; + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentChangingEventArgs : System::EventArgs + { + ComponentChangingEventArgs(decltype(nullptr) n); + 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) other); + ComponentChangingEventArgs& operator=(ComponentChangingEventArgs&& other); + bool operator==(const ComponentChangingEventArgs& other) const; + bool operator!=(const ComponentChangingEventArgs& other) const; + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentChangedEventArgs : System::EventArgs + { + ComponentChangedEventArgs(decltype(nullptr) n); + 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) other); + ComponentChangedEventArgs& operator=(ComponentChangedEventArgs&& other); + bool operator==(const ComponentChangedEventArgs& other) const; + bool operator!=(const ComponentChangedEventArgs& other) const; + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentRenameEventArgs : System::EventArgs + { + ComponentRenameEventArgs(decltype(nullptr) n); + 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) other); + ComponentRenameEventArgs& operator=(ComponentRenameEventArgs&& other); + bool operator==(const ComponentRenameEventArgs& other) const; + bool operator!=(const ComponentRenameEventArgs& other) const; + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + struct MemberDescriptor : System::Object + { + MemberDescriptor(decltype(nullptr) n); + 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) other); + MemberDescriptor& operator=(MemberDescriptor&& other); + bool operator==(const MemberDescriptor& other) const; + bool operator!=(const MemberDescriptor& other) const; + }; + } +} + namespace System { namespace Collections @@ -1681,26 +1917,6 @@ namespace System }; } -namespace System -{ - struct EventArgs : System::Object - { - EventArgs(decltype(nullptr) n); - 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) other); - EventArgs& operator=(EventArgs&& other); - bool operator==(const EventArgs& other) const; - bool operator!=(const EventArgs& other) const; - int32_t CppHandle; - EventArgs(); - virtual System::String ToString(); - }; -} - namespace System { namespace Collections @@ -1789,6 +2005,47 @@ namespace System } } +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct IComponentChangeService : System::Object + { + IComponentChangeService(decltype(nullptr) n); + 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) other); + IComponentChangeService& operator=(IComponentChangeService&& other); + bool operator==(const IComponentChangeService& other) const; + bool operator!=(const IComponentChangeService& other) const; + int32_t CppHandle; + IComponentChangeService(); + 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 MyGame { namespace MonoBehaviours @@ -2323,4 +2580,124 @@ namespace UnityEngine }; } } + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentEventHandler : System::Object + { + ComponentEventHandler(decltype(nullptr) n); + ComponentEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentEventHandler(const ComponentEventHandler& other); + ComponentEventHandler(ComponentEventHandler&& other); + virtual ~ComponentEventHandler(); + ComponentEventHandler& operator=(const ComponentEventHandler& other); + ComponentEventHandler& operator=(decltype(nullptr) other); + 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 + { + namespace Design + { + struct ComponentChangingEventHandler : System::Object + { + ComponentChangingEventHandler(decltype(nullptr) n); + ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentChangingEventHandler(const ComponentChangingEventHandler& other); + ComponentChangingEventHandler(ComponentChangingEventHandler&& other); + virtual ~ComponentChangingEventHandler(); + ComponentChangingEventHandler& operator=(const ComponentChangingEventHandler& other); + ComponentChangingEventHandler& operator=(decltype(nullptr) other); + 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); + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentChangedEventHandler : System::Object + { + ComponentChangedEventHandler(decltype(nullptr) n); + ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentChangedEventHandler(const ComponentChangedEventHandler& other); + ComponentChangedEventHandler(ComponentChangedEventHandler&& other); + virtual ~ComponentChangedEventHandler(); + ComponentChangedEventHandler& operator=(const ComponentChangedEventHandler& other); + ComponentChangedEventHandler& operator=(decltype(nullptr) other); + 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); + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct ComponentRenameEventHandler : System::Object + { + ComponentRenameEventHandler(decltype(nullptr) n); + ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle); + ComponentRenameEventHandler(const ComponentRenameEventHandler& other); + ComponentRenameEventHandler(ComponentRenameEventHandler&& other); + virtual ~ComponentRenameEventHandler(); + ComponentRenameEventHandler& operator=(const ComponentRenameEventHandler& other); + ComponentRenameEventHandler& operator=(decltype(nullptr) other); + 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); + }; + } + } +} /*END TYPE DEFINITIONS*/ From 754c23a41fe222c65a4772c76d4caa33d2b7d12a Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 3 Dec 2017 14:01:33 -0800 Subject: [PATCH 15/65] Fix generic method declarations Add another example MonoBehaviour --- Unity/Assets/NativeScript/Bindings.cs | 205 ++++++++++++ Unity/Assets/NativeScript/BootScene.unity | 108 +++--- .../NativeScript/Editor/GenerateBindings.cs | 110 +++++-- Unity/Assets/NativeScriptTypes.json | 40 ++- Unity/CppSource/Game/Game.cpp | 34 ++ Unity/CppSource/NativeScript/Bindings.cpp | 310 ++++++++++++++++++ Unity/CppSource/NativeScript/Bindings.h | 99 +++++- 7 files changed, 816 insertions(+), 90 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index b6fd6c0..c180649 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -286,6 +286,8 @@ delegate void InitDelegate( IntPtr unityEngineGameObjectConstructorSystemString, IntPtr unityEngineGameObjectPropertyGetTransform, IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript, + IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript, + IntPtr unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, IntPtr unityEngineComponentPropertyGetTransform, IntPtr unityEngineTransformPropertyGetPosition, IntPtr unityEngineTransformPropertySetPosition, @@ -294,6 +296,7 @@ delegate void InitDelegate( IntPtr unityEngineAssertionsAssertFieldSetRaiseExceptions, IntPtr unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString, IntPtr unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject, + IntPtr unityEngineMonoBehaviourPropertyGetTransform, IntPtr unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32, IntPtr unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte, IntPtr unityEngineNetworkingNetworkTransportMethodInit, @@ -373,6 +376,9 @@ delegate void InitDelegate( IntPtr unboxLoadSceneMode, IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, IntPtr systemCollectionsIEnumeratorMethodMoveNext, + IntPtr boxPrimitiveType, + IntPtr unboxPrimitiveType, + IntPtr unityEngineTimePropertyGetDeltaTime, IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, IntPtr releaseSystemCollectionsGenericIComparerSystemString, @@ -643,6 +649,12 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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; @@ -792,6 +804,8 @@ static extern void Init( IntPtr unityEngineGameObjectConstructorSystemString, IntPtr unityEngineGameObjectPropertyGetTransform, IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript, + IntPtr unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript, + IntPtr unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, IntPtr unityEngineComponentPropertyGetTransform, IntPtr unityEngineTransformPropertyGetPosition, IntPtr unityEngineTransformPropertySetPosition, @@ -800,6 +814,7 @@ static extern void Init( IntPtr unityEngineAssertionsAssertFieldSetRaiseExceptions, IntPtr unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString, IntPtr unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject, + IntPtr unityEngineMonoBehaviourPropertyGetTransform, IntPtr unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32, IntPtr unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte, IntPtr unityEngineNetworkingNetworkTransportMethodInit, @@ -879,6 +894,9 @@ static extern void Init( IntPtr unboxLoadSceneMode, IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, IntPtr systemCollectionsIEnumeratorMethodMoveNext, + IntPtr boxPrimitiveType, + IntPtr unboxPrimitiveType, + IntPtr unityEngineTimePropertyGetDeltaTime, IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, IntPtr releaseSystemCollectionsGenericIComparerSystemString, @@ -1150,6 +1168,12 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke [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); @@ -1209,6 +1233,8 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int UnityEngineGameObjectConstructorSystemStringDelegate(int nameHandle); delegate int UnityEngineGameObjectPropertyGetTransformDelegate(int thisHandle); delegate int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate(int thisHandle); + delegate int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate(int thisHandle); + delegate int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngine.PrimitiveType type); delegate int UnityEngineComponentPropertyGetTransformDelegate(int thisHandle); delegate UnityEngine.Vector3 UnityEngineTransformPropertyGetPositionDelegate(int thisHandle); delegate void UnityEngineTransformPropertySetPositionDelegate(int thisHandle, ref UnityEngine.Vector3 value); @@ -1217,6 +1243,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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(); @@ -1296,6 +1323,9 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneModeDelegate(int valHandle); delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegate(int thisHandle); + delegate int BoxPrimitiveTypeDelegate(UnityEngine.PrimitiveType val); + delegate UnityEngine.PrimitiveType UnboxPrimitiveTypeDelegate(int valHandle); + delegate float UnityEngineTimePropertyGetDeltaTimeDelegate(); delegate void SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(int handle); delegate void SystemCollectionsGenericIComparerSystemStringConstructorDelegate(int cppHandle, ref int handle); @@ -1501,6 +1531,8 @@ public static void Open( 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"); @@ -1538,6 +1570,8 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectConstructorSystemStringDelegate(UnityEngineGameObjectConstructorSystemString)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectPropertyGetTransformDelegate(UnityEngineGameObjectPropertyGetTransform)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)), Marshal.GetFunctionPointerForDelegate(new UnityEngineComponentPropertyGetTransformDelegate(UnityEngineComponentPropertyGetTransform)), Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertyGetPositionDelegate(UnityEngineTransformPropertyGetPosition)), Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertySetPositionDelegate(UnityEngineTransformPropertySetPosition)), @@ -1546,6 +1580,7 @@ public static void Open( 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)), @@ -1625,6 +1660,9 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnboxLoadSceneModeDelegate(UnboxLoadSceneMode)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(SystemCollectionsIEnumeratorPropertyGetCurrent)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorMethodMoveNextDelegate(SystemCollectionsIEnumeratorMethodMoveNext)), + Marshal.GetFunctionPointerForDelegate(new BoxPrimitiveTypeDelegate(BoxPrimitiveType)), + Marshal.GetFunctionPointerForDelegate(new UnboxPrimitiveTypeDelegate(UnboxPrimitiveType)), + Marshal.GetFunctionPointerForDelegate(new UnityEngineTimePropertyGetDeltaTimeDelegate(UnityEngineTimePropertyGetDeltaTime)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(ReleaseSystemCollectionsGenericIComparerSystemInt32)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(SystemCollectionsGenericIComparerSystemInt32Constructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(ReleaseSystemCollectionsGenericIComparerSystemString)), @@ -3263,6 +3301,51 @@ static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript } } + [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(UnityEngineComponentPropertyGetTransformDelegate))] static int UnityEngineComponentPropertyGetTransform(int thisHandle) { @@ -3432,6 +3515,29 @@ static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityE } } + [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) { @@ -5158,6 +5264,73 @@ static bool SystemCollectionsIEnumeratorMethodMoveNext(int thisHandle) } } + [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(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) { @@ -7875,4 +8048,36 @@ public void Update() } } } +namespace MyGame +{ + namespace MonoBehaviours + { + public class AnotherScript : UnityEngine.MonoBehaviour + { + public void Awake() + { + 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; + } + } + + public void Update() + { + int thisHandle = NativeScript.Bindings.ObjectStore.GetHandle(this); + NativeScript.Bindings.MyGameMonoBehavioursAnotherScriptUpdate(thisHandle); + if (NativeScript.Bindings.UnhandledCppException != null) + { + Exception ex = NativeScript.Bindings.UnhandledCppException; + NativeScript.Bindings.UnhandledCppException = null; + throw ex; + } + } + } + } +} /*END MONOBEHAVIOURS*/ \ No newline at end of file diff --git a/Unity/Assets/NativeScript/BootScene.unity b/Unity/Assets/NativeScript/BootScene.unity index 49ab8b7..c38824f 100644 --- a/Unity/Assets/NativeScript/BootScene.unity +++ b/Unity/Assets/NativeScript/BootScene.unity @@ -77,15 +77,17 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 - m_PVRFiltering: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousColorSigma: 1 - m_PVRFilteringAtrousNormalSigma: 1 - m_PVRFilteringAtrousPositionSigma: 1 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 @@ -107,6 +109,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + debug: + m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &643357608 GameObject: @@ -149,83 +153,81 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1835393739 +--- !u!1 &1667680821 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - - component: {fileID: 1835393743} - - component: {fileID: 1835393742} - - component: {fileID: 1835393741} - - component: {fileID: 1835393740} + - component: {fileID: 1667680825} + - component: {fileID: 1667680824} + - component: {fileID: 1667680823} + - component: {fileID: 1667680822} m_Layer: 0 - m_Name: Sphere + m_Name: Camera m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!23 &1835393740 -MeshRenderer: +--- !u!81 &1667680822 +AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1835393739} + m_GameObject: {fileID: 1667680821} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!135 &1835393741 -SphereCollider: +--- !u!124 &1667680823 +Behaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1835393739} - m_Material: {fileID: 0} - m_IsTrigger: 0 + m_GameObject: {fileID: 1667680821} m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1835393742 -MeshFilter: +--- !u!20 &1667680824 +Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1835393739} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1835393743 + m_GameObject: {fileID: 1667680821} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1667680825 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1835393739} + m_GameObject: {fileID: 1667680821} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0, z: -2} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 1f8ce78..8fd346d 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -1111,6 +1111,13 @@ static bool IsFullValueType(Type type) return true; } + static int ArrayIndexOf(T[] array, T value) + { + return array != null ? + Array.IndexOf(array, value) : + -1; + } + static void AppendTypeNameWithoutGenericSuffix( string typeName, StringBuilder output) @@ -1945,6 +1952,7 @@ static void AppendBoxingUnboxing( false, false, null, + typeParams, null, boxParams, builders.CppBoxingMethodDeclarations); @@ -1957,6 +1965,7 @@ static void AppendBoxingUnboxing( false, false, null, + typeParams, null, unboxCppParams, builders.CppBoxingMethodDeclarations); @@ -2296,6 +2305,7 @@ static void AppendConstructor( false, false, null, + enclosingTypeParams, null, parameters, builders.CppTypeDefinitions); @@ -2849,6 +2859,7 @@ static void AppendEventAddRemoveMethod( false, cppMethodIsStatic, cppReturnType, + typeTypeParams, null, cppParameters, builders.CppTypeDefinitions); @@ -3039,6 +3050,7 @@ static void AppendMethod( if (jsonMethod.GenericParams != null) { // Generate for each set of generic types + bool generateDeclaration = true; foreach (JsonGenericParams jsonGenericParams in jsonMethod.GenericParams) { @@ -3062,9 +3074,11 @@ static void AppendMethod( typeTypeParams, methodTypeParams, parameters, + generateDeclaration, indent, exceptionTypes, builders); + generateDeclaration = false; } } else @@ -3085,6 +3099,7 @@ static void AppendMethod( typeTypeParams, null, parameters, + true, indent, exceptionTypes, builders); @@ -3160,6 +3175,7 @@ static void AppendMethod( Type[] enclosingTypeParams, Type[] methodTypeParams, ParameterInfo[] parameters, + bool generateDeclaration, int indent, Type[] exceptionTypes, StringBuilders builders) @@ -3534,18 +3550,22 @@ static void AppendMethod( cppParameters = parameters; cppCallParameters = parameters; } - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - cppMethodName, - enclosingTypeIsStatic, - false, - cppMethodIsStatic, - cppReturnType, - methodTypeParams, - cppParameters, - builders.CppTypeDefinitions); + if (generateDeclaration) + { + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + cppMethodName, + enclosingTypeIsStatic, + false, + cppMethodIsStatic, + cppReturnType, + enclosingTypeParams, + methodTypeParams, + cppParameters, + builders.CppTypeDefinitions); + } // C++ method definition AppendCppMethodDefinitionBegin( @@ -3750,6 +3770,7 @@ static void AppendMonoBehaviour( false, typeof(void), null, + null, parameters, builders.CppTypeDefinitions); @@ -4946,6 +4967,7 @@ static void AppendArrayConstructor( false, null, null, + null, parameters, builders.CppTypeDefinitions); @@ -5080,6 +5102,7 @@ static void AppendArrayCppGetLengthFunction( false, typeof(int), null, + null, parameters, builders.CppTypeDefinitions); @@ -5158,6 +5181,7 @@ static void AppendArrayCppGetRankFunction( false, typeof(int), null, + null, parameters, builders.CppTypeDefinitions); @@ -5305,6 +5329,7 @@ static void AppendArrayMultidimensionalGetLength( false, typeof(int), null, + null, parameters, builders.CppTypeDefinitions); @@ -5833,6 +5858,7 @@ static void AppendDelegate( false, false, null, + typeParams, null, new ParameterInfo[0], builders.CppTypeDefinitions); @@ -5845,6 +5871,7 @@ static void AppendDelegate( false, false, typeof(void), + typeParams, null, addRemoveParams, builders.CppTypeDefinitions); @@ -5857,6 +5884,7 @@ static void AppendDelegate( false, false, typeof(void), + typeParams, null, addRemoveParams, builders.CppTypeDefinitions); @@ -6429,6 +6457,7 @@ static void AppendBaseType( false, false, null, + typeParams, null, new ParameterInfo[0], builders.CppTypeDefinitions); @@ -7263,6 +7292,7 @@ static void AppendBaseTypeMethodCallsCsharpMethod( false, false, methodInfo.ReturnType, + typeParams, null, invokeParams, builders.CppTypeDefinitions); @@ -7483,6 +7513,7 @@ static ParameterInfo[] AppendBaseTypeCppNativeInvokeCall( true, false, invokeMethod.ReturnType, + typeParams, null, invokeParams, builders.CppTypeDefinitions); @@ -9586,6 +9617,7 @@ static void AppendGetter( false, methodIsStatic, fieldType, + enclosingTypeParams, null, parameters, builders.CppTypeDefinitions); @@ -9778,6 +9810,7 @@ static void AppendSetter( false, methodIsStatic, typeof(void), + enclosingTypeParams, null, parameters, builders.CppTypeDefinitions); @@ -9867,6 +9900,7 @@ static void AppendCppTemplateDeclaration( output); AppendCppTemplateTypenames( numTypeParameters, + 'T', output); output.Append("struct "); AppendTypeNameWithoutGenericSuffix( @@ -11187,15 +11221,29 @@ static void AppendCsharpBindingParameterDeclaration( static void AppendCppParameterDeclaration( ParameterInfo[] parameters, + Type[] typeTypeParameters, + Type[] methodTypeParameters, StringBuilder output) { for (int i = 0; i < parameters.Length; ++i) { ParameterInfo param = parameters[i]; + Type paramType = param.DereferencedParameterType; - AppendCppTypeName( - param.DereferencedParameterType, - output); + int typeParamIndex = ArrayIndexOf( + methodTypeParameters, + paramType); + if (typeParamIndex >= 0) + { + output.Append("MT"); + output.Append(typeParamIndex); + } + else + { + AppendCppTypeName( + paramType, + output); + } // Pointer (*) or reference (&) suffix if necessary if (param.IsOut || param.IsRef) @@ -11287,6 +11335,8 @@ static void AppendCppMethodDefinitionBegin( output.Append('('); AppendCppParameterDeclaration( parameters, + null, // don't substitute type type params + null, // don't substitute method type params output); output.Append(")\n"); } @@ -11598,6 +11648,7 @@ static void AppendCppFunctionPointer( static void AppendCppTemplateTypenames( int numTypeParameters, + char prefix, StringBuilder output) { if (numTypeParameters > 0) @@ -11605,7 +11656,9 @@ static void AppendCppTemplateTypenames( output.Append("template<"); for (int i = 0; i < numTypeParameters; ++i) { - output.Append("typename T"); + output.Append("typename "); + output.Append(prefix); + output.Append('T'); output.Append(i); if (i != numTypeParameters - 1) { @@ -11622,12 +11675,14 @@ static void AppendCppMethodDeclaration( bool methodIsVirtual, bool methodIsStatic, Type returnType, - Type[] typeParameters, + Type[] typeTypeParameters, + Type[] methodTypeParameters, ParameterInfo[] parameters, StringBuilder output) { AppendCppTemplateTypenames( - typeParameters == null ? 0 : typeParameters.Length, + methodTypeParameters == null ? 0 : methodTypeParameters.Length, + 'M', output); if (!enclosingTypeIsStatic && methodIsStatic) @@ -11643,9 +11698,20 @@ static void AppendCppMethodDeclaration( // Return type if (returnType != null) { - AppendCppTypeName( - returnType, - output); + int typeParamIndex = ArrayIndexOf( + methodTypeParameters, + returnType); + if (typeParamIndex >= 0) + { + output.Append("MT"); + output.Append(typeParamIndex); + } + else + { + AppendCppTypeName( + returnType, + output); + } output.Append(' '); } @@ -11659,6 +11725,8 @@ static void AppendCppMethodDeclaration( output.Append('('); AppendCppParameterDeclaration( parameters, + typeTypeParameters, + methodTypeParameters, output); output.Append(')'); diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index fa0d271..d60a4df 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -73,11 +73,22 @@ "Types": [ "MyGame.MonoBehaviours.TestScript" ] + }, + { + "Types": [ + "MyGame.MonoBehaviours.AnotherScript" + ] } ], "Exceptions": [ "System.NullReferenceException" ] + }, + { + "Name": "CreatePrimitive", + "ParamTypes": [ + "UnityEngine.PrimitiveType" + ] } ], "Properties": [ @@ -159,7 +170,14 @@ "Name": "UnityEngine.Behaviour" }, { - "Name": "UnityEngine.MonoBehaviour" + "Name": "UnityEngine.MonoBehaviour", + "Properties": [ + { + "Name": "transform", + "Get": {}, + "Set": {} + } + ] }, { "Name": "UnityEngine.AudioSettings", @@ -572,6 +590,19 @@ }, { "Name": "System.ComponentModel.MemberDescriptor" + }, + { + "Name": "UnityEngine.PrimitiveType" + }, + { + "Name": "UnityEngine.Time", + "Properties": [ + { + "Name": "deltaTime", + "Get": {}, + "Set": {} + } + ] } ], "BaseTypes": [ @@ -622,6 +653,13 @@ "OnCollisionEnter", "Update" ] + }, + { + "Name": "MyGame.MonoBehaviours.AnotherScript", + "Messages": [ + "Awake", + "Update" + ] } ], "Arrays": [ diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index 8526d53..f7caf26 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -58,6 +58,40 @@ void MyGame::MonoBehaviours::TestScript::Update() { 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 = 1.2f; + static float dir = 1.0f; + static float min = -1.5f; + static float max = 1.5f; + Vector3 offset(Time::GetDeltaTime() * speed * dir, 0, 0); + Vector3 newPos = pos + offset; + if (newPos.x > max) + { + dir = -dir; + newPos.x = max - (newPos.x - max); + } + else if (newPos.x < min) + { + dir = -dir; + newPos.x = min + (min - newPos.x); + } + transform.SetPosition(newPos); +} diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index c99a94c..9127c40 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -52,6 +52,8 @@ namespace Plugin 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 (*UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type); int32_t (*UnityEngineComponentPropertyGetTransform)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineTransformPropertyGetPosition)(int32_t thisHandle); void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value); @@ -60,6 +62,7 @@ namespace Plugin void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean 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)(); @@ -139,6 +142,9 @@ namespace Plugin UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); int32_t (*SystemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle); System::Boolean (*SystemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle); + int32_t (*BoxPrimitiveType)(UnityEngine::PrimitiveType val); + UnityEngine::PrimitiveType (*UnboxPrimitiveType)(int32_t valHandle); + float (*UnityEngineTimePropertyGetDeltaTime)(); void (*ReleaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle); void (*SystemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemCollectionsGenericIComparerSystemString)(int32_t handle); @@ -1411,6 +1417,32 @@ namespace UnityEngine } 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 @@ -2008,6 +2040,19 @@ namespace UnityEngine { 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 @@ -5377,6 +5422,134 @@ namespace System } } +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) n) + : Time(Plugin::InternalUse::Only, 0) + { + } + + Time::Time(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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 { namespace Collections @@ -7997,6 +8170,91 @@ namespace MyGame } } +namespace MyGame +{ + namespace MonoBehaviours + { + AnotherScript::AnotherScript(decltype(nullptr) n) + : AnotherScript(Plugin::InternalUse::Only, 0) + { + } + + AnotherScript::AnotherScript(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::MonoBehaviour(iu, 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) other) + { + 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 iu, int32_t handle, int32_t index0) @@ -12265,6 +12523,8 @@ DLLEXPORT void Init( 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 (*unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type), int32_t (*unityEngineComponentPropertyGetTransform)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineTransformPropertyGetPosition)(int32_t thisHandle), void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value), @@ -12273,6 +12533,7 @@ DLLEXPORT void Init( void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean 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)(), @@ -12352,6 +12613,9 @@ DLLEXPORT void Init( UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), int32_t (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), System::Boolean (*systemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle), + int32_t (*boxPrimitiveType)(UnityEngine::PrimitiveType val), + UnityEngine::PrimitiveType (*unboxPrimitiveType)(int32_t valHandle), + float (*unityEngineTimePropertyGetDeltaTime)(), void (*releaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle), void (*systemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemCollectionsGenericIComparerSystemString)(int32_t handle), @@ -12502,6 +12766,8 @@ DLLEXPORT void Init( Plugin::UnityEngineGameObjectConstructorSystemString = unityEngineGameObjectConstructorSystemString; Plugin::UnityEngineGameObjectPropertyGetTransform = unityEngineGameObjectPropertyGetTransform; Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript = unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript; + Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript = unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript; + Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType = unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType; Plugin::UnityEngineComponentPropertyGetTransform = unityEngineComponentPropertyGetTransform; Plugin::UnityEngineTransformPropertyGetPosition = unityEngineTransformPropertyGetPosition; Plugin::UnityEngineTransformPropertySetPosition = unityEngineTransformPropertySetPosition; @@ -12510,6 +12776,7 @@ DLLEXPORT void Init( 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; @@ -12591,6 +12858,9 @@ DLLEXPORT void Init( Plugin::UnboxLoadSceneMode = unboxLoadSceneMode; Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = systemCollectionsIEnumeratorPropertyGetCurrent; Plugin::SystemCollectionsIEnumeratorMethodMoveNext = systemCollectionsIEnumeratorMethodMoveNext; + Plugin::BoxPrimitiveType = boxPrimitiveType; + Plugin::UnboxPrimitiveType = unboxPrimitiveType; + Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; SystemCollectionsGenericIComparerSystemInt32FreeListSize = maxManagedObjects; SystemCollectionsGenericIComparerSystemInt32FreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemInt32FreeListSize]; for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1; i < end; ++i) @@ -12973,4 +13243,44 @@ DLLEXPORT void MyGameMonoBehavioursTestScriptUpdate(int32_t thisHandle) 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 890fbc6..d6005b8 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -310,7 +310,7 @@ namespace System { namespace Generic { - template struct KeyValuePair; + template struct KeyValuePair; } } } @@ -332,7 +332,7 @@ namespace System { namespace Generic { - template struct List; + template struct List; } } } @@ -365,7 +365,7 @@ namespace System { namespace Generic { - template struct LinkedListNode; + template struct LinkedListNode; } } } @@ -387,7 +387,7 @@ namespace System { namespace CompilerServices { - template struct StrongBox; + template struct StrongBox; } } } @@ -409,7 +409,7 @@ namespace System { namespace ObjectModel { - template struct Collection; + template struct Collection; } } } @@ -431,7 +431,7 @@ namespace System { namespace ObjectModel { - template struct KeyedCollection; + template struct KeyedCollection; } } } @@ -600,13 +600,31 @@ namespace System } } +namespace UnityEngine +{ + enum struct PrimitiveType : int32_t + { + Sphere = 0, + Capsule = 1, + Cylinder = 2, + Cube = 3, + Plane = 4, + Quad = 5 + }; +} + +namespace UnityEngine +{ + struct Time; +} + namespace System { namespace Collections { namespace Generic { - template struct IComparer; + template struct IComparer; } } } @@ -681,6 +699,14 @@ namespace MyGame } } +namespace MyGame +{ + namespace MonoBehaviours + { + struct AnotherScript; + } +} + namespace Plugin { template<> struct ArrayElementProxy1_1; @@ -783,7 +809,7 @@ namespace System namespace System { - template struct Action1; + template struct Action1; } namespace System @@ -793,7 +819,7 @@ namespace System namespace System { - template struct Action2; + template struct Action2; } namespace System @@ -803,12 +829,12 @@ namespace System namespace System { - template struct Func3; + template struct Func3; } namespace System { - template struct Func3; + template struct Func3; } namespace System @@ -838,7 +864,7 @@ namespace UnityEngine { namespace Events { - template struct UnityAction2; + template struct UnityAction2; } } @@ -934,6 +960,8 @@ namespace System 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::Boolean val); explicit operator System::Boolean(); Object(int8_t val); @@ -1054,7 +1082,8 @@ namespace UnityEngine GameObject(); GameObject(System::String& name); UnityEngine::Transform GetTransform(); - template MyGame::MonoBehaviours::TestScript AddComponent(); + template MT0 AddComponent(); + static UnityEngine::GameObject CreatePrimitive(UnityEngine::PrimitiveType type); }; } @@ -1121,8 +1150,7 @@ namespace UnityEngine { System::Boolean GetRaiseExceptions(); void SetRaiseExceptions(System::Boolean value); - template void AreEqual(System::String& expected, System::String& actual); - template void AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual); + template void AreEqual(MT0& expected, MT0& actual); } } } @@ -1175,6 +1203,7 @@ namespace UnityEngine MonoBehaviour& operator=(MonoBehaviour&& other); bool operator==(const MonoBehaviour& other) const; bool operator!=(const MonoBehaviour& other) const; + UnityEngine::Transform GetTransform(); }; } @@ -1843,6 +1872,24 @@ namespace System } } +namespace UnityEngine +{ + struct Time : System::Object + { + Time(decltype(nullptr) n); + 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) other); + Time& operator=(Time&& other); + bool operator==(const Time& other) const; + bool operator!=(const Time& other) const; + static float GetDeltaTime(); + }; +} + namespace System { namespace Collections @@ -2070,6 +2117,28 @@ namespace MyGame } } +namespace MyGame +{ + namespace MonoBehaviours + { + struct AnotherScript : UnityEngine::MonoBehaviour + { + AnotherScript(decltype(nullptr) n); + AnotherScript(Plugin::InternalUse iu, int32_t handle); + AnotherScript(const AnotherScript& other); + AnotherScript(AnotherScript&& other); + virtual ~AnotherScript(); + AnotherScript& operator=(const AnotherScript& other); + AnotherScript& operator=(decltype(nullptr) other); + AnotherScript& operator=(AnotherScript&& other); + bool operator==(const AnotherScript& other) const; + bool operator!=(const AnotherScript& other) const; + void Awake(); + void Update(); + }; + } +} + namespace Plugin { template<> struct ArrayElementProxy1_1 From 2042b07e0715058de4ea8174dab667bfc98a5118 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 3 Dec 2017 14:01:57 -0800 Subject: [PATCH 16/65] Support deriving from classes that don't have a default constructor --- README.md | 1 - Unity/Assets/NativeScript/Bindings.cs | 142 +++ .../NativeScript/Editor/GenerateBindings.cs | 551 ++++++++---- Unity/Assets/NativeScriptTypes.json | 28 + Unity/CppSource/NativeScript/Bindings.cpp | 807 +++++++++++++++--- Unity/CppSource/NativeScript/Bindings.h | 99 +++ 6 files changed, 1358 insertions(+), 270 deletions(-) diff --git a/README.md b/README.md index 5280b7a..632dcf4 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,6 @@ Note that the code generator does not support (yet): * `Array` methods (e.g. `IndexOf`) * `string` methods (e.g. `Substring`) * Default parameters -* Deriving from classes without a default constructor * `decimal` * C# pointers diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index c180649..6dbbc70 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -379,6 +379,8 @@ delegate void InitDelegate( IntPtr boxPrimitiveType, IntPtr unboxPrimitiveType, IntPtr unityEngineTimePropertyGetDeltaTime, + IntPtr boxFileMode, + IntPtr unboxFileMode, IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, IntPtr releaseSystemCollectionsGenericIComparerSystemString, @@ -393,6 +395,8 @@ delegate void InitDelegate( IntPtr systemCollectionsQueueConstructor, IntPtr releaseSystemComponentModelDesignIComponentChangeService, IntPtr systemComponentModelDesignIComponentChangeServiceConstructor, + IntPtr releaseSystemIOFileStream, + IntPtr systemIOFileStreamConstructorSystemString_SystemIOFileMode, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -637,6 +641,9 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke public delegate void SystemComponentModelDesignIComponentChangeServiceRemoveComponentRenameDelegate(int thisHandle, int param0); public static SystemComponentModelDesignIComponentChangeServiceRemoveComponentRenameDelegate SystemComponentModelDesignIComponentChangeServiceRemoveComponentRename; + public delegate void SystemIOFileStreamWriteByteDelegate(int thisHandle, byte param0); + public static SystemIOFileStreamWriteByteDelegate SystemIOFileStreamWriteByte; + public delegate void MyGameMonoBehavioursTestScriptAwakeDelegate(int thisHandle); public static MyGameMonoBehavioursTestScriptAwakeDelegate MyGameMonoBehavioursTestScriptAwake; @@ -897,6 +904,8 @@ static extern void Init( IntPtr boxPrimitiveType, IntPtr unboxPrimitiveType, IntPtr unityEngineTimePropertyGetDeltaTime, + IntPtr boxFileMode, + IntPtr unboxFileMode, IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, IntPtr releaseSystemCollectionsGenericIComparerSystemString, @@ -911,6 +920,8 @@ static extern void Init( IntPtr systemCollectionsQueueConstructor, IntPtr releaseSystemComponentModelDesignIComponentChangeService, IntPtr systemComponentModelDesignIComponentChangeServiceConstructor, + IntPtr releaseSystemIOFileStream, + IntPtr systemIOFileStreamConstructorSystemString_SystemIOFileMode, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -1156,6 +1167,9 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke [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); @@ -1326,6 +1340,8 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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 SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(int handle); delegate void SystemCollectionsGenericIComparerSystemStringConstructorDelegate(int cppHandle, ref int handle); @@ -1340,6 +1356,8 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate void ReleaseSystemCollectionsQueueDelegate(int handle); delegate void SystemComponentModelDesignIComponentChangeServiceConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate(int handle); + delegate void SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode); + delegate void ReleaseSystemIOFileStreamDelegate(int handle); delegate int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1527,6 +1545,7 @@ public static void Open( 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"); @@ -1663,6 +1682,8 @@ public static void Open( 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 ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(ReleaseSystemCollectionsGenericIComparerSystemInt32)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(SystemCollectionsGenericIComparerSystemInt32Constructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(ReleaseSystemCollectionsGenericIComparerSystemString)), @@ -1677,6 +1698,8 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemCollectionsQueueConstructorDelegate(SystemCollectionsQueueConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate(ReleaseSystemComponentModelDesignIComponentChangeService)), Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignIComponentChangeServiceConstructorDelegate(SystemComponentModelDesignIComponentChangeServiceConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemIOFileStreamDelegate(ReleaseSystemIOFileStream)), + Marshal.GetFunctionPointerForDelegate(new SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate(SystemIOFileStreamConstructorSystemString_SystemIOFileMode)), Marshal.GetFunctionPointerForDelegate(new BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -1848,6 +1871,7 @@ class SystemCollectionsGenericIComparerSystemInt32 : System.Collections.Generic. public int CppHandle; public SystemCollectionsGenericIComparerSystemInt32(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -1876,6 +1900,7 @@ class SystemCollectionsGenericIComparerSystemString : System.Collections.Generic public int CppHandle; public SystemCollectionsGenericIComparerSystemString(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -1906,6 +1931,7 @@ class SystemStringComparer : System.StringComparer public int CppHandle; public SystemStringComparer(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -1973,6 +1999,7 @@ class SystemCollectionsICollection : System.Collections.ICollection public int CppHandle; public SystemCollectionsICollection(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -2077,6 +2104,7 @@ class SystemCollectionsIList : System.Collections.IList public int CppHandle; public SystemCollectionsIList(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -2372,6 +2400,7 @@ class SystemCollectionsQueue : System.Collections.Queue public int CppHandle; public SystemCollectionsQueue(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -2403,6 +2432,7 @@ class SystemComponentModelDesignIComponentChangeService : System.ComponentModel. public int CppHandle; public SystemComponentModelDesignIComponentChangeService(int cppHandle) + : base() { CppHandle = cppHandle; } @@ -2683,6 +2713,33 @@ public event System.ComponentModel.Design.ComponentRenameEventHandler ComponentR } + class SystemIOFileStream : System.IO.FileStream + { + public int CppHandle; + + public SystemIOFileStream(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; @@ -5331,6 +5388,51 @@ static float UnityEngineTimePropertyGetDeltaTime() } } + [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(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) { @@ -5604,6 +5706,46 @@ static void ReleaseSystemComponentModelDesignIComponentChangeService(int handle) } } + [MonoPInvokeCallback(typeof(SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate))] + static void SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode) + { + try + { + var path = (string)NativeScript.Bindings.ObjectStore.Get(pathHandle); + var thiz = new SystemIOFileStream(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)); + } + catch (System.Exception ex) + { + UnityEngine.Debug.LogException(ex); + NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + } + } + + [MonoPInvokeCallback(typeof(ReleaseSystemIOFileStreamDelegate))] + static void ReleaseSystemIOFileStream(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(BoxBooleanDelegate))] static int BoxBoolean(bool val) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 8fd346d..272f160 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -100,6 +100,7 @@ class JsonBaseType public string Name; public JsonGenericParams[] GenericParams; public int MaxSimultaneous; + public JsonConstructor[] Constructors; public JsonMethod[] OverrideMethods; public JsonProperty[] OverrideProperties; public JsonEvent[] OverrideEvents; @@ -785,6 +786,7 @@ static TypeKind GetTypeKind(Type type) static ParameterInfo[] GetConstructorParameters( Type type, + bool allowDefault, string[] paramTypeNames) { foreach (ConstructorInfo ctor in type.GetConstructors()) @@ -799,6 +801,11 @@ System.Reflection.ParameterInfo[] reflectionParams } } + if (allowDefault) + { + return new ParameterInfo[0]; + } + // Throw an exception so the user knows what to fix in the JSON StringBuilder errorBuilder = new StringBuilder(1024); errorBuilder.Append("Constructor \""); @@ -949,14 +956,14 @@ static void AppendParameterTypeNames( } static void AppendTypeNames( - Type[] typeParams, + Type[] typeNames, StringBuilder output) { - if (typeParams != null) + if (typeNames != null) { - for (int i = 0, len = typeParams.Length; i < len; ++i) + for (int i = 0, len = typeNames.Length; i < len; ++i) { - Type curType = typeParams[i]; + Type curType = typeNames[i]; AppendNamespace( curType.Namespace, string.Empty, @@ -1657,6 +1664,7 @@ static void AppendBaseType( type.Name, typeParams, maxSimultaneous, + assemblies, builders); } } @@ -1671,6 +1679,7 @@ static void AppendBaseType( type.Name, null, maxSimultaneous, + assemblies, builders); } } @@ -2169,6 +2178,7 @@ static void AppendConstructor( } parameters = GetConstructorParameters( enclosingType, + false, constructorParamTypeNames); } @@ -2241,10 +2251,11 @@ static void AppendConstructor( AppendCsharpTypeName( enclosingType, builders.CsharpFunctions); + builders.CsharpFunctions.Append('('); AppendCsharpFunctionCallParameters( parameters, builders.CsharpFunctions); - builders.CsharpFunctions.Append(";"); + builders.CsharpFunctions.Append(");"); AppendCsharpFunctionReturn( parameters, enclosingType, @@ -2271,10 +2282,11 @@ static void AppendConstructor( AppendCsharpTypeName( enclosingType, builders.CsharpFunctions); + builders.CsharpFunctions.Append('('); AppendCsharpFunctionCallParameters( parameters, builders.CsharpFunctions); - builders.CsharpFunctions.Append(");"); + builders.CsharpFunctions.Append("));"); AppendCsharpFunctionReturn( parameters, typeof(int), @@ -3359,9 +3371,11 @@ static void AppendMethod( AppendCSharpTypeParameters( methodTypeParams, builders.CsharpFunctions); + builders.CsharpFunctions.Append('('); AppendCsharpFunctionCallParameters( parameters, builders.CsharpFunctions); + builders.CsharpFunctions.Append(')'); } builders.CsharpFunctions.Append(';'); if (!isReadOnly @@ -5707,11 +5721,11 @@ static void AppendDelegate( AppendTypeNames( typeParams, builders.TempStrBuilder); - string typeName = builders.TempStrBuilder.ToString(); + string bindingTypeName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Release"); - builders.TempStrBuilder.Append(typeName); + builders.TempStrBuilder.Append(bindingTypeName); string releaseFuncName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder[0] = char.ToLower( @@ -5719,7 +5733,7 @@ static void AppendDelegate( string releaseFuncNameLower = builders.TempStrBuilder.ToString(); builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append(typeName); + builders.TempStrBuilder.Append(bindingTypeName); builders.TempStrBuilder.Append("Constructor"); string constructorFuncName = builders.TempStrBuilder.ToString(); @@ -5728,7 +5742,7 @@ static void AppendDelegate( string constructorFuncNameLower = builders.TempStrBuilder.ToString(); builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append(typeName); + builders.TempStrBuilder.Append(bindingTypeName); builders.TempStrBuilder.Append("Add"); string addFuncName = builders.TempStrBuilder.ToString(); @@ -5737,7 +5751,7 @@ static void AppendDelegate( string addFuncNameLower = builders.TempStrBuilder.ToString(); builders.TempStrBuilder.Length = 0; - builders.TempStrBuilder.Append(typeName); + builders.TempStrBuilder.Append(bindingTypeName); builders.TempStrBuilder.Append("Remove"); string removeFuncName = builders.TempStrBuilder.ToString(); @@ -5816,13 +5830,13 @@ static void AppendDelegate( AppendCppFreeListStateAndFunctions( type, - typeName, + bindingTypeName, builders.CppGlobalStateAndFunctions); AppendCppFreeListInit( type, maxSimultaneous, - typeName, + bindingTypeName, builders.CppInitBody); // C++ type definition (begin) @@ -6012,27 +6026,37 @@ static void AppendDelegate( type.Namespace, builders.CppMethodDefinitions); - AppendCppBaseTypeDefaultConstructor( - typeName, + AppendCppBaseTypeConstructor( + bindingTypeName, + type.Name, + type.Namespace, + TypeKind.Class, cppTypeName, + typeof(object), typeParams, + new ParameterInfo[0], + constructorParams, true, constructorFuncName, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeNullptrConstructor( - typeName, + bindingTypeName, cppTypeName, typeParams, + "Object", + "System", true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeCopyConstructor( - typeName, + bindingTypeName, cppTypeName, typeParams, + "Object", + "System", true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6040,20 +6064,24 @@ static void AppendDelegate( AppendCppBaseTypeMoveConstructor( cppTypeName, typeParams, + "Object", + "System", true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeHandleConstructor( - typeName, + bindingTypeName, cppTypeName, typeParams, + "Object", + "System", true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeDestructor( - typeName, + bindingTypeName, cppTypeName, typeParams, true, @@ -6078,7 +6106,7 @@ static void AppendDelegate( builders.CppMethodDefinitions); AppendCppBaseTypeMoveAssignmentOperator( - typeName, + bindingTypeName, cppTypeName, typeParams, true, @@ -6172,7 +6200,7 @@ static void AppendDelegate( // C# class (beginning) builders.CsharpBaseTypes.Append("\t\tclass "); - builders.CsharpBaseTypes.Append(typeName); + builders.CsharpBaseTypes.Append(bindingTypeName); builders.CsharpBaseTypes.Append("\n"); builders.CsharpBaseTypes.Append("\t\t{\n"); @@ -6187,7 +6215,7 @@ static void AppendDelegate( // C# class constructor builders.CsharpBaseTypes.Append("\t\t\tpublic "); - builders.CsharpBaseTypes.Append(typeName); + 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"); @@ -6208,7 +6236,7 @@ static void AppendDelegate( MethodInfo invokeMethod = type.GetMethod("Invoke"); AppendBaseTypeCppMethodCall( type, - typeName, + bindingTypeName, cppTypeName, typeParams, invokeMethod, @@ -6226,7 +6254,7 @@ static void AppendDelegate( // Invoke() is how C++ invokes the delegate AppendBaseTypeMethodCallsCsharpMethod( type, - typeName, + bindingTypeName, cppTypeName, typeParams, invokeMethod, @@ -6247,10 +6275,11 @@ static void AppendDelegate( AppendCsharpBaseTypeConstructorFunction( type, - typeName, + bindingTypeName, false, constructorFuncName, constructorParams, + new ParameterInfo[0], builders.CsharpFunctions); // C# release delegate type @@ -6265,7 +6294,7 @@ static void AppendDelegate( AppendCsharpBaseTypeReleaseFunction( type, - typeName, + bindingTypeName, true, releaseFuncName, releaseParams, @@ -6345,6 +6374,7 @@ static void AppendBaseType( string cppTypeName, Type[] typeParams, int? maxSimultaneous, + Assembly[] assemblies, StringBuilders builders) { builders.TempStrBuilder.Length = 0; @@ -6358,84 +6388,148 @@ static void AppendBaseType( AppendTypeNames( typeParams, builders.TempStrBuilder); - string typeName = builders.TempStrBuilder.ToString(); + string bindingTypeName = builders.TempStrBuilder.ToString(); builders.TempStrBuilder.Length = 0; builders.TempStrBuilder.Append("Release"); - builders.TempStrBuilder.Append(typeName); + 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(typeName); - builders.TempStrBuilder.Append("Constructor"); - string constructorFuncName = builders.TempStrBuilder.ToString(); - - builders.TempStrBuilder[0] = char.ToLower( - builders.TempStrBuilder[0]); - string constructorFuncNameLower = builders.TempStrBuilder.ToString(); - - // C++ type declaration - int indent = AppendCppTypeDeclaration( - type.Namespace, - cppTypeName, - false, - typeParams, - builders.CppTypeDeclarations); + // Either use specified constructors or the default constructor + JsonConstructor[] jsonConstructors = jsonBaseType.Constructors; + if (jsonConstructors == null) + { + // 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)) + { + // Throw an exception so the user knows what to fix in the JSON + StringBuilder errorBuilder = new StringBuilder(1024); + errorBuilder.Append("Base type \""); + AppendCsharpTypeName( + type, + errorBuilder); + errorBuilder.Append( + ")\" doesn't have any specified constructors or a default constructor"); + throw new Exception(errorBuilder.ToString()); + } + + jsonConstructors = new JsonConstructor[] + { + new JsonConstructor + { + ParamTypes = new string[0] + } + }; + } - ParameterInfo[] releaseParams = { - new ParameterInfo + // Build constructor function names and parameter lists + int numConstructors = jsonConstructors.Length; + string[] constructorFuncNames = new string[numConstructors]; + string[] constructorFuncNameLowers = new string[numConstructors]; + ParameterInfo[][] cppConstructorParams = new ParameterInfo[numConstructors][]; + ParameterInfo[][] constructorParams = new ParameterInfo[numConstructors][]; + for (int i = 0; i < numConstructors; ++i) + { + JsonConstructor jsonCtor = jsonConstructors[i]; + Type[] paramTypes = GetTypes( + jsonCtor.ParamTypes, + assemblies); + + builders.TempStrBuilder.Length = 0; + builders.TempStrBuilder.Append(bindingTypeName); + builders.TempStrBuilder.Append("Constructor"); + AppendTypeNames( + paramTypes, + builders.TempStrBuilder); + string constructorFuncName = builders.TempStrBuilder.ToString(); + + builders.TempStrBuilder[0] = char.ToLower( + builders.TempStrBuilder[0]); + string constructorFuncNameLower = builders.TempStrBuilder.ToString(); + + ParameterInfo[] parameters = GetConstructorParameters( + type, + true, + jsonCtor.ParamTypes); + int numParams = parameters.Length; + ParameterInfo[] fullParams = new ParameterInfo[numParams + 2]; + fullParams[0] = new ParameterInfo { - Name = "handle", + Name = "cppHandle", ParameterType = typeof(int), DereferencedParameterType = typeof(int), IsOut = false, IsRef = false, Kind = TypeKind.Primitive - }}; - - ParameterInfo[] constructorParams = { - new ParameterInfo + }; + fullParams[1] = new ParameterInfo { - Name = "cppHandle", + Name = "handle", ParameterType = typeof(int), DereferencedParameterType = typeof(int), - IsOut = false, + IsOut = true, IsRef = false, Kind = TypeKind.Primitive - }, + }; + Array.Copy( + parameters, + 0, + fullParams, + 2, + numParams); + + constructorFuncNames[i] = constructorFuncName; + constructorFuncNameLowers[i] = constructorFuncNameLower; + cppConstructorParams[i] = parameters; + constructorParams[i] = fullParams; + } + + // C++ type declaration + int indent = AppendCppTypeDeclaration( + type.Namespace, + cppTypeName, + false, + typeParams, + builders.CppTypeDeclarations); + + ParameterInfo[] releaseParams = { new ParameterInfo { Name = "handle", ParameterType = typeof(int), DereferencedParameterType = typeof(int), - IsOut = true, + IsOut = false, IsRef = false, Kind = TypeKind.Primitive }}; AppendCppFreeListStateAndFunctions( type, - typeName, + bindingTypeName, builders.CppGlobalStateAndFunctions); AppendCppFreeListInit( type, maxSimultaneous, - typeName, + bindingTypeName, builders.CppInitBody); // C++ type definition (begin) + Type baseType = type.BaseType ?? typeof(object); AppendCppTypeDefinitionBegin( cppTypeName, type.Namespace, TypeKind.Class, typeParams, - "Object", - "System", + baseType.Name, + baseType.Namespace, null, false, indent, @@ -6447,20 +6541,23 @@ static void AppendBaseType( builders.CppTypeDefinitions); builders.CppTypeDefinitions.Append("int32_t CppHandle;\n"); - // C++ method declarations - AppendIndent( - indent + 1, - builders.CppTypeDefinitions); - AppendCppMethodDeclaration( - cppTypeName, - false, - false, - false, - null, - typeParams, - null, - new ParameterInfo[0], - builders.CppTypeDefinitions); + // C++ constructor declarations + for (int i = 0; i < numConstructors; ++i) + { + AppendIndent( + indent + 1, + builders.CppTypeDefinitions); + AppendCppMethodDeclaration( + cppTypeName, + false, + false, + false, + null, + typeParams, + null, + cppConstructorParams[i], + builders.CppTypeDefinitions); + } // C++ function pointers AppendCppFunctionPointerDefinition( @@ -6472,15 +6569,18 @@ static void AppendBaseType( releaseParams, typeof(void), builders.CppFunctionPointers); - AppendCppFunctionPointerDefinition( - constructorFuncName, - true, - null, - null, - TypeKind.None, - constructorParams, - typeof(void), - builders.CppFunctionPointers); + for (int i = 0; i < numConstructors; ++i) + { + AppendCppFunctionPointerDefinition( + constructorFuncNames[i], + true, + null, + null, + TypeKind.None, + constructorParams[i], + typeof(void), + builders.CppFunctionPointers); + } // C++ init params AppendCppInitParam( @@ -6492,64 +6592,85 @@ static void AppendBaseType( releaseParams, typeof(void), builders.CppInitParams); - AppendCppInitParam( - constructorFuncNameLower, - true, - null, - null, - TypeKind.None, - constructorParams, - typeof(void), - builders.CppInitParams); + for (int i = 0; i < numConstructors; ++i) + { + AppendCppInitParam( + constructorFuncNameLowers[i], + true, + null, + null, + TypeKind.None, + constructorParams[i], + typeof(void), + builders.CppInitParams); + } // C++ and C# init params AppendCppInitBody( releaseFuncName, releaseFuncNameLower, builders.CppInitBody); - AppendCppInitBody( - constructorFuncName, - constructorFuncNameLower, - builders.CppInitBody); AppendCsharpInitParam( releaseFuncNameLower, builders.CsharpInitParams); - AppendCsharpInitParam( - constructorFuncNameLower, - builders.CsharpInitParams); AppendCsharpInitCallArg( releaseFuncName, builders.CsharpInitCall); - AppendCsharpInitCallArg( - constructorFuncName, - 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( + funcName, + builders.CsharpInitCall); + } // C++ method definitions (end) int cppMethodDefinitionsIndent = AppendNamespaceBeginning( type.Namespace, builders.CppMethodDefinitions); - AppendCppBaseTypeDefaultConstructor( - typeName, - cppTypeName, - typeParams, - false, - constructorFuncName, - cppMethodDefinitionsIndent, - builders.CppMethodDefinitions); + for (int i = 0; i < numConstructors; ++i) + { + AppendCppBaseTypeConstructor( + bindingTypeName, + type.Name, + type.Namespace, + TypeKind.Class, + cppTypeName, + type.BaseType, + typeParams, + cppConstructorParams[i], + constructorParams[i], + false, + constructorFuncNames[i], + cppMethodDefinitionsIndent, + builders.CppMethodDefinitions); + } AppendCppBaseTypeNullptrConstructor( - typeName, + bindingTypeName, cppTypeName, typeParams, + baseType.Name, + baseType.Namespace, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeCopyConstructor( - typeName, + bindingTypeName, cppTypeName, typeParams, + baseType.Name, + baseType.Namespace, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6557,20 +6678,24 @@ static void AppendBaseType( AppendCppBaseTypeMoveConstructor( cppTypeName, typeParams, + baseType.Name, + baseType.Namespace, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeHandleConstructor( - typeName, + bindingTypeName, cppTypeName, typeParams, + baseType.Name, + baseType.Namespace, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeDestructor( - typeName, + bindingTypeName, cppTypeName, typeParams, false, @@ -6595,7 +6720,7 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeMoveAssignmentOperator( - typeName, + bindingTypeName, cppTypeName, typeParams, false, @@ -6617,7 +6742,7 @@ static void AppendBaseType( // C# class (beginning) builders.CsharpBaseTypes.Append("\t\tclass "); - builders.CsharpBaseTypes.Append(typeName); + builders.CsharpBaseTypes.Append(bindingTypeName); if (jsonBaseType != null) { builders.CsharpBaseTypes.Append(" : "); @@ -6633,31 +6758,55 @@ static void AppendBaseType( builders.CsharpBaseTypes.Append("\t\t\t\n"); // C# class constructor - builders.CsharpBaseTypes.Append("\t\t\tpublic "); - builders.CsharpBaseTypes.Append(typeName); - 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}\n"); - builders.CsharpBaseTypes.Append("\t\t\t\n"); + for (int i = 0; i < numConstructors; ++i) + { + builders.CsharpBaseTypes.Append("\t\t\tpublic "); + builders.CsharpBaseTypes.Append(bindingTypeName); + builders.CsharpBaseTypes.Append("(int cppHandle"); + ParameterInfo[] parameters = cppConstructorParams[i]; + if (parameters.Length > 0) + { + builders.CsharpBaseTypes.Append(", "); + AppendCsharpParams( + parameters, + builders.CsharpBaseTypes); + } + builders.CsharpBaseTypes.Append(")\n"); + builders.CsharpBaseTypes.Append("\t\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"); + } // C# constructor delegate type - AppendCsharpDelegateType( - constructorFuncName, - true, - type, - TypeKind.Class, - typeof(void), - constructorParams, - builders.CsharpDelegateTypes); + for (int i = 0; i < numConstructors; ++i) + { + AppendCsharpDelegateType( + constructorFuncNames[i], + true, + type, + TypeKind.Class, + typeof(void), + constructorParams[i], + builders.CsharpDelegateTypes); + } - AppendCsharpBaseTypeConstructorFunction( - type, - typeName, - false, - constructorFuncName, - constructorParams, - builders.CsharpFunctions); + for (int i = 0; i < numConstructors; ++i) + { + AppendCsharpBaseTypeConstructorFunction( + type, + bindingTypeName, + false, + constructorFuncNames[i], + constructorParams[i], + cppConstructorParams[i], + builders.CsharpFunctions); + } // C# release delegate type AppendCsharpDelegateType( @@ -6671,7 +6820,7 @@ static void AppendBaseType( AppendCsharpBaseTypeReleaseFunction( type, - typeName, + bindingTypeName, false, releaseFuncName, releaseParams, @@ -6685,7 +6834,7 @@ static void AppendBaseType( { AppendBaseTypeNativeMethod( type, - typeName, + bindingTypeName, typeParams, cppTypeName, methodInfo, @@ -6706,7 +6855,7 @@ static void AppendBaseType( { AppendBaseTypeNativeMethod( type, - typeName, + bindingTypeName, typeParams, cppTypeName, methodInfo, @@ -6732,7 +6881,7 @@ static void AppendBaseType( methods); AppendBaseTypeNativeMethod( type, - typeName, + bindingTypeName, typeParams, cppTypeName, methodInfo, @@ -6753,7 +6902,7 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - typeName, + bindingTypeName, cppTypeName, typeParams, propertyInfo, @@ -6780,7 +6929,7 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - typeName, + bindingTypeName, cppTypeName, typeParams, propertyInfo, @@ -6840,7 +6989,7 @@ static void AppendBaseType( } AppendBaseTypeProperty( type, - typeName, + bindingTypeName, cppTypeName, typeParams, propertyInfo, @@ -6863,7 +7012,7 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - typeName, + bindingTypeName, cppTypeName, typeParams, eventInfo, @@ -6889,7 +7038,7 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - typeName, + bindingTypeName, cppTypeName, typeParams, eventInfo, @@ -6949,7 +7098,7 @@ static void AppendBaseType( } AppendBaseTypeEvent( type, - typeName, + bindingTypeName, cppTypeName, typeParams, eventInfo, @@ -7414,10 +7563,11 @@ static void AppendBaseTypeMethodCallsCsharpMethod( builders.CsharpFunctions.Append('.'); builders.CsharpFunctions.Append(csharpMethodName); } + builders.CsharpFunctions.Append('('); AppendCsharpFunctionCallParameters( invokeParams, builders.CsharpFunctions); - builders.CsharpFunctions.Append(';'); + builders.CsharpFunctions.Append(");"); AppendCsharpFunctionReturn( invokeParams, methodInfo.ReturnType, @@ -7770,6 +7920,7 @@ private static void AppendCsharpBaseTypeConstructorFunction( bool typeIsDelegate, string constructorFuncName, ParameterInfo[] constructorParams, + ParameterInfo[] cppConstructorParams, StringBuilder output) { AppendCsharpFunctionBeginning( @@ -7782,7 +7933,15 @@ private static void AppendCsharpBaseTypeConstructorFunction( output); output.Append("var thiz = new "); output.Append(typeName); - output.Append("(cppHandle);\n"); + output.Append("(cppHandle"); + if (cppConstructorParams.Length > 0) + { + output.Append(", "); + AppendCsharpFunctionCallParameters( + cppConstructorParams, + output); + } + output.Append(");\n"); if (typeIsDelegate) { output.Append( @@ -7907,8 +8066,8 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( AppendIndent( indent + 2, output); - output.Append("auto param"); - output.Append(i); + output.Append("auto "); + output.Append(parameter.Name); output.Append(" = "); AppendCppTypeName( parameter.ParameterType, @@ -7936,8 +8095,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( if (parameter.Kind == TypeKind.Class || parameter.Kind == TypeKind.ManagedStruct) { - output.Append("param"); - output.Append(i); + output.Append(parameter.Name); } else { @@ -8559,6 +8717,8 @@ static void AppendCppBaseTypeHandleConstructor( string typeName, string cppTypeName, Type[] typeParams, + string baseTypeName, + string baseTypeNamespace, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8581,8 +8741,12 @@ static void AppendCppBaseTypeHandleConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append( - "\t: System::Object(iu, handle)\n"); + output.Append("\t: "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + output); + output.Append("(iu, handle)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -8631,6 +8795,8 @@ static void AppendCppBaseTypeHandleConstructor( static void AppendCppBaseTypeMoveConstructor( string cppTypeName, Type[] typeParams, + string baseTypeName, + string baseTypeNamespace, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8659,8 +8825,12 @@ static void AppendCppBaseTypeMoveConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append( - "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); + output.Append("\t: "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + output); + output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -8707,6 +8877,8 @@ static void AppendCppBaseTypeCopyConstructor( string typeName, string cppTypeName, Type[] typeParams, + string baseTypeName, + string baseTypeNamespace, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8735,8 +8907,12 @@ static void AppendCppBaseTypeCopyConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append( - "\t: System::Object(Plugin::InternalUse::Only, other.Handle)\n"); + output.Append("\t: "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + output); + output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -8786,6 +8962,8 @@ static void AppendCppBaseTypeNullptrConstructor( string typeName, string cppTypeName, Type[] typeParams, + string baseTypeName, + string baseTypeNamespace, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8807,8 +8985,12 @@ static void AppendCppBaseTypeNullptrConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append( - "\t: System::Object(Plugin::InternalUse::Only, 0)\n"); + output.Append("\t: "); + AppendCppTypeName( + baseTypeNamespace, + baseTypeName, + output); + output.Append("(Plugin::InternalUse::Only, 0)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -8836,10 +9018,16 @@ static void AppendCppBaseTypeNullptrConstructor( output.Append("\n"); } - static void AppendCppBaseTypeDefaultConstructor( + static void AppendCppBaseTypeConstructor( + string bindingTypeName, string typeName, + string typeNamespace, + TypeKind typeKind, string cppTypeName, + Type baseType, Type[] typeParams, + ParameterInfo[] cppParameters, + ParameterInfo[] parameters, bool typeIsDelegate, string constructorFuncName, int cppMethodDefinitionsIndent, @@ -8851,13 +9039,17 @@ static void AppendCppBaseTypeDefaultConstructor( cppTypeName, typeParams, null, - new ParameterInfo[0], + cppParameters, cppMethodDefinitionsIndent, output); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append(" : System::Object(nullptr)\n"); + output.Append(" : "); + AppendCppTypeName( + baseType ?? typeof(object), + output); + output.Append("(nullptr)\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -8866,19 +9058,34 @@ static void AppendCppBaseTypeDefaultConstructor( cppMethodDefinitionsIndent + 1, output); output.Append("CppHandle = Plugin::Store"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("(this);\n"); AppendIndent( cppMethodDefinitionsIndent + 1, output); - output.Append("Plugin::"); - output.Append(constructorFuncName); - output.Append("(CppHandle, &Handle"); + output.Append("int32_t* handle = &Handle;\n"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("int32_t cppHandle = CppHandle;\n"); if (typeIsDelegate) { - output.Append(", &ClassHandle"); + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append("int32_t* classHandle = &ClassHandle;\n"); } - output.Append(");\n"); + AppendCppPluginFunctionCall( + true, + bindingTypeName, + typeNamespace, + typeKind, + typeParams, + null, + constructorFuncName, + parameters, + cppMethodDefinitionsIndent + 1, + output); AppendIndent( cppMethodDefinitionsIndent + 1, output); @@ -8908,7 +9115,7 @@ static void AppendCppBaseTypeDefaultConstructor( cppMethodDefinitionsIndent + 2, output); output.Append("Plugin::Remove"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("(CppHandle);\n"); if (typeIsDelegate) { @@ -10951,7 +11158,6 @@ static void AppendCsharpFunctionCallParameters( ParameterInfo[] parameters, StringBuilder output) { - output.Append('('); for (int i = 0; i < parameters.Length; ++i) { ParameterInfo param = parameters[i]; @@ -10969,7 +11175,6 @@ static void AppendCsharpFunctionCallParameters( output.Append(", "); } } - output.Append(')'); } static void AppendStructStoreReplace( diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index d60a4df..0545f4d 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -603,6 +603,15 @@ "Set": {} } ] + }, + { + "Name": "System.IO.FileMode" + }, + { + "Name": "System.MarshalByRefObject" + }, + { + "Name": "System.IO.Stream" } ], "BaseTypes": [ @@ -642,6 +651,25 @@ }, { "Name": "System.ComponentModel.Design.IComponentChangeService" + }, + { + "Name": "System.IO.FileStream", + "OverrideMethods": [ + { + "Name": "WriteByte", + "ParamTypes": [ + "System.Byte" + ] + } + ], + "Constructors": [ + { + "ParamTypes": [ + "System.String", + "System.IO.FileMode" + ] + } + ] } ], "MonoBehaviours": [ diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 9127c40..cd6802c 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -145,6 +145,8 @@ namespace Plugin int32_t (*BoxPrimitiveType)(UnityEngine::PrimitiveType val); UnityEngine::PrimitiveType (*UnboxPrimitiveType)(int32_t valHandle); float (*UnityEngineTimePropertyGetDeltaTime)(); + int32_t (*BoxFileMode)(System::IO::FileMode val); + System::IO::FileMode (*UnboxFileMode)(int32_t valHandle); void (*ReleaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle); void (*SystemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemCollectionsGenericIComparerSystemString)(int32_t handle); @@ -159,6 +161,8 @@ namespace Plugin void (*SystemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemComponentModelDesignIComponentChangeService)(int32_t handle); void (*SystemComponentModelDesignIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemIOFileStream)(int32_t handle); + void (*SystemIOFileStreamConstructorSystemString_SystemIOFileMode)(int32_t cppHandle, int32_t* handle, int32_t pathHandle, System::IO::FileMode mode); int32_t (*BoxBoolean)(System::Boolean val); System::Boolean (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -543,6 +547,31 @@ namespace Plugin *pRelease = (System::ComponentModel::Design::IComponentChangeService*)NextFreeSystemComponentModelDesignIComponentChangeService; NextFreeSystemComponentModelDesignIComponentChangeService = pRelease; } + int32_t SystemIOFileStreamFreeListSize; + System::IO::FileStream** SystemIOFileStreamFreeList; + System::IO::FileStream** NextFreeSystemIOFileStream; + + int32_t StoreSystemIOFileStream(System::IO::FileStream* del) + { + assert(NextFreeSystemIOFileStream != nullptr); + System::IO::FileStream** pNext = NextFreeSystemIOFileStream; + NextFreeSystemIOFileStream = (System::IO::FileStream**)*pNext; + *pNext = del; + return (int32_t)(pNext - SystemIOFileStreamFreeList); + } + + System::IO::FileStream* GetSystemIOFileStream(int32_t handle) + { + assert(handle >= 0 && handle < SystemIOFileStreamFreeListSize); + return SystemIOFileStreamFreeList[handle]; + } + + void RemoveSystemIOFileStream(int32_t handle) + { + System::IO::FileStream** pRelease = SystemIOFileStreamFreeList + handle; + *pRelease = (System::IO::FileStream*)NextFreeSystemIOFileStream; + NextFreeSystemIOFileStream = pRelease; + } int32_t SystemActionFreeListSize; System::Action** SystemActionFreeList; System::Action** NextFreeSystemAction; @@ -5550,6 +5579,206 @@ namespace UnityEngine } } +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() + { + 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) n) + : MarshalByRefObject(Plugin::InternalUse::Only, 0) + { + } + + MarshalByRefObject::MarshalByRefObject(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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) n) + : Stream(Plugin::InternalUse::Only, 0) + { + } + + Stream::Stream(Plugin::InternalUse iu, int32_t handle) + : System::MarshalByRefObject(iu, 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) other) + { + 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 @@ -5560,7 +5789,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); - Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -5744,7 +5982,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); - Plugin::SystemCollectionsGenericIComparerSystemStringConstructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsGenericIComparerSystemStringConstructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -5899,9 +6146,9 @@ namespace System { try { - auto param0 = System::String(Plugin::InternalUse::Only, xHandle); - auto param1 = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(param0, param1); + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(x, y); } catch (System::Exception ex) { @@ -5926,7 +6173,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemStringComparer(this); - Plugin::SystemStringComparerConstructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemStringComparerConstructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -6081,9 +6337,9 @@ namespace System { try { - auto param0 = System::String(Plugin::InternalUse::Only, xHandle); - auto param1 = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemStringComparer(cppHandle)->Compare(param0, param1); + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemStringComparer(cppHandle)->Compare(x, y); } catch (System::Exception ex) { @@ -6108,9 +6364,9 @@ namespace System { try { - auto param0 = System::String(Plugin::InternalUse::Only, xHandle); - auto param1 = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemStringComparer(cppHandle)->Equals(param0, param1); + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemStringComparer(cppHandle)->Equals(x, y); } catch (System::Exception ex) { @@ -6135,8 +6391,8 @@ namespace System { try { - auto param0 = System::String(Plugin::InternalUse::Only, objHandle); - return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(param0); + auto obj = System::String(Plugin::InternalUse::Only, objHandle); + return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(obj); } catch (System::Exception ex) { @@ -6161,7 +6417,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemCollectionsICollection(this); - Plugin::SystemCollectionsICollectionConstructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsICollectionConstructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -6315,8 +6580,8 @@ namespace System { try { - auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsICollection(cppHandle)->CopyTo(param0, index); + auto array = System::Array(Plugin::InternalUse::Only, arrayHandle); + Plugin::GetSystemCollectionsICollection(cppHandle)->CopyTo(array, index); } catch (System::Exception ex) { @@ -6440,7 +6705,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemCollectionsIList(this); - Plugin::SystemCollectionsIListConstructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsIListConstructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -6595,8 +6869,8 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->Add(param0); + auto value = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->Add(value); } catch (System::Exception ex) { @@ -6643,8 +6917,8 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->Contains(param0); + auto value = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->Contains(value); } catch (System::Exception ex) { @@ -6669,8 +6943,8 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->IndexOf(param0); + auto value = System::Object(Plugin::InternalUse::Only, valueHandle); + return Plugin::GetSystemCollectionsIList(cppHandle)->IndexOf(value); } catch (System::Exception ex) { @@ -6694,8 +6968,8 @@ namespace System { try { - auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->Insert(index, param1); + auto value = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->Insert(index, value); } catch (System::Exception ex) { @@ -6717,8 +6991,8 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->Remove(param0); + auto value = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->Remove(value); } catch (System::Exception ex) { @@ -6787,8 +7061,8 @@ namespace System { try { - auto param0 = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->CopyTo(param0, index); + auto array = System::Array(Plugin::InternalUse::Only, arrayHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->CopyTo(array, index); } catch (System::Exception ex) { @@ -6885,8 +7159,8 @@ namespace System { try { - auto param1 = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->SetItem(index, param1); + auto value = System::Object(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemCollectionsIList(cppHandle)->SetItem(index, value); } catch (System::Exception ex) { @@ -6985,7 +7259,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemCollectionsQueue(this); - Plugin::SystemCollectionsQueueConstructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemCollectionsQueueConstructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -7168,7 +7451,16 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); - Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor(CppHandle, &Handle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor(cppHandle, handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -7322,11 +7614,11 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, componentHandle); - auto param1 = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - auto param2 = System::Object(Plugin::InternalUse::Only, oldValueHandle); - auto param3 = System::Object(Plugin::InternalUse::Only, newValueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanged(param0, param1, param2, param3); + 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::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanged(component, member, oldValue, newValue); } catch (System::Exception ex) { @@ -7348,9 +7640,9 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, componentHandle); - auto param1 = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanging(param0, param1); + auto component = System::Object(Plugin::InternalUse::Only, componentHandle); + auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanging(component, member); } catch (System::Exception ex) { @@ -7372,8 +7664,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdded(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdded(value); } catch (System::Exception ex) { @@ -7395,8 +7687,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdded(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdded(value); } catch (System::Exception ex) { @@ -7418,8 +7710,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdding(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdding(value); } catch (System::Exception ex) { @@ -7441,8 +7733,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdding(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdding(value); } catch (System::Exception ex) { @@ -7464,8 +7756,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanged(param0); + auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanged(value); } catch (System::Exception ex) { @@ -7487,8 +7779,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanged(param0); + auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanged(value); } catch (System::Exception ex) { @@ -7510,8 +7802,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanging(param0); + auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanging(value); } catch (System::Exception ex) { @@ -7533,8 +7825,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanging(param0); + auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanging(value); } catch (System::Exception ex) { @@ -7556,8 +7848,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoved(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoved(value); } catch (System::Exception ex) { @@ -7579,8 +7871,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoved(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoved(value); } catch (System::Exception ex) { @@ -7602,8 +7894,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoving(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoving(value); } catch (System::Exception ex) { @@ -7625,8 +7917,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoving(param0); + auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoving(value); } catch (System::Exception ex) { @@ -7648,8 +7940,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRename(param0); + auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRename(value); } catch (System::Exception ex) { @@ -7671,8 +7963,8 @@ namespace System { try { - auto param0 = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRename(param0); + auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); + Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRename(value); } catch (System::Exception ex) { @@ -7689,6 +7981,193 @@ namespace System } } +namespace System +{ + namespace IO + { + FileStream::FileStream(System::String& path, System::IO::FileMode mode) + : System::IO::Stream(nullptr) + { + CppHandle = Plugin::StoreSystemIOFileStream(this); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + Plugin::SystemIOFileStreamConstructorSystemString_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::RemoveSystemIOFileStream(CppHandle); + CppHandle = 0; + } + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + FileStream::FileStream(decltype(nullptr) n) + : System::IO::Stream(Plugin::InternalUse::Only, 0) + { + CppHandle = Plugin::StoreSystemIOFileStream(this); + } + + FileStream::FileStream(const FileStream& other) + : System::IO::Stream(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = Plugin::StoreSystemIOFileStream(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + FileStream::FileStream(FileStream&& other) + : System::IO::Stream(Plugin::InternalUse::Only, other.Handle) + { + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; + } + + FileStream::FileStream(Plugin::InternalUse iu, int32_t handle) + : System::IO::Stream(iu, handle) + { + CppHandle = Plugin::StoreSystemIOFileStream(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } + } + + FileStream::~FileStream() + { + Plugin::RemoveSystemIOFileStream(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemIOFileStream(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } + + 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) other) + { + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemIOFileStream(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + Handle = 0; + return *this; + } + + FileStream& FileStream::operator=(FileStream&& other) + { + Plugin::RemoveSystemIOFileStream(CppHandle); + CppHandle = 0; + if (Handle) + { + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) + { + Plugin::ReleaseSystemIOFileStream(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 FileStream::operator==(const FileStream& other) const + { + return Handle == other.Handle; + } + + bool FileStream::operator!=(const FileStream& other) const + { + return Handle != other.Handle; + } + + void FileStream::WriteByte(uint8_t value) + { + } + + DLLEXPORT void SystemIOFileStreamWriteByte(int32_t cppHandle, uint8_t value) + { + try + { + Plugin::GetSystemIOFileStream(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 System { Object::Object(System::Boolean val) @@ -9704,7 +10183,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemAction(this); - Plugin::SystemActionConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemActionConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -9931,7 +10420,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemActionSystemSingle(this); - Plugin::SystemActionSystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemActionSystemSingleConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -10158,7 +10657,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); - Plugin::SystemActionSystemSingle_SystemSingleConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemActionSystemSingle_SystemSingleConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -10385,7 +10894,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); - Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -10616,7 +11135,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); - Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -10847,7 +11376,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemAppDomainInitializer(this); - Plugin::SystemAppDomainInitializerConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemAppDomainInitializerConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -11041,8 +11580,8 @@ namespace System { try { - auto param0 = System::Array1(Plugin::InternalUse::Only, argsHandle); - Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(param0); + auto args = System::Array1(Plugin::InternalUse::Only, argsHandle); + Plugin::GetSystemAppDomainInitializer(cppHandle)->operator()(args); } catch (System::Exception ex) { @@ -11077,7 +11616,17 @@ namespace UnityEngine : System::Object(nullptr) { CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); - Plugin::UnityEngineEventsUnityActionConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::UnityEngineEventsUnityActionConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -11307,7 +11856,17 @@ namespace UnityEngine : System::Object(nullptr) { CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -11539,7 +12098,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); - Plugin::SystemComponentModelDesignComponentEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemComponentModelDesignComponentEventHandlerConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -11733,9 +12302,9 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, senderHandle); - auto param1 = System::ComponentModel::Design::ComponentEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentEventHandler(cppHandle)->operator()(param0, param1); + 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) { @@ -11774,7 +12343,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); - Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemComponentModelDesignComponentChangingEventHandlerConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -11968,9 +12547,9 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, senderHandle); - auto param1 = System::ComponentModel::Design::ComponentChangingEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentChangingEventHandler(cppHandle)->operator()(param0, param1); + 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) { @@ -12009,7 +12588,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); - Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemComponentModelDesignComponentChangedEventHandlerConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -12203,9 +12792,9 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, senderHandle); - auto param1 = System::ComponentModel::Design::ComponentChangedEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentChangedEventHandler(cppHandle)->operator()(param0, param1); + 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) { @@ -12244,7 +12833,17 @@ namespace System : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); - Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor(CppHandle, &Handle, &ClassHandle); + int32_t* handle = &Handle; + int32_t cppHandle = CppHandle; + int32_t* classHandle = &ClassHandle; + Plugin::SystemComponentModelDesignComponentRenameEventHandlerConstructor(cppHandle, handle, classHandle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } if (Handle) { Plugin::ReferenceManagedClass(Handle); @@ -12438,9 +13037,9 @@ namespace System { try { - auto param0 = System::Object(Plugin::InternalUse::Only, senderHandle); - auto param1 = System::ComponentModel::Design::ComponentRenameEventArgs(Plugin::InternalUse::Only, eHandle); - Plugin::GetSystemComponentModelDesignComponentRenameEventHandler(cppHandle)->operator()(param0, param1); + 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) { @@ -12616,6 +13215,8 @@ DLLEXPORT void Init( int32_t (*boxPrimitiveType)(UnityEngine::PrimitiveType val), UnityEngine::PrimitiveType (*unboxPrimitiveType)(int32_t valHandle), float (*unityEngineTimePropertyGetDeltaTime)(), + int32_t (*boxFileMode)(System::IO::FileMode val), + System::IO::FileMode (*unboxFileMode)(int32_t valHandle), void (*releaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle), void (*systemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemCollectionsGenericIComparerSystemString)(int32_t handle), @@ -12630,6 +13231,8 @@ DLLEXPORT void Init( void (*systemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemComponentModelDesignIComponentChangeService)(int32_t handle), void (*systemComponentModelDesignIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemIOFileStream)(int32_t handle), + void (*systemIOFileStreamConstructorSystemString_SystemIOFileMode)(int32_t cppHandle, int32_t* handle, int32_t pathHandle, System::IO::FileMode mode), int32_t (*boxBoolean)(System::Boolean val), System::Boolean (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -12861,6 +13464,8 @@ DLLEXPORT void Init( Plugin::BoxPrimitiveType = boxPrimitiveType; Plugin::UnboxPrimitiveType = unboxPrimitiveType; Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; + Plugin::BoxFileMode = boxFileMode; + Plugin::UnboxFileMode = unboxFileMode; SystemCollectionsGenericIComparerSystemInt32FreeListSize = maxManagedObjects; SystemCollectionsGenericIComparerSystemInt32FreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemInt32FreeListSize]; for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1; i < end; ++i) @@ -12931,6 +13536,16 @@ DLLEXPORT void Init( NextFreeSystemComponentModelDesignIComponentChangeService = SystemComponentModelDesignIComponentChangeServiceFreeList + 1; Plugin::ReleaseSystemComponentModelDesignIComponentChangeService = releaseSystemComponentModelDesignIComponentChangeService; Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor = systemComponentModelDesignIComponentChangeServiceConstructor; + SystemIOFileStreamFreeListSize = maxManagedObjects; + SystemIOFileStreamFreeList = new System::IO::FileStream*[SystemIOFileStreamFreeListSize]; + for (int32_t i = 0, end = SystemIOFileStreamFreeListSize - 1; i < end; ++i) + { + SystemIOFileStreamFreeList[i] = (System::IO::FileStream*)(SystemIOFileStreamFreeList + i + 1); + } + SystemIOFileStreamFreeList[SystemIOFileStreamFreeListSize - 1] = nullptr; + NextFreeSystemIOFileStream = SystemIOFileStreamFreeList + 1; + Plugin::ReleaseSystemIOFileStream = releaseSystemIOFileStream; + Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode = systemIOFileStreamConstructorSystemString_SystemIOFileMode; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index d6005b8..5954582 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -618,6 +618,35 @@ namespace UnityEngine struct Time; } +namespace System +{ + namespace IO + { + enum struct FileMode : int32_t + { + CreateNew = 1, + Create = 2, + Open = 3, + OpenOrCreate = 4, + Truncate = 5, + Append = 6 + }; + } +} + +namespace System +{ + struct MarshalByRefObject; +} + +namespace System +{ + namespace IO + { + struct Stream; + } +} + namespace System { namespace Collections @@ -691,6 +720,14 @@ namespace System } } +namespace System +{ + namespace IO + { + struct FileStream; + } +} + namespace MyGame { namespace MonoBehaviours @@ -962,6 +999,8 @@ namespace System explicit operator UnityEngine::SceneManagement::LoadSceneMode(); Object(UnityEngine::PrimitiveType val); explicit operator UnityEngine::PrimitiveType(); + Object(System::IO::FileMode val); + explicit operator System::IO::FileMode(); Object(System::Boolean val); explicit operator System::Boolean(); Object(int8_t val); @@ -1890,6 +1929,43 @@ namespace UnityEngine }; } +namespace System +{ + struct MarshalByRefObject : System::Object + { + MarshalByRefObject(decltype(nullptr) n); + 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) other); + MarshalByRefObject& operator=(MarshalByRefObject&& other); + bool operator==(const MarshalByRefObject& other) const; + bool operator!=(const MarshalByRefObject& other) const; + }; +} + +namespace System +{ + namespace IO + { + struct Stream : System::MarshalByRefObject + { + Stream(decltype(nullptr) n); + 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) other); + Stream& operator=(Stream&& other); + bool operator==(const Stream& other) const; + bool operator!=(const Stream& other) const; + }; + } +} + namespace System { namespace Collections @@ -2093,6 +2169,29 @@ namespace System } } +namespace System +{ + namespace IO + { + struct FileStream : System::IO::Stream + { + FileStream(decltype(nullptr) n); + 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) other); + FileStream& operator=(FileStream&& other); + bool operator==(const FileStream& other) const; + bool operator!=(const FileStream& other) const; + int32_t CppHandle; + FileStream(System::String& path, System::IO::FileMode mode); + virtual void WriteByte(uint8_t value); + }; + } +} + namespace MyGame { namespace MonoBehaviours From 666b53ea37b809d183cb305266e5f518c31d7532 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 10 Dec 2017 23:02:19 -0800 Subject: [PATCH 17/65] Insert base types into the type hierarchy --- Unity/Assets/NativeScript/Bindings.cs | 310 ++- .../NativeScript/Editor/GenerateBindings.cs | 194 +- Unity/Assets/NativeScriptTypes.json | 86 +- Unity/CppSource/NativeScript/Bindings.cpp | 1862 ++++++++++++----- Unity/CppSource/NativeScript/Bindings.h | 270 ++- 5 files changed, 1968 insertions(+), 754 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 6dbbc70..bbff41a 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -381,22 +381,25 @@ delegate void InitDelegate( IntPtr unityEngineTimePropertyGetDeltaTime, IntPtr boxFileMode, IntPtr unboxFileMode, - IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, - IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, - IntPtr releaseSystemCollectionsGenericIComparerSystemString, - IntPtr systemCollectionsGenericIComparerSystemStringConstructor, - IntPtr releaseSystemStringComparer, - IntPtr systemStringComparerConstructor, - IntPtr releaseSystemCollectionsICollection, - IntPtr systemCollectionsICollectionConstructor, - IntPtr releaseSystemCollectionsIList, - IntPtr systemCollectionsIListConstructor, - IntPtr releaseSystemCollectionsQueue, - IntPtr systemCollectionsQueueConstructor, - IntPtr releaseSystemComponentModelDesignIComponentChangeService, - IntPtr systemComponentModelDesignIComponentChangeServiceConstructor, - IntPtr releaseSystemIOFileStream, + IntPtr releaseSystemCollectionsGenericBaseIComparerSystemInt32, + IntPtr systemCollectionsGenericBaseIComparerSystemInt32Constructor, + IntPtr releaseSystemCollectionsGenericBaseIComparerSystemString, + IntPtr systemCollectionsGenericBaseIComparerSystemStringConstructor, + IntPtr releaseSystemBaseStringComparer, + IntPtr systemBaseStringComparerConstructor, + IntPtr releaseSystemCollectionsBaseICollection, + IntPtr systemCollectionsBaseICollectionConstructor, + IntPtr releaseSystemCollectionsBaseIList, + IntPtr systemCollectionsBaseIListConstructor, + IntPtr systemCollectionsQueuePropertyGetCount, + IntPtr releaseSystemCollectionsBaseQueue, + IntPtr systemCollectionsBaseQueueConstructor, + IntPtr releaseSystemComponentModelDesignBaseIComponentChangeService, + IntPtr systemComponentModelDesignBaseIComponentChangeServiceConstructor, IntPtr systemIOFileStreamConstructorSystemString_SystemIOFileMode, + IntPtr systemIOFileStreamMethodWriteByteSystemByte, + IntPtr releaseSystemIOBaseFileStream, + IntPtr systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -906,22 +909,25 @@ static extern void Init( IntPtr unityEngineTimePropertyGetDeltaTime, IntPtr boxFileMode, IntPtr unboxFileMode, - IntPtr releaseSystemCollectionsGenericIComparerSystemInt32, - IntPtr systemCollectionsGenericIComparerSystemInt32Constructor, - IntPtr releaseSystemCollectionsGenericIComparerSystemString, - IntPtr systemCollectionsGenericIComparerSystemStringConstructor, - IntPtr releaseSystemStringComparer, - IntPtr systemStringComparerConstructor, - IntPtr releaseSystemCollectionsICollection, - IntPtr systemCollectionsICollectionConstructor, - IntPtr releaseSystemCollectionsIList, - IntPtr systemCollectionsIListConstructor, - IntPtr releaseSystemCollectionsQueue, - IntPtr systemCollectionsQueueConstructor, - IntPtr releaseSystemComponentModelDesignIComponentChangeService, - IntPtr systemComponentModelDesignIComponentChangeServiceConstructor, - IntPtr releaseSystemIOFileStream, + IntPtr releaseSystemCollectionsGenericBaseIComparerSystemInt32, + IntPtr systemCollectionsGenericBaseIComparerSystemInt32Constructor, + IntPtr releaseSystemCollectionsGenericBaseIComparerSystemString, + IntPtr systemCollectionsGenericBaseIComparerSystemStringConstructor, + IntPtr releaseSystemBaseStringComparer, + IntPtr systemBaseStringComparerConstructor, + IntPtr releaseSystemCollectionsBaseICollection, + IntPtr systemCollectionsBaseICollectionConstructor, + IntPtr releaseSystemCollectionsBaseIList, + IntPtr systemCollectionsBaseIListConstructor, + IntPtr systemCollectionsQueuePropertyGetCount, + IntPtr releaseSystemCollectionsBaseQueue, + IntPtr systemCollectionsBaseQueueConstructor, + IntPtr releaseSystemComponentModelDesignBaseIComponentChangeService, + IntPtr systemComponentModelDesignBaseIComponentChangeServiceConstructor, IntPtr systemIOFileStreamConstructorSystemString_SystemIOFileMode, + IntPtr systemIOFileStreamMethodWriteByteSystemByte, + IntPtr releaseSystemIOBaseFileStream, + IntPtr systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode, IntPtr boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -1342,22 +1348,25 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate float UnityEngineTimePropertyGetDeltaTimeDelegate(); delegate int BoxFileModeDelegate(System.IO.FileMode val); delegate System.IO.FileMode UnboxFileModeDelegate(int valHandle); - delegate void SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(int handle); - delegate void SystemCollectionsGenericIComparerSystemStringConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(int handle); - delegate void SystemStringComparerConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemStringComparerDelegate(int handle); - delegate void SystemCollectionsICollectionConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsICollectionDelegate(int handle); - delegate void SystemCollectionsIListConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsIListDelegate(int handle); - delegate void SystemCollectionsQueueConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsQueueDelegate(int handle); - delegate void SystemComponentModelDesignIComponentChangeServiceConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate(int handle); - delegate void SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode); - delegate void ReleaseSystemIOFileStreamDelegate(int handle); + 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 void SystemCollectionsBaseICollectionConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsBaseICollectionDelegate(int handle); + delegate void SystemCollectionsBaseIListConstructorDelegate(int cppHandle, ref int handle); + delegate void ReleaseSystemCollectionsBaseIListDelegate(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 int BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1684,22 +1693,25 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnityEngineTimePropertyGetDeltaTimeDelegate(UnityEngineTimePropertyGetDeltaTime)), Marshal.GetFunctionPointerForDelegate(new BoxFileModeDelegate(BoxFileMode)), Marshal.GetFunctionPointerForDelegate(new UnboxFileModeDelegate(UnboxFileMode)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate(ReleaseSystemCollectionsGenericIComparerSystemInt32)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate(SystemCollectionsGenericIComparerSystemInt32Constructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericIComparerSystemStringDelegate(ReleaseSystemCollectionsGenericIComparerSystemString)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericIComparerSystemStringConstructorDelegate(SystemCollectionsGenericIComparerSystemStringConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemStringComparerDelegate(ReleaseSystemStringComparer)), - Marshal.GetFunctionPointerForDelegate(new SystemStringComparerConstructorDelegate(SystemStringComparerConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsICollectionDelegate(ReleaseSystemCollectionsICollection)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsICollectionConstructorDelegate(SystemCollectionsICollectionConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsIListDelegate(ReleaseSystemCollectionsIList)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIListConstructorDelegate(SystemCollectionsIListConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsQueueDelegate(ReleaseSystemCollectionsQueue)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsQueueConstructorDelegate(SystemCollectionsQueueConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate(ReleaseSystemComponentModelDesignIComponentChangeService)), - Marshal.GetFunctionPointerForDelegate(new SystemComponentModelDesignIComponentChangeServiceConstructorDelegate(SystemComponentModelDesignIComponentChangeServiceConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemIOFileStreamDelegate(ReleaseSystemIOFileStream)), + 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 ReleaseSystemCollectionsBaseICollectionDelegate(ReleaseSystemCollectionsBaseICollection)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsBaseICollectionConstructorDelegate(SystemCollectionsBaseICollectionConstructor)), + Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsBaseIListDelegate(ReleaseSystemCollectionsBaseIList)), + Marshal.GetFunctionPointerForDelegate(new SystemCollectionsBaseIListConstructorDelegate(SystemCollectionsBaseIListConstructor)), + 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 BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -1866,11 +1878,11 @@ static int ArrayGetLength(int handle) } /*BEGIN BASE TYPES*/ - class SystemCollectionsGenericIComparerSystemInt32 : System.Collections.Generic.IComparer + class SystemCollectionsGenericBaseIComparerSystemInt32 : System.Collections.Generic.IComparer { public int CppHandle; - public SystemCollectionsGenericIComparerSystemInt32(int cppHandle) + public SystemCollectionsGenericBaseIComparerSystemInt32(int cppHandle) : base() { CppHandle = cppHandle; @@ -1895,11 +1907,11 @@ public int Compare(int x, int y) } - class SystemCollectionsGenericIComparerSystemString : System.Collections.Generic.IComparer + class SystemCollectionsGenericBaseIComparerSystemString : System.Collections.Generic.IComparer { public int CppHandle; - public SystemCollectionsGenericIComparerSystemString(int cppHandle) + public SystemCollectionsGenericBaseIComparerSystemString(int cppHandle) : base() { CppHandle = cppHandle; @@ -1926,11 +1938,11 @@ public int Compare(string x, string y) } - class SystemStringComparer : System.StringComparer + class SystemBaseStringComparer : System.StringComparer { public int CppHandle; - public SystemStringComparer(int cppHandle) + public SystemBaseStringComparer(int cppHandle) : base() { CppHandle = cppHandle; @@ -1994,11 +2006,11 @@ public override int GetHashCode(string obj) } - class SystemCollectionsICollection : System.Collections.ICollection + class SystemCollectionsBaseICollection : System.Collections.ICollection { public int CppHandle; - public SystemCollectionsICollection(int cppHandle) + public SystemCollectionsBaseICollection(int cppHandle) : base() { CppHandle = cppHandle; @@ -2099,11 +2111,11 @@ public object SyncRoot } - class SystemCollectionsIList : System.Collections.IList + class SystemCollectionsBaseIList : System.Collections.IList { public int CppHandle; - public SystemCollectionsIList(int cppHandle) + public SystemCollectionsBaseIList(int cppHandle) : base() { CppHandle = cppHandle; @@ -2395,11 +2407,11 @@ public object SyncRoot } - class SystemCollectionsQueue : System.Collections.Queue + class SystemCollectionsBaseQueue : System.Collections.Queue { public int CppHandle; - public SystemCollectionsQueue(int cppHandle) + public SystemCollectionsBaseQueue(int cppHandle) : base() { CppHandle = cppHandle; @@ -2427,11 +2439,11 @@ public override int Count } - class SystemComponentModelDesignIComponentChangeService : System.ComponentModel.Design.IComponentChangeService + class SystemComponentModelDesignBaseIComponentChangeService : System.ComponentModel.Design.IComponentChangeService { public int CppHandle; - public SystemComponentModelDesignIComponentChangeService(int cppHandle) + public SystemComponentModelDesignBaseIComponentChangeService(int cppHandle) : base() { CppHandle = cppHandle; @@ -2713,11 +2725,11 @@ public event System.ComponentModel.Design.ComponentRenameEventHandler ComponentR } - class SystemIOFileStream : System.IO.FileStream + class SystemIOBaseFileStream : System.IO.FileStream { public int CppHandle; - public SystemIOFileStream(int cppHandle, string path, System.IO.FileMode mode) + public SystemIOBaseFileStream(int cppHandle, string path, System.IO.FileMode mode) : base(path, mode) { CppHandle = cppHandle; @@ -5433,12 +5445,12 @@ static System.IO.FileMode UnboxFileMode(int valHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemInt32ConstructorDelegate))] - static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemInt32ConstructorDelegate))] + static void SystemCollectionsGenericBaseIComparerSystemInt32Constructor(int cppHandle, ref int handle) { try { - var thiz = new SystemCollectionsGenericIComparerSystemInt32(cppHandle); + var thiz = new SystemCollectionsGenericBaseIComparerSystemInt32(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5453,8 +5465,8 @@ static void SystemCollectionsGenericIComparerSystemInt32Constructor(int cppHandl } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemInt32Delegate))] - static void ReleaseSystemCollectionsGenericIComparerSystemInt32(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemInt32Delegate))] + static void ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(int handle) { try { @@ -5472,12 +5484,12 @@ static void ReleaseSystemCollectionsGenericIComparerSystemInt32(int handle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericIComparerSystemStringConstructorDelegate))] - static void SystemCollectionsGenericIComparerSystemStringConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate))] + static void SystemCollectionsGenericBaseIComparerSystemStringConstructor(int cppHandle, ref int handle) { try { - var thiz = new SystemCollectionsGenericIComparerSystemString(cppHandle); + var thiz = new SystemCollectionsGenericBaseIComparerSystemString(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5492,8 +5504,8 @@ static void SystemCollectionsGenericIComparerSystemStringConstructor(int cppHand } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericIComparerSystemStringDelegate))] - static void ReleaseSystemCollectionsGenericIComparerSystemString(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate))] + static void ReleaseSystemCollectionsGenericBaseIComparerSystemString(int handle) { try { @@ -5511,12 +5523,12 @@ static void ReleaseSystemCollectionsGenericIComparerSystemString(int handle) } } - [MonoPInvokeCallback(typeof(SystemStringComparerConstructorDelegate))] - static void SystemStringComparerConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemBaseStringComparerConstructorDelegate))] + static void SystemBaseStringComparerConstructor(int cppHandle, ref int handle) { try { - var thiz = new SystemStringComparer(cppHandle); + var thiz = new SystemBaseStringComparer(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5531,8 +5543,8 @@ static void SystemStringComparerConstructor(int cppHandle, ref int handle) } } - [MonoPInvokeCallback(typeof(ReleaseSystemStringComparerDelegate))] - static void ReleaseSystemStringComparer(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemBaseStringComparerDelegate))] + static void ReleaseSystemBaseStringComparer(int handle) { try { @@ -5550,12 +5562,12 @@ static void ReleaseSystemStringComparer(int handle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsICollectionConstructorDelegate))] - static void SystemCollectionsICollectionConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsBaseICollectionConstructorDelegate))] + static void SystemCollectionsBaseICollectionConstructor(int cppHandle, ref int handle) { try { - var thiz = new SystemCollectionsICollection(cppHandle); + var thiz = new SystemCollectionsBaseICollection(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5570,8 +5582,8 @@ static void SystemCollectionsICollectionConstructor(int cppHandle, ref int handl } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsICollectionDelegate))] - static void ReleaseSystemCollectionsICollection(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsBaseICollectionDelegate))] + static void ReleaseSystemCollectionsBaseICollection(int handle) { try { @@ -5589,12 +5601,12 @@ static void ReleaseSystemCollectionsICollection(int handle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsIListConstructorDelegate))] - static void SystemCollectionsIListConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsBaseIListConstructorDelegate))] + static void SystemCollectionsBaseIListConstructor(int cppHandle, ref int handle) { try { - var thiz = new SystemCollectionsIList(cppHandle); + var thiz = new SystemCollectionsBaseIList(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5609,8 +5621,8 @@ static void SystemCollectionsIListConstructor(int cppHandle, ref int handle) } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsIListDelegate))] - static void ReleaseSystemCollectionsIList(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsBaseIListDelegate))] + static void ReleaseSystemCollectionsBaseIList(int handle) { try { @@ -5628,12 +5640,35 @@ static void ReleaseSystemCollectionsIList(int handle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsQueueConstructorDelegate))] - static void SystemCollectionsQueueConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsQueuePropertyGetCountDelegate))] + static int SystemCollectionsQueuePropertyGetCount(int thisHandle) { try { - var thiz = new SystemCollectionsQueue(cppHandle); + 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) @@ -5648,8 +5683,8 @@ static void SystemCollectionsQueueConstructor(int cppHandle, ref int handle) } } - [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsQueueDelegate))] - static void ReleaseSystemCollectionsQueue(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsBaseQueueDelegate))] + static void ReleaseSystemCollectionsBaseQueue(int handle) { try { @@ -5667,12 +5702,12 @@ static void ReleaseSystemCollectionsQueue(int handle) } } - [MonoPInvokeCallback(typeof(SystemComponentModelDesignIComponentChangeServiceConstructorDelegate))] - static void SystemComponentModelDesignIComponentChangeServiceConstructor(int cppHandle, ref int handle) + [MonoPInvokeCallback(typeof(SystemComponentModelDesignBaseIComponentChangeServiceConstructorDelegate))] + static void SystemComponentModelDesignBaseIComponentChangeServiceConstructor(int cppHandle, ref int handle) { try { - var thiz = new SystemComponentModelDesignIComponentChangeService(cppHandle); + var thiz = new SystemComponentModelDesignBaseIComponentChangeService(cppHandle); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5687,8 +5722,8 @@ static void SystemComponentModelDesignIComponentChangeServiceConstructor(int cpp } } - [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignIComponentChangeServiceDelegate))] - static void ReleaseSystemComponentModelDesignIComponentChangeService(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemComponentModelDesignBaseIComponentChangeServiceDelegate))] + static void ReleaseSystemComponentModelDesignBaseIComponentChangeService(int handle) { try { @@ -5707,12 +5742,55 @@ static void ReleaseSystemComponentModelDesignIComponentChangeService(int handle) } [MonoPInvokeCallback(typeof(SystemIOFileStreamConstructorSystemString_SystemIOFileModeDelegate))] - static void SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int cppHandle, ref int handle, int pathHandle, System.IO.FileMode mode) + 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 SystemIOFileStream(cppHandle, path, mode); + var thiz = new SystemIOBaseFileStream(cppHandle, path, mode); handle = NativeScript.Bindings.ObjectStore.Store(thiz); } catch (System.NullReferenceException ex) @@ -5727,8 +5805,8 @@ static void SystemIOFileStreamConstructorSystemString_SystemIOFileMode(int cppHa } } - [MonoPInvokeCallback(typeof(ReleaseSystemIOFileStreamDelegate))] - static void ReleaseSystemIOFileStream(int handle) + [MonoPInvokeCallback(typeof(ReleaseSystemIOBaseFileStreamDelegate))] + static void ReleaseSystemIOBaseFileStream(int handle) { try { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 272f160..da95a3e 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -92,12 +92,12 @@ class JsonType public JsonEvent[] Events; public JsonGenericParams[] GenericParams; public int MaxSimultaneous; + public JsonBaseType[] BaseTypes; } [Serializable] class JsonBaseType { - public string Name; public JsonGenericParams[] GenericParams; public int MaxSimultaneous; public JsonConstructor[] Constructors; @@ -133,7 +133,6 @@ class JsonDocument { public string[] Assemblies; public JsonType[] Types; - public JsonBaseType[] BaseTypes; public JsonMonoBehaviour[] MonoBehaviours; public JsonArray[] Arrays; public JsonDelegate[] Delegates; @@ -519,18 +518,18 @@ static void DoPostCompileWork(bool canRefreshAssetDb) jsonType, assemblies, builders); - } - } - - // Generate base types - if (doc.BaseTypes != null) - { - foreach (JsonBaseType jsonBaseType in doc.BaseTypes) - { - AppendBaseType( - jsonBaseType, - assemblies, - builders); + + if (jsonType.BaseTypes != null) + { + foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) + { + AppendBaseType( + jsonType.Name, + jsonBaseType, + assemblies, + builders); + } + } } } @@ -1629,18 +1628,20 @@ static void AppendType( } static void AppendBaseType( + string typeName, JsonBaseType jsonBaseType, Assembly[] assemblies, StringBuilders builders) { - Type type = GetType(jsonBaseType.Name, assemblies); + Type type = GetType(typeName, assemblies); + string cppTypeName = "Base" + type.Name; Type[] genericArgTypes = type.GetGenericArguments(); if (jsonBaseType.GenericParams != null) { if (!IsStatic(type)) { AppendCppTemplateDeclaration( - type.Name, + cppTypeName, type.Namespace, genericArgTypes.Length, builders.CppTypeDeclarations); @@ -1661,7 +1662,7 @@ static void AppendBaseType( AppendBaseType( genericType, jsonBaseType, - type.Name, + cppTypeName, typeParams, maxSimultaneous, assemblies, @@ -1676,7 +1677,7 @@ static void AppendBaseType( AppendBaseType( type, jsonBaseType, - type.Name, + cppTypeName, null, maxSimultaneous, assemblies, @@ -5830,11 +5831,15 @@ static void AppendDelegate( AppendCppFreeListStateAndFunctions( type, + typeParams, + cppTypeName, bindingTypeName, builders.CppGlobalStateAndFunctions); AppendCppFreeListInit( type, + typeParams, + cppTypeName, maxSimultaneous, bindingTypeName, builders.CppInitBody); @@ -6034,6 +6039,7 @@ static void AppendDelegate( cppTypeName, typeof(object), typeParams, + null, new ParameterInfo[0], constructorParams, true, @@ -6047,6 +6053,7 @@ static void AppendDelegate( typeParams, "Object", "System", + null, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6057,6 +6064,7 @@ static void AppendDelegate( typeParams, "Object", "System", + null, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6066,6 +6074,7 @@ static void AppendDelegate( typeParams, "Object", "System", + null, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6076,6 +6085,7 @@ static void AppendDelegate( typeParams, "Object", "System", + null, true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6382,6 +6392,7 @@ static void AppendBaseType( type.Namespace, string.Empty, builders.TempStrBuilder); + builders.TempStrBuilder.Append("Base"); AppendTypeNameWithoutSuffixes( type.Name, builders.TempStrBuilder); @@ -6512,25 +6523,28 @@ static void AppendBaseType( AppendCppFreeListStateAndFunctions( type, + typeParams, + cppTypeName, bindingTypeName, builders.CppGlobalStateAndFunctions); AppendCppFreeListInit( type, + typeParams, + cppTypeName, maxSimultaneous, bindingTypeName, builders.CppInitBody); // C++ type definition (begin) - Type baseType = type.BaseType ?? typeof(object); AppendCppTypeDefinitionBegin( cppTypeName, type.Namespace, TypeKind.Class, typeParams, - baseType.Name, - baseType.Namespace, - null, + type.Name, + type.Namespace, + typeParams, false, indent, builders.CppTypeDefinitions); @@ -6645,7 +6659,8 @@ static void AppendBaseType( type.Namespace, TypeKind.Class, cppTypeName, - type.BaseType, + type, + typeParams, typeParams, cppConstructorParams[i], constructorParams[i], @@ -6659,8 +6674,9 @@ static void AppendBaseType( bindingTypeName, cppTypeName, typeParams, - baseType.Name, - baseType.Namespace, + type.Name, + type.Namespace, + typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6669,8 +6685,9 @@ static void AppendBaseType( bindingTypeName, cppTypeName, typeParams, - baseType.Name, - baseType.Namespace, + type.Name, + type.Namespace, + typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6678,8 +6695,9 @@ static void AppendBaseType( AppendCppBaseTypeMoveConstructor( cppTypeName, typeParams, - baseType.Name, - baseType.Namespace, + type.Name, + type.Namespace, + typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6688,8 +6706,9 @@ static void AppendBaseType( bindingTypeName, cppTypeName, typeParams, - baseType.Name, - baseType.Namespace, + type.Name, + type.Namespace, + typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -8719,6 +8738,7 @@ static void AppendCppBaseTypeHandleConstructor( Type[] typeParams, string baseTypeName, string baseTypeNamespace, + Type[] baseTypeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8746,6 +8766,9 @@ static void AppendCppBaseTypeHandleConstructor( baseTypeNamespace, baseTypeName, output); + AppendCppTypeParameters( + baseTypeParams, + output); output.Append("(iu, handle)\n"); AppendIndent( cppMethodDefinitionsIndent, @@ -8797,6 +8820,7 @@ static void AppendCppBaseTypeMoveConstructor( Type[] typeParams, string baseTypeName, string baseTypeNamespace, + Type[] baseTypeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8830,6 +8854,9 @@ static void AppendCppBaseTypeMoveConstructor( baseTypeNamespace, baseTypeName, output); + AppendCppTypeParameters( + baseTypeParams, + output); output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent( cppMethodDefinitionsIndent, @@ -8879,6 +8906,7 @@ static void AppendCppBaseTypeCopyConstructor( Type[] typeParams, string baseTypeName, string baseTypeNamespace, + Type[] baseTypeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8912,6 +8940,9 @@ static void AppendCppBaseTypeCopyConstructor( baseTypeNamespace, baseTypeName, output); + AppendCppTypeParameters( + baseTypeParams, + output); output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); AppendIndent( cppMethodDefinitionsIndent, @@ -8964,6 +8995,7 @@ static void AppendCppBaseTypeNullptrConstructor( Type[] typeParams, string baseTypeName, string baseTypeNamespace, + Type[] baseTypeParams, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8990,6 +9022,9 @@ static void AppendCppBaseTypeNullptrConstructor( baseTypeNamespace, baseTypeName, output); + AppendCppTypeParameters( + baseTypeParams, + output); output.Append("(Plugin::InternalUse::Only, 0)\n"); AppendIndent( cppMethodDefinitionsIndent, @@ -9026,6 +9061,7 @@ static void AppendCppBaseTypeConstructor( string cppTypeName, Type baseType, Type[] typeParams, + Type[] baseTypeParams, ParameterInfo[] cppParameters, ParameterInfo[] parameters, bool typeIsDelegate, @@ -9147,6 +9183,8 @@ static void AppendCppBaseTypeConstructor( static void AppendCppFreeListInit( Type type, + Type[] typeParams, + string cppTypeName, int? maxSimultaneous, string typeName, StringBuilder output) @@ -9167,7 +9205,11 @@ static void AppendCppFreeListInit( output.Append(typeName); output.Append("FreeList = new "); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("*["); output.Append(typeName); @@ -9180,7 +9222,11 @@ static void AppendCppFreeListInit( output.Append(typeName); output.Append("FreeList[i] = ("); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("*)("); output.Append(typeName); @@ -9200,95 +9246,129 @@ static void AppendCppFreeListInit( static void AppendCppFreeListStateAndFunctions( Type type, - string typeName, + Type[] typeParams, + string cppTypeName, + string bindingTypeName, StringBuilder output) { output.Append("\tint32_t "); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("FreeListSize;\n"); output.Append('\t'); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("** "); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("FreeList;\n"); output.Append('\t'); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("** NextFree"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append(";\n"); output.Append("\t\n"); output.Append("\tint32_t Store"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append('('); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("* del)\n"); output.Append("\t{\n"); output.Append("\t\tassert(NextFree"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append(" != nullptr);\n"); output.Append("\t\t"); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("** pNext = NextFree"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append(";\n"); output.Append("\t\tNextFree"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append(" = ("); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("**)*pNext;\n"); output.Append("\t\t*pNext = del;\n"); output.Append("\t\treturn (int32_t)(pNext - "); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("FreeList);\n"); output.Append("\t}\n"); output.Append("\t\n"); output.Append('\t'); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("* Get"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("(int32_t handle)\n"); output.Append("\t{\n"); output.Append( "\t\tassert(handle >= 0 && handle < "); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("FreeListSize);\n"); output.Append("\t\treturn "); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("FreeList[handle];\n"); output.Append("\t}\n"); output.Append("\t\n"); output.Append("\tvoid Remove"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("(int32_t handle)\n"); output.Append("\t{\n"); output.Append("\t\t"); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("** pRelease = "); - output.Append(typeName); + output.Append(bindingTypeName); output.Append("FreeList + handle;\n"); output.Append("\t\t*pRelease = ("); AppendCppTypeName( - type, + type.Namespace, + cppTypeName, + output); + AppendCppTypeParameters( + typeParams, output); output.Append("*)NextFree"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append(";\n"); output.Append("\t\tNextFree"); - output.Append(typeName); + output.Append(bindingTypeName); output.Append(" = pRelease;\n"); output.Append("\t}\n"); } diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 0545f4d..56d156e 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -612,9 +612,7 @@ }, { "Name": "System.IO.Stream" - } - ], - "BaseTypes": [ + }, { "Name": "System.Collections.Generic.IComparer`1", "GenericParams": [ @@ -628,33 +626,82 @@ "System.String" ] } + ], + "BaseTypes": [ + { + "Name": "System.Collections.Generic.IComparer`1", + "GenericParams": [ + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.String" + ] + } + ] + } ] }, { - "Name": "System.StringComparer" + "Name": "System.StringComparer", + "BaseTypes": [ + { + "Name": "System.StringComparer" + } + ] }, { - "Name": "System.Collections.ICollection" + "Name": "System.Collections.ICollection", + "BaseTypes": [ + { + "Name": "System.Collections.ICollection" + } + ] }, { - "Name": "System.Collections.IList" + "Name": "System.Collections.IList", + "BaseTypes": [ + { + "Name": "System.Collections.IList" + } + ] }, { "Name": "System.Collections.Queue", - "OverrideProperties": [ + "Properties": [ { "Name": "Count", "Get": {}, "Set": {} } + ], + "BaseTypes": [ + { + "Name": "System.Collections.Queue", + "OverrideProperties": [ + { + "Name": "Count", + "Get": {}, + "Set": {} + } + ] + } ] }, { - "Name": "System.ComponentModel.Design.IComponentChangeService" + "Name": "System.ComponentModel.Design.IComponentChangeService", + "BaseTypes": [ + { + "Name": "System.ComponentModel.Design.IComponentChangeService" + } + ] }, { "Name": "System.IO.FileStream", - "OverrideMethods": [ + "Methods": [ { "Name": "WriteByte", "ParamTypes": [ @@ -669,6 +716,27 @@ "System.IO.FileMode" ] } + ], + "BaseTypes": [ + { + "Name": "System.IO.FileStream", + "OverrideMethods": [ + { + "Name": "WriteByte", + "ParamTypes": [ + "System.Byte" + ] + } + ], + "Constructors": [ + { + "ParamTypes": [ + "System.String", + "System.IO.FileMode" + ] + } + ] + } ] } ], diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index cd6802c..2f9c286 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -147,22 +147,25 @@ namespace Plugin float (*UnityEngineTimePropertyGetDeltaTime)(); int32_t (*BoxFileMode)(System::IO::FileMode val); System::IO::FileMode (*UnboxFileMode)(int32_t valHandle); - void (*ReleaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle); - void (*SystemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsGenericIComparerSystemString)(int32_t handle); - void (*SystemCollectionsGenericIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemStringComparer)(int32_t handle); - void (*SystemStringComparerConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsICollection)(int32_t handle); - void (*SystemCollectionsICollectionConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsIList)(int32_t handle); - void (*SystemCollectionsIListConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsQueue)(int32_t handle); - void (*SystemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemComponentModelDesignIComponentChangeService)(int32_t handle); - void (*SystemComponentModelDesignIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemIOFileStream)(int32_t handle); - void (*SystemIOFileStreamConstructorSystemString_SystemIOFileMode)(int32_t cppHandle, int32_t* handle, int32_t pathHandle, System::IO::FileMode mode); + 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); + void (*ReleaseSystemCollectionsBaseICollection)(int32_t handle); + void (*SystemCollectionsBaseICollectionConstructor)(int32_t cppHandle, int32_t* handle); + void (*ReleaseSystemCollectionsBaseIList)(int32_t handle); + void (*SystemCollectionsBaseIListConstructor)(int32_t cppHandle, int32_t* handle); + int32_t (*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); int32_t (*BoxBoolean)(System::Boolean val); System::Boolean (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -372,205 +375,205 @@ namespace Plugin } } - int32_t SystemCollectionsGenericIComparerSystemInt32FreeListSize; - System::Collections::Generic::IComparer** SystemCollectionsGenericIComparerSystemInt32FreeList; - System::Collections::Generic::IComparer** NextFreeSystemCollectionsGenericIComparerSystemInt32; + int32_t SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize; + System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemInt32FreeList; + System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; - int32_t StoreSystemCollectionsGenericIComparerSystemInt32(System::Collections::Generic::IComparer* del) + int32_t StoreSystemCollectionsGenericBaseIComparerSystemInt32(System::Collections::Generic::BaseIComparer* del) { - assert(NextFreeSystemCollectionsGenericIComparerSystemInt32 != nullptr); - System::Collections::Generic::IComparer** pNext = NextFreeSystemCollectionsGenericIComparerSystemInt32; - NextFreeSystemCollectionsGenericIComparerSystemInt32 = (System::Collections::Generic::IComparer**)*pNext; + assert(NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 != nullptr); + System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; + NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = (System::Collections::Generic::BaseIComparer**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemCollectionsGenericIComparerSystemInt32FreeList); + return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemInt32FreeList); } - System::Collections::Generic::IComparer* GetSystemCollectionsGenericIComparerSystemInt32(int32_t handle) + System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) { - assert(handle >= 0 && handle < SystemCollectionsGenericIComparerSystemInt32FreeListSize); - return SystemCollectionsGenericIComparerSystemInt32FreeList[handle]; + assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize); + return SystemCollectionsGenericBaseIComparerSystemInt32FreeList[handle]; } - void RemoveSystemCollectionsGenericIComparerSystemInt32(int32_t handle) + void RemoveSystemCollectionsGenericBaseIComparerSystemInt32(int32_t handle) { - System::Collections::Generic::IComparer** pRelease = SystemCollectionsGenericIComparerSystemInt32FreeList + handle; - *pRelease = (System::Collections::Generic::IComparer*)NextFreeSystemCollectionsGenericIComparerSystemInt32; - NextFreeSystemCollectionsGenericIComparerSystemInt32 = pRelease; + System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemInt32FreeList + handle; + *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemInt32; + NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = pRelease; } - int32_t SystemCollectionsGenericIComparerSystemStringFreeListSize; - System::Collections::Generic::IComparer** SystemCollectionsGenericIComparerSystemStringFreeList; - System::Collections::Generic::IComparer** NextFreeSystemCollectionsGenericIComparerSystemString; + int32_t SystemCollectionsGenericBaseIComparerSystemStringFreeListSize; + System::Collections::Generic::BaseIComparer** SystemCollectionsGenericBaseIComparerSystemStringFreeList; + System::Collections::Generic::BaseIComparer** NextFreeSystemCollectionsGenericBaseIComparerSystemString; - int32_t StoreSystemCollectionsGenericIComparerSystemString(System::Collections::Generic::IComparer* del) + int32_t StoreSystemCollectionsGenericBaseIComparerSystemString(System::Collections::Generic::BaseIComparer* del) { - assert(NextFreeSystemCollectionsGenericIComparerSystemString != nullptr); - System::Collections::Generic::IComparer** pNext = NextFreeSystemCollectionsGenericIComparerSystemString; - NextFreeSystemCollectionsGenericIComparerSystemString = (System::Collections::Generic::IComparer**)*pNext; + assert(NextFreeSystemCollectionsGenericBaseIComparerSystemString != nullptr); + System::Collections::Generic::BaseIComparer** pNext = NextFreeSystemCollectionsGenericBaseIComparerSystemString; + NextFreeSystemCollectionsGenericBaseIComparerSystemString = (System::Collections::Generic::BaseIComparer**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemCollectionsGenericIComparerSystemStringFreeList); + return (int32_t)(pNext - SystemCollectionsGenericBaseIComparerSystemStringFreeList); } - System::Collections::Generic::IComparer* GetSystemCollectionsGenericIComparerSystemString(int32_t handle) + System::Collections::Generic::BaseIComparer* GetSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) { - assert(handle >= 0 && handle < SystemCollectionsGenericIComparerSystemStringFreeListSize); - return SystemCollectionsGenericIComparerSystemStringFreeList[handle]; + assert(handle >= 0 && handle < SystemCollectionsGenericBaseIComparerSystemStringFreeListSize); + return SystemCollectionsGenericBaseIComparerSystemStringFreeList[handle]; } - void RemoveSystemCollectionsGenericIComparerSystemString(int32_t handle) + void RemoveSystemCollectionsGenericBaseIComparerSystemString(int32_t handle) { - System::Collections::Generic::IComparer** pRelease = SystemCollectionsGenericIComparerSystemStringFreeList + handle; - *pRelease = (System::Collections::Generic::IComparer*)NextFreeSystemCollectionsGenericIComparerSystemString; - NextFreeSystemCollectionsGenericIComparerSystemString = pRelease; + System::Collections::Generic::BaseIComparer** pRelease = SystemCollectionsGenericBaseIComparerSystemStringFreeList + handle; + *pRelease = (System::Collections::Generic::BaseIComparer*)NextFreeSystemCollectionsGenericBaseIComparerSystemString; + NextFreeSystemCollectionsGenericBaseIComparerSystemString = pRelease; } - int32_t SystemStringComparerFreeListSize; - System::StringComparer** SystemStringComparerFreeList; - System::StringComparer** NextFreeSystemStringComparer; + int32_t SystemBaseStringComparerFreeListSize; + System::BaseStringComparer** SystemBaseStringComparerFreeList; + System::BaseStringComparer** NextFreeSystemBaseStringComparer; - int32_t StoreSystemStringComparer(System::StringComparer* del) + int32_t StoreSystemBaseStringComparer(System::BaseStringComparer* del) { - assert(NextFreeSystemStringComparer != nullptr); - System::StringComparer** pNext = NextFreeSystemStringComparer; - NextFreeSystemStringComparer = (System::StringComparer**)*pNext; + assert(NextFreeSystemBaseStringComparer != nullptr); + System::BaseStringComparer** pNext = NextFreeSystemBaseStringComparer; + NextFreeSystemBaseStringComparer = (System::BaseStringComparer**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemStringComparerFreeList); + return (int32_t)(pNext - SystemBaseStringComparerFreeList); } - System::StringComparer* GetSystemStringComparer(int32_t handle) + System::BaseStringComparer* GetSystemBaseStringComparer(int32_t handle) { - assert(handle >= 0 && handle < SystemStringComparerFreeListSize); - return SystemStringComparerFreeList[handle]; + assert(handle >= 0 && handle < SystemBaseStringComparerFreeListSize); + return SystemBaseStringComparerFreeList[handle]; } - void RemoveSystemStringComparer(int32_t handle) + void RemoveSystemBaseStringComparer(int32_t handle) { - System::StringComparer** pRelease = SystemStringComparerFreeList + handle; - *pRelease = (System::StringComparer*)NextFreeSystemStringComparer; - NextFreeSystemStringComparer = pRelease; + System::BaseStringComparer** pRelease = SystemBaseStringComparerFreeList + handle; + *pRelease = (System::BaseStringComparer*)NextFreeSystemBaseStringComparer; + NextFreeSystemBaseStringComparer = pRelease; } - int32_t SystemCollectionsICollectionFreeListSize; - System::Collections::ICollection** SystemCollectionsICollectionFreeList; - System::Collections::ICollection** NextFreeSystemCollectionsICollection; + int32_t SystemCollectionsBaseICollectionFreeListSize; + System::Collections::BaseICollection** SystemCollectionsBaseICollectionFreeList; + System::Collections::BaseICollection** NextFreeSystemCollectionsBaseICollection; - int32_t StoreSystemCollectionsICollection(System::Collections::ICollection* del) + int32_t StoreSystemCollectionsBaseICollection(System::Collections::BaseICollection* del) { - assert(NextFreeSystemCollectionsICollection != nullptr); - System::Collections::ICollection** pNext = NextFreeSystemCollectionsICollection; - NextFreeSystemCollectionsICollection = (System::Collections::ICollection**)*pNext; + assert(NextFreeSystemCollectionsBaseICollection != nullptr); + System::Collections::BaseICollection** pNext = NextFreeSystemCollectionsBaseICollection; + NextFreeSystemCollectionsBaseICollection = (System::Collections::BaseICollection**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemCollectionsICollectionFreeList); + return (int32_t)(pNext - SystemCollectionsBaseICollectionFreeList); } - System::Collections::ICollection* GetSystemCollectionsICollection(int32_t handle) + System::Collections::BaseICollection* GetSystemCollectionsBaseICollection(int32_t handle) { - assert(handle >= 0 && handle < SystemCollectionsICollectionFreeListSize); - return SystemCollectionsICollectionFreeList[handle]; + assert(handle >= 0 && handle < SystemCollectionsBaseICollectionFreeListSize); + return SystemCollectionsBaseICollectionFreeList[handle]; } - void RemoveSystemCollectionsICollection(int32_t handle) + void RemoveSystemCollectionsBaseICollection(int32_t handle) { - System::Collections::ICollection** pRelease = SystemCollectionsICollectionFreeList + handle; - *pRelease = (System::Collections::ICollection*)NextFreeSystemCollectionsICollection; - NextFreeSystemCollectionsICollection = pRelease; + System::Collections::BaseICollection** pRelease = SystemCollectionsBaseICollectionFreeList + handle; + *pRelease = (System::Collections::BaseICollection*)NextFreeSystemCollectionsBaseICollection; + NextFreeSystemCollectionsBaseICollection = pRelease; } - int32_t SystemCollectionsIListFreeListSize; - System::Collections::IList** SystemCollectionsIListFreeList; - System::Collections::IList** NextFreeSystemCollectionsIList; + int32_t SystemCollectionsBaseIListFreeListSize; + System::Collections::BaseIList** SystemCollectionsBaseIListFreeList; + System::Collections::BaseIList** NextFreeSystemCollectionsBaseIList; - int32_t StoreSystemCollectionsIList(System::Collections::IList* del) + int32_t StoreSystemCollectionsBaseIList(System::Collections::BaseIList* del) { - assert(NextFreeSystemCollectionsIList != nullptr); - System::Collections::IList** pNext = NextFreeSystemCollectionsIList; - NextFreeSystemCollectionsIList = (System::Collections::IList**)*pNext; + assert(NextFreeSystemCollectionsBaseIList != nullptr); + System::Collections::BaseIList** pNext = NextFreeSystemCollectionsBaseIList; + NextFreeSystemCollectionsBaseIList = (System::Collections::BaseIList**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemCollectionsIListFreeList); + return (int32_t)(pNext - SystemCollectionsBaseIListFreeList); } - System::Collections::IList* GetSystemCollectionsIList(int32_t handle) + System::Collections::BaseIList* GetSystemCollectionsBaseIList(int32_t handle) { - assert(handle >= 0 && handle < SystemCollectionsIListFreeListSize); - return SystemCollectionsIListFreeList[handle]; + assert(handle >= 0 && handle < SystemCollectionsBaseIListFreeListSize); + return SystemCollectionsBaseIListFreeList[handle]; } - void RemoveSystemCollectionsIList(int32_t handle) + void RemoveSystemCollectionsBaseIList(int32_t handle) { - System::Collections::IList** pRelease = SystemCollectionsIListFreeList + handle; - *pRelease = (System::Collections::IList*)NextFreeSystemCollectionsIList; - NextFreeSystemCollectionsIList = pRelease; + System::Collections::BaseIList** pRelease = SystemCollectionsBaseIListFreeList + handle; + *pRelease = (System::Collections::BaseIList*)NextFreeSystemCollectionsBaseIList; + NextFreeSystemCollectionsBaseIList = pRelease; } - int32_t SystemCollectionsQueueFreeListSize; - System::Collections::Queue** SystemCollectionsQueueFreeList; - System::Collections::Queue** NextFreeSystemCollectionsQueue; + int32_t SystemCollectionsBaseQueueFreeListSize; + System::Collections::BaseQueue** SystemCollectionsBaseQueueFreeList; + System::Collections::BaseQueue** NextFreeSystemCollectionsBaseQueue; - int32_t StoreSystemCollectionsQueue(System::Collections::Queue* del) + int32_t StoreSystemCollectionsBaseQueue(System::Collections::BaseQueue* del) { - assert(NextFreeSystemCollectionsQueue != nullptr); - System::Collections::Queue** pNext = NextFreeSystemCollectionsQueue; - NextFreeSystemCollectionsQueue = (System::Collections::Queue**)*pNext; + assert(NextFreeSystemCollectionsBaseQueue != nullptr); + System::Collections::BaseQueue** pNext = NextFreeSystemCollectionsBaseQueue; + NextFreeSystemCollectionsBaseQueue = (System::Collections::BaseQueue**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemCollectionsQueueFreeList); + return (int32_t)(pNext - SystemCollectionsBaseQueueFreeList); } - System::Collections::Queue* GetSystemCollectionsQueue(int32_t handle) + System::Collections::BaseQueue* GetSystemCollectionsBaseQueue(int32_t handle) { - assert(handle >= 0 && handle < SystemCollectionsQueueFreeListSize); - return SystemCollectionsQueueFreeList[handle]; + assert(handle >= 0 && handle < SystemCollectionsBaseQueueFreeListSize); + return SystemCollectionsBaseQueueFreeList[handle]; } - void RemoveSystemCollectionsQueue(int32_t handle) + void RemoveSystemCollectionsBaseQueue(int32_t handle) { - System::Collections::Queue** pRelease = SystemCollectionsQueueFreeList + handle; - *pRelease = (System::Collections::Queue*)NextFreeSystemCollectionsQueue; - NextFreeSystemCollectionsQueue = pRelease; + System::Collections::BaseQueue** pRelease = SystemCollectionsBaseQueueFreeList + handle; + *pRelease = (System::Collections::BaseQueue*)NextFreeSystemCollectionsBaseQueue; + NextFreeSystemCollectionsBaseQueue = pRelease; } - int32_t SystemComponentModelDesignIComponentChangeServiceFreeListSize; - System::ComponentModel::Design::IComponentChangeService** SystemComponentModelDesignIComponentChangeServiceFreeList; - System::ComponentModel::Design::IComponentChangeService** NextFreeSystemComponentModelDesignIComponentChangeService; + int32_t SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize; + System::ComponentModel::Design::BaseIComponentChangeService** SystemComponentModelDesignBaseIComponentChangeServiceFreeList; + System::ComponentModel::Design::BaseIComponentChangeService** NextFreeSystemComponentModelDesignBaseIComponentChangeService; - int32_t StoreSystemComponentModelDesignIComponentChangeService(System::ComponentModel::Design::IComponentChangeService* del) + int32_t StoreSystemComponentModelDesignBaseIComponentChangeService(System::ComponentModel::Design::BaseIComponentChangeService* del) { - assert(NextFreeSystemComponentModelDesignIComponentChangeService != nullptr); - System::ComponentModel::Design::IComponentChangeService** pNext = NextFreeSystemComponentModelDesignIComponentChangeService; - NextFreeSystemComponentModelDesignIComponentChangeService = (System::ComponentModel::Design::IComponentChangeService**)*pNext; + assert(NextFreeSystemComponentModelDesignBaseIComponentChangeService != nullptr); + System::ComponentModel::Design::BaseIComponentChangeService** pNext = NextFreeSystemComponentModelDesignBaseIComponentChangeService; + NextFreeSystemComponentModelDesignBaseIComponentChangeService = (System::ComponentModel::Design::BaseIComponentChangeService**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemComponentModelDesignIComponentChangeServiceFreeList); + return (int32_t)(pNext - SystemComponentModelDesignBaseIComponentChangeServiceFreeList); } - System::ComponentModel::Design::IComponentChangeService* GetSystemComponentModelDesignIComponentChangeService(int32_t handle) + System::ComponentModel::Design::BaseIComponentChangeService* GetSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) { - assert(handle >= 0 && handle < SystemComponentModelDesignIComponentChangeServiceFreeListSize); - return SystemComponentModelDesignIComponentChangeServiceFreeList[handle]; + assert(handle >= 0 && handle < SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize); + return SystemComponentModelDesignBaseIComponentChangeServiceFreeList[handle]; } - void RemoveSystemComponentModelDesignIComponentChangeService(int32_t handle) + void RemoveSystemComponentModelDesignBaseIComponentChangeService(int32_t handle) { - System::ComponentModel::Design::IComponentChangeService** pRelease = SystemComponentModelDesignIComponentChangeServiceFreeList + handle; - *pRelease = (System::ComponentModel::Design::IComponentChangeService*)NextFreeSystemComponentModelDesignIComponentChangeService; - NextFreeSystemComponentModelDesignIComponentChangeService = pRelease; + System::ComponentModel::Design::BaseIComponentChangeService** pRelease = SystemComponentModelDesignBaseIComponentChangeServiceFreeList + handle; + *pRelease = (System::ComponentModel::Design::BaseIComponentChangeService*)NextFreeSystemComponentModelDesignBaseIComponentChangeService; + NextFreeSystemComponentModelDesignBaseIComponentChangeService = pRelease; } - int32_t SystemIOFileStreamFreeListSize; - System::IO::FileStream** SystemIOFileStreamFreeList; - System::IO::FileStream** NextFreeSystemIOFileStream; + int32_t SystemIOBaseFileStreamFreeListSize; + System::IO::BaseFileStream** SystemIOBaseFileStreamFreeList; + System::IO::BaseFileStream** NextFreeSystemIOBaseFileStream; - int32_t StoreSystemIOFileStream(System::IO::FileStream* del) + int32_t StoreSystemIOBaseFileStream(System::IO::BaseFileStream* del) { - assert(NextFreeSystemIOFileStream != nullptr); - System::IO::FileStream** pNext = NextFreeSystemIOFileStream; - NextFreeSystemIOFileStream = (System::IO::FileStream**)*pNext; + assert(NextFreeSystemIOBaseFileStream != nullptr); + System::IO::BaseFileStream** pNext = NextFreeSystemIOBaseFileStream; + NextFreeSystemIOBaseFileStream = (System::IO::BaseFileStream**)*pNext; *pNext = del; - return (int32_t)(pNext - SystemIOFileStreamFreeList); + return (int32_t)(pNext - SystemIOBaseFileStreamFreeList); } - System::IO::FileStream* GetSystemIOFileStream(int32_t handle) + System::IO::BaseFileStream* GetSystemIOBaseFileStream(int32_t handle) { - assert(handle >= 0 && handle < SystemIOFileStreamFreeListSize); - return SystemIOFileStreamFreeList[handle]; + assert(handle >= 0 && handle < SystemIOBaseFileStreamFreeListSize); + return SystemIOBaseFileStreamFreeList[handle]; } - void RemoveSystemIOFileStream(int32_t handle) + void RemoveSystemIOBaseFileStream(int32_t handle) { - System::IO::FileStream** pRelease = SystemIOFileStreamFreeList + handle; - *pRelease = (System::IO::FileStream*)NextFreeSystemIOFileStream; - NextFreeSystemIOFileStream = pRelease; + System::IO::BaseFileStream** pRelease = SystemIOBaseFileStreamFreeList + handle; + *pRelease = (System::IO::BaseFileStream*)NextFreeSystemIOBaseFileStream; + NextFreeSystemIOBaseFileStream = pRelease; } int32_t SystemActionFreeListSize; System::Action** SystemActionFreeList; @@ -5785,13 +5788,189 @@ namespace System { namespace Generic { - IComparer::IComparer() - : System::Object(nullptr) + IComparer::IComparer(decltype(nullptr) n) + : IComparer(Plugin::InternalUse::Only, 0) + { + } + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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) n) + : IComparer(Plugin::InternalUse::Only, 0) + { + } + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + 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) other) + { + 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); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor(cppHandle, handle); + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5805,7 +5984,7 @@ namespace System } else { - Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -5817,43 +5996,43 @@ namespace System } } - IComparer::IComparer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseIComparer::BaseIComparer(decltype(nullptr) n) + : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); } - IComparer::IComparer(const IComparer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIComparer::BaseIComparer(const BaseIComparer& other) + : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IComparer::IComparer(IComparer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIComparer::BaseIComparer(BaseIComparer&& other) + : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) + : System::Collections::Generic::IComparer(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemInt32(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IComparer::~IComparer() + BaseIComparer::~BaseIComparer() { - Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); CppHandle = 0; if (Handle) { @@ -5861,7 +6040,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5873,7 +6052,7 @@ namespace System } } - IComparer& IComparer::operator=(const IComparer& other) + BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) { if (this->Handle) { @@ -5887,7 +6066,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) { if (Handle) { @@ -5895,7 +6074,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5909,9 +6088,9 @@ namespace System return *this; } - IComparer& IComparer::operator=(IComparer&& other) + BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) { - Plugin::RemoveSystemCollectionsGenericIComparerSystemInt32(CppHandle); + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemInt32(CppHandle); CppHandle = 0; if (Handle) { @@ -5919,7 +6098,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32(handle); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5934,17 +6113,17 @@ namespace System return *this; } - bool IComparer::operator==(const IComparer& other) const + bool BaseIComparer::operator==(const BaseIComparer& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool BaseIComparer::operator!=(const BaseIComparer& other) const { return Handle != other.Handle; } - int32_t IComparer::Compare(int32_t x, int32_t y) + int32_t BaseIComparer::Compare(int32_t x, int32_t y) { return {}; } @@ -5953,7 +6132,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsGenericIComparerSystemInt32(cppHandle)->Compare(x, y); + return Plugin::GetSystemCollectionsGenericBaseIComparerSystemInt32(cppHandle)->Compare(x, y); } catch (System::Exception ex) { @@ -5978,13 +6157,13 @@ namespace System { namespace Generic { - IComparer::IComparer() - : System::Object(nullptr) + BaseIComparer::BaseIComparer() + : System::Collections::Generic::IComparer(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsGenericIComparerSystemStringConstructor(cppHandle, handle); + Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5998,7 +6177,7 @@ namespace System } else { - Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -6010,43 +6189,43 @@ namespace System } } - IComparer::IComparer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseIComparer::BaseIComparer(decltype(nullptr) n) + : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); } - IComparer::IComparer(const IComparer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIComparer::BaseIComparer(const BaseIComparer& other) + : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IComparer::IComparer(IComparer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIComparer::BaseIComparer(BaseIComparer&& other) + : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) + : System::Collections::Generic::IComparer(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericIComparerSystemString(this); + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IComparer::~IComparer() + BaseIComparer::~BaseIComparer() { - Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); CppHandle = 0; if (Handle) { @@ -6054,7 +6233,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6066,7 +6245,7 @@ namespace System } } - IComparer& IComparer::operator=(const IComparer& other) + BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) { if (this->Handle) { @@ -6080,7 +6259,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) { if (Handle) { @@ -6088,7 +6267,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6102,9 +6281,9 @@ namespace System return *this; } - IComparer& IComparer::operator=(IComparer&& other) + BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) { - Plugin::RemoveSystemCollectionsGenericIComparerSystemString(CppHandle); + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); CppHandle = 0; if (Handle) { @@ -6112,7 +6291,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString(handle); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6127,17 +6306,17 @@ namespace System return *this; } - bool IComparer::operator==(const IComparer& other) const + bool BaseIComparer::operator==(const BaseIComparer& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool BaseIComparer::operator!=(const BaseIComparer& other) const { return Handle != other.Handle; } - int32_t IComparer::Compare(System::String& x, System::String& y) + int32_t BaseIComparer::Compare(System::String& x, System::String& y) { return {}; } @@ -6148,7 +6327,7 @@ namespace System { auto x = System::String(Plugin::InternalUse::Only, xHandle); auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemCollectionsGenericIComparerSystemString(cppHandle)->Compare(x, y); + return Plugin::GetSystemCollectionsGenericBaseIComparerSystemString(cppHandle)->Compare(x, y); } catch (System::Exception ex) { @@ -6169,13 +6348,95 @@ namespace System namespace System { - StringComparer::StringComparer() - : System::Object(nullptr) + StringComparer::StringComparer(decltype(nullptr) n) + : StringComparer(Plugin::InternalUse::Only, 0) + { + } + + StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) { - CppHandle = Plugin::StoreSystemStringComparer(this); + 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) other) + { + 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::StringComparer(nullptr) + { + CppHandle = Plugin::StoreSystemBaseStringComparer(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemStringComparerConstructor(cppHandle, handle); + Plugin::SystemBaseStringComparerConstructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6189,7 +6450,7 @@ namespace System } else { - Plugin::RemoveSystemStringComparer(CppHandle); + Plugin::RemoveSystemBaseStringComparer(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -6201,43 +6462,43 @@ namespace System } } - StringComparer::StringComparer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseStringComparer::BaseStringComparer(decltype(nullptr) n) + : System::StringComparer(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemStringComparer(this); + CppHandle = Plugin::StoreSystemBaseStringComparer(this); } - StringComparer::StringComparer(const StringComparer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseStringComparer::BaseStringComparer(const BaseStringComparer& other) + : System::StringComparer(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemStringComparer(this); + CppHandle = Plugin::StoreSystemBaseStringComparer(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - StringComparer::StringComparer(StringComparer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseStringComparer::BaseStringComparer(BaseStringComparer&& other) + : System::StringComparer(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseStringComparer::BaseStringComparer(Plugin::InternalUse iu, int32_t handle) + : System::StringComparer(iu, handle) { - CppHandle = Plugin::StoreSystemStringComparer(this); + CppHandle = Plugin::StoreSystemBaseStringComparer(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - StringComparer::~StringComparer() + BaseStringComparer::~BaseStringComparer() { - Plugin::RemoveSystemStringComparer(CppHandle); + Plugin::RemoveSystemBaseStringComparer(CppHandle); CppHandle = 0; if (Handle) { @@ -6245,7 +6506,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemStringComparer(handle); + Plugin::ReleaseSystemBaseStringComparer(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6257,7 +6518,7 @@ namespace System } } - StringComparer& StringComparer::operator=(const StringComparer& other) + BaseStringComparer& BaseStringComparer::operator=(const BaseStringComparer& other) { if (this->Handle) { @@ -6271,7 +6532,7 @@ namespace System return *this; } - StringComparer& StringComparer::operator=(decltype(nullptr) other) + BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr) other) { if (Handle) { @@ -6279,7 +6540,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemStringComparer(handle); + Plugin::ReleaseSystemBaseStringComparer(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6293,9 +6554,9 @@ namespace System return *this; } - StringComparer& StringComparer::operator=(StringComparer&& other) + BaseStringComparer& BaseStringComparer::operator=(BaseStringComparer&& other) { - Plugin::RemoveSystemStringComparer(CppHandle); + Plugin::RemoveSystemBaseStringComparer(CppHandle); CppHandle = 0; if (Handle) { @@ -6303,7 +6564,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemStringComparer(handle); + Plugin::ReleaseSystemBaseStringComparer(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6318,17 +6579,17 @@ namespace System return *this; } - bool StringComparer::operator==(const StringComparer& other) const + bool BaseStringComparer::operator==(const BaseStringComparer& other) const { return Handle == other.Handle; } - bool StringComparer::operator!=(const StringComparer& other) const + bool BaseStringComparer::operator!=(const BaseStringComparer& other) const { return Handle != other.Handle; } - int32_t StringComparer::Compare(System::String& x, System::String& y) + int32_t BaseStringComparer::Compare(System::String& x, System::String& y) { return {}; } @@ -6339,7 +6600,7 @@ namespace System { auto x = System::String(Plugin::InternalUse::Only, xHandle); auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemStringComparer(cppHandle)->Compare(x, y); + return Plugin::GetSystemBaseStringComparer(cppHandle)->Compare(x, y); } catch (System::Exception ex) { @@ -6355,7 +6616,7 @@ namespace System } } - System::Boolean StringComparer::Equals(System::String& x, System::String& y) + System::Boolean BaseStringComparer::Equals(System::String& x, System::String& y) { return {}; } @@ -6366,45 +6627,130 @@ namespace System { auto x = System::String(Plugin::InternalUse::Only, xHandle); auto y = System::String(Plugin::InternalUse::Only, yHandle); - return Plugin::GetSystemStringComparer(cppHandle)->Equals(x, y); + return Plugin::GetSystemBaseStringComparer(cppHandle)->Equals(x, y); } catch (System::Exception ex) { - Plugin::SetException(ex.Handle); - return {}; + Plugin::SetException(ex.Handle); + return {}; + } + catch (...) + { + System::String msg = "Unhandled exception invoking System::StringComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + + int32_t 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 + { + ICollection::ICollection(decltype(nullptr) n) + : ICollection(Plugin::InternalUse::Only, 0) + { + } + + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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; } - catch (...) + + ICollection& ICollection::operator=(decltype(nullptr) other) { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - } - - int32_t StringComparer::GetHashCode(System::String& obj) - { - return {}; - } - - DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) - { - try + + ICollection& ICollection::operator=(ICollection&& other) { - auto obj = System::String(Plugin::InternalUse::Only, objHandle); - return Plugin::GetSystemStringComparer(cppHandle)->GetHashCode(obj); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - catch (System::Exception ex) + + bool ICollection::operator==(const ICollection& other) const { - Plugin::SetException(ex.Handle); - return {}; + return Handle == other.Handle; } - catch (...) + + bool ICollection::operator!=(const ICollection& other) const { - System::String msg = "Unhandled exception invoking System::StringComparer"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + return Handle != other.Handle; } } } @@ -6413,13 +6759,13 @@ namespace System { namespace Collections { - ICollection::ICollection() - : System::Object(nullptr) + BaseICollection::BaseICollection() + : System::Collections::ICollection(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); + CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsICollectionConstructor(cppHandle, handle); + Plugin::SystemCollectionsBaseICollectionConstructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6433,7 +6779,7 @@ namespace System } else { - Plugin::RemoveSystemCollectionsICollection(CppHandle); + Plugin::RemoveSystemCollectionsBaseICollection(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -6445,43 +6791,43 @@ namespace System } } - ICollection::ICollection(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseICollection::BaseICollection(decltype(nullptr) n) + : System::Collections::ICollection(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); + CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); } - ICollection::ICollection(const ICollection& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseICollection::BaseICollection(const BaseICollection& other) + : System::Collections::ICollection(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); + CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - ICollection::ICollection(ICollection&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseICollection::BaseICollection(BaseICollection&& other) + : System::Collections::ICollection(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseICollection::BaseICollection(Plugin::InternalUse iu, int32_t handle) + : System::Collections::ICollection(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsICollection(this); + CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - ICollection::~ICollection() + BaseICollection::~BaseICollection() { - Plugin::RemoveSystemCollectionsICollection(CppHandle); + Plugin::RemoveSystemCollectionsBaseICollection(CppHandle); CppHandle = 0; if (Handle) { @@ -6489,7 +6835,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsICollection(handle); + Plugin::ReleaseSystemCollectionsBaseICollection(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6501,7 +6847,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + BaseICollection& BaseICollection::operator=(const BaseICollection& other) { if (this->Handle) { @@ -6515,7 +6861,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + BaseICollection& BaseICollection::operator=(decltype(nullptr) other) { if (Handle) { @@ -6523,7 +6869,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsICollection(handle); + Plugin::ReleaseSystemCollectionsBaseICollection(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6537,9 +6883,9 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + BaseICollection& BaseICollection::operator=(BaseICollection&& other) { - Plugin::RemoveSystemCollectionsICollection(CppHandle); + Plugin::RemoveSystemCollectionsBaseICollection(CppHandle); CppHandle = 0; if (Handle) { @@ -6547,7 +6893,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsICollection(handle); + Plugin::ReleaseSystemCollectionsBaseICollection(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6562,17 +6908,17 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool BaseICollection::operator==(const BaseICollection& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + bool BaseICollection::operator!=(const BaseICollection& other) const { return Handle != other.Handle; } - void ICollection::CopyTo(System::Array& array, int32_t index) + void BaseICollection::CopyTo(System::Array& array, int32_t index) { } @@ -6581,7 +6927,7 @@ namespace System try { auto array = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsICollection(cppHandle)->CopyTo(array, index); + Plugin::GetSystemCollectionsBaseICollection(cppHandle)->CopyTo(array, index); } catch (System::Exception ex) { @@ -6595,7 +6941,7 @@ namespace System } } - System::Collections::IEnumerator ICollection::GetEnumerator() + System::Collections::IEnumerator BaseICollection::GetEnumerator() { return nullptr; } @@ -6604,7 +6950,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetEnumerator().Handle; + return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetEnumerator().Handle; } catch (System::Exception ex) { @@ -6620,7 +6966,7 @@ namespace System } } - int32_t ICollection::GetCount() + int32_t BaseICollection::GetCount() { return {}; } @@ -6629,7 +6975,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetCount(); + return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetCount(); } catch (System::Exception ex) { @@ -6645,7 +6991,7 @@ namespace System } } - System::Boolean ICollection::GetIsSynchronized() + System::Boolean BaseICollection::GetIsSynchronized() { return {}; } @@ -6654,7 +7000,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetIsSynchronized(); + return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetIsSynchronized(); } catch (System::Exception ex) { @@ -6670,7 +7016,7 @@ namespace System } } - System::Object ICollection::GetSyncRoot() + System::Object BaseICollection::GetSyncRoot() { return nullptr; } @@ -6679,7 +7025,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsICollection(cppHandle)->GetSyncRoot().Handle; + return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetSyncRoot().Handle; } catch (System::Exception ex) { @@ -6701,13 +7047,98 @@ namespace System { namespace Collections { - IList::IList() - : System::Object(nullptr) + IList::IList(decltype(nullptr) n) + : IList(Plugin::InternalUse::Only, 0) + { + } + + IList::IList(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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 System +{ + namespace Collections + { + BaseIList::BaseIList() + : System::Collections::IList(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); + CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsIListConstructor(cppHandle, handle); + Plugin::SystemCollectionsBaseIListConstructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6721,7 +7152,7 @@ namespace System } else { - Plugin::RemoveSystemCollectionsIList(CppHandle); + Plugin::RemoveSystemCollectionsBaseIList(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -6733,43 +7164,43 @@ namespace System } } - IList::IList(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseIList::BaseIList(decltype(nullptr) n) + : System::Collections::IList(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); + CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); } - IList::IList(const IList& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIList::BaseIList(const BaseIList& other) + : System::Collections::IList(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); + CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IList::IList(IList&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIList::BaseIList(BaseIList&& other) + : System::Collections::IList(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseIList::BaseIList(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IList(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsIList(this); + CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IList::~IList() + BaseIList::~BaseIList() { - Plugin::RemoveSystemCollectionsIList(CppHandle); + Plugin::RemoveSystemCollectionsBaseIList(CppHandle); CppHandle = 0; if (Handle) { @@ -6777,7 +7208,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsIList(handle); + Plugin::ReleaseSystemCollectionsBaseIList(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6789,7 +7220,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + BaseIList& BaseIList::operator=(const BaseIList& other) { if (this->Handle) { @@ -6803,7 +7234,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + BaseIList& BaseIList::operator=(decltype(nullptr) other) { if (Handle) { @@ -6811,7 +7242,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsIList(handle); + Plugin::ReleaseSystemCollectionsBaseIList(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6825,9 +7256,9 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + BaseIList& BaseIList::operator=(BaseIList&& other) { - Plugin::RemoveSystemCollectionsIList(CppHandle); + Plugin::RemoveSystemCollectionsBaseIList(CppHandle); CppHandle = 0; if (Handle) { @@ -6835,7 +7266,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsIList(handle); + Plugin::ReleaseSystemCollectionsBaseIList(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6850,17 +7281,17 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool BaseIList::operator==(const BaseIList& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool BaseIList::operator!=(const BaseIList& other) const { return Handle != other.Handle; } - int32_t IList::Add(System::Object& value) + int32_t BaseIList::Add(System::Object& value) { return {}; } @@ -6870,7 +7301,7 @@ namespace System try { auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->Add(value); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->Add(value); } catch (System::Exception ex) { @@ -6886,7 +7317,7 @@ namespace System } } - void IList::Clear() + void BaseIList::Clear() { } @@ -6894,7 +7325,7 @@ namespace System { try { - Plugin::GetSystemCollectionsIList(cppHandle)->Clear(); + Plugin::GetSystemCollectionsBaseIList(cppHandle)->Clear(); } catch (System::Exception ex) { @@ -6908,7 +7339,7 @@ namespace System } } - System::Boolean IList::Contains(System::Object& value) + System::Boolean BaseIList::Contains(System::Object& value) { return {}; } @@ -6918,7 +7349,7 @@ namespace System try { auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->Contains(value); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->Contains(value); } catch (System::Exception ex) { @@ -6934,7 +7365,7 @@ namespace System } } - int32_t IList::IndexOf(System::Object& value) + int32_t BaseIList::IndexOf(System::Object& value) { return {}; } @@ -6944,7 +7375,7 @@ namespace System try { auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsIList(cppHandle)->IndexOf(value); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->IndexOf(value); } catch (System::Exception ex) { @@ -6960,7 +7391,7 @@ namespace System } } - void IList::Insert(int32_t index, System::Object& value) + void BaseIList::Insert(int32_t index, System::Object& value) { } @@ -6969,7 +7400,7 @@ namespace System try { auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->Insert(index, value); + Plugin::GetSystemCollectionsBaseIList(cppHandle)->Insert(index, value); } catch (System::Exception ex) { @@ -6983,7 +7414,7 @@ namespace System } } - void IList::Remove(System::Object& value) + void BaseIList::Remove(System::Object& value) { } @@ -6992,7 +7423,7 @@ namespace System try { auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->Remove(value); + Plugin::GetSystemCollectionsBaseIList(cppHandle)->Remove(value); } catch (System::Exception ex) { @@ -7006,7 +7437,7 @@ namespace System } } - void IList::RemoveAt(int32_t index) + void BaseIList::RemoveAt(int32_t index) { } @@ -7014,7 +7445,7 @@ namespace System { try { - Plugin::GetSystemCollectionsIList(cppHandle)->RemoveAt(index); + Plugin::GetSystemCollectionsBaseIList(cppHandle)->RemoveAt(index); } catch (System::Exception ex) { @@ -7028,7 +7459,7 @@ namespace System } } - System::Collections::IEnumerator IList::GetEnumerator() + System::Collections::IEnumerator BaseIList::GetEnumerator() { return nullptr; } @@ -7037,7 +7468,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetEnumerator().Handle; + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetEnumerator().Handle; } catch (System::Exception ex) { @@ -7053,7 +7484,7 @@ namespace System } } - void IList::CopyTo(System::Array& array, int32_t index) + void BaseIList::CopyTo(System::Array& array, int32_t index) { } @@ -7062,7 +7493,7 @@ namespace System try { auto array = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->CopyTo(array, index); + Plugin::GetSystemCollectionsBaseIList(cppHandle)->CopyTo(array, index); } catch (System::Exception ex) { @@ -7076,7 +7507,7 @@ namespace System } } - System::Boolean IList::GetIsFixedSize() + System::Boolean BaseIList::GetIsFixedSize() { return {}; } @@ -7085,7 +7516,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsFixedSize(); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetIsFixedSize(); } catch (System::Exception ex) { @@ -7101,7 +7532,7 @@ namespace System } } - System::Boolean IList::GetIsReadOnly() + System::Boolean BaseIList::GetIsReadOnly() { return {}; } @@ -7110,7 +7541,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsReadOnly(); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetIsReadOnly(); } catch (System::Exception ex) { @@ -7126,7 +7557,7 @@ namespace System } } - System::Object IList::GetItem(int32_t index) + System::Object BaseIList::GetItem(int32_t index) { return nullptr; } @@ -7135,7 +7566,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetItem(index).Handle; + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetItem(index).Handle; } catch (System::Exception ex) { @@ -7151,7 +7582,7 @@ namespace System } } - void IList::SetItem(int32_t index, System::Object& value) + void BaseIList::SetItem(int32_t index, System::Object& value) { } @@ -7160,7 +7591,7 @@ namespace System try { auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsIList(cppHandle)->SetItem(index, value); + Plugin::GetSystemCollectionsBaseIList(cppHandle)->SetItem(index, value); } catch (System::Exception ex) { @@ -7174,7 +7605,7 @@ namespace System } } - int32_t IList::GetCount() + int32_t BaseIList::GetCount() { return {}; } @@ -7183,7 +7614,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetCount(); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetCount(); } catch (System::Exception ex) { @@ -7199,7 +7630,7 @@ namespace System } } - System::Boolean IList::GetIsSynchronized() + System::Boolean BaseIList::GetIsSynchronized() { return {}; } @@ -7208,7 +7639,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetIsSynchronized(); + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetIsSynchronized(); } catch (System::Exception ex) { @@ -7224,7 +7655,7 @@ namespace System } } - System::Object IList::GetSyncRoot() + System::Object BaseIList::GetSyncRoot() { return nullptr; } @@ -7233,7 +7664,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsIList(cppHandle)->GetSyncRoot().Handle; + return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetSyncRoot().Handle; } catch (System::Exception ex) { @@ -7242,11 +7673,109 @@ namespace System } catch (...) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + System::String msg = "Unhandled exception invoking System::Collections::IList"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; + } + } + } +} + +namespace System +{ + namespace Collections + { + Queue::Queue(decltype(nullptr) n) + : Queue(Plugin::InternalUse::Only, 0) + { + } + + Queue::Queue(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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; + } + + int32_t Queue::GetCount() + { + auto returnValue = Plugin::SystemCollectionsQueuePropertyGetCount(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } } } @@ -7255,13 +7784,13 @@ namespace System { namespace Collections { - Queue::Queue() - : System::Object(nullptr) + BaseQueue::BaseQueue() + : System::Collections::Queue(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsQueue(this); + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsQueueConstructor(cppHandle, handle); + Plugin::SystemCollectionsBaseQueueConstructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7275,7 +7804,7 @@ namespace System } else { - Plugin::RemoveSystemCollectionsQueue(CppHandle); + Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -7287,43 +7816,43 @@ namespace System } } - Queue::Queue(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseQueue::BaseQueue(decltype(nullptr) n) + : System::Collections::Queue(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemCollectionsQueue(this); + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); } - Queue::Queue(const Queue& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseQueue::BaseQueue(const BaseQueue& other) + : System::Collections::Queue(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsQueue(this); + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - Queue::Queue(Queue&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseQueue::BaseQueue(BaseQueue&& other) + : System::Collections::Queue(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - Queue::Queue(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseQueue::BaseQueue(Plugin::InternalUse iu, int32_t handle) + : System::Collections::Queue(iu, handle) { - CppHandle = Plugin::StoreSystemCollectionsQueue(this); + CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - Queue::~Queue() + BaseQueue::~BaseQueue() { - Plugin::RemoveSystemCollectionsQueue(CppHandle); + Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); CppHandle = 0; if (Handle) { @@ -7331,7 +7860,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsQueue(handle); + Plugin::ReleaseSystemCollectionsBaseQueue(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7343,7 +7872,7 @@ namespace System } } - Queue& Queue::operator=(const Queue& other) + BaseQueue& BaseQueue::operator=(const BaseQueue& other) { if (this->Handle) { @@ -7357,7 +7886,7 @@ namespace System return *this; } - Queue& Queue::operator=(decltype(nullptr) other) + BaseQueue& BaseQueue::operator=(decltype(nullptr) other) { if (Handle) { @@ -7365,7 +7894,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsQueue(handle); + Plugin::ReleaseSystemCollectionsBaseQueue(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7379,9 +7908,9 @@ namespace System return *this; } - Queue& Queue::operator=(Queue&& other) + BaseQueue& BaseQueue::operator=(BaseQueue&& other) { - Plugin::RemoveSystemCollectionsQueue(CppHandle); + Plugin::RemoveSystemCollectionsBaseQueue(CppHandle); CppHandle = 0; if (Handle) { @@ -7389,7 +7918,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemCollectionsQueue(handle); + Plugin::ReleaseSystemCollectionsBaseQueue(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7404,17 +7933,17 @@ namespace System return *this; } - bool Queue::operator==(const Queue& other) const + bool BaseQueue::operator==(const BaseQueue& other) const { return Handle == other.Handle; } - bool Queue::operator!=(const Queue& other) const + bool BaseQueue::operator!=(const BaseQueue& other) const { return Handle != other.Handle; } - int32_t Queue::GetCount() + int32_t BaseQueue::GetCount() { return {}; } @@ -7423,7 +7952,7 @@ namespace System { try { - return Plugin::GetSystemCollectionsQueue(cppHandle)->GetCount(); + return Plugin::GetSystemCollectionsBaseQueue(cppHandle)->GetCount(); } catch (System::Exception ex) { @@ -7447,13 +7976,101 @@ namespace System { namespace Design { - IComponentChangeService::IComponentChangeService() - : System::Object(nullptr) + IComponentChangeService::IComponentChangeService(decltype(nullptr) n) + : IComponentChangeService(Plugin::InternalUse::Only, 0) + { + } + + IComponentChangeService::IComponentChangeService(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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::StoreSystemComponentModelDesignIComponentChangeService(this); + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor(cppHandle, handle); + Plugin::SystemComponentModelDesignBaseIComponentChangeServiceConstructor(cppHandle, handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7467,7 +8084,7 @@ namespace System } else { - Plugin::RemoveSystemComponentModelDesignIComponentChangeService(CppHandle); + Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -7479,43 +8096,43 @@ namespace System } } - IComponentChangeService::IComponentChangeService(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) + BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr) n) + : System::ComponentModel::Design::IComponentChangeService(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); } - IComponentChangeService::IComponentChangeService(const IComponentChangeService& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIComponentChangeService::BaseIComponentChangeService(const BaseIComponentChangeService& other) + : System::ComponentModel::Design::IComponentChangeService(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IComponentChangeService::IComponentChangeService(IComponentChangeService&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) + BaseIComponentChangeService::BaseIComponentChangeService(BaseIComponentChangeService&& other) + : System::ComponentModel::Design::IComponentChangeService(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - IComponentChangeService::IComponentChangeService(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + BaseIComponentChangeService::BaseIComponentChangeService(Plugin::InternalUse iu, int32_t handle) + : System::ComponentModel::Design::IComponentChangeService(iu, handle) { - CppHandle = Plugin::StoreSystemComponentModelDesignIComponentChangeService(this); + CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - IComponentChangeService::~IComponentChangeService() + BaseIComponentChangeService::~BaseIComponentChangeService() { - Plugin::RemoveSystemComponentModelDesignIComponentChangeService(CppHandle); + Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); CppHandle = 0; if (Handle) { @@ -7523,7 +8140,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemComponentModelDesignIComponentChangeService(handle); + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7535,7 +8152,7 @@ namespace System } } - IComponentChangeService& IComponentChangeService::operator=(const IComponentChangeService& other) + BaseIComponentChangeService& BaseIComponentChangeService::operator=(const BaseIComponentChangeService& other) { if (this->Handle) { @@ -7549,7 +8166,7 @@ namespace System return *this; } - IComponentChangeService& IComponentChangeService::operator=(decltype(nullptr) other) + BaseIComponentChangeService& BaseIComponentChangeService::operator=(decltype(nullptr) other) { if (Handle) { @@ -7557,7 +8174,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemComponentModelDesignIComponentChangeService(handle); + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7571,9 +8188,9 @@ namespace System return *this; } - IComponentChangeService& IComponentChangeService::operator=(IComponentChangeService&& other) + BaseIComponentChangeService& BaseIComponentChangeService::operator=(BaseIComponentChangeService&& other) { - Plugin::RemoveSystemComponentModelDesignIComponentChangeService(CppHandle); + Plugin::RemoveSystemComponentModelDesignBaseIComponentChangeService(CppHandle); CppHandle = 0; if (Handle) { @@ -7581,7 +8198,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemComponentModelDesignIComponentChangeService(handle); + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -7596,17 +8213,17 @@ namespace System return *this; } - bool IComponentChangeService::operator==(const IComponentChangeService& other) const + bool BaseIComponentChangeService::operator==(const BaseIComponentChangeService& other) const { return Handle == other.Handle; } - bool IComponentChangeService::operator!=(const IComponentChangeService& other) const + bool BaseIComponentChangeService::operator!=(const BaseIComponentChangeService& other) const { return Handle != other.Handle; } - void IComponentChangeService::OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue) + void BaseIComponentChangeService::OnComponentChanged(System::Object& component, System::ComponentModel::MemberDescriptor& member, System::Object& oldValue, System::Object& newValue) { } @@ -7618,7 +8235,7 @@ namespace System 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::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanged(component, member, oldValue, newValue); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanged(component, member, oldValue, newValue); } catch (System::Exception ex) { @@ -7632,7 +8249,7 @@ namespace System } } - void IComponentChangeService::OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member) + void BaseIComponentChangeService::OnComponentChanging(System::Object& component, System::ComponentModel::MemberDescriptor& member) { } @@ -7642,7 +8259,7 @@ namespace System { auto component = System::Object(Plugin::InternalUse::Only, componentHandle); auto member = System::ComponentModel::MemberDescriptor(Plugin::InternalUse::Only, memberHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->OnComponentChanging(component, member); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->OnComponentChanging(component, member); } catch (System::Exception ex) { @@ -7656,7 +8273,7 @@ namespace System } } - void IComponentChangeService::AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::AddComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7665,7 +8282,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdded(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdded(value); } catch (System::Exception ex) { @@ -7679,7 +8296,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::RemoveComponentAdded(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7688,7 +8305,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdded(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdded(value); } catch (System::Exception ex) { @@ -7702,7 +8319,7 @@ namespace System } } - void IComponentChangeService::AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::AddComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7711,7 +8328,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentAdding(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentAdding(value); } catch (System::Exception ex) { @@ -7725,7 +8342,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::RemoveComponentAdding(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7734,7 +8351,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentAdding(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentAdding(value); } catch (System::Exception ex) { @@ -7748,7 +8365,7 @@ namespace System } } - void IComponentChangeService::AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + void BaseIComponentChangeService::AddComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) { } @@ -7757,7 +8374,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanged(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanged(value); } catch (System::Exception ex) { @@ -7771,7 +8388,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) + void BaseIComponentChangeService::RemoveComponentChanged(System::ComponentModel::Design::ComponentChangedEventHandler& value) { } @@ -7780,7 +8397,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentChangedEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanged(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanged(value); } catch (System::Exception ex) { @@ -7794,7 +8411,7 @@ namespace System } } - void IComponentChangeService::AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + void BaseIComponentChangeService::AddComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) { } @@ -7803,7 +8420,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentChanging(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentChanging(value); } catch (System::Exception ex) { @@ -7817,7 +8434,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) + void BaseIComponentChangeService::RemoveComponentChanging(System::ComponentModel::Design::ComponentChangingEventHandler& value) { } @@ -7826,7 +8443,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentChangingEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentChanging(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentChanging(value); } catch (System::Exception ex) { @@ -7840,7 +8457,7 @@ namespace System } } - void IComponentChangeService::AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::AddComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7849,7 +8466,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoved(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoved(value); } catch (System::Exception ex) { @@ -7863,7 +8480,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::RemoveComponentRemoved(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7872,7 +8489,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoved(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoved(value); } catch (System::Exception ex) { @@ -7886,7 +8503,7 @@ namespace System } } - void IComponentChangeService::AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::AddComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7895,7 +8512,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRemoving(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRemoving(value); } catch (System::Exception ex) { @@ -7909,7 +8526,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) + void BaseIComponentChangeService::RemoveComponentRemoving(System::ComponentModel::Design::ComponentEventHandler& value) { } @@ -7918,7 +8535,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRemoving(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRemoving(value); } catch (System::Exception ex) { @@ -7932,7 +8549,7 @@ namespace System } } - void IComponentChangeService::AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + void BaseIComponentChangeService::AddComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) { } @@ -7941,7 +8558,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->AddComponentRename(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->AddComponentRename(value); } catch (System::Exception ex) { @@ -7955,7 +8572,7 @@ namespace System } } - void IComponentChangeService::RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) + void BaseIComponentChangeService::RemoveComponentRename(System::ComponentModel::Design::ComponentRenameEventHandler& value) { } @@ -7964,7 +8581,7 @@ namespace System try { auto value = System::ComponentModel::Design::ComponentRenameEventHandler(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemComponentModelDesignIComponentChangeService(cppHandle)->RemoveComponentRename(value); + Plugin::GetSystemComponentModelDesignBaseIComponentChangeService(cppHandle)->RemoveComponentRename(value); } catch (System::Exception ex) { @@ -7985,13 +8602,128 @@ namespace System { namespace IO { + FileStream::FileStream(decltype(nullptr) n) + : FileStream(Plugin::InternalUse::Only, 0) + { + } + + FileStream::FileStream(Plugin::InternalUse iu, int32_t handle) + : System::IO::Stream(iu, 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) other) + { + 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::IO::Stream(nullptr) { - CppHandle = Plugin::StoreSystemIOFileStream(this); + 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(uint8_t 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::IO::FileStream(nullptr) + { + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); int32_t* handle = &Handle; int32_t cppHandle = CppHandle; - Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode(cppHandle, handle, path.Handle, mode); + Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(cppHandle, handle, path.Handle, mode); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8005,7 +8737,7 @@ namespace System } else { - Plugin::RemoveSystemIOFileStream(CppHandle); + Plugin::RemoveSystemIOBaseFileStream(CppHandle); CppHandle = 0; } if (Plugin::unhandledCsharpException) @@ -8017,43 +8749,43 @@ namespace System } } - FileStream::FileStream(decltype(nullptr) n) - : System::IO::Stream(Plugin::InternalUse::Only, 0) + BaseFileStream::BaseFileStream(decltype(nullptr) n) + : System::IO::FileStream(Plugin::InternalUse::Only, 0) { - CppHandle = Plugin::StoreSystemIOFileStream(this); + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); } - FileStream::FileStream(const FileStream& other) - : System::IO::Stream(Plugin::InternalUse::Only, other.Handle) + BaseFileStream::BaseFileStream(const BaseFileStream& other) + : System::IO::FileStream(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemIOFileStream(this); + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - FileStream::FileStream(FileStream&& other) - : System::IO::Stream(Plugin::InternalUse::Only, other.Handle) + BaseFileStream::BaseFileStream(BaseFileStream&& other) + : System::IO::FileStream(Plugin::InternalUse::Only, other.Handle) { CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } - FileStream::FileStream(Plugin::InternalUse iu, int32_t handle) - : System::IO::Stream(iu, handle) + BaseFileStream::BaseFileStream(Plugin::InternalUse iu, int32_t handle) + : System::IO::FileStream(iu, handle) { - CppHandle = Plugin::StoreSystemIOFileStream(this); + CppHandle = Plugin::StoreSystemIOBaseFileStream(this); if (Handle) { Plugin::ReferenceManagedClass(Handle); } } - FileStream::~FileStream() + BaseFileStream::~BaseFileStream() { - Plugin::RemoveSystemIOFileStream(CppHandle); + Plugin::RemoveSystemIOBaseFileStream(CppHandle); CppHandle = 0; if (Handle) { @@ -8061,7 +8793,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemIOFileStream(handle); + Plugin::ReleaseSystemIOBaseFileStream(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8073,7 +8805,7 @@ namespace System } } - FileStream& FileStream::operator=(const FileStream& other) + BaseFileStream& BaseFileStream::operator=(const BaseFileStream& other) { if (this->Handle) { @@ -8087,7 +8819,7 @@ namespace System return *this; } - FileStream& FileStream::operator=(decltype(nullptr) other) + BaseFileStream& BaseFileStream::operator=(decltype(nullptr) other) { if (Handle) { @@ -8095,7 +8827,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemIOFileStream(handle); + Plugin::ReleaseSystemIOBaseFileStream(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8109,9 +8841,9 @@ namespace System return *this; } - FileStream& FileStream::operator=(FileStream&& other) + BaseFileStream& BaseFileStream::operator=(BaseFileStream&& other) { - Plugin::RemoveSystemIOFileStream(CppHandle); + Plugin::RemoveSystemIOBaseFileStream(CppHandle); CppHandle = 0; if (Handle) { @@ -8119,7 +8851,7 @@ namespace System Handle = 0; if (Plugin::DereferenceManagedClassNoRelease(handle)) { - Plugin::ReleaseSystemIOFileStream(handle); + Plugin::ReleaseSystemIOBaseFileStream(handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8134,17 +8866,17 @@ namespace System return *this; } - bool FileStream::operator==(const FileStream& other) const + bool BaseFileStream::operator==(const BaseFileStream& other) const { return Handle == other.Handle; } - bool FileStream::operator!=(const FileStream& other) const + bool BaseFileStream::operator!=(const BaseFileStream& other) const { return Handle != other.Handle; } - void FileStream::WriteByte(uint8_t value) + void BaseFileStream::WriteByte(uint8_t value) { } @@ -8152,7 +8884,7 @@ namespace System { try { - Plugin::GetSystemIOFileStream(cppHandle)->WriteByte(value); + Plugin::GetSystemIOBaseFileStream(cppHandle)->WriteByte(value); } catch (System::Exception ex) { @@ -13217,22 +13949,25 @@ DLLEXPORT void Init( float (*unityEngineTimePropertyGetDeltaTime)(), int32_t (*boxFileMode)(System::IO::FileMode val), System::IO::FileMode (*unboxFileMode)(int32_t valHandle), - void (*releaseSystemCollectionsGenericIComparerSystemInt32)(int32_t handle), - void (*systemCollectionsGenericIComparerSystemInt32Constructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsGenericIComparerSystemString)(int32_t handle), - void (*systemCollectionsGenericIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemStringComparer)(int32_t handle), - void (*systemStringComparerConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsICollection)(int32_t handle), - void (*systemCollectionsICollectionConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsIList)(int32_t handle), - void (*systemCollectionsIListConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsQueue)(int32_t handle), - void (*systemCollectionsQueueConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemComponentModelDesignIComponentChangeService)(int32_t handle), - void (*systemComponentModelDesignIComponentChangeServiceConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemIOFileStream)(int32_t handle), - void (*systemIOFileStreamConstructorSystemString_SystemIOFileMode)(int32_t cppHandle, int32_t* handle, int32_t pathHandle, System::IO::FileMode mode), + 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), + void (*releaseSystemCollectionsBaseICollection)(int32_t handle), + void (*systemCollectionsBaseICollectionConstructor)(int32_t cppHandle, int32_t* handle), + void (*releaseSystemCollectionsBaseIList)(int32_t handle), + void (*systemCollectionsBaseIListConstructor)(int32_t cppHandle, int32_t* handle), + int32_t (*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), int32_t (*boxBoolean)(System::Boolean val), System::Boolean (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -13466,86 +14201,89 @@ DLLEXPORT void Init( Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; Plugin::BoxFileMode = boxFileMode; Plugin::UnboxFileMode = unboxFileMode; - SystemCollectionsGenericIComparerSystemInt32FreeListSize = maxManagedObjects; - SystemCollectionsGenericIComparerSystemInt32FreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemInt32FreeListSize]; - for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1; i < end; ++i) - { - SystemCollectionsGenericIComparerSystemInt32FreeList[i] = (System::Collections::Generic::IComparer*)(SystemCollectionsGenericIComparerSystemInt32FreeList + i + 1); - } - SystemCollectionsGenericIComparerSystemInt32FreeList[SystemCollectionsGenericIComparerSystemInt32FreeListSize - 1] = nullptr; - NextFreeSystemCollectionsGenericIComparerSystemInt32 = SystemCollectionsGenericIComparerSystemInt32FreeList + 1; - Plugin::ReleaseSystemCollectionsGenericIComparerSystemInt32 = releaseSystemCollectionsGenericIComparerSystemInt32; - Plugin::SystemCollectionsGenericIComparerSystemInt32Constructor = systemCollectionsGenericIComparerSystemInt32Constructor; - SystemCollectionsGenericIComparerSystemStringFreeListSize = maxManagedObjects; - SystemCollectionsGenericIComparerSystemStringFreeList = new System::Collections::Generic::IComparer*[SystemCollectionsGenericIComparerSystemStringFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsGenericIComparerSystemStringFreeListSize - 1; i < end; ++i) - { - SystemCollectionsGenericIComparerSystemStringFreeList[i] = (System::Collections::Generic::IComparer*)(SystemCollectionsGenericIComparerSystemStringFreeList + i + 1); - } - SystemCollectionsGenericIComparerSystemStringFreeList[SystemCollectionsGenericIComparerSystemStringFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsGenericIComparerSystemString = SystemCollectionsGenericIComparerSystemStringFreeList + 1; - Plugin::ReleaseSystemCollectionsGenericIComparerSystemString = releaseSystemCollectionsGenericIComparerSystemString; - Plugin::SystemCollectionsGenericIComparerSystemStringConstructor = systemCollectionsGenericIComparerSystemStringConstructor; - SystemStringComparerFreeListSize = maxManagedObjects; - SystemStringComparerFreeList = new System::StringComparer*[SystemStringComparerFreeListSize]; - for (int32_t i = 0, end = SystemStringComparerFreeListSize - 1; i < end; ++i) - { - SystemStringComparerFreeList[i] = (System::StringComparer*)(SystemStringComparerFreeList + i + 1); - } - SystemStringComparerFreeList[SystemStringComparerFreeListSize - 1] = nullptr; - NextFreeSystemStringComparer = SystemStringComparerFreeList + 1; - Plugin::ReleaseSystemStringComparer = releaseSystemStringComparer; - Plugin::SystemStringComparerConstructor = systemStringComparerConstructor; - SystemCollectionsICollectionFreeListSize = maxManagedObjects; - SystemCollectionsICollectionFreeList = new System::Collections::ICollection*[SystemCollectionsICollectionFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsICollectionFreeListSize - 1; i < end; ++i) - { - SystemCollectionsICollectionFreeList[i] = (System::Collections::ICollection*)(SystemCollectionsICollectionFreeList + i + 1); - } - SystemCollectionsICollectionFreeList[SystemCollectionsICollectionFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsICollection = SystemCollectionsICollectionFreeList + 1; - Plugin::ReleaseSystemCollectionsICollection = releaseSystemCollectionsICollection; - Plugin::SystemCollectionsICollectionConstructor = systemCollectionsICollectionConstructor; - SystemCollectionsIListFreeListSize = maxManagedObjects; - SystemCollectionsIListFreeList = new System::Collections::IList*[SystemCollectionsIListFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsIListFreeListSize - 1; i < end; ++i) - { - SystemCollectionsIListFreeList[i] = (System::Collections::IList*)(SystemCollectionsIListFreeList + i + 1); - } - SystemCollectionsIListFreeList[SystemCollectionsIListFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsIList = SystemCollectionsIListFreeList + 1; - Plugin::ReleaseSystemCollectionsIList = releaseSystemCollectionsIList; - Plugin::SystemCollectionsIListConstructor = systemCollectionsIListConstructor; - SystemCollectionsQueueFreeListSize = maxManagedObjects; - SystemCollectionsQueueFreeList = new System::Collections::Queue*[SystemCollectionsQueueFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsQueueFreeListSize - 1; i < end; ++i) - { - SystemCollectionsQueueFreeList[i] = (System::Collections::Queue*)(SystemCollectionsQueueFreeList + i + 1); - } - SystemCollectionsQueueFreeList[SystemCollectionsQueueFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsQueue = SystemCollectionsQueueFreeList + 1; - Plugin::ReleaseSystemCollectionsQueue = releaseSystemCollectionsQueue; - Plugin::SystemCollectionsQueueConstructor = systemCollectionsQueueConstructor; - SystemComponentModelDesignIComponentChangeServiceFreeListSize = maxManagedObjects; - SystemComponentModelDesignIComponentChangeServiceFreeList = new System::ComponentModel::Design::IComponentChangeService*[SystemComponentModelDesignIComponentChangeServiceFreeListSize]; - for (int32_t i = 0, end = SystemComponentModelDesignIComponentChangeServiceFreeListSize - 1; i < end; ++i) - { - SystemComponentModelDesignIComponentChangeServiceFreeList[i] = (System::ComponentModel::Design::IComponentChangeService*)(SystemComponentModelDesignIComponentChangeServiceFreeList + i + 1); - } - SystemComponentModelDesignIComponentChangeServiceFreeList[SystemComponentModelDesignIComponentChangeServiceFreeListSize - 1] = nullptr; - NextFreeSystemComponentModelDesignIComponentChangeService = SystemComponentModelDesignIComponentChangeServiceFreeList + 1; - Plugin::ReleaseSystemComponentModelDesignIComponentChangeService = releaseSystemComponentModelDesignIComponentChangeService; - Plugin::SystemComponentModelDesignIComponentChangeServiceConstructor = systemComponentModelDesignIComponentChangeServiceConstructor; - SystemIOFileStreamFreeListSize = maxManagedObjects; - SystemIOFileStreamFreeList = new System::IO::FileStream*[SystemIOFileStreamFreeListSize]; - for (int32_t i = 0, end = SystemIOFileStreamFreeListSize - 1; i < end; ++i) - { - SystemIOFileStreamFreeList[i] = (System::IO::FileStream*)(SystemIOFileStreamFreeList + i + 1); - } - SystemIOFileStreamFreeList[SystemIOFileStreamFreeListSize - 1] = nullptr; - NextFreeSystemIOFileStream = SystemIOFileStreamFreeList + 1; - Plugin::ReleaseSystemIOFileStream = releaseSystemIOFileStream; + SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize = maxManagedObjects; + SystemCollectionsGenericBaseIComparerSystemInt32FreeList = new System::Collections::Generic::BaseIComparer*[SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize]; + for (int32_t i = 0, end = SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1; i < end; ++i) + { + SystemCollectionsGenericBaseIComparerSystemInt32FreeList[i] = (System::Collections::Generic::BaseIComparer*)(SystemCollectionsGenericBaseIComparerSystemInt32FreeList + i + 1); + } + SystemCollectionsGenericBaseIComparerSystemInt32FreeList[SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1] = nullptr; + NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = SystemCollectionsGenericBaseIComparerSystemInt32FreeList + 1; + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32 = releaseSystemCollectionsGenericBaseIComparerSystemInt32; + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor = systemCollectionsGenericBaseIComparerSystemInt32Constructor; + SystemCollectionsGenericBaseIComparerSystemStringFreeListSize = maxManagedObjects; + SystemCollectionsGenericBaseIComparerSystemStringFreeList = new System::Collections::Generic::BaseIComparer*[SystemCollectionsGenericBaseIComparerSystemStringFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsGenericBaseIComparerSystemStringFreeListSize - 1; i < end; ++i) + { + SystemCollectionsGenericBaseIComparerSystemStringFreeList[i] = (System::Collections::Generic::BaseIComparer*)(SystemCollectionsGenericBaseIComparerSystemStringFreeList + i + 1); + } + SystemCollectionsGenericBaseIComparerSystemStringFreeList[SystemCollectionsGenericBaseIComparerSystemStringFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsGenericBaseIComparerSystemString = SystemCollectionsGenericBaseIComparerSystemStringFreeList + 1; + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString = releaseSystemCollectionsGenericBaseIComparerSystemString; + Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor = systemCollectionsGenericBaseIComparerSystemStringConstructor; + SystemBaseStringComparerFreeListSize = maxManagedObjects; + SystemBaseStringComparerFreeList = new System::BaseStringComparer*[SystemBaseStringComparerFreeListSize]; + for (int32_t i = 0, end = SystemBaseStringComparerFreeListSize - 1; i < end; ++i) + { + SystemBaseStringComparerFreeList[i] = (System::BaseStringComparer*)(SystemBaseStringComparerFreeList + i + 1); + } + SystemBaseStringComparerFreeList[SystemBaseStringComparerFreeListSize - 1] = nullptr; + NextFreeSystemBaseStringComparer = SystemBaseStringComparerFreeList + 1; + Plugin::ReleaseSystemBaseStringComparer = releaseSystemBaseStringComparer; + Plugin::SystemBaseStringComparerConstructor = systemBaseStringComparerConstructor; + SystemCollectionsBaseICollectionFreeListSize = maxManagedObjects; + SystemCollectionsBaseICollectionFreeList = new System::Collections::BaseICollection*[SystemCollectionsBaseICollectionFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsBaseICollectionFreeListSize - 1; i < end; ++i) + { + SystemCollectionsBaseICollectionFreeList[i] = (System::Collections::BaseICollection*)(SystemCollectionsBaseICollectionFreeList + i + 1); + } + SystemCollectionsBaseICollectionFreeList[SystemCollectionsBaseICollectionFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsBaseICollection = SystemCollectionsBaseICollectionFreeList + 1; + Plugin::ReleaseSystemCollectionsBaseICollection = releaseSystemCollectionsBaseICollection; + Plugin::SystemCollectionsBaseICollectionConstructor = systemCollectionsBaseICollectionConstructor; + SystemCollectionsBaseIListFreeListSize = maxManagedObjects; + SystemCollectionsBaseIListFreeList = new System::Collections::BaseIList*[SystemCollectionsBaseIListFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsBaseIListFreeListSize - 1; i < end; ++i) + { + SystemCollectionsBaseIListFreeList[i] = (System::Collections::BaseIList*)(SystemCollectionsBaseIListFreeList + i + 1); + } + SystemCollectionsBaseIListFreeList[SystemCollectionsBaseIListFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsBaseIList = SystemCollectionsBaseIListFreeList + 1; + Plugin::ReleaseSystemCollectionsBaseIList = releaseSystemCollectionsBaseIList; + Plugin::SystemCollectionsBaseIListConstructor = systemCollectionsBaseIListConstructor; + Plugin::SystemCollectionsQueuePropertyGetCount = systemCollectionsQueuePropertyGetCount; + SystemCollectionsBaseQueueFreeListSize = maxManagedObjects; + SystemCollectionsBaseQueueFreeList = new System::Collections::BaseQueue*[SystemCollectionsBaseQueueFreeListSize]; + for (int32_t i = 0, end = SystemCollectionsBaseQueueFreeListSize - 1; i < end; ++i) + { + SystemCollectionsBaseQueueFreeList[i] = (System::Collections::BaseQueue*)(SystemCollectionsBaseQueueFreeList + i + 1); + } + SystemCollectionsBaseQueueFreeList[SystemCollectionsBaseQueueFreeListSize - 1] = nullptr; + NextFreeSystemCollectionsBaseQueue = SystemCollectionsBaseQueueFreeList + 1; + Plugin::ReleaseSystemCollectionsBaseQueue = releaseSystemCollectionsBaseQueue; + Plugin::SystemCollectionsBaseQueueConstructor = systemCollectionsBaseQueueConstructor; + SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize = maxManagedObjects; + SystemComponentModelDesignBaseIComponentChangeServiceFreeList = new System::ComponentModel::Design::BaseIComponentChangeService*[SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize]; + for (int32_t i = 0, end = SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize - 1; i < end; ++i) + { + SystemComponentModelDesignBaseIComponentChangeServiceFreeList[i] = (System::ComponentModel::Design::BaseIComponentChangeService*)(SystemComponentModelDesignBaseIComponentChangeServiceFreeList + i + 1); + } + SystemComponentModelDesignBaseIComponentChangeServiceFreeList[SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize - 1] = nullptr; + NextFreeSystemComponentModelDesignBaseIComponentChangeService = SystemComponentModelDesignBaseIComponentChangeServiceFreeList + 1; + Plugin::ReleaseSystemComponentModelDesignBaseIComponentChangeService = releaseSystemComponentModelDesignBaseIComponentChangeService; + Plugin::SystemComponentModelDesignBaseIComponentChangeServiceConstructor = systemComponentModelDesignBaseIComponentChangeServiceConstructor; Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode = systemIOFileStreamConstructorSystemString_SystemIOFileMode; + Plugin::SystemIOFileStreamMethodWriteByteSystemByte = systemIOFileStreamMethodWriteByteSystemByte; + SystemIOBaseFileStreamFreeListSize = maxManagedObjects; + SystemIOBaseFileStreamFreeList = new System::IO::BaseFileStream*[SystemIOBaseFileStreamFreeListSize]; + for (int32_t i = 0, end = SystemIOBaseFileStreamFreeListSize - 1; i < end; ++i) + { + SystemIOBaseFileStreamFreeList[i] = (System::IO::BaseFileStream*)(SystemIOBaseFileStreamFreeList + i + 1); + } + SystemIOBaseFileStreamFreeList[SystemIOBaseFileStreamFreeListSize - 1] = nullptr; + NextFreeSystemIOBaseFileStream = SystemIOBaseFileStreamFreeList + 1; + Plugin::ReleaseSystemIOBaseFileStream = releaseSystemIOBaseFileStream; + Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode = systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 5954582..b76735e 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -680,11 +680,49 @@ namespace System } } +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 BaseIComparer; + } + } +} + namespace System { struct StringComparer; } +namespace System +{ + struct BaseStringComparer; +} + namespace System { namespace Collections @@ -693,6 +731,14 @@ namespace System } } +namespace System +{ + namespace Collections + { + struct BaseICollection; + } +} + namespace System { namespace Collections @@ -701,6 +747,14 @@ namespace System } } +namespace System +{ + namespace Collections + { + struct BaseIList; + } +} + namespace System { namespace Collections @@ -709,6 +763,14 @@ namespace System } } +namespace System +{ + namespace Collections + { + struct BaseQueue; + } +} + namespace System { namespace ComponentModel @@ -720,6 +782,17 @@ namespace System } } +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct BaseIComponentChangeService; + } + } +} + namespace System { namespace IO @@ -728,6 +801,14 @@ namespace System } } +namespace System +{ + namespace IO + { + struct BaseFileStream; + } +} + namespace MyGame { namespace MonoBehaviours @@ -1984,9 +2065,6 @@ namespace System IComparer& operator=(IComparer&& other); bool operator==(const IComparer& other) const; bool operator!=(const IComparer& other) const; - int32_t CppHandle; - IComparer(); - virtual int32_t Compare(int32_t x, int32_t y); }; } } @@ -2010,8 +2088,57 @@ namespace System 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 : System::Collections::Generic::IComparer + { + BaseIComparer(decltype(nullptr) n); + 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) other); + 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); + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct BaseIComparer : System::Collections::Generic::IComparer + { + BaseIComparer(decltype(nullptr) n); + 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) other); + BaseIComparer& operator=(BaseIComparer&& other); + bool operator==(const BaseIComparer& other) const; + bool operator!=(const BaseIComparer& other) const; int32_t CppHandle; - IComparer(); + BaseIComparer(); virtual int32_t Compare(System::String& x, System::String& y); }; } @@ -2032,8 +2159,25 @@ namespace System StringComparer& operator=(StringComparer&& other); bool operator==(const StringComparer& other) const; bool operator!=(const StringComparer& other) const; + }; +} + +namespace System +{ + struct BaseStringComparer : System::StringComparer + { + BaseStringComparer(decltype(nullptr) n); + 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) other); + BaseStringComparer& operator=(BaseStringComparer&& other); + bool operator==(const BaseStringComparer& other) const; + bool operator!=(const BaseStringComparer& other) const; int32_t CppHandle; - StringComparer(); + 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); @@ -2056,8 +2200,28 @@ namespace System ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; + }; + } +} + +namespace System +{ + namespace Collections + { + struct BaseICollection : System::Collections::ICollection + { + BaseICollection(decltype(nullptr) n); + BaseICollection(Plugin::InternalUse iu, int32_t handle); + BaseICollection(const BaseICollection& other); + BaseICollection(BaseICollection&& other); + virtual ~BaseICollection(); + BaseICollection& operator=(const BaseICollection& other); + BaseICollection& operator=(decltype(nullptr) other); + BaseICollection& operator=(BaseICollection&& other); + bool operator==(const BaseICollection& other) const; + bool operator!=(const BaseICollection& other) const; int32_t CppHandle; - ICollection(); + BaseICollection(); virtual void CopyTo(System::Array& array, int32_t index); virtual System::Collections::IEnumerator GetEnumerator(); virtual int32_t GetCount(); @@ -2083,8 +2247,28 @@ namespace System IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; + }; + } +} + +namespace System +{ + namespace Collections + { + struct BaseIList : System::Collections::IList + { + BaseIList(decltype(nullptr) n); + BaseIList(Plugin::InternalUse iu, int32_t handle); + BaseIList(const BaseIList& other); + BaseIList(BaseIList&& other); + virtual ~BaseIList(); + BaseIList& operator=(const BaseIList& other); + BaseIList& operator=(decltype(nullptr) other); + BaseIList& operator=(BaseIList&& other); + bool operator==(const BaseIList& other) const; + bool operator!=(const BaseIList& other) const; int32_t CppHandle; - IList(); + BaseIList(); virtual int32_t Add(System::Object& value); virtual void Clear(); virtual System::Boolean Contains(System::Object& value); @@ -2121,8 +2305,29 @@ namespace System Queue& operator=(Queue&& other); bool operator==(const Queue& other) const; bool operator!=(const Queue& other) const; + int32_t GetCount(); + }; + } +} + +namespace System +{ + namespace Collections + { + struct BaseQueue : System::Collections::Queue + { + BaseQueue(decltype(nullptr) n); + 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) other); + BaseQueue& operator=(BaseQueue&& other); + bool operator==(const BaseQueue& other) const; + bool operator!=(const BaseQueue& other) const; int32_t CppHandle; - Queue(); + BaseQueue(); virtual int32_t GetCount(); }; } @@ -2146,8 +2351,31 @@ namespace System IComponentChangeService& operator=(IComponentChangeService&& other); bool operator==(const IComponentChangeService& other) const; bool operator!=(const IComponentChangeService& other) const; + }; + } + } +} + +namespace System +{ + namespace ComponentModel + { + namespace Design + { + struct BaseIComponentChangeService : System::ComponentModel::Design::IComponentChangeService + { + BaseIComponentChangeService(decltype(nullptr) n); + 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) other); + BaseIComponentChangeService& operator=(BaseIComponentChangeService&& other); + bool operator==(const BaseIComponentChangeService& other) const; + bool operator!=(const BaseIComponentChangeService& other) const; int32_t CppHandle; - IComponentChangeService(); + 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); @@ -2185,8 +2413,30 @@ namespace System FileStream& operator=(FileStream&& other); bool operator==(const FileStream& other) const; bool operator!=(const FileStream& other) const; - int32_t CppHandle; FileStream(System::String& path, System::IO::FileMode mode); + void WriteByte(uint8_t value); + }; + } +} + +namespace System +{ + namespace IO + { + struct BaseFileStream : System::IO::FileStream + { + BaseFileStream(decltype(nullptr) n); + 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) other); + 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); }; } From 9aef59458f3a6431f6d39f26276e1fcacbaaec8c Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 16 Dec 2017 10:36:08 -0800 Subject: [PATCH 18/65] Split generic parameters in base types --- .../NativeScript/Editor/GenerateBindings.cs | 143 +++++++++--------- Unity/Assets/NativeScriptTypes.json | 37 ++--- Unity/CppSource/NativeScript/Bindings.h | 11 ++ 3 files changed, 97 insertions(+), 94 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index da95a3e..5733e12 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -98,7 +98,7 @@ class JsonType [Serializable] class JsonBaseType { - public JsonGenericParams[] GenericParams; + public string[] GenericTypes; public int MaxSimultaneous; public JsonConstructor[] Constructors; public JsonMethod[] OverrideMethods; @@ -521,10 +521,34 @@ static void DoPostCompileWork(bool canRefreshAssetDb) if (jsonType.BaseTypes != null) { + // C++ template declaration if necessary + Type type = GetType( + jsonType.Name, + assemblies); + 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.CppTypeDeclarations); + } + } + } + foreach (JsonBaseType jsonBaseType in jsonType.BaseTypes) { AppendBaseType( + type, + genericArgTypes, jsonType.Name, + cppBaseTypeName, jsonBaseType, assemblies, builders); @@ -1628,56 +1652,38 @@ static void AppendType( } static void AppendBaseType( + Type type, + Type[] genericArgTypes, string typeName, + string cppBaseTypeName, JsonBaseType jsonBaseType, Assembly[] assemblies, StringBuilders builders) { - Type type = GetType(typeName, assemblies); - string cppTypeName = "Base" + type.Name; - Type[] genericArgTypes = type.GetGenericArguments(); - if (jsonBaseType.GenericParams != null) + int? maxSimultaneous = jsonBaseType.MaxSimultaneous != 0 + ? jsonBaseType.MaxSimultaneous + : default(int?); + if (jsonBaseType.GenericTypes != null) { - if (!IsStatic(type)) - { - AppendCppTemplateDeclaration( - cppTypeName, - type.Namespace, - genericArgTypes.Length, - builders.CppTypeDeclarations); - } - - foreach (JsonGenericParams jsonGenericParams - in jsonBaseType.GenericParams) - { - Type[] typeParams = GetTypes( - jsonGenericParams.Types, - assemblies); - Type genericType = type.MakeGenericType(typeParams); - int? maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 - ? jsonGenericParams.MaxSimultaneous - : jsonBaseType.MaxSimultaneous != 0 - ? jsonBaseType.MaxSimultaneous - : default(int?); - AppendBaseType( - genericType, - jsonBaseType, - cppTypeName, - typeParams, - maxSimultaneous, - assemblies, - builders); - } + Type[] typeParams = GetTypes( + jsonBaseType.GenericTypes, + assemblies); + Type genericType = type.MakeGenericType(typeParams); + AppendBaseType( + genericType, + jsonBaseType, + cppBaseTypeName, + typeParams, + maxSimultaneous, + assemblies, + builders); } else { - int? maxSimultaneous = jsonBaseType.MaxSimultaneous != 0 - ? jsonBaseType.MaxSimultaneous - : default(int?); AppendBaseType( type, jsonBaseType, - cppTypeName, + cppBaseTypeName, null, maxSimultaneous, assemblies, @@ -6381,7 +6387,7 @@ static void AppendDelegate( static void AppendBaseType( Type type, JsonBaseType jsonBaseType, - string cppTypeName, + string cppBaseTypeName, Type[] typeParams, int? maxSimultaneous, Assembly[] assemblies, @@ -6410,7 +6416,8 @@ static void AppendBaseType( builders.TempStrBuilder[0]); string releaseFuncNameLower = builders.TempStrBuilder.ToString(); - // Either use specified constructors or the default constructor + // Either use specified constructors, the default constructor, or + // nothing in the case of MonoBehaviour (where you can't call 'new') JsonConstructor[] jsonConstructors = jsonBaseType.Constructors; if (jsonConstructors == null) { @@ -6505,7 +6512,7 @@ static void AppendBaseType( // C++ type declaration int indent = AppendCppTypeDeclaration( type.Namespace, - cppTypeName, + cppBaseTypeName, false, typeParams, builders.CppTypeDeclarations); @@ -6524,21 +6531,21 @@ static void AppendBaseType( AppendCppFreeListStateAndFunctions( type, typeParams, - cppTypeName, + cppBaseTypeName, bindingTypeName, builders.CppGlobalStateAndFunctions); AppendCppFreeListInit( type, typeParams, - cppTypeName, + cppBaseTypeName, maxSimultaneous, bindingTypeName, builders.CppInitBody); // C++ type definition (begin) AppendCppTypeDefinitionBegin( - cppTypeName, + cppBaseTypeName, type.Namespace, TypeKind.Class, typeParams, @@ -6562,7 +6569,7 @@ static void AppendBaseType( indent + 1, builders.CppTypeDefinitions); AppendCppMethodDeclaration( - cppTypeName, + cppBaseTypeName, false, false, false, @@ -6658,7 +6665,7 @@ static void AppendBaseType( type.Name, type.Namespace, TypeKind.Class, - cppTypeName, + cppBaseTypeName, type, typeParams, typeParams, @@ -6672,7 +6679,7 @@ static void AppendBaseType( AppendCppBaseTypeNullptrConstructor( bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, type.Name, type.Namespace, @@ -6683,7 +6690,7 @@ static void AppendBaseType( AppendCppBaseTypeCopyConstructor( bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, type.Name, type.Namespace, @@ -6693,7 +6700,7 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeMoveConstructor( - cppTypeName, + cppBaseTypeName, typeParams, type.Name, type.Namespace, @@ -6704,7 +6711,7 @@ static void AppendBaseType( AppendCppBaseTypeHandleConstructor( bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, type.Name, type.Namespace, @@ -6712,10 +6719,10 @@ static void AppendBaseType( false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); - + AppendCppBaseTypeDestructor( bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, false, releaseFuncName, @@ -6724,14 +6731,14 @@ static void AppendBaseType( AppendCppBaseTypeAssignmentOperatorSameType( type, - cppTypeName, + cppBaseTypeName, typeParams, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeAssignmentOperatorNullptr( - cppTypeName, + cppBaseTypeName, typeParams, false, releaseFuncName, @@ -6740,7 +6747,7 @@ static void AppendBaseType( AppendCppBaseTypeMoveAssignmentOperator( bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, false, releaseFuncName, @@ -6748,13 +6755,13 @@ static void AppendBaseType( builders.CppMethodDefinitions); AppendCppBaseTypeEqualityOperator( - cppTypeName, + cppBaseTypeName, typeParams, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); AppendCppBaseTypeInequalityOperator( - cppTypeName, + cppBaseTypeName, typeParams, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6855,7 +6862,7 @@ static void AppendBaseType( type, bindingTypeName, typeParams, - cppTypeName, + cppBaseTypeName, methodInfo, indent, builders); @@ -6876,7 +6883,7 @@ static void AppendBaseType( type, bindingTypeName, typeParams, - cppTypeName, + cppBaseTypeName, methodInfo, indent, builders); @@ -6902,7 +6909,7 @@ static void AppendBaseType( type, bindingTypeName, typeParams, - cppTypeName, + cppBaseTypeName, methodInfo, indent, builders); @@ -6922,7 +6929,7 @@ static void AppendBaseType( AppendBaseTypeProperty( type, bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, propertyInfo, getMethodInfo, @@ -6949,7 +6956,7 @@ static void AppendBaseType( AppendBaseTypeProperty( type, bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, propertyInfo, getMethodInfo, @@ -7009,7 +7016,7 @@ static void AppendBaseType( AppendBaseTypeProperty( type, bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, propertyInfo, getMethodInfo, @@ -7032,7 +7039,7 @@ static void AppendBaseType( AppendBaseTypeEvent( type, bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, eventInfo, addMethodInfo, @@ -7058,7 +7065,7 @@ static void AppendBaseType( AppendBaseTypeEvent( type, bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, eventInfo, addMethodInfo, @@ -7118,7 +7125,7 @@ static void AppendBaseType( AppendBaseTypeEvent( type, bindingTypeName, - cppTypeName, + cppBaseTypeName, typeParams, eventInfo, addMethodInfo, @@ -8814,7 +8821,7 @@ static void AppendCppBaseTypeHandleConstructor( output); output.Append("\n"); } - + static void AppendCppBaseTypeMoveConstructor( string cppTypeName, Type[] typeParams, diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 56d156e..47aff03 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -629,18 +629,13 @@ ], "BaseTypes": [ { - "Name": "System.Collections.Generic.IComparer`1", - "GenericParams": [ - { - "Types": [ - "System.Int32" - ] - }, - { - "Types": [ - "System.String" - ] - } + "GenericTypes": [ + "System.Int32" + ] + }, + { + "GenericTypes": [ + "System.String" ] } ] @@ -648,25 +643,19 @@ { "Name": "System.StringComparer", "BaseTypes": [ - { - "Name": "System.StringComparer" - } + {} ] }, { "Name": "System.Collections.ICollection", "BaseTypes": [ - { - "Name": "System.Collections.ICollection" - } + {} ] }, { "Name": "System.Collections.IList", "BaseTypes": [ - { - "Name": "System.Collections.IList" - } + {} ] }, { @@ -680,7 +669,6 @@ ], "BaseTypes": [ { - "Name": "System.Collections.Queue", "OverrideProperties": [ { "Name": "Count", @@ -694,9 +682,7 @@ { "Name": "System.ComponentModel.Design.IComponentChangeService", "BaseTypes": [ - { - "Name": "System.ComponentModel.Design.IComponentChangeService" - } + {} ] }, { @@ -719,7 +705,6 @@ ], "BaseTypes": [ { - "Name": "System.IO.FileStream", "OverrideMethods": [ { "Name": "WriteByte", diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index b76735e..9049197 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -691,6 +691,17 @@ namespace System } } +namespace System +{ + namespace Collections + { + namespace Generic + { + template struct BaseIComparer; + } + } +} + namespace System { namespace Collections From 694e0817e330b68e7b291e57799d2dadc0f7d0df Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 16 Dec 2017 18:41:43 -0800 Subject: [PATCH 19/65] Support default parameters (except non-null strings and when there are var args) --- Unity/Assets/NativeScript/Bindings.cs | 886 ++++++++- .../NativeScript/Editor/GenerateBindings.cs | 253 ++- Unity/Assets/NativeScriptTypes.json | 67 + Unity/CppSource/NativeScript/Bindings.cpp | 1661 +++++++++++++++-- Unity/CppSource/NativeScript/Bindings.h | 351 +++- 5 files changed, 2939 insertions(+), 279 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index bbff41a..0f30704 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -307,6 +307,8 @@ delegate void InitDelegate( IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, IntPtr boxVector3, IntPtr unboxVector3, + IntPtr boxQuaternion, + IntPtr unboxQuaternion, IntPtr unityEngineMatrix4x4PropertyGetItem, IntPtr unityEngineMatrix4x4PropertySetItem, IntPtr boxMatrix4x4, @@ -342,6 +344,7 @@ delegate void InitDelegate( IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue, IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue, IntPtr systemExceptionConstructorSystemString, + IntPtr releaseUnityEngineResolution, IntPtr unityEngineResolutionPropertyGetWidth, IntPtr unityEngineResolutionPropertySetWidth, IntPtr unityEngineResolutionPropertyGetHeight, @@ -351,10 +354,11 @@ delegate void InitDelegate( IntPtr boxResolution, IntPtr unboxResolution, IntPtr unityEngineScreenPropertyGetResolutions, + IntPtr releaseUnityEngineRay, IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, IntPtr boxRay, IntPtr unboxRay, - IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit, + IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1, IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, IntPtr boxColor, IntPtr unboxColor, @@ -370,6 +374,7 @@ delegate void InitDelegate( IntPtr unityEngineApplicationRemoveEventOnBeforeRender, IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, + IntPtr releaseUnityEngineSceneManagementScene, IntPtr boxScene, IntPtr unboxScene, IntPtr boxLoadSceneMode, @@ -400,6 +405,26 @@ delegate void InitDelegate( IntPtr systemIOFileStreamMethodWriteByteSystemByte, IntPtr releaseSystemIOBaseFileStream, IntPtr systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode, + IntPtr releaseUnityEnginePlayablesPlayableHandle, + IntPtr boxPlayableHandle, + IntPtr unboxPlayableHandle, + IntPtr releaseUnityEnginePlayablesPlayableGraph, + IntPtr boxPlayableGraph, + IntPtr unboxPlayableGraph, + IntPtr releaseUnityEngineAnimationsAnimationMixerPlayable, + IntPtr unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean, + IntPtr boxAnimationMixerPlayable, + IntPtr unboxAnimationMixerPlayable, + 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 boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -686,7 +711,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke public delegate void UnityEngineEventsUnityActionNativeInvokeDelegate(int thisHandle); public static UnityEngineEventsUnityActionNativeInvokeDelegate UnityEngineEventsUnityActionNativeInvoke; - public delegate void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvokeDelegate(int thisHandle, UnityEngine.SceneManagement.Scene param0, UnityEngine.SceneManagement.LoadSceneMode param1); + 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); @@ -835,6 +860,8 @@ static extern void Init( IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, IntPtr boxVector3, IntPtr unboxVector3, + IntPtr boxQuaternion, + IntPtr unboxQuaternion, IntPtr unityEngineMatrix4x4PropertyGetItem, IntPtr unityEngineMatrix4x4PropertySetItem, IntPtr boxMatrix4x4, @@ -870,6 +897,7 @@ static extern void Init( IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue, IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue, IntPtr systemExceptionConstructorSystemString, + IntPtr releaseUnityEngineResolution, IntPtr unityEngineResolutionPropertyGetWidth, IntPtr unityEngineResolutionPropertySetWidth, IntPtr unityEngineResolutionPropertyGetHeight, @@ -879,10 +907,11 @@ static extern void Init( IntPtr boxResolution, IntPtr unboxResolution, IntPtr unityEngineScreenPropertyGetResolutions, + IntPtr releaseUnityEngineRay, IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, IntPtr boxRay, IntPtr unboxRay, - IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit, + IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1, IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, IntPtr boxColor, IntPtr unboxColor, @@ -898,6 +927,7 @@ static extern void Init( IntPtr unityEngineApplicationRemoveEventOnBeforeRender, IntPtr unityEngineSceneManagementSceneManagerAddEventSceneLoaded, IntPtr unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded, + IntPtr releaseUnityEngineSceneManagementScene, IntPtr boxScene, IntPtr unboxScene, IntPtr boxLoadSceneMode, @@ -928,6 +958,26 @@ static extern void Init( IntPtr systemIOFileStreamMethodWriteByteSystemByte, IntPtr releaseSystemIOBaseFileStream, IntPtr systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode, + IntPtr releaseUnityEnginePlayablesPlayableHandle, + IntPtr boxPlayableHandle, + IntPtr unboxPlayableHandle, + IntPtr releaseUnityEnginePlayablesPlayableGraph, + IntPtr boxPlayableGraph, + IntPtr unboxPlayableGraph, + IntPtr releaseUnityEngineAnimationsAnimationMixerPlayable, + IntPtr unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean, + IntPtr boxAnimationMixerPlayable, + IntPtr unboxAnimationMixerPlayable, + 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 boxBoolean, IntPtr unboxBoolean, IntPtr boxSByte, @@ -1216,7 +1266,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke public static extern void UnityEngineEventsUnityActionNativeInvoke(int thisHandle); [DllImport(Constants.PluginName)] - public static extern void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int thisHandle, UnityEngine.SceneManagement.Scene param0, int param1); + 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); @@ -1274,6 +1324,8 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate(ref UnityEngine.Vector3 a); delegate int BoxVector3Delegate(ref UnityEngine.Vector3 val); delegate UnityEngine.Vector3 UnboxVector3Delegate(int valHandle); + 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); @@ -1309,20 +1361,22 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate(int thisHandle); delegate void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate(int thisHandle, int valueHandle); delegate int SystemExceptionConstructorSystemStringDelegate(int messageHandle); - delegate int UnityEngineResolutionPropertyGetWidthDelegate(ref UnityEngine.Resolution thiz); - delegate void UnityEngineResolutionPropertySetWidthDelegate(ref UnityEngine.Resolution thiz, int value); - delegate int UnityEngineResolutionPropertyGetHeightDelegate(ref UnityEngine.Resolution thiz); - delegate void UnityEngineResolutionPropertySetHeightDelegate(ref UnityEngine.Resolution thiz, int value); - delegate int UnityEngineResolutionPropertyGetRefreshRateDelegate(ref UnityEngine.Resolution thiz); - delegate void UnityEngineResolutionPropertySetRefreshRateDelegate(ref UnityEngine.Resolution thiz, int value); - delegate int BoxResolutionDelegate(ref UnityEngine.Resolution val); - delegate UnityEngine.Resolution UnboxResolutionDelegate(int valHandle); + delegate void ReleaseUnityEngineResolutionDelegate(int handle); + 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 int UnityEngineScreenPropertyGetResolutionsDelegate(); - delegate UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction); - delegate int BoxRayDelegate(ref UnityEngine.Ray val); - delegate UnityEngine.Ray UnboxRayDelegate(int valHandle); - delegate int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate(ref UnityEngine.Ray ray, int resultsHandle); - delegate int UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(ref UnityEngine.Ray ray); + 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 BoxColorDelegate(ref UnityEngine.Color val); delegate UnityEngine.Color UnboxColorDelegate(int valHandle); delegate int BoxGradientColorKeyDelegate(ref UnityEngine.GradientColorKey val); @@ -1337,8 +1391,9 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate void UnityEngineApplicationRemoveEventOnBeforeRenderDelegate(int delHandle); delegate void UnityEngineSceneManagementSceneManagerAddEventSceneLoadedDelegate(int delHandle); delegate void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoadedDelegate(int delHandle); - delegate int BoxSceneDelegate(ref UnityEngine.SceneManagement.Scene val); - delegate UnityEngine.SceneManagement.Scene UnboxSceneDelegate(int valHandle); + 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 SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); @@ -1367,6 +1422,26 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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 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 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 BoxBooleanDelegate(bool val); delegate bool UnboxBooleanDelegate(int valHandle); delegate int BoxSByteDelegate(sbyte val); @@ -1409,8 +1484,8 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int SystemStringArray1GetItem1Delegate(int thisHandle, int index0); delegate void SystemStringArray1SetItem1Delegate(int thisHandle, int index0, int itemHandle); delegate int UnityEngineUnityEngineResolutionArray1Constructor1Delegate(int length0); - delegate UnityEngine.Resolution UnityEngineResolutionArray1GetItem1Delegate(int thisHandle, int index0); - delegate void UnityEngineResolutionArray1SetItem1Delegate(int thisHandle, int index0, ref UnityEngine.Resolution item); + 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); @@ -1452,7 +1527,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1); + 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); @@ -1497,6 +1572,13 @@ public static void Open( /*BEGIN STRUCTSTORE INIT CALLS*/ NativeScript.Bindings.StructStore.Init(1000); NativeScript.Bindings.StructStore>.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); /*END STRUCTSTORE INIT CALLS*/ #if UNITY_EDITOR @@ -1619,6 +1701,8 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate(UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)), Marshal.GetFunctionPointerForDelegate(new BoxVector3Delegate(BoxVector3)), Marshal.GetFunctionPointerForDelegate(new UnboxVector3Delegate(UnboxVector3)), + 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)), @@ -1654,6 +1738,7 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)), Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)), Marshal.GetFunctionPointerForDelegate(new SystemExceptionConstructorSystemStringDelegate(SystemExceptionConstructorSystemString)), + Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineResolutionDelegate(ReleaseUnityEngineResolution)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetWidthDelegate(UnityEngineResolutionPropertyGetWidth)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertySetWidthDelegate(UnityEngineResolutionPropertySetWidth)), Marshal.GetFunctionPointerForDelegate(new UnityEngineResolutionPropertyGetHeightDelegate(UnityEngineResolutionPropertyGetHeight)), @@ -1663,10 +1748,11 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new BoxResolutionDelegate(BoxResolution)), Marshal.GetFunctionPointerForDelegate(new UnboxResolutionDelegate(UnboxResolution)), 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_UnityEngineRaycastHitDelegate(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)), + Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)), Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(UnityEnginePhysicsMethodRaycastAllUnityEngineRay)), Marshal.GetFunctionPointerForDelegate(new BoxColorDelegate(BoxColor)), Marshal.GetFunctionPointerForDelegate(new UnboxColorDelegate(UnboxColor)), @@ -1682,6 +1768,7 @@ public static void Open( 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)), @@ -1712,6 +1799,26 @@ public static void Open( 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 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 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 BoxBooleanDelegate(BoxBoolean)), Marshal.GetFunctionPointerForDelegate(new UnboxBooleanDelegate(UnboxBoolean)), Marshal.GetFunctionPointerForDelegate(new BoxSByteDelegate(BoxSByte)), @@ -2969,7 +3076,8 @@ public void NativeInvoke(UnityEngine.SceneManagement.Scene arg0, UnityEngine.Sce if (CppHandle != 0) { int thisHandle = CppHandle; - NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(thisHandle, arg0, arg1); + int arg0Handle = NativeScript.Bindings.StructStore.Store(arg0); + NativeScript.Bindings.UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(thisHandle, arg0Handle, arg1); if (NativeScript.Bindings.UnhandledCppException != null) { Exception ex = NativeScript.Bindings.UnhandledCppException; @@ -3618,11 +3726,15 @@ static void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt3 { 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); } } @@ -3640,11 +3752,17 @@ static void UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInf { 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); } } @@ -3819,6 +3937,51 @@ static UnityEngine.Vector3 UnboxVector3(int valHandle) } } + [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) { @@ -4593,11 +4756,34 @@ static int SystemExceptionConstructorSystemString(int messageHandle) } } + [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(UnityEngineResolutionPropertyGetWidthDelegate))] - static int UnityEngineResolutionPropertyGetWidth(ref UnityEngine.Resolution thiz) + static int UnityEngineResolutionPropertyGetWidth(int thisHandle) { try { + var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); var returnValue = thiz.width; return returnValue; } @@ -4616,11 +4802,13 @@ static int UnityEngineResolutionPropertyGetWidth(ref UnityEngine.Resolution thiz } [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetWidthDelegate))] - static void UnityEngineResolutionPropertySetWidth(ref UnityEngine.Resolution thiz, int value) + 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) { @@ -4635,10 +4823,11 @@ static void UnityEngineResolutionPropertySetWidth(ref UnityEngine.Resolution thi } [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetHeightDelegate))] - static int UnityEngineResolutionPropertyGetHeight(ref UnityEngine.Resolution thiz) + static int UnityEngineResolutionPropertyGetHeight(int thisHandle) { try { + var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); var returnValue = thiz.height; return returnValue; } @@ -4657,11 +4846,13 @@ static int UnityEngineResolutionPropertyGetHeight(ref UnityEngine.Resolution thi } [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetHeightDelegate))] - static void UnityEngineResolutionPropertySetHeight(ref UnityEngine.Resolution thiz, int value) + 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) { @@ -4676,10 +4867,11 @@ static void UnityEngineResolutionPropertySetHeight(ref UnityEngine.Resolution th } [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetRefreshRateDelegate))] - static int UnityEngineResolutionPropertyGetRefreshRate(ref UnityEngine.Resolution thiz) + static int UnityEngineResolutionPropertyGetRefreshRate(int thisHandle) { try { + var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); var returnValue = thiz.refreshRate; return returnValue; } @@ -4698,11 +4890,13 @@ static int UnityEngineResolutionPropertyGetRefreshRate(ref UnityEngine.Resolutio } [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetRefreshRateDelegate))] - static void UnityEngineResolutionPropertySetRefreshRate(ref UnityEngine.Resolution thiz, int value) + 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) { @@ -4717,10 +4911,11 @@ static void UnityEngineResolutionPropertySetRefreshRate(ref UnityEngine.Resoluti } [MonoPInvokeCallback(typeof(BoxResolutionDelegate))] - static int BoxResolution(ref UnityEngine.Resolution val) + 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; } @@ -4739,25 +4934,25 @@ static int BoxResolution(ref UnityEngine.Resolution val) } [MonoPInvokeCallback(typeof(UnboxResolutionDelegate))] - static UnityEngine.Resolution UnboxResolution(int valHandle) + static int UnboxResolution(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Resolution)val; + 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(UnityEngine.Resolution); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Resolution); + return default(int); } } @@ -4783,33 +4978,56 @@ static int UnityEngineScreenPropertyGetResolutions() } } + [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 UnityEngine.Ray UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) + static int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) { try { - var returnValue = new UnityEngine.Ray(origin, direction); + 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(UnityEngine.Ray); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(int); } } [MonoPInvokeCallback(typeof(BoxRayDelegate))] - static int BoxRay(ref UnityEngine.Ray val) + 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; } @@ -4828,33 +5046,34 @@ static int BoxRay(ref UnityEngine.Ray val) } [MonoPInvokeCallback(typeof(UnboxRayDelegate))] - static UnityEngine.Ray UnboxRay(int valHandle) + static int UnboxRay(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Ray)val; + 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(UnityEngine.Ray); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Ray); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitDelegate))] - static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ref UnityEngine.Ray ray, int resultsHandle) + [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; @@ -4874,10 +5093,11 @@ static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRayc } [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] - static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ref UnityEngine.Ray ray) + 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); } @@ -5197,11 +5417,34 @@ static void UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(int del } } + [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(ref UnityEngine.SceneManagement.Scene val) + 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; } @@ -5220,25 +5463,25 @@ static int BoxScene(ref UnityEngine.SceneManagement.Scene val) } [MonoPInvokeCallback(typeof(UnboxSceneDelegate))] - static UnityEngine.SceneManagement.Scene UnboxScene(int valHandle) + static int UnboxScene(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.SceneManagement.Scene)val; + 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(UnityEngine.SceneManagement.Scene); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.SceneManagement.Scene); + return default(int); } } @@ -5457,11 +5700,13 @@ static void SystemCollectionsGenericBaseIComparerSystemInt32Constructor(int cppH { 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); } } @@ -5496,11 +5741,13 @@ static void SystemCollectionsGenericBaseIComparerSystemStringConstructor(int cpp { 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); } } @@ -5535,11 +5782,13 @@ static void SystemBaseStringComparerConstructor(int cppHandle, ref int handle) { 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); } } @@ -5574,11 +5823,13 @@ static void SystemCollectionsBaseICollectionConstructor(int cppHandle, ref int h { 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); } } @@ -5613,11 +5864,13 @@ static void SystemCollectionsBaseIListConstructor(int cppHandle, ref int handle) { 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); } } @@ -5675,11 +5928,13 @@ static void SystemCollectionsBaseQueueConstructor(int cppHandle, ref int handle) { 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); } } @@ -5714,11 +5969,13 @@ static void SystemComponentModelDesignBaseIComponentChangeServiceConstructor(int { 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); } } @@ -5797,11 +6054,13 @@ static void SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode(int c { 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); } } @@ -5824,6 +6083,467 @@ static void ReleaseSystemIOBaseFileStream(int handle) } } + [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(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(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(BoxBooleanDelegate))] static int BoxBoolean(bool val) { @@ -6759,34 +7479,35 @@ static int UnityEngineUnityEngineResolutionArray1Constructor1(int length0) } [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1GetItem1Delegate))] - static UnityEngine.Resolution UnityEngineResolutionArray1GetItem1(int thisHandle, int index0) + static int UnityEngineResolutionArray1GetItem1(int thisHandle, int index0) { try { var thiz = (UnityEngine.Resolution[])NativeScript.Bindings.ObjectStore.Get(thisHandle); var returnValue = thiz[index0]; - return returnValue; + return NativeScript.Bindings.StructStore.Store(returnValue); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Resolution); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Resolution); + return default(int); } } [MonoPInvokeCallback(typeof(UnityEngineResolutionArray1SetItem1Delegate))] - static void UnityEngineResolutionArray1SetItem1(int thisHandle, int index0, ref UnityEngine.Resolution item) + 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) @@ -6963,11 +7684,15 @@ static void SystemActionConstructor(int cppHandle, ref int handle, ref int class { 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); } } @@ -7068,11 +7793,15 @@ static void SystemActionSystemSingleConstructor(int cppHandle, ref int handle, r { 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); } } @@ -7173,11 +7902,15 @@ static void SystemActionSystemSingle_SystemSingleConstructor(int cppHandle, ref { 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); } } @@ -7281,11 +8014,15 @@ static void SystemFuncSystemInt32_SystemSingle_SystemDoubleConstructor(int cppHa { 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); } } @@ -7389,11 +8126,15 @@ static void SystemFuncSystemInt16_SystemInt32_SystemStringConstructor(int cppHan { 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); } } @@ -7495,11 +8236,15 @@ static void SystemAppDomainInitializerConstructor(int cppHandle, ref int handle, { 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); } } @@ -7600,11 +8345,15 @@ static void UnityEngineEventsUnityActionConstructor(int cppHandle, ref int handl { 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); } } @@ -7675,10 +8424,11 @@ static void UnityEngineEventsUnityActionRemove(int thisHandle, int delHandle) } [MonoPInvokeCallback(typeof(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvokeDelegate))] - static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, ref UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.LoadSceneMode arg1) + static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(int thisHandle, int arg0Handle, UnityEngine.SceneManagement.LoadSceneMode arg1) { try { + var arg0 = (UnityEngine.SceneManagement.Scene)NativeScript.Bindings.StructStore.Get(arg0Handle); ((UnityEngine.Events.UnityAction)NativeScript.Bindings.ObjectStore.Get(thisHandle))(arg0, arg1); } catch (System.NullReferenceException ex) @@ -7705,11 +8455,15 @@ static void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEng { 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); } } @@ -7812,11 +8566,15 @@ static void SystemComponentModelDesignComponentEventHandlerConstructor(int cppHa { 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); } } @@ -7919,11 +8677,15 @@ static void SystemComponentModelDesignComponentChangingEventHandlerConstructor(i { 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); } } @@ -8026,11 +8788,15 @@ static void SystemComponentModelDesignComponentChangedEventHandlerConstructor(in { 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); } } @@ -8133,11 +8899,15 @@ static void SystemComponentModelDesignComponentRenameEventHandlerConstructor(int { 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); } } diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 5733e12..e846bac 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -180,6 +180,8 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppBoxingMethodDeclarations = new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CppStringDefaultParams = + new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder TempStrBuilder = new StringBuilder(InitialStringBuilderCapacity); } @@ -193,6 +195,9 @@ class ParameterInfo public bool IsRef; public TypeKind Kind; public bool IsVirtual; + public bool HasDefault; + public object DefaultValue; + public bool IsVarArg; } enum TypeKind @@ -850,7 +855,8 @@ static MethodInfo GetMethod( Type type, MethodInfo[] methods, string methodName, - string[] paramTypeNames) + string[] paramTypeNames, + string[] genericTypeNames) { foreach (MethodInfo method in methods) { @@ -861,9 +867,17 @@ static MethodInfo GetMethod( } // All parameters must match - if (CheckParametersMatch( + if (!CheckParametersMatch( paramTypeNames, method.GetParameters())) + { + continue; + } + + // Generic arg count must match + Type[] methodGenericArgs = method.GetGenericArguments(); + int numGenericTypeNames = genericTypeNames == null ? 0 : genericTypeNames.Length; + if (methodGenericArgs.Length == numGenericTypeNames) { return method; } @@ -971,6 +985,11 @@ static void AppendParameterTypeNames( AppendTypeNameWithoutSuffixes( type.Name, output); + if (type.IsArray) + { + output.Append("Array"); + output.Append(type.GetArrayRank()); + } if (i != len - 1) { output.Append('_'); @@ -1049,7 +1068,8 @@ static ParameterInfo[] ConvertParameters( ParameterInfo[] parameters = new ParameterInfo[num]; for (int i = start; i < num; ++i) { - var reflectionInfo = reflectionParameters[i]; + System.Reflection.ParameterInfo reflectionInfo = + reflectionParameters[i]; ParameterInfo info = new ParameterInfo(); info.Name = reflectionInfo.Name; info.ParameterType = reflectionInfo.ParameterType; @@ -1059,6 +1079,13 @@ static ParameterInfo[] ConvertParameters( reflectionInfo); info.Kind = GetTypeKind( info.DereferencedParameterType); + info.HasDefault = (reflectionInfo.Attributes & + ParameterAttributes.HasDefault) == + ParameterAttributes.HasDefault; + info.DefaultValue = reflectionInfo.DefaultValue; + info.IsVarArg = reflectionInfo.IsDefined( + typeof(ParamArrayAttribute), + false); parameters[i - start] = info; } return parameters; @@ -1122,7 +1149,7 @@ static bool IsFullValueType(Type type) { return false; } - if (type.IsPrimitive || type.IsEnum) + if (type.IsPrimitive || type.IsEnum || type == typeof(void)) { return true; } @@ -1132,8 +1159,9 @@ static bool IsFullValueType(Type type) | BindingFlags.Public; foreach (FieldInfo field in type.GetFields(bindingFlags)) { - if (!field.IsStatic - && !IsFullValueType(field.FieldType)) + if (!field.IsPublic + || (!field.IsStatic + && !IsFullValueType(field.FieldType))) { return false; } @@ -1398,6 +1426,7 @@ static void AppendType( AppendCsharpFunctionEnd( typeof(void), new Type[0], + parameters, builders.CsharpFunctions); // C++ function pointer definition @@ -2850,6 +2879,7 @@ static void AppendEventAddRemoveMethod( AppendCsharpFunctionEnd( typeof(void), null, + methodParams, builders.CsharpFunctions); // C++ function pointer @@ -2936,7 +2966,8 @@ static MethodInfo GetMethod( Type enclosingType, Type[] typeTypeParams, Type[] genericArgTypes, - MethodInfo[] methods) + MethodInfo[] methods, + string[] methodGenericTypeNames) { // Map convenience method names to actual method names switch (jsonMethod.Name) @@ -3031,7 +3062,8 @@ static MethodInfo GetMethod( enclosingType, methods, jsonMethod.Name, - overriddenParamTypeNames); + overriddenParamTypeNames, + methodGenericTypeNames); } else { @@ -3039,7 +3071,8 @@ static MethodInfo GetMethod( enclosingType, methods, jsonMethod.Name, - jsonMethod.ParamTypes); + jsonMethod.ParamTypes, + methodGenericTypeNames); } } @@ -3055,13 +3088,6 @@ static void AppendMethod( int indent, StringBuilders builders) { - MethodInfo method = GetMethod( - jsonMethod, - enclosingType, - typeTypeParams, - genericArgTypes, - methods); - Type[] exceptionTypes = GetTypes( jsonMethod.Exceptions, assemblies); @@ -3073,6 +3099,13 @@ static void AppendMethod( foreach (JsonGenericParams jsonGenericParams in jsonMethod.GenericParams) { + MethodInfo method = GetMethod( + jsonMethod, + enclosingType, + typeTypeParams, + genericArgTypes, + methods, + jsonGenericParams.Types); Type[] methodTypeParams = GetTypes( jsonGenericParams.Types, assemblies); @@ -3102,6 +3135,13 @@ static void AppendMethod( } else { + MethodInfo method = GetMethod( + jsonMethod, + enclosingType, + typeTypeParams, + genericArgTypes, + methods, + null); ParameterInfo[] parameters = ConvertParameters( method.GetParameters()); Type returnType = method.ReturnType; @@ -3386,6 +3426,7 @@ static void AppendMethod( } builders.CsharpFunctions.Append(';'); if (!isReadOnly + && !methodIsStatic && enclosingTypeKind == TypeKind.ManagedStruct) { AppendStructStoreReplace( @@ -6899,20 +6940,46 @@ static void AppendBaseType( Type[] genericArgTypes = type.GetGenericArguments(); foreach (JsonMethod jsonMethod in jsonBaseType.OverrideMethods) { - MethodInfo methodInfo = GetMethod( - jsonMethod, - type, - typeParams, - genericArgTypes, - methods); - AppendBaseTypeNativeMethod( - type, - bindingTypeName, - typeParams, - cppBaseTypeName, - methodInfo, - indent, - builders); + if (jsonMethod.GenericParams != null) + { + foreach (JsonGenericParams jsonGenericParams in + jsonMethod.GenericParams) + { + MethodInfo methodInfo = GetMethod( + jsonMethod, + type, + typeParams, + genericArgTypes, + methods, + jsonGenericParams.Types); + AppendBaseTypeNativeMethod( + type, + bindingTypeName, + typeParams, + cppBaseTypeName, + methodInfo, + indent, + builders); + } + } + else + { + MethodInfo methodInfo = GetMethod( + jsonMethod, + type, + typeParams, + genericArgTypes, + methods, + null); + AppendBaseTypeNativeMethod( + type, + bindingTypeName, + typeParams, + cppBaseTypeName, + methodInfo, + indent, + builders); + } } } @@ -9876,6 +9943,7 @@ static void AppendGetter( } builders.CsharpFunctions.Append(';'); if (!isReadOnly + && !methodIsStatic && enclosingTypeKind == TypeKind.ManagedStruct) { AppendStructStoreReplace( @@ -10069,6 +10137,7 @@ static void AppendSetter( } builders.CsharpFunctions.Append(';'); if (!isReadOnly + && !methodIsStatic && enclosingTypeKind == TypeKind.ManagedStruct) { AppendStructStoreReplace( @@ -11356,12 +11425,14 @@ static void AppendCsharpFunctionReturn( AppendCsharpFunctionEnd( returnType, exceptionTypes, + parameters, output); } static void AppendCsharpFunctionEnd( Type returnType, Type[] exceptionTypes, + ParameterInfo[] parameters, StringBuilder output) { output.Append('\n'); @@ -11374,6 +11445,7 @@ static void AppendCsharpFunctionEnd( AppendCsharpCatchException( typeof(NullReferenceException), returnType, + parameters, output); } if (exceptionTypes != null) @@ -11383,12 +11455,14 @@ static void AppendCsharpFunctionEnd( AppendCsharpCatchException( exceptionType, returnType, + parameters, output); } } AppendCsharpCatchException( typeof(Exception), returnType, + parameters, output); output.Append("\t\t}\n"); output.Append("\t\t\n"); @@ -11397,6 +11471,7 @@ static void AppendCsharpFunctionEnd( static void AppendCsharpCatchException( Type exceptionType, Type returnType, + ParameterInfo[] parameters, StringBuilder output) { output.Append("\t\t\tcatch ("); @@ -11411,6 +11486,27 @@ static void AppendCsharpCatchException( exceptionType, output); output.Append("(NativeScript.Bindings.ObjectStore.Store(ex));\n"); + foreach (ParameterInfo param in parameters) + { + if (param.IsOut) + { + output.Append("\t\t\t\t"); + output.Append(param.Name); + if (param.Kind == TypeKind.Class + || param.Kind == TypeKind.ManagedStruct) + { + output.Append("Handle = default(int);\n"); + } + else + { + output.Append(" = default("); + AppendCsharpTypeName( + param.DereferencedParameterType, + output); + output.Append(");\n"); + } + } + } if (returnType != typeof(void)) { output.Append("\t\t\t\treturn default("); @@ -11515,8 +11611,11 @@ static void AppendCppParameterDeclaration( ParameterInfo[] parameters, Type[] typeTypeParameters, Type[] methodTypeParameters, + bool includeDefaults, StringBuilder output) { + bool hasVarArgs = parameters.Length > 0 && + parameters[parameters.Length-1].IsVarArg; for (int i = 0; i < parameters.Length; ++i) { ParameterInfo param = parameters[i]; @@ -11555,12 +11654,92 @@ static void AppendCppParameterDeclaration( output.Append(' '); output.Append(param.Name); + // Default if desired, present, and the method has no var args + if (includeDefaults && param.HasDefault && !hasVarArgs) + { + output.Append(" = "); + if (param.DereferencedParameterType == typeof(string)) + { + if (param.DefaultValue != null) + { + throw new Exception( + "Non-null string default parameters aren't supported"); + } + output.Append("Plugin::NullString"); + } + else if (object.ReferenceEquals(param.DefaultValue, null)) + { + output.Append("nullptr"); + } + else + { + if ((param.DefaultValue is sbyte) || + (param.DefaultValue is byte) || + (param.DefaultValue is short) || + (param.DefaultValue is ushort) || + (param.DefaultValue is int) || + (param.DefaultValue is uint) || + (param.DefaultValue is long) || + (param.DefaultValue is ulong)) + { + output.Append(param.DefaultValue); + } + else if (param.DefaultValue is bool) + { + bool val = (bool)param.DefaultValue; + output.Append(val ? "true" : "false"); + } + else if (param.DefaultValue is char) + { + char val = (char)param.DefaultValue; + output.Append('\''); + output.Append(val); + output.Append('\''); + } + else + { + Type type = param.DefaultValue.GetType(); + if (type.IsEnum) + { + AppendCppTypeName( + type, + output); + output.Append("::"); + output.Append(param.DefaultValue); + } + else + { + StringBuilder error = new StringBuilder(); + error.Append("Default parameter type ("); + AppendCsharpTypeName( + param.DefaultValue.GetType(), + error); + error.Append(") not supported"); + throw new Exception(error.ToString()); + } + } + } + } + if (i != parameters.Length - 1) { output.Append(", "); } } } + + static void AppendDefaultStringParamName( + string str, + StringBuilder output) + { + foreach (char c in str) + { + if (char.IsLetterOrDigit(c)) + { + output.Append(c); + } + } + } static void AppendCppInitBody( string globalVariableName, @@ -11629,6 +11808,7 @@ static void AppendCppMethodDefinitionBegin( parameters, null, // don't substitute type type params null, // don't substitute method type params + false, output); output.Append(")\n"); } @@ -12019,6 +12199,7 @@ static void AppendCppMethodDeclaration( parameters, typeTypeParameters, methodTypeParameters, + true, output); output.Append(')'); @@ -12172,6 +12353,10 @@ static void AppendCppTypeName( { output.Append("System::String"); } + else if (type == typeof(IntPtr)) + { + output.Append("void*"); + } else if (type.IsArray) { int rank = type.GetArrayRank(); @@ -12253,6 +12438,7 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CppMonoBehaviourMessages); RemoveTrailingChars(builders.CppGlobalStateAndFunctions); RemoveTrailingChars(builders.CppBoxingMethodDeclarations); + RemoveTrailingChars(builders.CppStringDefaultParams); } // Remove trailing chars (e.g. commas) for last elements @@ -12380,9 +12566,14 @@ static void InjectBuilders( builders.CppGlobalStateAndFunctions.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, - "*BEGIN BOXING METHOD DECLARATIONS*/\n", + "/*BEGIN BOXING METHOD DECLARATIONS*/\n", "\n\t\t/*END BOXING METHOD DECLARATIONS*/", builders.CppBoxingMethodDeclarations.ToString()); + cppHeaderContents = InjectIntoString( + cppHeaderContents, + "/*BEGIN STRING DEFAULT PARAMETERS*/\n", + "\n\t/*END STRING DEFAULT PARAMETERS*/", + builders.CppStringDefaultParams.ToString()); File.WriteAllText(CsharpPath, csharpContents); File.WriteAllText(CppHeaderPath, cppHeaderContents); diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 47aff03..7c09fbb 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -250,6 +250,9 @@ } ] }, + { + "Name": "UnityEngine.Quaternion" + }, { "Name": "UnityEngine.Matrix4x4", "Properties": [ @@ -723,6 +726,70 @@ ] } ] + }, + { + "Name": "UnityEngine.Playables.PlayableHandle" + }, + { + "Name": "UnityEngine.Playables.PlayableGraph" + }, + { + "Name": "UnityEngine.Animations.AnimationMixerPlayable", + "Methods": [ + { + "Name": "Create", + "ParamTypes": [ + "UnityEngine.Playables.PlayableGraph", + "System.Int32", + "System.Boolean" + ] + } + ] + }, + { + "Name": "UnityEngine.Experimental.UIElements.CallbackEventHandler" + }, + { + "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" + ] + } + ] } ], "MonoBehaviours": [ diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 2f9c286..e2ce580 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -28,6 +28,15 @@ #define DLLEXPORT extern "C" #endif +//////////////////////////////////////////////////////////////// +// Global variables +//////////////////////////////////////////////////////////////// + +namespace Plugin +{ + System::String NullString(nullptr); +} + //////////////////////////////////////////////////////////////// // C# functions for C++ to call //////////////////////////////////////////////////////////////// @@ -73,6 +82,8 @@ namespace Plugin UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a); int32_t (*BoxVector3)(UnityEngine::Vector3& val); UnityEngine::Vector3 (*UnboxVector3)(int32_t valHandle); + int32_t (*BoxQuaternion)(UnityEngine::Quaternion& val); + UnityEngine::Quaternion (*UnboxQuaternion)(int32_t valHandle); float (*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); @@ -108,20 +119,22 @@ namespace Plugin int32_t (*SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)(int32_t thisHandle); void (*SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)(int32_t thisHandle, int32_t valueHandle); int32_t (*SystemExceptionConstructorSystemString)(int32_t messageHandle); - int32_t (*UnityEngineResolutionPropertyGetWidth)(UnityEngine::Resolution* thiz); - void (*UnityEngineResolutionPropertySetWidth)(UnityEngine::Resolution* thiz, int32_t value); - int32_t (*UnityEngineResolutionPropertyGetHeight)(UnityEngine::Resolution* thiz); - void (*UnityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value); - int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz); - void (*UnityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value); - int32_t (*BoxResolution)(UnityEngine::Resolution& val); - UnityEngine::Resolution (*UnboxResolution)(int32_t valHandle); + void (*ReleaseUnityEngineResolution)(int32_t handle); + int32_t (*UnityEngineResolutionPropertyGetWidth)(int32_t thisHandle); + void (*UnityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value); + int32_t (*UnityEngineResolutionPropertyGetHeight)(int32_t thisHandle); + void (*UnityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value); + int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle); + void (*UnityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value); + int32_t (*BoxResolution)(int32_t valHandle); + int32_t (*UnboxResolution)(int32_t valHandle); int32_t (*UnityEngineScreenPropertyGetResolutions)(); - UnityEngine::Ray (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); - int32_t (*BoxRay)(UnityEngine::Ray& val); - UnityEngine::Ray (*UnboxRay)(int32_t valHandle); - int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle); - int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray); + 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); + int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle); + int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle); int32_t (*BoxColor)(UnityEngine::Color& val); UnityEngine::Color (*UnboxColor)(int32_t valHandle); int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); @@ -136,8 +149,9 @@ namespace Plugin void (*UnityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle); void (*UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle); - int32_t (*BoxScene)(UnityEngine::SceneManagement::Scene& val); - UnityEngine::SceneManagement::Scene (*UnboxScene)(int32_t valHandle); + 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 (*SystemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle); @@ -166,6 +180,26 @@ namespace Plugin 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); + 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 (*BoxAnimationMixerPlayable)(int32_t valHandle); + int32_t (*UnboxAnimationMixerPlayable)(int32_t valHandle); + 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); + System::Boolean (*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); System::Boolean (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); @@ -208,8 +242,8 @@ namespace Plugin 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); - UnityEngine::Resolution (*UnityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0); - int32_t (*UnityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item); + 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); @@ -255,7 +289,7 @@ namespace Plugin 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, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1); + 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); @@ -375,6 +409,81 @@ namespace Plugin } } + int32_t RefCountsLenUnityEngineResolution; + int32_t* RefCountsUnityEngineResolution; + + void ReferenceManagedUnityEngineResolution(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + if (handle != 0) + { + RefCountsUnityEngineResolution[handle]++; + } + } + + void DereferenceManagedUnityEngineResolution(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineResolution[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineResolution(handle); + } + } + } + + int32_t RefCountsLenUnityEngineRay; + int32_t* RefCountsUnityEngineRay; + + void ReferenceManagedUnityEngineRay(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); + if (handle != 0) + { + RefCountsUnityEngineRay[handle]++; + } + } + + void DereferenceManagedUnityEngineRay(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineRay); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineRay[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineRay(handle); + } + } + } + + int32_t RefCountsLenUnityEngineSceneManagementScene; + int32_t* RefCountsUnityEngineSceneManagementScene; + + void ReferenceManagedUnityEngineSceneManagementScene(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineSceneManagementScene); + if (handle != 0) + { + RefCountsUnityEngineSceneManagementScene[handle]++; + } + } + + void DereferenceManagedUnityEngineSceneManagementScene(int32_t handle) + { + 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; @@ -575,6 +684,106 @@ namespace Plugin *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) + { + RefCountsUnityEnginePlayablesPlayableHandle[handle]++; + } + } + + void DereferenceManagedUnityEnginePlayablesPlayableHandle(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableHandle); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableHandle[handle]; + if (numRemain == 0) + { + ReleaseUnityEnginePlayablesPlayableHandle(handle); + } + } + } + + int32_t RefCountsLenUnityEnginePlayablesPlayableGraph; + int32_t* RefCountsUnityEnginePlayablesPlayableGraph; + + void ReferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); + if (handle != 0) + { + RefCountsUnityEnginePlayablesPlayableGraph[handle]++; + } + } + + void DereferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableGraph[handle]; + if (numRemain == 0) + { + ReleaseUnityEnginePlayablesPlayableGraph(handle); + } + } + } + + int32_t RefCountsLenUnityEngineAnimationsAnimationMixerPlayable; + int32_t* RefCountsUnityEngineAnimationsAnimationMixerPlayable; + + void ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); + if (handle != 0) + { + RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]++; + } + } + + void DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineAnimationsAnimationMixerPlayable(handle); + } + } + } + + int32_t RefCountsLenUnityEngineXRWSAInputInteractionSourcePose; + int32_t* RefCountsUnityEngineXRWSAInputInteractionSourcePose; + + void ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); + if (handle != 0) + { + RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]++; + } + } + + void DereferenceManagedUnityEngineXRWSAInputInteractionSourcePose(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineXRWSAInputInteractionSourcePose); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineXRWSAInputInteractionSourcePose[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineXRWSAInputInteractionSourcePose(handle); + } + } + } + int32_t SystemActionFreeListSize; System::Action** SystemActionFreeList; System::Action** NextFreeSystemAction; @@ -1002,11 +1211,6 @@ namespace System return *this; } - String::String() - : Object(nullptr) - { - } - String::String(const char* chars) : Object(Plugin::InternalUse::Only, Plugin::StringNew(chars)) { @@ -2404,6 +2608,46 @@ namespace System } } +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() @@ -3834,13 +4078,88 @@ namespace System namespace UnityEngine { - Resolution::Resolution() + Resolution::Resolution(decltype(nullptr) n) + : Resolution(Plugin::InternalUse::Only, 0) + { + } + + Resolution::Resolution(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, handle) + { + if (handle) + { + Plugin::ReferenceManagedUnityEngineResolution(Handle); + } + } + + Resolution::Resolution(const Resolution& other) + : Resolution(Plugin::InternalUse::Only, other.Handle) + { + } + + Resolution::Resolution(Resolution&& other) + : Resolution(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Resolution::~Resolution() + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineResolution(Handle); + Handle = 0; + } + } + + Resolution& Resolution::operator=(const Resolution& other) + { + if (this->Handle) + { + Plugin::DereferenceManagedUnityEngineResolution(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineResolution(Handle); + } + return *this; + } + + Resolution& Resolution::operator=(decltype(nullptr) other) { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineResolution(Handle); + Handle = 0; + } + return *this; + } + + Resolution& Resolution::operator=(Resolution&& other) + { + if (Handle) + { + Plugin::DereferenceManagedUnityEngineResolution(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Resolution::operator==(const Resolution& other) const + { + return Handle == other.Handle; + } + + bool Resolution::operator!=(const Resolution& other) const + { + return Handle != other.Handle; } int32_t Resolution::GetWidth() { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(this); + auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3853,7 +4172,7 @@ namespace UnityEngine void Resolution::SetWidth(int32_t value) { - Plugin::UnityEngineResolutionPropertySetWidth(this, value); + Plugin::UnityEngineResolutionPropertySetWidth(Handle, value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3865,7 +4184,7 @@ namespace UnityEngine int32_t Resolution::GetHeight() { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(this); + auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3878,7 +4197,7 @@ namespace UnityEngine void Resolution::SetHeight(int32_t value) { - Plugin::UnityEngineResolutionPropertySetHeight(this, value); + Plugin::UnityEngineResolutionPropertySetHeight(Handle, value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3890,7 +4209,7 @@ namespace UnityEngine int32_t Resolution::GetRefreshRate() { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(this); + auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3903,7 +4222,7 @@ namespace UnityEngine void Resolution::SetRefreshRate(int32_t value) { - Plugin::UnityEngineResolutionPropertySetRefreshRate(this, value); + Plugin::UnityEngineResolutionPropertySetRefreshRate(Handle, value); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3918,7 +4237,7 @@ namespace System { Object::Object(UnityEngine::Resolution& val) { - int32_t handle = Plugin::BoxResolution(val); + int32_t handle = Plugin::BoxResolution(val.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -3935,7 +4254,7 @@ namespace System Object::operator UnityEngine::Resolution() { - UnityEngine::Resolution returnVal(Plugin::UnboxResolution(Handle)); + UnityEngine::Resolution returnVal(Plugin::InternalUse::Only, Plugin::UnboxResolution(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4044,52 +4363,132 @@ namespace UnityEngine namespace UnityEngine { - Ray::Ray() + Ray::Ray(decltype(nullptr) n) + : Ray(Plugin::InternalUse::Only, 0) { } - Ray::Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction) + Ray::Ray(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, handle) { - auto returnValue = Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(origin, direction); - if (Plugin::unhandledCsharpException) + if (handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReferenceManagedUnityEngineRay(Handle); } - *this = returnValue; } -} - -namespace System -{ - Object::Object(UnityEngine::Ray& val) + + Ray::Ray(const Ray& other) + : Ray(Plugin::InternalUse::Only, other.Handle) { - int32_t handle = Plugin::BoxRay(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + } + + Ray::Ray(Ray&& other) + : Ray(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Ray::~Ray() + { + if (Handle) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + Plugin::DereferenceManagedUnityEngineRay(Handle); + Handle = 0; } } - Object::operator UnityEngine::Ray() + Ray& Ray::operator=(const Ray& other) { - UnityEngine::Ray returnVal(Plugin::UnboxRay(Handle)); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedUnityEngineRay(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineRay(Handle); + } + return *this; + } + + Ray& Ray::operator=(decltype(nullptr) other) + { + 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) + : System::ValueType(nullptr) + { + 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); + } + } +} + +namespace System +{ + Object::Object(UnityEngine::Ray& val) + { + int32_t handle = Plugin::BoxRay(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::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; } @@ -4178,7 +4577,7 @@ namespace UnityEngine int32_t Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results) { - auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit(ray, results.Handle); + auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(ray.Handle, results.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4191,7 +4590,7 @@ namespace UnityEngine System::Array1 Physics::RaycastAll(UnityEngine::Ray& ray) { - auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ray); + auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay(ray.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4752,8 +5151,83 @@ namespace UnityEngine { namespace SceneManagement { - Scene::Scene() + Scene::Scene(decltype(nullptr) n) + : Scene(Plugin::InternalUse::Only, 0) + { + } + + Scene::Scene(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, 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) other) + { + 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; } } } @@ -4762,7 +5236,7 @@ namespace System { Object::Object(UnityEngine::SceneManagement::Scene& val) { - int32_t handle = Plugin::BoxScene(val); + int32_t handle = Plugin::BoxScene(val.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4779,7 +5253,7 @@ namespace System Object::operator UnityEngine::SceneManagement::Scene() { - UnityEngine::SceneManagement::Scene returnVal(Plugin::UnboxScene(Handle)); + UnityEngine::SceneManagement::Scene returnVal(Plugin::InternalUse::Only, Plugin::UnboxScene(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -8900,110 +9374,96 @@ namespace System } } -namespace System +namespace UnityEngine { - Object::Object(System::Boolean val) + namespace Playables { - int32_t handle = Plugin::BoxBoolean(val); - if (Plugin::unhandledCsharpException) + PlayableHandle::PlayableHandle(decltype(nullptr) n) + : PlayableHandle(Plugin::InternalUse::Only, 0) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - if (handle) + + PlayableHandle::PlayableHandle(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, handle) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } } - } - - Object::operator System::Boolean() - { - System::Boolean returnVal(Plugin::UnboxBoolean(Handle)); - if (Plugin::unhandledCsharpException) + + PlayableHandle::PlayableHandle(const PlayableHandle& other) + : PlayableHandle(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - return returnVal; - } -} - -namespace System -{ - Object::Object(int8_t val) - { - int32_t handle = Plugin::BoxSByte(val); - if (Plugin::unhandledCsharpException) + + PlayableHandle::PlayableHandle(PlayableHandle&& other) + : PlayableHandle(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + other.Handle = 0; } - if (handle) + + PlayableHandle::~PlayableHandle() { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + Handle = 0; + } } - } - - Object::operator int8_t() - { - int8_t returnVal(Plugin::UnboxSByte(Handle)); - if (Plugin::unhandledCsharpException) + + PlayableHandle& PlayableHandle::operator=(const PlayableHandle& other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (this->Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } + return *this; } - return returnVal; - } -} - -namespace System -{ - Object::Object(uint8_t val) - { - int32_t handle = Plugin::BoxByte(val); - if (Plugin::unhandledCsharpException) + + PlayableHandle& PlayableHandle::operator=(decltype(nullptr) other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + Handle = 0; + } + return *this; } - if (handle) + + PlayableHandle& PlayableHandle::operator=(PlayableHandle&& other) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - } - - Object::operator uint8_t() - { - uint8_t returnVal(Plugin::UnboxByte(Handle)); - if (Plugin::unhandledCsharpException) + + bool PlayableHandle::operator==(const PlayableHandle& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; + } + + bool PlayableHandle::operator!=(const PlayableHandle& other) const + { + return Handle != other.Handle; } - return returnVal; } } namespace System { - Object::Object(int16_t val) + Object::Object(UnityEngine::Playables::PlayableHandle& val) { - int32_t handle = Plugin::BoxInt16(val); + int32_t handle = Plugin::BoxPlayableHandle(val.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9018,9 +9478,9 @@ namespace System } } - Object::operator int16_t() + Object::operator UnityEngine::Playables::PlayableHandle() { - int16_t returnVal(Plugin::UnboxInt16(Handle)); + UnityEngine::Playables::PlayableHandle returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableHandle(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9032,9 +9492,804 @@ namespace System } } -namespace System +namespace UnityEngine { - Object::Object(uint16_t val) + namespace Playables + { + PlayableGraph::PlayableGraph(decltype(nullptr) n) + : PlayableGraph(Plugin::InternalUse::Only, 0) + { + } + + PlayableGraph::PlayableGraph(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, 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) other) + { + 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; + } + } +} + +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 Animations + { + AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr) n) + : AnimationMixerPlayable(Plugin::InternalUse::Only, 0) + { + } + + AnimationMixerPlayable::AnimationMixerPlayable(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, 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) other) + { + 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, int32_t 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); + } + } +} + +namespace System +{ + Object::Object(UnityEngine::Animations::AnimationMixerPlayable& val) + { + int32_t handle = Plugin::BoxAnimationMixerPlayable(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::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 UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + CallbackEventHandler::CallbackEventHandler(decltype(nullptr) n) + : CallbackEventHandler(Plugin::InternalUse::Only, 0) + { + } + + CallbackEventHandler::CallbackEventHandler(Plugin::InternalUse iu, int32_t handle) + : System::Object(iu, 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) other) + { + 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 + { + VisualElement::VisualElement(decltype(nullptr) n) + : VisualElement(Plugin::InternalUse::Only, 0) + { + } + + VisualElement::VisualElement(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::Experimental::UIElements::CallbackEventHandler(iu, 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) other) + { + 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 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 System +{ + Object::Object(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val) + { + int32_t handle = Plugin::BoxInteractionSourcePositionAccuracy(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::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 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() + { + 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) n) + : InteractionSourcePose(Plugin::InternalUse::Only, 0) + { + } + + InteractionSourcePose::InteractionSourcePose(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(iu, 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) other) + { + 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; + } + } + } + } +} + +namespace System +{ + Object::Object(UnityEngine::XR::WSA::Input::InteractionSourcePose& val) + { + 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() + { + 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 +{ + Object::Object(System::Boolean val) + { + int32_t handle = Plugin::BoxBoolean(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::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::Object(int8_t val) + { + int32_t handle = Plugin::BoxSByte(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 int8_t() + { + int8_t returnVal(Plugin::UnboxSByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + uint8_t returnVal(Plugin::UnboxByte(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +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() + { + int16_t returnVal(Plugin::UnboxInt16(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + Object::Object(uint16_t val) { int32_t handle = Plugin::BoxUInt16(val); if (Plugin::unhandledCsharpException) @@ -10427,7 +11682,7 @@ namespace Plugin void ArrayElementProxy1_1::operator=(UnityEngine::Resolution item) { - Plugin::UnityEngineResolutionArray1SetItem1(Handle, Index0, item); + Plugin::UnityEngineResolutionArray1SetItem1(Handle, Index0, item.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -10447,7 +11702,7 @@ namespace Plugin ex->ThrowReferenceToThis(); delete ex; } - return returnValue; + return UnityEngine::Resolution(Plugin::InternalUse::Only, returnValue); } } @@ -12788,10 +14043,11 @@ namespace UnityEngine { } - DLLEXPORT void UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeNativeInvoke(int32_t cppHandle, 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) @@ -12808,7 +14064,7 @@ namespace UnityEngine void UnityAction2::Invoke(UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1) { - Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0, arg1); + Plugin::UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeInvoke(Handle, arg0.Handle, arg1); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -13875,6 +15131,8 @@ DLLEXPORT void Init( UnityEngine::Vector3 (*unityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a), int32_t (*boxVector3)(UnityEngine::Vector3& val), UnityEngine::Vector3 (*unboxVector3)(int32_t valHandle), + int32_t (*boxQuaternion)(UnityEngine::Quaternion& val), + UnityEngine::Quaternion (*unboxQuaternion)(int32_t valHandle), float (*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), @@ -13910,20 +15168,22 @@ DLLEXPORT void Init( int32_t (*systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)(int32_t thisHandle), void (*systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)(int32_t thisHandle, int32_t valueHandle), int32_t (*systemExceptionConstructorSystemString)(int32_t messageHandle), - int32_t (*unityEngineResolutionPropertyGetWidth)(UnityEngine::Resolution* thiz), - void (*unityEngineResolutionPropertySetWidth)(UnityEngine::Resolution* thiz, int32_t value), - int32_t (*unityEngineResolutionPropertyGetHeight)(UnityEngine::Resolution* thiz), - void (*unityEngineResolutionPropertySetHeight)(UnityEngine::Resolution* thiz, int32_t value), - int32_t (*unityEngineResolutionPropertyGetRefreshRate)(UnityEngine::Resolution* thiz), - void (*unityEngineResolutionPropertySetRefreshRate)(UnityEngine::Resolution* thiz, int32_t value), - int32_t (*boxResolution)(UnityEngine::Resolution& val), - UnityEngine::Resolution (*unboxResolution)(int32_t valHandle), + void (*releaseUnityEngineResolution)(int32_t handle), + int32_t (*unityEngineResolutionPropertyGetWidth)(int32_t thisHandle), + void (*unityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value), + int32_t (*unityEngineResolutionPropertyGetHeight)(int32_t thisHandle), + void (*unityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value), + int32_t (*unityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle), + void (*unityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value), + int32_t (*boxResolution)(int32_t valHandle), + int32_t (*unboxResolution)(int32_t valHandle), int32_t (*unityEngineScreenPropertyGetResolutions)(), - UnityEngine::Ray (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), - int32_t (*boxRay)(UnityEngine::Ray& val), - UnityEngine::Ray (*unboxRay)(int32_t valHandle), - int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit)(UnityEngine::Ray& ray, int32_t resultsHandle), - int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(UnityEngine::Ray& ray), + 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), + int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle), + int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle), int32_t (*boxColor)(UnityEngine::Color& val), UnityEngine::Color (*unboxColor)(int32_t valHandle), int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), @@ -13938,8 +15198,9 @@ DLLEXPORT void Init( void (*unityEngineApplicationRemoveEventOnBeforeRender)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerAddEventSceneLoaded)(int32_t delHandle), void (*unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded)(int32_t delHandle), - int32_t (*boxScene)(UnityEngine::SceneManagement::Scene& val), - UnityEngine::SceneManagement::Scene (*unboxScene)(int32_t valHandle), + 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 (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), @@ -13968,6 +15229,26 @@ DLLEXPORT void Init( 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), + 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 (*boxAnimationMixerPlayable)(int32_t valHandle), + int32_t (*unboxAnimationMixerPlayable)(int32_t valHandle), + 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), + System::Boolean (*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), System::Boolean (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), @@ -14010,8 +15291,8 @@ DLLEXPORT void Init( 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), - UnityEngine::Resolution (*unityEngineResolutionArray1GetItem1)(int32_t thisHandle, int32_t index0), - int32_t (*unityEngineResolutionArray1SetItem1)(int32_t thisHandle, int32_t index0, UnityEngine::Resolution& item), + 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), @@ -14057,7 +15338,7 @@ DLLEXPORT void Init( 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, UnityEngine::SceneManagement::Scene& arg0, UnityEngine::SceneManagement::LoadSceneMode arg1), + 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), @@ -14125,6 +15406,8 @@ DLLEXPORT void Init( Plugin::UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3 = unityEngineVector3Methodop_UnaryNegationUnityEngineVector3; Plugin::BoxVector3 = boxVector3; Plugin::UnboxVector3 = unboxVector3; + Plugin::BoxQuaternion = boxQuaternion; + Plugin::UnboxQuaternion = unboxQuaternion; Plugin::UnityEngineMatrix4x4PropertyGetItem = unityEngineMatrix4x4PropertyGetItem; Plugin::UnityEngineMatrix4x4PropertySetItem = unityEngineMatrix4x4PropertySetItem; Plugin::BoxMatrix4x4 = boxMatrix4x4; @@ -14162,6 +15445,8 @@ DLLEXPORT void Init( Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue = systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue; Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue = systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue; Plugin::SystemExceptionConstructorSystemString = systemExceptionConstructorSystemString; + Plugin::ReleaseUnityEngineResolution = releaseUnityEngineResolution; + Plugin::RefCountsUnityEngineResolution = new int32_t[maxManagedObjects](); Plugin::UnityEngineResolutionPropertyGetWidth = unityEngineResolutionPropertyGetWidth; Plugin::UnityEngineResolutionPropertySetWidth = unityEngineResolutionPropertySetWidth; Plugin::UnityEngineResolutionPropertyGetHeight = unityEngineResolutionPropertyGetHeight; @@ -14171,10 +15456,12 @@ DLLEXPORT void Init( Plugin::BoxResolution = boxResolution; Plugin::UnboxResolution = unboxResolution; Plugin::UnityEngineScreenPropertyGetResolutions = unityEngineScreenPropertyGetResolutions; + Plugin::ReleaseUnityEngineRay = releaseUnityEngineRay; + Plugin::RefCountsUnityEngineRay = new int32_t[maxManagedObjects](); Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3 = unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3; Plugin::BoxRay = boxRay; Plugin::UnboxRay = unboxRay; - Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit = unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHit; + Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1 = unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1; Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay = unityEnginePhysicsMethodRaycastAllUnityEngineRay; Plugin::BoxColor = boxColor; Plugin::UnboxColor = unboxColor; @@ -14190,6 +15477,8 @@ DLLEXPORT void Init( Plugin::UnityEngineApplicationRemoveEventOnBeforeRender = unityEngineApplicationRemoveEventOnBeforeRender; Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded = unityEngineSceneManagementSceneManagerAddEventSceneLoaded; Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded = unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded; + Plugin::ReleaseUnityEngineSceneManagementScene = releaseUnityEngineSceneManagementScene; + Plugin::RefCountsUnityEngineSceneManagementScene = new int32_t[maxManagedObjects](); Plugin::BoxScene = boxScene; Plugin::UnboxScene = unboxScene; Plugin::BoxLoadSceneMode = boxLoadSceneMode; @@ -14284,6 +15573,30 @@ DLLEXPORT void Init( NextFreeSystemIOBaseFileStream = SystemIOBaseFileStreamFreeList + 1; Plugin::ReleaseSystemIOBaseFileStream = releaseSystemIOBaseFileStream; Plugin::SystemIOBaseFileStreamConstructorSystemString_SystemIOFileMode = systemIOBaseFileStreamConstructorSystemString_SystemIOFileMode; + Plugin::ReleaseUnityEnginePlayablesPlayableHandle = releaseUnityEnginePlayablesPlayableHandle; + Plugin::RefCountsUnityEnginePlayablesPlayableHandle = new int32_t[maxManagedObjects](); + Plugin::BoxPlayableHandle = boxPlayableHandle; + Plugin::UnboxPlayableHandle = unboxPlayableHandle; + Plugin::ReleaseUnityEnginePlayablesPlayableGraph = releaseUnityEnginePlayablesPlayableGraph; + Plugin::RefCountsUnityEnginePlayablesPlayableGraph = new int32_t[maxManagedObjects](); + Plugin::BoxPlayableGraph = boxPlayableGraph; + Plugin::UnboxPlayableGraph = unboxPlayableGraph; + Plugin::ReleaseUnityEngineAnimationsAnimationMixerPlayable = releaseUnityEngineAnimationsAnimationMixerPlayable; + Plugin::RefCountsUnityEngineAnimationsAnimationMixerPlayable = new int32_t[maxManagedObjects](); + Plugin::UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean = unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean; + Plugin::BoxAnimationMixerPlayable = boxAnimationMixerPlayable; + Plugin::UnboxAnimationMixerPlayable = unboxAnimationMixerPlayable; + 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 = new int32_t[maxManagedObjects](); + Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode = unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode; + Plugin::BoxInteractionSourcePose = boxInteractionSourcePose; + Plugin::UnboxInteractionSourcePose = unboxInteractionSourcePose; Plugin::BoxBoolean = boxBoolean; Plugin::UnboxBoolean = unboxBoolean; Plugin::BoxSByte = boxSByte; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 9049197..040361b 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -284,6 +284,11 @@ namespace UnityEngine struct Vector3; } +namespace UnityEngine +{ + struct Quaternion; +} + namespace UnityEngine { struct Matrix4x4; @@ -820,6 +825,116 @@ namespace System } } +namespace UnityEngine +{ + namespace Playables + { + struct PlayableHandle; + } +} + +namespace UnityEngine +{ + namespace Playables + { + struct PlayableGraph; + } +} + +namespace UnityEngine +{ + namespace Animations + { + struct AnimationMixerPlayable; + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct CallbackEventHandler; + } + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct VisualElement; + } + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + namespace UQueryExtensions + { + } + } + } +} + +namespace UnityEngine +{ + namespace XR + { + namespace WSA + { + namespace Input + { + enum struct InteractionSourcePositionAccuracy : int32_t + { + None = 0, + Approximate = 1, + High = 2 + }; + } + } + } +} + +namespace UnityEngine +{ + namespace XR + { + namespace WSA + { + namespace Input + { + enum struct InteractionSourceNode : int32_t + { + Grip = 0, + Pointer = 1 + }; + } + } + } +} + +namespace UnityEngine +{ + namespace XR + { + namespace WSA + { + namespace Input + { + struct InteractionSourcePose; + } + } + } +} + namespace MyGame { namespace MonoBehaviours @@ -1069,6 +1184,8 @@ namespace System /*BEGIN BOXING METHOD DECLARATIONS*/ Object(UnityEngine::Vector3& val); explicit operator UnityEngine::Vector3(); + Object(UnityEngine::Quaternion& val); + explicit operator UnityEngine::Quaternion(); Object(UnityEngine::Matrix4x4& val); explicit operator UnityEngine::Matrix4x4(); Object(UnityEngine::RaycastHit& val); @@ -1093,6 +1210,18 @@ namespace System 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::Playables::PlayableGraph& val); + explicit operator UnityEngine::Playables::PlayableGraph(); + Object(UnityEngine::Animations::AnimationMixerPlayable& val); + explicit operator UnityEngine::Animations::AnimationMixerPlayable(); + 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); @@ -1137,7 +1266,6 @@ namespace System String& operator=(const String& other); String& operator=(decltype(nullptr) other); String& operator=(String&& other); - String(); String(const char* chars); }; @@ -1150,6 +1278,15 @@ namespace System }; } +//////////////////////////////////////////////////////////////// +// Global variables +//////////////////////////////////////////////////////////////// + +namespace Plugin +{ + extern System::String NullString; +} + /*BEGIN TYPE DEFINITIONS*/ namespace System { @@ -1394,6 +1531,18 @@ namespace UnityEngine }; } +namespace UnityEngine +{ + struct Quaternion + { + Quaternion(); + float x; + float y; + float z; + float w; + }; +} + namespace UnityEngine { struct Matrix4x4 @@ -1674,18 +1823,24 @@ namespace System namespace UnityEngine { - struct Resolution - { - Resolution(); + struct Resolution : System::ValueType + { + Resolution(decltype(nullptr) n); + Resolution(Plugin::InternalUse iu, int32_t handle); + Resolution(const Resolution& other); + Resolution(Resolution&& other); + virtual ~Resolution(); + Resolution& operator=(const Resolution& other); + Resolution& operator=(decltype(nullptr) other); + 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); - int32_t m_Width; - int32_t m_Height; - int32_t m_RefreshRate; }; } @@ -1709,12 +1864,19 @@ namespace UnityEngine namespace UnityEngine { - struct Ray - { - Ray(); + struct Ray : System::ValueType + { + Ray(decltype(nullptr) n); + 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) other); + Ray& operator=(Ray&& other); + bool operator==(const Ray& other) const; + bool operator!=(const Ray& other) const; Ray(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); - UnityEngine::Vector3 m_Origin; - UnityEngine::Vector3 m_Direction; }; } @@ -1844,10 +2006,18 @@ namespace UnityEngine { namespace SceneManagement { - struct Scene - { - Scene(); - int32_t m_Handle; + struct Scene : System::ValueType + { + Scene(decltype(nullptr) n); + 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) other); + Scene& operator=(Scene&& other); + bool operator==(const Scene& other) const; + bool operator!=(const Scene& other) const; }; } } @@ -2453,6 +2623,155 @@ namespace System } } +namespace UnityEngine +{ + namespace Playables + { + struct PlayableHandle : System::ValueType + { + PlayableHandle(decltype(nullptr) n); + 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) other); + PlayableHandle& operator=(PlayableHandle&& other); + bool operator==(const PlayableHandle& other) const; + bool operator!=(const PlayableHandle& other) const; + }; + } +} + +namespace UnityEngine +{ + namespace Playables + { + struct PlayableGraph : System::ValueType + { + PlayableGraph(decltype(nullptr) n); + 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) other); + PlayableGraph& operator=(PlayableGraph&& other); + bool operator==(const PlayableGraph& other) const; + bool operator!=(const PlayableGraph& other) const; + }; + } +} + +namespace UnityEngine +{ + namespace Animations + { + struct AnimationMixerPlayable : System::ValueType + { + AnimationMixerPlayable(decltype(nullptr) n); + 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) other); + 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); + }; + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct CallbackEventHandler : System::Object + { + CallbackEventHandler(decltype(nullptr) n); + 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) other); + CallbackEventHandler& operator=(CallbackEventHandler&& other); + bool operator==(const CallbackEventHandler& other) const; + bool operator!=(const CallbackEventHandler& other) const; + }; + } + } +} + +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct VisualElement : UnityEngine::Experimental::UIElements::CallbackEventHandler + { + VisualElement(decltype(nullptr) n); + 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) other); + VisualElement& operator=(VisualElement&& other); + bool operator==(const VisualElement& other) const; + bool operator!=(const VisualElement& other) const; + }; + } + } +} + +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 InteractionSourcePose : System::ValueType + { + InteractionSourcePose(decltype(nullptr) n); + 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) other); + 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); + }; + } + } + } +} + namespace MyGame { namespace MonoBehaviours From 6c31d40cf3f06e3d91bc53b90f9611aacfebe083 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 17 Dec 2017 18:21:29 -0800 Subject: [PATCH 20/65] Don't generate default paramters for non-string null values --- .../NativeScript/Editor/GenerateBindings.cs | 75 +++++++++---------- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index e846bac..0080eed 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -11667,56 +11667,49 @@ static void AppendCppParameterDeclaration( } output.Append("Plugin::NullString"); } - else if (object.ReferenceEquals(param.DefaultValue, null)) + else if (param.DefaultValue is bool) { - output.Append("nullptr"); + bool val = (bool)param.DefaultValue; + output.Append(val ? "true" : "false"); + } + else if (param.DefaultValue is char) + { + char val = (char)param.DefaultValue; + output.Append('\''); + output.Append(val); + output.Append('\''); + } + else if ((param.DefaultValue is sbyte) || + (param.DefaultValue is byte) || + (param.DefaultValue is short) || + (param.DefaultValue is ushort) || + (param.DefaultValue is int) || + (param.DefaultValue is uint) || + (param.DefaultValue is long) || + (param.DefaultValue is ulong)) + { + output.Append(param.DefaultValue); } else { - if ((param.DefaultValue is sbyte) || - (param.DefaultValue is byte) || - (param.DefaultValue is short) || - (param.DefaultValue is ushort) || - (param.DefaultValue is int) || - (param.DefaultValue is uint) || - (param.DefaultValue is long) || - (param.DefaultValue is ulong)) + Type type = param.DefaultValue.GetType(); + if (type.IsEnum) { + AppendCppTypeName( + type, + output); + output.Append("::"); output.Append(param.DefaultValue); } - else if (param.DefaultValue is bool) - { - bool val = (bool)param.DefaultValue; - output.Append(val ? "true" : "false"); - } - else if (param.DefaultValue is char) - { - char val = (char)param.DefaultValue; - output.Append('\''); - output.Append(val); - output.Append('\''); - } else { - Type type = param.DefaultValue.GetType(); - if (type.IsEnum) - { - AppendCppTypeName( - type, - output); - output.Append("::"); - output.Append(param.DefaultValue); - } - else - { - StringBuilder error = new StringBuilder(); - error.Append("Default parameter type ("); - AppendCsharpTypeName( - param.DefaultValue.GetType(), - error); - error.Append(") not supported"); - throw new Exception(error.ToString()); - } + StringBuilder error = new StringBuilder(); + error.Append("Default parameter type ("); + AppendCsharpTypeName( + param.DefaultValue.GetType(), + error); + error.Append(") not supported"); + throw new Exception(error.ToString()); } } } From a4830d4be2c14e4094a8204428a405900f66369d Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 17 Dec 2017 18:47:52 -0800 Subject: [PATCH 21/65] Update README for default parameter support --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 632dcf4..3a766ab 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,9 @@ C++ is the standard language for video games as well as many other fields. By pr * Delegates * Events * Boxing and unboxing (e.g. boxing `int` to `object`, casting `object` to `int`) - * Implementing C# interfaces and deriving from C# classes with C++ classes + * Implementing C# interfaces with C++ classes + * Deriving from C# classes with C++ classes + * Default parameters # Performance @@ -199,9 +201,9 @@ 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` methods (e.g. `IndexOf`) -* `string` methods (e.g. `Substring`) -* Default parameters +* `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 From a978505f6dee95ae3ced50dec4355f48f6ebf2b6 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Fri, 5 Jan 2018 17:43:43 -0800 Subject: [PATCH 22/65] List all interfaces for C++ classes --- Unity/Assets/NativeScript/Bindings.cs | 2406 ++-- .../NativeScript/Editor/GenerateBindings.cs | 477 +- Unity/Assets/NativeScriptTypes.json | 426 +- Unity/CppSource/NativeScript/Bindings.cpp | 11561 +++++++++------- Unity/CppSource/NativeScript/Bindings.h | 2343 +++- 5 files changed, 9961 insertions(+), 7252 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 0f30704..51b1c0b 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -274,23 +274,56 @@ delegate void InitDelegate( IntPtr setException, IntPtr arrayGetLength, /*BEGIN INIT PARAMS*/ - IntPtr systemDiagnosticsStopwatchConstructor, - IntPtr systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds, - IntPtr systemDiagnosticsStopwatchMethodStart, - IntPtr systemDiagnosticsStopwatchMethodReset, + 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 boxColor, + IntPtr unboxColor, + IntPtr boxGradientColorKey, + IntPtr unboxGradientColorKey, + IntPtr releaseUnityEngineResolution, + 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 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 unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, - IntPtr unityEngineComponentPropertyGetTransform, - IntPtr unityEngineTransformPropertyGetPosition, - IntPtr unityEngineTransformPropertySetPosition, IntPtr unityEngineDebugMethodLogSystemObject, IntPtr unityEngineAssertionsAssertFieldGetRaiseExceptions, IntPtr unityEngineAssertionsAssertFieldSetRaiseExceptions, @@ -300,25 +333,12 @@ delegate void InitDelegate( IntPtr unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32, IntPtr unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte, IntPtr unityEngineNetworkingNetworkTransportMethodInit, - IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3PropertyGetMagnitude, - IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, - IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, - IntPtr boxVector3, - IntPtr unboxVector3, IntPtr boxQuaternion, IntPtr unboxQuaternion, IntPtr unityEngineMatrix4x4PropertyGetItem, IntPtr unityEngineMatrix4x4PropertySetItem, IntPtr boxMatrix4x4, IntPtr unboxMatrix4x4, - IntPtr releaseUnityEngineRaycastHit, - IntPtr unityEngineRaycastHitPropertyGetPoint, - IntPtr unityEngineRaycastHitPropertySetPoint, - IntPtr unityEngineRaycastHitPropertyGetTransform, - IntPtr boxRaycastHit, - IntPtr unboxRaycastHit, IntPtr boxQueryTriggerInteraction, IntPtr unboxQueryTriggerInteraction, IntPtr releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble, @@ -344,15 +364,6 @@ delegate void InitDelegate( IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue, IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue, IntPtr systemExceptionConstructorSystemString, - IntPtr releaseUnityEngineResolution, - IntPtr unityEngineResolutionPropertyGetWidth, - IntPtr unityEngineResolutionPropertySetWidth, - IntPtr unityEngineResolutionPropertyGetHeight, - IntPtr unityEngineResolutionPropertySetHeight, - IntPtr unityEngineResolutionPropertyGetRefreshRate, - IntPtr unityEngineResolutionPropertySetRefreshRate, - IntPtr boxResolution, - IntPtr unboxResolution, IntPtr unityEngineScreenPropertyGetResolutions, IntPtr releaseUnityEngineRay, IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, @@ -360,10 +371,6 @@ delegate void InitDelegate( IntPtr unboxRay, IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1, IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, - IntPtr boxColor, - IntPtr unboxColor, - IntPtr boxGradientColorKey, - IntPtr unboxGradientColorKey, IntPtr unityEngineGradientConstructor, IntPtr unityEngineGradientPropertyGetColorKeys, IntPtr unityEngineGradientPropertySetColorKeys, @@ -392,10 +399,6 @@ delegate void InitDelegate( IntPtr systemCollectionsGenericBaseIComparerSystemStringConstructor, IntPtr releaseSystemBaseStringComparer, IntPtr systemBaseStringComparerConstructor, - IntPtr releaseSystemCollectionsBaseICollection, - IntPtr systemCollectionsBaseICollectionConstructor, - IntPtr releaseSystemCollectionsBaseIList, - IntPtr systemCollectionsBaseIListConstructor, IntPtr systemCollectionsQueuePropertyGetCount, IntPtr releaseSystemCollectionsBaseQueue, IntPtr systemCollectionsBaseQueueConstructor, @@ -408,13 +411,6 @@ delegate void InitDelegate( IntPtr releaseUnityEnginePlayablesPlayableHandle, IntPtr boxPlayableHandle, IntPtr unboxPlayableHandle, - IntPtr releaseUnityEnginePlayablesPlayableGraph, - IntPtr boxPlayableGraph, - IntPtr unboxPlayableGraph, - IntPtr releaseUnityEngineAnimationsAnimationMixerPlayable, - IntPtr unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean, - IntPtr boxAnimationMixerPlayable, - IntPtr unboxAnimationMixerPlayable, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString, IntPtr boxInteractionSourcePositionAccuracy, @@ -555,69 +551,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke public delegate int SystemStringComparerGetHashCodeDelegate(int thisHandle, int param0); public static SystemStringComparerGetHashCodeDelegate SystemStringComparerGetHashCode; - public delegate void SystemCollectionsICollectionCopyToDelegate(int thisHandle, int param0, int param1); - public static SystemCollectionsICollectionCopyToDelegate SystemCollectionsICollectionCopyTo; - - public delegate int SystemCollectionsICollectionGetEnumeratorDelegate(int thisHandle); - public static SystemCollectionsICollectionGetEnumeratorDelegate SystemCollectionsICollectionGetEnumerator; - - public delegate int SystemCollectionsICollectionGetCountDelegate(int thisHandle); - public static SystemCollectionsICollectionGetCountDelegate SystemCollectionsICollectionGetCount; - - public delegate bool SystemCollectionsICollectionGetIsSynchronizedDelegate(int thisHandle); - public static SystemCollectionsICollectionGetIsSynchronizedDelegate SystemCollectionsICollectionGetIsSynchronized; - - public delegate int SystemCollectionsICollectionGetSyncRootDelegate(int thisHandle); - public static SystemCollectionsICollectionGetSyncRootDelegate SystemCollectionsICollectionGetSyncRoot; - - public delegate int SystemCollectionsIListAddDelegate(int thisHandle, int param0); - public static SystemCollectionsIListAddDelegate SystemCollectionsIListAdd; - - public delegate void SystemCollectionsIListClearDelegate(int thisHandle); - public static SystemCollectionsIListClearDelegate SystemCollectionsIListClear; - - public delegate bool SystemCollectionsIListContainsDelegate(int thisHandle, int param0); - public static SystemCollectionsIListContainsDelegate SystemCollectionsIListContains; - - public delegate int SystemCollectionsIListIndexOfDelegate(int thisHandle, int param0); - public static SystemCollectionsIListIndexOfDelegate SystemCollectionsIListIndexOf; - - public delegate void SystemCollectionsIListInsertDelegate(int thisHandle, int param0, int param1); - public static SystemCollectionsIListInsertDelegate SystemCollectionsIListInsert; - - public delegate void SystemCollectionsIListRemoveDelegate(int thisHandle, int param0); - public static SystemCollectionsIListRemoveDelegate SystemCollectionsIListRemove; - - public delegate void SystemCollectionsIListRemoveAtDelegate(int thisHandle, int param0); - public static SystemCollectionsIListRemoveAtDelegate SystemCollectionsIListRemoveAt; - - public delegate int SystemCollectionsIListGetEnumeratorDelegate(int thisHandle); - public static SystemCollectionsIListGetEnumeratorDelegate SystemCollectionsIListGetEnumerator; - - public delegate void SystemCollectionsIListCopyToDelegate(int thisHandle, int param0, int param1); - public static SystemCollectionsIListCopyToDelegate SystemCollectionsIListCopyTo; - - public delegate bool SystemCollectionsIListGetIsFixedSizeDelegate(int thisHandle); - public static SystemCollectionsIListGetIsFixedSizeDelegate SystemCollectionsIListGetIsFixedSize; - - public delegate bool SystemCollectionsIListGetIsReadOnlyDelegate(int thisHandle); - public static SystemCollectionsIListGetIsReadOnlyDelegate SystemCollectionsIListGetIsReadOnly; - - public delegate int SystemCollectionsIListGetItemDelegate(int thisHandle, int param0); - public static SystemCollectionsIListGetItemDelegate SystemCollectionsIListGetItem; - - public delegate void SystemCollectionsIListSetItemDelegate(int thisHandle, int param0, int param1); - public static SystemCollectionsIListSetItemDelegate SystemCollectionsIListSetItem; - - public delegate int SystemCollectionsIListGetCountDelegate(int thisHandle); - public static SystemCollectionsIListGetCountDelegate SystemCollectionsIListGetCount; - - public delegate bool SystemCollectionsIListGetIsSynchronizedDelegate(int thisHandle); - public static SystemCollectionsIListGetIsSynchronizedDelegate SystemCollectionsIListGetIsSynchronized; - - public delegate int SystemCollectionsIListGetSyncRootDelegate(int thisHandle); - public static SystemCollectionsIListGetSyncRootDelegate SystemCollectionsIListGetSyncRoot; - public delegate int SystemCollectionsQueueGetCountDelegate(int thisHandle); public static SystemCollectionsQueueGetCountDelegate SystemCollectionsQueueGetCount; @@ -827,23 +760,56 @@ static extern void Init( IntPtr setException, IntPtr arrayGetLength, /*BEGIN INIT PARAMS*/ - IntPtr systemDiagnosticsStopwatchConstructor, - IntPtr systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds, - IntPtr systemDiagnosticsStopwatchMethodStart, - IntPtr systemDiagnosticsStopwatchMethodReset, + 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 boxColor, + IntPtr unboxColor, + IntPtr boxGradientColorKey, + IntPtr unboxGradientColorKey, + IntPtr releaseUnityEngineResolution, + 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 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 unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType, - IntPtr unityEngineComponentPropertyGetTransform, - IntPtr unityEngineTransformPropertyGetPosition, - IntPtr unityEngineTransformPropertySetPosition, IntPtr unityEngineDebugMethodLogSystemObject, IntPtr unityEngineAssertionsAssertFieldGetRaiseExceptions, IntPtr unityEngineAssertionsAssertFieldSetRaiseExceptions, @@ -853,25 +819,12 @@ static extern void Init( IntPtr unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32, IntPtr unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte, IntPtr unityEngineNetworkingNetworkTransportMethodInit, - IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3PropertyGetMagnitude, - IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, - IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, - IntPtr unityEngineVector3Methodop_UnaryNegationUnityEngineVector3, - IntPtr boxVector3, - IntPtr unboxVector3, IntPtr boxQuaternion, IntPtr unboxQuaternion, IntPtr unityEngineMatrix4x4PropertyGetItem, IntPtr unityEngineMatrix4x4PropertySetItem, IntPtr boxMatrix4x4, IntPtr unboxMatrix4x4, - IntPtr releaseUnityEngineRaycastHit, - IntPtr unityEngineRaycastHitPropertyGetPoint, - IntPtr unityEngineRaycastHitPropertySetPoint, - IntPtr unityEngineRaycastHitPropertyGetTransform, - IntPtr boxRaycastHit, - IntPtr unboxRaycastHit, IntPtr boxQueryTriggerInteraction, IntPtr unboxQueryTriggerInteraction, IntPtr releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble, @@ -897,15 +850,6 @@ static extern void Init( IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue, IntPtr systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue, IntPtr systemExceptionConstructorSystemString, - IntPtr releaseUnityEngineResolution, - IntPtr unityEngineResolutionPropertyGetWidth, - IntPtr unityEngineResolutionPropertySetWidth, - IntPtr unityEngineResolutionPropertyGetHeight, - IntPtr unityEngineResolutionPropertySetHeight, - IntPtr unityEngineResolutionPropertyGetRefreshRate, - IntPtr unityEngineResolutionPropertySetRefreshRate, - IntPtr boxResolution, - IntPtr unboxResolution, IntPtr unityEngineScreenPropertyGetResolutions, IntPtr releaseUnityEngineRay, IntPtr unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3, @@ -913,10 +857,6 @@ static extern void Init( IntPtr unboxRay, IntPtr unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1, IntPtr unityEnginePhysicsMethodRaycastAllUnityEngineRay, - IntPtr boxColor, - IntPtr unboxColor, - IntPtr boxGradientColorKey, - IntPtr unboxGradientColorKey, IntPtr unityEngineGradientConstructor, IntPtr unityEngineGradientPropertyGetColorKeys, IntPtr unityEngineGradientPropertySetColorKeys, @@ -945,10 +885,6 @@ static extern void Init( IntPtr systemCollectionsGenericBaseIComparerSystemStringConstructor, IntPtr releaseSystemBaseStringComparer, IntPtr systemBaseStringComparerConstructor, - IntPtr releaseSystemCollectionsBaseICollection, - IntPtr systemCollectionsBaseICollectionConstructor, - IntPtr releaseSystemCollectionsBaseIList, - IntPtr systemCollectionsBaseIListConstructor, IntPtr systemCollectionsQueuePropertyGetCount, IntPtr releaseSystemCollectionsBaseQueue, IntPtr systemCollectionsBaseQueueConstructor, @@ -961,13 +897,6 @@ static extern void Init( IntPtr releaseUnityEnginePlayablesPlayableHandle, IntPtr boxPlayableHandle, IntPtr unboxPlayableHandle, - IntPtr releaseUnityEnginePlayablesPlayableGraph, - IntPtr boxPlayableGraph, - IntPtr unboxPlayableGraph, - IntPtr releaseUnityEngineAnimationsAnimationMixerPlayable, - IntPtr unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean, - IntPtr boxAnimationMixerPlayable, - IntPtr unboxAnimationMixerPlayable, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1, IntPtr unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString, IntPtr boxInteractionSourcePositionAccuracy, @@ -1109,69 +1038,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke [DllImport(Constants.PluginName)] public static extern void SystemStringComparerGetHashCode(int thisHandle, int param0); - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsICollectionCopyTo(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsICollectionGetEnumerator(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsICollectionGetCount(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsICollectionGetIsSynchronized(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsICollectionGetSyncRoot(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListAdd(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListClear(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListContains(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListIndexOf(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListInsert(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListRemove(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListRemoveAt(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetEnumerator(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListCopyTo(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetIsFixedSize(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetIsReadOnly(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetItem(int thisHandle, int param0); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListSetItem(int thisHandle, int param0, int param1); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetCount(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetIsSynchronized(int thisHandle); - - [DllImport(Constants.PluginName)] - public static extern void SystemCollectionsIListGetSyncRoot(int thisHandle); - [DllImport(Constants.PluginName)] public static extern void SystemCollectionsQueueGetCount(int thisHandle); @@ -1291,32 +1157,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int ArrayGetLengthDelegate(int handle); /*BEGIN DELEGATE TYPES*/ - delegate int SystemDiagnosticsStopwatchConstructorDelegate(); - delegate long SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate(int thisHandle); - delegate void SystemDiagnosticsStopwatchMethodStartDelegate(int thisHandle); - delegate void SystemDiagnosticsStopwatchMethodResetDelegate(int thisHandle); - 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 UnityEngineGameObjectConstructorDelegate(); - delegate int UnityEngineGameObjectConstructorSystemStringDelegate(int nameHandle); - delegate int UnityEngineGameObjectPropertyGetTransformDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate(int thisHandle); - delegate int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngine.PrimitiveType type); - delegate int UnityEngineComponentPropertyGetTransformDelegate(int thisHandle); - delegate UnityEngine.Vector3 UnityEngineTransformPropertyGetPositionDelegate(int thisHandle); - delegate void UnityEngineTransformPropertySetPositionDelegate(int thisHandle, ref UnityEngine.Vector3 value); - 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 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); @@ -1324,18 +1164,64 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate(ref UnityEngine.Vector3 a); delegate int BoxVector3Delegate(ref UnityEngine.Vector3 val); delegate UnityEngine.Vector3 UnboxVector3Delegate(int valHandle); - 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 void ReleaseUnityEngineRaycastHitDelegate(int handle); + 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 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 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 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 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); @@ -1361,15 +1247,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate(int thisHandle); delegate void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate(int thisHandle, int valueHandle); delegate int SystemExceptionConstructorSystemStringDelegate(int messageHandle); - delegate void ReleaseUnityEngineResolutionDelegate(int handle); - 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 int UnityEngineScreenPropertyGetResolutionsDelegate(); delegate void ReleaseUnityEngineRayDelegate(int handle); delegate int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction); @@ -1377,10 +1254,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int UnboxRayDelegate(int valHandle); delegate int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate(int rayHandle, int resultsHandle); delegate int UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(int rayHandle); - 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 int UnityEngineGradientConstructorDelegate(); delegate int UnityEngineGradientPropertyGetColorKeysDelegate(int thisHandle); delegate void UnityEngineGradientPropertySetColorKeysDelegate(int thisHandle, int valueHandle); @@ -1409,10 +1282,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate void ReleaseSystemCollectionsGenericBaseIComparerSystemStringDelegate(int handle); delegate void SystemBaseStringComparerConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemBaseStringComparerDelegate(int handle); - delegate void SystemCollectionsBaseICollectionConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsBaseICollectionDelegate(int handle); - delegate void SystemCollectionsBaseIListConstructorDelegate(int cppHandle, ref int handle); - delegate void ReleaseSystemCollectionsBaseIListDelegate(int handle); delegate int SystemCollectionsQueuePropertyGetCountDelegate(int thisHandle); delegate void SystemCollectionsBaseQueueConstructorDelegate(int cppHandle, ref int handle); delegate void ReleaseSystemCollectionsBaseQueueDelegate(int handle); @@ -1425,13 +1294,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate void ReleaseUnityEnginePlayablesPlayableHandleDelegate(int handle); delegate int BoxPlayableHandleDelegate(int valHandle); delegate int UnboxPlayableHandleDelegate(int valHandle); - 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 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); @@ -1570,14 +1432,14 @@ public static void Open( { ObjectStore.Init(maxManagedObjects); /*BEGIN STRUCTSTORE INIT CALLS*/ + NativeScript.Bindings.StructStore.Init(maxManagedObjects); NativeScript.Bindings.StructStore.Init(1000); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); + NativeScript.Bindings.StructStore.Init(maxManagedObjects); NativeScript.Bindings.StructStore>.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); NativeScript.Bindings.StructStore.Init(maxManagedObjects); NativeScript.Bindings.StructStore.Init(maxManagedObjects); NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); NativeScript.Bindings.StructStore.Init(maxManagedObjects); /*END STRUCTSTORE INIT CALLS*/ @@ -1598,27 +1460,6 @@ public static void Open( SystemStringComparerCompare = GetDelegate(libraryHandle, "SystemStringComparerCompare"); SystemStringComparerEquals = GetDelegate(libraryHandle, "SystemStringComparerEquals"); SystemStringComparerGetHashCode = GetDelegate(libraryHandle, "SystemStringComparerGetHashCode"); - SystemCollectionsICollectionCopyTo = GetDelegate(libraryHandle, "SystemCollectionsICollectionCopyTo"); - SystemCollectionsICollectionGetEnumerator = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetEnumerator"); - SystemCollectionsICollectionGetCount = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetCount"); - SystemCollectionsICollectionGetIsSynchronized = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetIsSynchronized"); - SystemCollectionsICollectionGetSyncRoot = GetDelegate(libraryHandle, "SystemCollectionsICollectionGetSyncRoot"); - SystemCollectionsIListAdd = GetDelegate(libraryHandle, "SystemCollectionsIListAdd"); - SystemCollectionsIListClear = GetDelegate(libraryHandle, "SystemCollectionsIListClear"); - SystemCollectionsIListContains = GetDelegate(libraryHandle, "SystemCollectionsIListContains"); - SystemCollectionsIListIndexOf = GetDelegate(libraryHandle, "SystemCollectionsIListIndexOf"); - SystemCollectionsIListInsert = GetDelegate(libraryHandle, "SystemCollectionsIListInsert"); - SystemCollectionsIListRemove = GetDelegate(libraryHandle, "SystemCollectionsIListRemove"); - SystemCollectionsIListRemoveAt = GetDelegate(libraryHandle, "SystemCollectionsIListRemoveAt"); - SystemCollectionsIListGetEnumerator = GetDelegate(libraryHandle, "SystemCollectionsIListGetEnumerator"); - SystemCollectionsIListCopyTo = GetDelegate(libraryHandle, "SystemCollectionsIListCopyTo"); - SystemCollectionsIListGetIsFixedSize = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsFixedSize"); - SystemCollectionsIListGetIsReadOnly = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsReadOnly"); - SystemCollectionsIListGetItem = GetDelegate(libraryHandle, "SystemCollectionsIListGetItem"); - SystemCollectionsIListSetItem = GetDelegate(libraryHandle, "SystemCollectionsIListSetItem"); - SystemCollectionsIListGetCount = GetDelegate(libraryHandle, "SystemCollectionsIListGetCount"); - SystemCollectionsIListGetIsSynchronized = GetDelegate(libraryHandle, "SystemCollectionsIListGetIsSynchronized"); - SystemCollectionsIListGetSyncRoot = GetDelegate(libraryHandle, "SystemCollectionsIListGetSyncRoot"); SystemCollectionsQueueGetCount = GetDelegate(libraryHandle, "SystemCollectionsQueueGetCount"); SystemComponentModelDesignIComponentChangeServiceOnComponentChanged = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceOnComponentChanged"); SystemComponentModelDesignIComponentChangeServiceOnComponentChanging = GetDelegate(libraryHandle, "SystemComponentModelDesignIComponentChangeServiceOnComponentChanging"); @@ -1668,23 +1509,56 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SetExceptionDelegate(SetException)), Marshal.GetFunctionPointerForDelegate(new ArrayGetLengthDelegate(ArrayGetLength)), /*BEGIN INIT CALL*/ - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchConstructorDelegate(SystemDiagnosticsStopwatchConstructor)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate(SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchMethodStartDelegate(SystemDiagnosticsStopwatchMethodStart)), - Marshal.GetFunctionPointerForDelegate(new SystemDiagnosticsStopwatchMethodResetDelegate(SystemDiagnosticsStopwatchMethodReset)), + 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 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 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 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 UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineComponentPropertyGetTransformDelegate(UnityEngineComponentPropertyGetTransform)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertyGetPositionDelegate(UnityEngineTransformPropertyGetPosition)), - Marshal.GetFunctionPointerForDelegate(new UnityEngineTransformPropertySetPositionDelegate(UnityEngineTransformPropertySetPosition)), Marshal.GetFunctionPointerForDelegate(new UnityEngineDebugMethodLogSystemObjectDelegate(UnityEngineDebugMethodLogSystemObject)), Marshal.GetFunctionPointerForDelegate(new UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate(UnityEngineAssertionsAssertFieldGetRaiseExceptions)), Marshal.GetFunctionPointerForDelegate(new UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate(UnityEngineAssertionsAssertFieldSetRaiseExceptions)), @@ -1694,25 +1568,12 @@ public static void Open( 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 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 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 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 BoxQueryTriggerInteractionDelegate(BoxQueryTriggerInteraction)), Marshal.GetFunctionPointerForDelegate(new UnboxQueryTriggerInteractionDelegate(UnboxQueryTriggerInteraction)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)), @@ -1738,15 +1599,6 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)), Marshal.GetFunctionPointerForDelegate(new SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)), Marshal.GetFunctionPointerForDelegate(new SystemExceptionConstructorSystemStringDelegate(SystemExceptionConstructorSystemString)), - Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineResolutionDelegate(ReleaseUnityEngineResolution)), - 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 UnityEngineScreenPropertyGetResolutionsDelegate(UnityEngineScreenPropertyGetResolutions)), Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEngineRayDelegate(ReleaseUnityEngineRay)), Marshal.GetFunctionPointerForDelegate(new UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)), @@ -1754,10 +1606,6 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new UnboxRayDelegate(UnboxRay)), Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)), Marshal.GetFunctionPointerForDelegate(new UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate(UnityEnginePhysicsMethodRaycastAllUnityEngineRay)), - Marshal.GetFunctionPointerForDelegate(new BoxColorDelegate(BoxColor)), - Marshal.GetFunctionPointerForDelegate(new UnboxColorDelegate(UnboxColor)), - Marshal.GetFunctionPointerForDelegate(new BoxGradientColorKeyDelegate(BoxGradientColorKey)), - Marshal.GetFunctionPointerForDelegate(new UnboxGradientColorKeyDelegate(UnboxGradientColorKey)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientConstructorDelegate(UnityEngineGradientConstructor)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientPropertyGetColorKeysDelegate(UnityEngineGradientPropertyGetColorKeys)), Marshal.GetFunctionPointerForDelegate(new UnityEngineGradientPropertySetColorKeysDelegate(UnityEngineGradientPropertySetColorKeys)), @@ -1786,10 +1634,6 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new SystemCollectionsGenericBaseIComparerSystemStringConstructorDelegate(SystemCollectionsGenericBaseIComparerSystemStringConstructor)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemBaseStringComparerDelegate(ReleaseSystemBaseStringComparer)), Marshal.GetFunctionPointerForDelegate(new SystemBaseStringComparerConstructorDelegate(SystemBaseStringComparerConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsBaseICollectionDelegate(ReleaseSystemCollectionsBaseICollection)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsBaseICollectionConstructorDelegate(SystemCollectionsBaseICollectionConstructor)), - Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsBaseIListDelegate(ReleaseSystemCollectionsBaseIList)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsBaseIListConstructorDelegate(SystemCollectionsBaseIListConstructor)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsQueuePropertyGetCountDelegate(SystemCollectionsQueuePropertyGetCount)), Marshal.GetFunctionPointerForDelegate(new ReleaseSystemCollectionsBaseQueueDelegate(ReleaseSystemCollectionsBaseQueue)), Marshal.GetFunctionPointerForDelegate(new SystemCollectionsBaseQueueConstructorDelegate(SystemCollectionsBaseQueueConstructor)), @@ -1802,13 +1646,6 @@ public static void Open( Marshal.GetFunctionPointerForDelegate(new ReleaseUnityEnginePlayablesPlayableHandleDelegate(ReleaseUnityEnginePlayablesPlayableHandle)), Marshal.GetFunctionPointerForDelegate(new BoxPlayableHandleDelegate(BoxPlayableHandle)), Marshal.GetFunctionPointerForDelegate(new UnboxPlayableHandleDelegate(UnboxPlayableHandle)), - 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 UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1)), Marshal.GetFunctionPointerForDelegate(new UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringDelegate(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString)), Marshal.GetFunctionPointerForDelegate(new BoxInteractionSourcePositionAccuracyDelegate(BoxInteractionSourcePositionAccuracy)), @@ -2113,23 +1950,58 @@ public override int GetHashCode(string obj) } - class SystemCollectionsBaseICollection : System.Collections.ICollection + class SystemCollectionsBaseQueue : System.Collections.Queue + { + public int CppHandle; + + public SystemCollectionsBaseQueue(int cppHandle) + : base() + { + CppHandle = cppHandle; + } + + 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 SystemCollectionsBaseICollection(int cppHandle) + public SystemComponentModelDesignBaseIComponentChangeService(int cppHandle) : base() { CppHandle = cppHandle; } - public void CopyTo(System.Array array, int index) + public void OnComponentChanged(object component, System.ComponentModel.MemberDescriptor member, object oldValue, object newValue) { if (CppHandle != 0) { int thisHandle = CppHandle; - int arrayHandle = NativeScript.Bindings.ObjectStore.GetHandle(array); - NativeScript.Bindings.SystemCollectionsICollectionCopyTo(thisHandle, arrayHandle, index); + 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; @@ -2139,528 +2011,92 @@ public void CopyTo(System.Array array, int index) } } - public System.Collections.IEnumerator GetEnumerator() + public void OnComponentChanging(object component, System.ComponentModel.MemberDescriptor member) { if (CppHandle != 0) { int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetEnumerator(thisHandle); + 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; } - return (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(returnVal); } - return default(System.Collections.IEnumerator); } - public int Count + public event System.ComponentModel.Design.ComponentEventHandler ComponentAdded { - get + add { if (CppHandle != 0) { int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetCount(thisHandle); + 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; } - return returnVal; } - return default(int); } - } - - public bool IsSynchronized - { - get + remove { if (CppHandle != 0) { int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetIsSynchronized(thisHandle); + 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; } - return returnVal; } - return default(bool); } } - public object SyncRoot + public event System.ComponentModel.Design.ComponentEventHandler ComponentAdding { - get + add { if (CppHandle != 0) { int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsICollectionGetSyncRoot(thisHandle); + 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; } - return NativeScript.Bindings.ObjectStore.Get(returnVal); } - return default(object); } - } - - } - - class SystemCollectionsBaseIList : System.Collections.IList - { - public int CppHandle; - - public SystemCollectionsBaseIList(int cppHandle) - : base() - { - CppHandle = cppHandle; - } - - public int Add(object value) - { - if (CppHandle != 0) + remove { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - var returnVal = NativeScript.Bindings.SystemCollectionsIListAdd(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) + if (CppHandle != 0) { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; + 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; + } } - return returnVal; } - return default(int); } - public void Clear() - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemCollectionsIListClear(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public bool Contains(object value) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - var returnVal = NativeScript.Bindings.SystemCollectionsIListContains(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(bool); - } - - public int IndexOf(object value) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - var returnVal = NativeScript.Bindings.SystemCollectionsIListIndexOf(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(int); - } - - public void Insert(int index, object value) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemCollectionsIListInsert(thisHandle, index, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public void Remove(object value) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemCollectionsIListRemove(thisHandle, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public void RemoveAt(int index) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - NativeScript.Bindings.SystemCollectionsIListRemoveAt(thisHandle, index); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public System.Collections.IEnumerator GetEnumerator() - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetEnumerator(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return (System.Collections.IEnumerator)NativeScript.Bindings.ObjectStore.Get(returnVal); - } - return default(System.Collections.IEnumerator); - } - - public void CopyTo(System.Array array, int index) - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int arrayHandle = NativeScript.Bindings.ObjectStore.GetHandle(array); - NativeScript.Bindings.SystemCollectionsIListCopyTo(thisHandle, arrayHandle, index); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - - public bool IsFixedSize - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetIsFixedSize(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(bool); - } - } - - public bool IsReadOnly - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetIsReadOnly(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(bool); - } - } - - public object this[int index] - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetItem(thisHandle, index); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return NativeScript.Bindings.ObjectStore.Get(returnVal); - } - return default(object); - } - set - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - int valueHandle = NativeScript.Bindings.ObjectStore.GetHandle(value); - NativeScript.Bindings.SystemCollectionsIListSetItem(thisHandle, index, valueHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - } - } - } - - public int Count - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetCount(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(int); - } - } - - public bool IsSynchronized - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetIsSynchronized(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return returnVal; - } - return default(bool); - } - } - - public object SyncRoot - { - get - { - if (CppHandle != 0) - { - int thisHandle = CppHandle; - var returnVal = NativeScript.Bindings.SystemCollectionsIListGetSyncRoot(thisHandle); - if (NativeScript.Bindings.UnhandledCppException != null) - { - Exception ex = NativeScript.Bindings.UnhandledCppException; - NativeScript.Bindings.UnhandledCppException = null; - throw ex; - } - return NativeScript.Bindings.ObjectStore.Get(returnVal); - } - return default(object); - } - } - - } - - class SystemCollectionsBaseQueue : System.Collections.Queue - { - public int CppHandle; - - public SystemCollectionsBaseQueue(int cppHandle) - : base() - { - CppHandle = cppHandle; - } - - 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 + public event System.ComponentModel.Design.ComponentChangedEventHandler ComponentChanged { add { @@ -3176,123 +2612,190 @@ public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentCh } } } - + + } + + 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(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); + } } - class SystemComponentModelDesignComponentRenameEventHandler + [MonoPInvokeCallback(typeof(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate))] + static void UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(ref UnityEngine.Vector3 thiz, float newX, float newY, float newZ) { - public int CppHandle; - public System.ComponentModel.Design.ComponentRenameEventHandler Delegate; - - public SystemComponentModelDesignComponentRenameEventHandler(int cppHandle) + try { - CppHandle = cppHandle; - Delegate = NativeInvoke; + thiz.Set(newX, newY, newZ); } - - public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentRenameEventArgs e) + catch (System.NullReferenceException ex) { - 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; - } - } + 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)); } - } - /*END BASE TYPES*/ - /*BEGIN FUNCTIONS*/ - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] - static int SystemDiagnosticsStopwatchConstructor() + [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] + static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); + var returnValue = a + b; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] - static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3Delegate))] + static UnityEngine.Vector3 UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(ref UnityEngine.Vector3 a) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.ElapsedMilliseconds; + var returnValue = -a; return returnValue; } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(long); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] - static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) + [MonoPInvokeCallback(typeof(BoxVector3Delegate))] + static int BoxVector3(ref UnityEngine.Vector3 val) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Start(); + 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(SystemDiagnosticsStopwatchMethodResetDelegate))] - static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] + static UnityEngine.Vector3 UnboxVector3(int valHandle) { try { - var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Reset(); + 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); } } @@ -3387,13 +2890,14 @@ static bool UnityEngineObjectMethodop_ImplicitUnityEngineObject(int existsHandle } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorDelegate))] - static int UnityEngineGameObjectConstructor() + [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegate))] + static int UnityEngineComponentPropertyGetTransform(int thisHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject()); - return returnValue; + var thiz = (UnityEngine.Component)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var returnValue = thiz.transform; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -3409,60 +2913,56 @@ static int UnityEngineGameObjectConstructor() } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorSystemStringDelegate))] - static int UnityEngineGameObjectConstructorSystemString(int nameHandle) + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] + static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) { try { - var name = (string)NativeScript.Bindings.ObjectStore.Get(nameHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject(name)); + 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(int); + return default(UnityEngine.Vector3); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.Vector3); } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectPropertyGetTransformDelegate))] - static int UnityEngineGameObjectPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineTransformPropertySetPositionDelegate))] + static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEngine.Vector3 value) { try { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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)); - 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) + [MonoPInvokeCallback(typeof(BoxColorDelegate))] + static int BoxColor(ref UnityEngine.Color val) { try { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AddComponent(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -3478,14 +2978,36 @@ static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate))] - static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(int thisHandle) + [MonoPInvokeCallback(typeof(UnboxColorDelegate))] + static UnityEngine.Color UnboxColor(int valHandle) { try { - var thiz = (UnityEngine.GameObject)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.AddComponent(); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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) { @@ -3501,13 +3023,59 @@ static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScr } } - [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] - static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) + [MonoPInvokeCallback(typeof(UnboxGradientColorKeyDelegate))] + static UnityEngine.GradientColorKey UnboxGradientColorKey(int valHandle) { try { - var returnValue = UnityEngine.GameObject.CreatePrimitive(type); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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(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) { @@ -3523,14 +3091,35 @@ static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(Un } } - [MonoPInvokeCallback(typeof(UnityEngineComponentPropertyGetTransformDelegate))] - static int UnityEngineComponentPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetWidthDelegate))] + static void UnityEngineResolutionPropertySetWidth(int thisHandle, int value) { try { - var thiz = (UnityEngine.Component)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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) { @@ -3546,56 +3135,58 @@ static int UnityEngineComponentPropertyGetTransform(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineTransformPropertyGetPositionDelegate))] - static UnityEngine.Vector3 UnityEngineTransformPropertyGetPosition(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetHeightDelegate))] + static void UnityEngineResolutionPropertySetHeight(int thisHandle, int value) { try { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.position; - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetRefreshRateDelegate))] + static int UnityEngineResolutionPropertyGetRefreshRate(int thisHandle) { try { - var thiz = (UnityEngine.Transform)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.position = value; + 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(UnityEngineDebugMethodLogSystemObjectDelegate))] - static void UnityEngineDebugMethodLogSystemObject(int messageHandle) + [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetRefreshRateDelegate))] + static void UnityEngineResolutionPropertySetRefreshRate(int thisHandle, int value) { try { - var message = NativeScript.Bindings.ObjectStore.Get(messageHandle); - UnityEngine.Debug.Log(message); + var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); + thiz.refreshRate = value; + NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); } catch (System.NullReferenceException ex) { @@ -3609,55 +3200,61 @@ static void UnityEngineDebugMethodLogSystemObject(int messageHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate))] - static bool UnityEngineAssertionsAssertFieldGetRaiseExceptions() + [MonoPInvokeCallback(typeof(BoxResolutionDelegate))] + static int BoxResolution(int valHandle) { try { - var returnValue = UnityEngine.Assertions.Assert.raiseExceptions; + 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(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(UnboxResolutionDelegate))] + static int UnboxResolution(int valHandle) { try { - UnityEngine.Assertions.Assert.raiseExceptions = value; + 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(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(int expectedHandle, int actualHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineRaycastHitDelegate))] + static void ReleaseUnityEngineRaycastHit(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) { @@ -3671,232 +3268,238 @@ static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_Sy } } - [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate))] - static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(int expectedHandle, int actualHandle) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetPointDelegate))] + static UnityEngine.Vector3 UnityEngineRaycastHitPropertyGetPoint(int thisHandle) { 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 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(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] - static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertySetPointDelegate))] + static void UnityEngineRaycastHitPropertySetPoint(int thisHandle, ref UnityEngine.Vector3 value) { try { - var thiz = (UnityEngine.MonoBehaviour)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.transform; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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)); - 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) + [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetTransformDelegate))] + static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) { try { - UnityEngine.AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); + 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)); - bufferLength = default(int); - numBuffers = default(int); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - bufferLength = default(int); - numBuffers = default(int); + return 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) + [MonoPInvokeCallback(typeof(BoxRaycastHitDelegate))] + static int BoxRaycastHit(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 = (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)); - 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(UnboxRaycastHitDelegate))] + static int UnboxRaycastHit(int valHandle) { try { - UnityEngine.Networking.NetworkTransport.Init(); + 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(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate))] - static UnityEngine.Vector3 UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(float x, float y, float z) + [MonoPInvokeCallback(typeof(ReleaseUnityEnginePlayablesPlayableGraphDelegate))] + static void ReleaseUnityEnginePlayablesPlayableGraph(int handle) { try { - var returnValue = new UnityEngine.Vector3(x, y, z); - return 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(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) + [MonoPInvokeCallback(typeof(BoxPlayableGraphDelegate))] + static int BoxPlayableGraph(int valHandle) { try { - var returnValue = thiz.magnitude; + 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(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(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate))] - static void UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(ref UnityEngine.Vector3 thiz, float newX, float newY, float newZ) + [MonoPInvokeCallback(typeof(UnboxPlayableGraphDelegate))] + static int UnboxPlayableGraph(int valHandle) { try { - thiz.Set(newX, newY, newZ); + 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(UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3Delegate))] - static UnityEngine.Vector3 UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 a, ref UnityEngine.Vector3 b) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineAnimationsAnimationMixerPlayableDelegate))] + static void ReleaseUnityEngineAnimationsAnimationMixerPlayable(int handle) { try { - var returnValue = a + b; - return 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(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) + [MonoPInvokeCallback(typeof(UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBooleanDelegate))] + static int UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean(int graphHandle, int inputCount, bool normalizeWeights) { try { - var returnValue = -a; - return returnValue; + 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(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxVector3Delegate))] - static int BoxVector3(ref UnityEngine.Vector3 val) + [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; } @@ -3914,35 +3517,35 @@ static int BoxVector3(ref UnityEngine.Vector3 val) } } - [MonoPInvokeCallback(typeof(UnboxVector3Delegate))] - static UnityEngine.Vector3 UnboxVector3(int valHandle) + [MonoPInvokeCallback(typeof(UnboxAnimationMixerPlayableDelegate))] + static int UnboxAnimationMixerPlayable(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Vector3)val; + 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(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxQuaternionDelegate))] - static int BoxQuaternion(ref UnityEngine.Quaternion val) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchConstructorDelegate))] + static int SystemDiagnosticsStopwatchConstructor() { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Diagnostics.Stopwatch()); return returnValue; } catch (System.NullReferenceException ex) @@ -3959,57 +3562,56 @@ static int BoxQuaternion(ref UnityEngine.Quaternion val) } } - [MonoPInvokeCallback(typeof(UnboxQuaternionDelegate))] - static UnityEngine.Quaternion UnboxQuaternion(int valHandle) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchPropertyGetElapsedMillisecondsDelegate))] + static long SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds(int thisHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Quaternion)val; + 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(UnityEngine.Quaternion); + return default(long); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Quaternion); + return default(long); } } - [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertyGetItemDelegate))] - static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) + [MonoPInvokeCallback(typeof(SystemDiagnosticsStopwatchMethodStartDelegate))] + static void SystemDiagnosticsStopwatchMethodStart(int thisHandle) { try { - var returnValue = thiz[row, row]; - return 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(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(SystemDiagnosticsStopwatchMethodResetDelegate))] + static void SystemDiagnosticsStopwatchMethodReset(int thisHandle) { try { - thiz[row, column] = column; + var thiz = (System.Diagnostics.Stopwatch)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.Reset(); } catch (System.NullReferenceException ex) { @@ -4023,12 +3625,12 @@ static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, } } - [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] - static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorDelegate))] + static int UnityEngineGameObjectConstructor() { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new UnityEngine.GameObject()); return returnValue; } catch (System.NullReferenceException ex) @@ -4045,102 +3647,104 @@ static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) } } - [MonoPInvokeCallback(typeof(UnboxMatrix4x4Delegate))] - static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectConstructorSystemStringDelegate))] + static int UnityEngineGameObjectConstructorSystemString(int nameHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Matrix4x4)val; + 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(UnityEngine.Matrix4x4); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Matrix4x4); + return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineRaycastHitDelegate))] - static void ReleaseUnityEngineRaycastHit(int handle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectPropertyGetTransformDelegate))] + static int UnityEngineGameObjectPropertyGetTransform(int thisHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + 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(UnityEngineRaycastHitPropertyGetPointDelegate))] - static UnityEngine.Vector3 UnityEngineRaycastHitPropertyGetPoint(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScriptDelegate))] + static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(int thisHandle) { try { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.point; - 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) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Vector3); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertySetPointDelegate))] - static void UnityEngineRaycastHitPropertySetPoint(int thisHandle, ref UnityEngine.Vector3 value) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScriptDelegate))] + static int UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(int thisHandle) { try { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.point = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref 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)); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); + return default(int); } } - [MonoPInvokeCallback(typeof(UnityEngineRaycastHitPropertyGetTransformDelegate))] - static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveTypeDelegate))] + static int UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(UnityEngine.PrimitiveType type) { try { - var thiz = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.transform; + var returnValue = UnityEngine.GameObject.CreatePrimitive(type); return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) @@ -4157,106 +3761,96 @@ static int UnityEngineRaycastHitPropertyGetTransform(int thisHandle) } } - [MonoPInvokeCallback(typeof(BoxRaycastHitDelegate))] - static int BoxRaycastHit(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineDebugMethodLogSystemObjectDelegate))] + static void UnityEngineDebugMethodLogSystemObject(int messageHandle) { try { - var val = (UnityEngine.RaycastHit)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - return returnValue; + 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)); - 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) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldGetRaiseExceptionsDelegate))] + static bool UnityEngineAssertionsAssertFieldGetRaiseExceptions() { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.RaycastHit)val); + 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(BoxQueryTriggerInteractionDelegate))] - static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertFieldSetRaiseExceptionsDelegate))] + static void UnityEngineAssertionsAssertFieldSetRaiseExceptions(bool value) { try { - 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(UnboxQueryTriggerInteractionDelegate))] - static UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteraction(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemStringDelegate))] + static void UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(int expectedHandle, int actualHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.QueryTriggerInteraction)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(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) + [MonoPInvokeCallback(typeof(UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObjectDelegate))] + static void UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(int expectedHandle, int actualHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore>.Remove(handle); - } + 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) { @@ -4270,14 +3864,14 @@ static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) + [MonoPInvokeCallback(typeof(UnityEngineMonoBehaviourPropertyGetTransformDelegate))] + static int UnityEngineMonoBehaviourPropertyGetTransform(int thisHandle) { try { - var key = (string)NativeScript.Bindings.ObjectStore.Get(keyHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store(new System.Collections.Generic.KeyValuePair(key, value)); - 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) { @@ -4293,82 +3887,82 @@ static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstruc } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] - static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) + [MonoPInvokeCallback(typeof(UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32Delegate))] + static void UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(ref int bufferLength, ref int numBuffers) { try { - var thiz = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Key; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + UnityEngine.AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); } catch (System.NullReferenceException ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpExceptionSystemNullReferenceException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + bufferLength = default(int); + numBuffers = default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + bufferLength = default(int); + numBuffers = default(int); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] - static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(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.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(thisHandle); - var returnValue = thiz.Value; - return returnValue; + 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)); - return default(double); + 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)); - return default(double); + addressHandle = default(int); + port = default(int); + error = default(byte); } } - [MonoPInvokeCallback(typeof(BoxKeyValuePairSystemString_SystemDoubleDelegate))] - static int BoxKeyValuePairSystemString_SystemDouble(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineNetworkingNetworkTransportMethodInitDelegate))] + static void UnityEngineNetworkingNetworkTransportMethodInit() { try { - var val = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); - 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(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] - static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) + [MonoPInvokeCallback(typeof(BoxQuaternionDelegate))] + static int BoxQuaternion(ref UnityEngine.Quaternion val) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore>.Store((System.Collections.Generic.KeyValuePair)val); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -4385,59 +3979,57 @@ static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] - static int SystemCollectionsGenericListSystemStringConstructor() + [MonoPInvokeCallback(typeof(UnboxQuaternionDelegate))] + static UnityEngine.Quaternion UnboxQuaternion(int valHandle) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); + 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(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertyGetItemDelegate))] + static float UnityEngineMatrix4x4PropertyGetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; - 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(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) + [MonoPInvokeCallback(typeof(UnityEngineMatrix4x4PropertySetItemDelegate))] + static void UnityEngineMatrix4x4PropertySetItem(ref UnityEngine.Matrix4x4 thiz, int row, int column, float value) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz[index] = value; + thiz[row, column] = column; } catch (System.NullReferenceException ex) { @@ -4451,54 +4043,57 @@ static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHand } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] - static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) + [MonoPInvokeCallback(typeof(BoxMatrix4x4Delegate))] + static int BoxMatrix4x4(ref UnityEngine.Matrix4x4 val) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var item = (string)NativeScript.Bindings.ObjectStore.Get(itemHandle); - thiz.Add(item); + 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(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) + [MonoPInvokeCallback(typeof(UnboxMatrix4x4Delegate))] + static UnityEngine.Matrix4x4 UnboxMatrix4x4(int valHandle) { 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 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(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] - static int SystemCollectionsGenericListSystemInt32Constructor() + [MonoPInvokeCallback(typeof(BoxQueryTriggerInteractionDelegate))] + static int BoxQueryTriggerInteraction(UnityEngine.QueryTriggerInteraction val) { try { - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); return returnValue; } catch (System.NullReferenceException ex) @@ -4515,36 +4110,38 @@ static int SystemCollectionsGenericListSystemInt32Constructor() } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] - static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) + [MonoPInvokeCallback(typeof(UnboxQueryTriggerInteractionDelegate))] + static UnityEngine.QueryTriggerInteraction UnboxQueryTriggerInteraction(int valHandle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz[index]; + 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(int); + return default(UnityEngine.QueryTriggerInteraction); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(UnityEngine.QueryTriggerInteraction); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] - static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) + [MonoPInvokeCallback(typeof(ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDoubleDelegate))] + static void ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int handle) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz[index] = value; + if (handle != 0) + { + NativeScript.Bindings.StructStore>.Remove(handle); + } } catch (System.NullReferenceException ex) { @@ -4558,78 +4155,83 @@ static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandl } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] - static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDoubleDelegate))] + static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(int keyHandle, double value) { try { - var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); - thiz.Add(item); + 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(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] - static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKeyDelegate))] + static int SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(int thisHandle) { 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.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(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValueDelegate))] + static double SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(int thisHandle) { try { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.LinkedListNode(value)); + 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(int); + return default(double); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); + return default(double); } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] - static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(BoxKeyValuePairSystemString_SystemDoubleDelegate))] + static int BoxKeyValuePairSystemString_SystemDouble(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 = (System.Collections.Generic.KeyValuePair)NativeScript.Bindings.StructStore>.Get(valHandle); + var returnValue = NativeScript.Bindings.ObjectStore.Store((object)val); + return returnValue; } catch (System.NullReferenceException ex) { @@ -4645,34 +4247,35 @@ static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(in } } - [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] - static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(UnboxKeyValuePairSystemString_SystemDoubleDelegate))] + static int UnboxKeyValuePairSystemString_SystemDouble(int valHandle) { try { - var thiz = (System.Collections.Generic.LinkedListNode)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 = 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(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringConstructorDelegate))] + static int SystemCollectionsGenericListSystemStringConstructor() { try { - var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Runtime.CompilerServices.StrongBox(value)); + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); return returnValue; } catch (System.NullReferenceException ex) @@ -4689,13 +4292,13 @@ static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemSt } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] - static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemStringPropertyGetItem(int thisHandle, int index) { try { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); - var returnValue = thiz.Value; + 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) @@ -4712,14 +4315,14 @@ static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int t } } - [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] - static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringPropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemStringPropertySetItem(int thisHandle, int index, int valueHandle) { try { - var thiz = (System.Runtime.CompilerServices.StrongBox)NativeScript.Bindings.ObjectStore.Get(thisHandle); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); var value = (string)NativeScript.Bindings.ObjectStore.Get(valueHandle); - thiz.Value = value; + thiz[index] = value; } catch (System.NullReferenceException ex) { @@ -4733,38 +4336,35 @@ static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int } } - [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] - static int SystemExceptionConstructorSystemString(int messageHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodAddSystemStringDelegate))] + static void SystemCollectionsGenericListSystemStringMethodAddSystemString(int thisHandle, int itemHandle) { try { - var message = (string)NativeScript.Bindings.ObjectStore.Get(messageHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Exception(message)); - 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(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(int); } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineResolutionDelegate))] - static void ReleaseUnityEngineResolution(int handle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparerDelegate))] + static void SystemCollectionsGenericListSystemStringMethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + 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) { @@ -4778,13 +4378,12 @@ static void ReleaseUnityEngineResolution(int handle) } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetWidthDelegate))] - static int UnityEngineResolutionPropertyGetWidth(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32ConstructorDelegate))] + static int SystemCollectionsGenericListSystemInt32Constructor() { try { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.width; + var returnValue = NativeScript.Bindings.ObjectStore.Store(new System.Collections.Generic.List()); return returnValue; } catch (System.NullReferenceException ex) @@ -4801,58 +4400,56 @@ static int UnityEngineResolutionPropertyGetWidth(int thisHandle) } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertySetWidthDelegate))] - static void UnityEngineResolutionPropertySetWidth(int thisHandle, int value) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertyGetItemDelegate))] + static int SystemCollectionsGenericListSystemInt32PropertyGetItem(int thisHandle, int index) { try { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.width = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); + 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(UnityEngineResolutionPropertyGetHeightDelegate))] - static int UnityEngineResolutionPropertyGetHeight(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32PropertySetItemDelegate))] + static void SystemCollectionsGenericListSystemInt32PropertySetItem(int thisHandle, int index, int value) { try { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.height; - 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)); - 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) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodAddSystemInt32Delegate))] + static void SystemCollectionsGenericListSystemInt32MethodAddSystemInt32(int thisHandle, int item) { try { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.height = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); + var thiz = (System.Collections.Generic.List)NativeScript.Bindings.ObjectStore.Get(thisHandle); + thiz.Add(item); } catch (System.NullReferenceException ex) { @@ -4866,58 +4463,58 @@ static void UnityEngineResolutionPropertySetHeight(int thisHandle, int value) } } - [MonoPInvokeCallback(typeof(UnityEngineResolutionPropertyGetRefreshRateDelegate))] - static int UnityEngineResolutionPropertyGetRefreshRate(int thisHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparerDelegate))] + static void SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(int thisHandle, int comparerHandle) { try { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - var returnValue = thiz.refreshRate; - 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(UnityEngineResolutionPropertySetRefreshRateDelegate))] - static void UnityEngineResolutionPropertySetRefreshRate(int thisHandle, int value) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemStringDelegate))] + static int SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(int valueHandle) { try { - var thiz = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(thisHandle); - thiz.refreshRate = value; - NativeScript.Bindings.StructStore.Replace(thisHandle, ref thiz); + 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(BoxResolutionDelegate))] - static int BoxResolution(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValueDelegate))] + static int SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(int thisHandle) { try { - var val = (UnityEngine.Resolution)NativeScript.Bindings.StructStore.Get(valHandle); - var returnValue = NativeScript.Bindings.ObjectStore.Store((object)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) { @@ -4933,36 +4530,35 @@ static int BoxResolution(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxResolutionDelegate))] - static int UnboxResolution(int valHandle) + [MonoPInvokeCallback(typeof(SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValueDelegate))] + static void SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(int thisHandle, int valueHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Resolution)val); - 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(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() + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemStringDelegate))] + static int SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(int valueHandle) { try { - var returnValue = UnityEngine.Screen.resolutions; - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + 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) { @@ -4978,57 +4574,57 @@ static int UnityEngineScreenPropertyGetResolutions() } } - [MonoPInvokeCallback(typeof(ReleaseUnityEngineRayDelegate))] - static void ReleaseUnityEngineRay(int handle) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValueDelegate))] + static int SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(int thisHandle) { try { - if (handle != 0) - { - NativeScript.Bindings.StructStore.Remove(handle); - } + 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(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] - static int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) + [MonoPInvokeCallback(typeof(SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValueDelegate))] + static void SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(int thisHandle, int valueHandle) { try { - var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Ray(origin, direction)); - 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(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) + [MonoPInvokeCallback(typeof(SystemExceptionConstructorSystemStringDelegate))] + static int SystemExceptionConstructorSystemString(int messageHandle) { try { - var val = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(valHandle); - 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) @@ -5045,14 +4641,13 @@ static int BoxRay(int valHandle) } } - [MonoPInvokeCallback(typeof(UnboxRayDelegate))] - static int UnboxRay(int valHandle) + [MonoPInvokeCallback(typeof(UnityEngineScreenPropertyGetResolutionsDelegate))] + static int UnityEngineScreenPropertyGetResolutions() { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = NativeScript.Bindings.StructStore.Store((UnityEngine.Ray)val); - return returnValue; + var returnValue = UnityEngine.Screen.resolutions; + return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); } catch (System.NullReferenceException ex) { @@ -5068,38 +4663,35 @@ static int UnboxRay(int valHandle) } } - [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate))] - static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(int rayHandle, int resultsHandle) + [MonoPInvokeCallback(typeof(ReleaseUnityEngineRayDelegate))] + static void ReleaseUnityEngineRay(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; + 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(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] - static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(int rayHandle) + [MonoPInvokeCallback(typeof(UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3Delegate))] + static int UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(ref UnityEngine.Vector3 origin, ref UnityEngine.Vector3 direction) { try { - var ray = (UnityEngine.Ray)NativeScript.Bindings.StructStore.Get(rayHandle); - var returnValue = UnityEngine.Physics.RaycastAll(ray); - return NativeScript.Bindings.ObjectStore.GetHandle(returnValue); + var returnValue = NativeScript.Bindings.StructStore.Store(new UnityEngine.Ray(origin, direction)); + return returnValue; } catch (System.NullReferenceException ex) { @@ -5115,11 +4707,12 @@ static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(int rayHandle) } } - [MonoPInvokeCallback(typeof(BoxColorDelegate))] - static int BoxColor(ref UnityEngine.Color val) + [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; } @@ -5137,35 +4730,37 @@ static int BoxColor(ref UnityEngine.Color val) } } - [MonoPInvokeCallback(typeof(UnboxColorDelegate))] - static UnityEngine.Color UnboxColor(int valHandle) + [MonoPInvokeCallback(typeof(UnboxRayDelegate))] + static int UnboxRay(int valHandle) { try { var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.Color)val; + 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(UnityEngine.Color); + return default(int); } catch (System.Exception ex) { UnityEngine.Debug.LogException(ex); NativeScript.Bindings.SetCsharpException(NativeScript.Bindings.ObjectStore.Store(ex)); - return default(UnityEngine.Color); + return default(int); } } - [MonoPInvokeCallback(typeof(BoxGradientColorKeyDelegate))] - static int BoxGradientColorKey(ref UnityEngine.GradientColorKey val) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1Delegate))] + static int UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1(int rayHandle, int resultsHandle) { try { - 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) @@ -5182,26 +4777,26 @@ static int BoxGradientColorKey(ref UnityEngine.GradientColorKey val) } } - [MonoPInvokeCallback(typeof(UnboxGradientColorKeyDelegate))] - static UnityEngine.GradientColorKey UnboxGradientColorKey(int valHandle) + [MonoPInvokeCallback(typeof(UnityEnginePhysicsMethodRaycastAllUnityEngineRayDelegate))] + static int UnityEnginePhysicsMethodRaycastAllUnityEngineRay(int rayHandle) { try { - var val = NativeScript.Bindings.ObjectStore.Get(valHandle); - var returnValue = (UnityEngine.GradientColorKey)val; - return returnValue; + 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(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); } } @@ -5811,88 +5406,6 @@ static void ReleaseSystemBaseStringComparer(int handle) } } - [MonoPInvokeCallback(typeof(SystemCollectionsBaseICollectionConstructorDelegate))] - static void SystemCollectionsBaseICollectionConstructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemCollectionsBaseICollection(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(ReleaseSystemCollectionsBaseICollectionDelegate))] - static void ReleaseSystemCollectionsBaseICollection(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(SystemCollectionsBaseIListConstructorDelegate))] - static void SystemCollectionsBaseIListConstructor(int cppHandle, ref int handle) - { - try - { - var thiz = new SystemCollectionsBaseIList(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(ReleaseSystemCollectionsBaseIListDelegate))] - static void ReleaseSystemCollectionsBaseIList(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) { @@ -6151,165 +5664,6 @@ static int UnboxPlayableHandle(int valHandle) } } - [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(UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1Delegate))] static int UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1(int eHandle, int nameHandle, int classesHandle) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 0080eed..48f3d07 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -166,6 +166,10 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppTypeDeclarations = new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CppTemplateDeclarations = + new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CppTemplateSpecializationDeclarations = + new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppTypeDefinitions = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppMethodDefinitions = @@ -542,7 +546,7 @@ static void DoPostCompileWork(bool canRefreshAssetDb) cppBaseTypeName, type.Namespace, genericArgTypes.Length, - builders.CppTypeDeclarations); + builders.CppTemplateDeclarations); } } } @@ -902,6 +906,57 @@ static MethodInfo GetMethod( throw new Exception(errorBuilder.ToString()); } + static Type[] GetDirectInterfaces(Type type) + { + Type[] allInterfaces = type.GetInterfaces(); + List minimalInterfaces = new List(); + foreach(Type iType in allInterfaces) + { + bool contains = false; + foreach (Type t in allInterfaces) + { + if (Array.IndexOf(t.GetInterfaces(), iType) >= 0) + { + contains = true; + break; + } + } + if (!contains) + { + minimalInterfaces.Add(iType); + } + } + minimalInterfaces.Sort((x, y) => x.Name.CompareTo(y.Name)); + return minimalInterfaces.ToArray(); + } + + static void AddCppCtorInitType(Type type, List types) + { + if (type.BaseType != null && type.BaseType != typeof(object)) + { + AddCppCtorInitType(type.BaseType, types); + } + foreach (Type interfaceType in GetDirectInterfaces(type)) + { + AddCppCtorInitType(interfaceType, types); + } + if (!types.Contains(type)) + { + types.Add(type); + } + } + + static Type[] GetCppCtorInitTypes(Type type, bool includeSelf) + { + List types = new List(); + AddCppCtorInitType(type, types); + if (!includeSelf) + { + types.RemoveAll(t => t == type); + } + return types.ToArray(); + } + static bool CheckParametersMatch( string[] paramTypeNames, System.Reflection.ParameterInfo[] reflectionParams) @@ -1269,7 +1324,7 @@ static void AppendType( type.Name, type.Namespace, genericArgTypes.Length, - builders.CppTypeDeclarations); + builders.CppTemplateDeclarations); } foreach (JsonGenericParams jsonGenericParams @@ -1529,10 +1584,13 @@ static void AppendType( type.Name, isStatic, typeParams, - builders.CppTypeDeclarations); + typeParams != null ? + builders.CppTemplateSpecializationDeclarations : + builders.CppTypeDeclarations); // C++ type definition (beginning) Type baseType = type.BaseType ?? typeof(object); + Type[] interfaceTypes = GetDirectInterfaces(type); AppendCppTypeDefinitionBegin( type.Name, type.Namespace, @@ -1541,11 +1599,15 @@ static void AppendType( baseType.Name, baseType.Namespace, baseType.GetGenericArguments(), + interfaceTypes, isStatic, indent, builders.CppTypeDefinitions); // C++ method definition + Type[] cppCtorInterfaceTypes = GetCppCtorInitTypes( + type, + false); int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( type.Name, type.Namespace, @@ -1554,6 +1616,7 @@ static void AppendType( baseType.Name, baseType.Namespace, baseType.GetGenericArguments(), + cppCtorInterfaceTypes, isStatic, (extraIndent, subject) => {}, (extraIndent, subject) => {}, @@ -1581,6 +1644,7 @@ static void AppendType( assemblies, typeParams, genericArgTypes, + cppCtorInterfaceTypes, indent, builders); } @@ -2185,6 +2249,7 @@ static void AppendConstructor( Assembly[] assemblies, Type[] enclosingTypeParams, Type[] genericArgTypes, + Type[] interfaceTypes, int indent, StringBuilders builders) { @@ -2370,14 +2435,19 @@ static void AppendConstructor( builders.CppMethodDefinitions); if (enclosingTypeKind != TypeKind.FullStruct) { - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(" : "); - AppendCppTypeName( - enclosingType.BaseType, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(nullptr)\n"); + 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 = ", "; + } } AppendIndent( indent, @@ -3749,11 +3819,15 @@ static void AppendMonoBehaviour( "MonoBehaviour", "UnityEngine", null, + null, false, cppIndent, builders.CppTypeDefinitions); // C++ method definition + Type[] interfaceTypes = GetCppCtorInitTypes( + type, + false); int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( type.Name, type.Namespace, @@ -3762,6 +3836,7 @@ static void AppendMonoBehaviour( "MonoBehaviour", "UnityEngine", null, + interfaceTypes, false, (extraIndent, subject) => {}, (extraIndent, subject) => {}, @@ -4228,9 +4303,12 @@ static void AppendArray( cppArrayTypeName, false, cppTypeParams, - builders.CppTypeDeclarations); + cppTypeParams != null ? + builders.CppTemplateSpecializationDeclarations : + builders.CppTypeDeclarations); // C++ type definition (beginning) + Type[] interfaceTypes = GetDirectInterfaces(arrayType); AppendCppTypeDefinitionBegin( cppArrayTypeName, "System", @@ -4239,11 +4317,15 @@ static void AppendArray( "Array", "System", null, + interfaceTypes, false, indent, builders.CppTypeDefinitions); // C++ method definitions (beginning) + Type[] cppCtorInitTypes = GetCppCtorInitTypes( + arrayType, + false); int cppMethodDefinitionsIndent = AppendCppMethodDefinitionsBegin( cppArrayTypeName, "System", @@ -4252,6 +4334,7 @@ static void AppendArray( "Array", "System", null, + cppCtorInitTypes, false, (extraIndent, subject) => { AppendIndent( @@ -4332,6 +4415,7 @@ static void AppendArray( cppArrayTypeName, rank, bindingArrayTypeName, + cppCtorInitTypes, indent, builders); @@ -4656,17 +4740,17 @@ static void AppendArrayElementProxy( // C++ element proxy type declaration int indent = AppendNamespaceBeginning( "Plugin", - builders.CppTypeDeclarations); - AppendIndent(indent, builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append("template<> struct "); + builders.CppTemplateSpecializationDeclarations); + AppendIndent(indent, builders.CppTemplateSpecializationDeclarations); + builders.CppTemplateSpecializationDeclarations.Append("template<> struct "); AppendTypeNameWithoutGenericSuffix( cppElementProxyTypeName, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append(";\n"); + builders.CppTemplateSpecializationDeclarations); + builders.CppTemplateSpecializationDeclarations.Append(";\n"); AppendNamespaceEnding( indent, - builders.CppTypeDeclarations); - builders.CppTypeDeclarations.Append('\n'); + builders.CppTemplateSpecializationDeclarations); + builders.CppTemplateSpecializationDeclarations.Append('\n'); // C++ element proxy type definition AppendNamespaceBeginning( @@ -4903,6 +4987,7 @@ static void AppendArrayConstructor( string cppArrayTypeName, int rank, string csharpTypeName, + Type[] cppCtorInitTypes, int indent, StringBuilders builders) { @@ -5044,15 +5129,19 @@ static void AppendArrayConstructor( parameters, indent, builders.CppMethodDefinitions); - AppendIndent( - indent + 1, - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(" : "); - AppendCppTypeName( - "System", - "Array", - builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("(nullptr)\n"); + string separator = ": "; + foreach (Type interfaceType in cppCtorInitTypes) + { + AppendIndent( + indent + 1, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(separator); + AppendCppTypeName( + interfaceType, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append("(nullptr)\n"); + separator = ", "; + } AppendIndent( indent, builders.CppMethodDefinitions); @@ -5702,7 +5791,7 @@ static void AppendDelegate( cppTypeName, type.Namespace, genericArgTypes.Length, - builders.CppTypeDeclarations); + builders.CppTemplateDeclarations); } foreach (JsonGenericParams jsonGenericParams @@ -5813,7 +5902,9 @@ static void AppendDelegate( cppTypeName, false, typeParams, - builders.CppTypeDeclarations); + typeParams != null ? + builders.CppTemplateSpecializationDeclarations : + builders.CppTypeDeclarations); ParameterInfo[] addRemoveParams = { new ParameterInfo @@ -5900,6 +5991,7 @@ static void AppendDelegate( "Object", "System", null, + null, false, indent, builders.CppTypeDefinitions); @@ -6087,6 +6179,7 @@ static void AppendDelegate( typeof(object), typeParams, null, + new Type[0], new ParameterInfo[0], constructorParams, true, @@ -6101,6 +6194,7 @@ static void AppendDelegate( "Object", "System", null, + new Type[0], true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6112,6 +6206,7 @@ static void AppendDelegate( "Object", "System", null, + new Type[0], true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6122,6 +6217,7 @@ static void AppendDelegate( "Object", "System", null, + new Type[0], true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6133,6 +6229,7 @@ static void AppendDelegate( "Object", "System", null, + new Type[0], true, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6550,13 +6647,35 @@ static void AppendBaseType( constructorParams[i] = fullParams; } + // Determine what the C++ class should derive from + Type cppBaseClass; + Type[] cppBaseClassTypeParams; + Type[] cppCtorInitTypes = GetCppCtorInitTypes( + type, + true); + Type[] cppInterfaceTypes; + if (type.IsInterface) + { + cppBaseClass = typeof(object); + cppBaseClassTypeParams = null; + cppInterfaceTypes = new Type[] { type }; + } + else + { + cppBaseClass = type; + cppBaseClassTypeParams = typeParams; + cppInterfaceTypes = new Type[0]; + } + // C++ type declaration int indent = AppendCppTypeDeclaration( type.Namespace, cppBaseTypeName, false, typeParams, - builders.CppTypeDeclarations); + typeParams != null ? + builders.CppTemplateSpecializationDeclarations : + builders.CppTypeDeclarations); ParameterInfo[] releaseParams = { new ParameterInfo @@ -6590,9 +6709,10 @@ static void AppendBaseType( type.Namespace, TypeKind.Class, typeParams, - type.Name, - type.Namespace, - typeParams, + cppBaseClass.Name, + cppBaseClass.Namespace, + cppBaseClassTypeParams, + cppInterfaceTypes, false, indent, builders.CppTypeDefinitions); @@ -6707,9 +6827,10 @@ static void AppendBaseType( type.Namespace, TypeKind.Class, cppBaseTypeName, - type, + cppBaseClass, typeParams, typeParams, + cppCtorInitTypes, cppConstructorParams[i], constructorParams[i], false, @@ -6722,9 +6843,10 @@ static void AppendBaseType( bindingTypeName, cppBaseTypeName, typeParams, - type.Name, - type.Namespace, - typeParams, + cppBaseClass.Name, + cppBaseClass.Namespace, + cppBaseClassTypeParams, + cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6733,9 +6855,10 @@ static void AppendBaseType( bindingTypeName, cppBaseTypeName, typeParams, - type.Name, - type.Namespace, - typeParams, + cppBaseClass.Name, + cppBaseClass.Namespace, + cppBaseClassTypeParams, + cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6743,9 +6866,10 @@ static void AppendBaseType( AppendCppBaseTypeMoveConstructor( cppBaseTypeName, typeParams, - type.Name, - type.Namespace, - typeParams, + cppBaseClass.Name, + cppBaseClass.Namespace, + cppBaseClassTypeParams, + cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -6754,9 +6878,10 @@ static void AppendBaseType( bindingTypeName, cppBaseTypeName, typeParams, - type.Name, - type.Namespace, - typeParams, + cppBaseClass.Name, + cppBaseClass.Namespace, + cppBaseClassTypeParams, + cppCtorInitTypes, false, cppMethodDefinitionsIndent, builders.CppMethodDefinitions); @@ -8813,6 +8938,7 @@ static void AppendCppBaseTypeHandleConstructor( string baseTypeName, string baseTypeNamespace, Type[] baseTypeParams, + Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8832,22 +8958,27 @@ static void AppendCppBaseTypeHandleConstructor( output); output.Append( "(Plugin::InternalUse iu, 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 = ", "; + } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\t: "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, - output); - AppendCppTypeParameters( - baseTypeParams, - output); - output.Append("(iu, handle)\n"); + output.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent, + cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.Append("Handle = handle;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, output); @@ -8895,6 +9026,7 @@ static void AppendCppBaseTypeMoveConstructor( string baseTypeName, string baseTypeNamespace, Type[] baseTypeParams, + Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -8920,22 +9052,28 @@ static void AppendCppBaseTypeMoveConstructor( 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 = ", "; + } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\t: "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, - output); - AppendCppTypeParameters( - baseTypeParams, - output); - output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); + output.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent, + cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.Append( + "Handle = other.Handle;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, output); @@ -8981,6 +9119,7 @@ static void AppendCppBaseTypeCopyConstructor( string baseTypeName, string baseTypeNamespace, Type[] baseTypeParams, + Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -9006,22 +9145,28 @@ static void AppendCppBaseTypeCopyConstructor( 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 = ", "; + } AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\t: "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, - output); - AppendCppTypeParameters( - baseTypeParams, - output); - output.Append("(Plugin::InternalUse::Only, other.Handle)\n"); + output.Append("{\n"); AppendIndent( - cppMethodDefinitionsIndent, + cppMethodDefinitionsIndent + 1, output); - output.Append("{\n"); + output.Append( + "Handle = other.Handle;\n"); AppendIndent( cppMethodDefinitionsIndent + 1, output); @@ -9070,6 +9215,7 @@ static void AppendCppBaseTypeNullptrConstructor( string baseTypeName, string baseTypeNamespace, Type[] baseTypeParams, + Type[] interfaceTypes, bool typeIsDelegate, int cppMethodDefinitionsIndent, StringBuilder output) @@ -9088,18 +9234,19 @@ static void AppendCppBaseTypeNullptrConstructor( cppTypeName, output); output.Append("(decltype(nullptr) n)\n"); - AppendIndent( - cppMethodDefinitionsIndent, - output); - output.Append("\t: "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, - output); - AppendCppTypeParameters( - baseTypeParams, - output); - output.Append("(Plugin::InternalUse::Only, 0)\n"); + string separator = ": "; + foreach (Type interfaceType in interfaceTypes) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append(separator); + AppendCppTypeName( + interfaceType, + output); + output.Append("(nullptr)\n"); + separator = ", "; + } AppendIndent( cppMethodDefinitionsIndent, output); @@ -9136,6 +9283,7 @@ static void AppendCppBaseTypeConstructor( Type baseType, Type[] typeParams, Type[] baseTypeParams, + Type[] interfaceTypes, ParameterInfo[] cppParameters, ParameterInfo[] parameters, bool typeIsDelegate, @@ -9152,14 +9300,19 @@ static void AppendCppBaseTypeConstructor( cppParameters, cppMethodDefinitionsIndent, output); - AppendIndent( - cppMethodDefinitionsIndent + 1, - output); - output.Append(" : "); - AppendCppTypeName( - baseType ?? typeof(object), - output); - output.Append("(nullptr)\n"); + string separator = ": "; + foreach (Type interfaceType in interfaceTypes) + { + AppendIndent( + cppMethodDefinitionsIndent + 1, + output); + output.Append(separator); + AppendCppTypeName( + interfaceType, + output); + output.Append("(nullptr)\n"); + separator = ", "; + } AppendIndent( cppMethodDefinitionsIndent, output); @@ -9732,7 +9885,23 @@ static void AppendExceptions( AppendIndent( throwerIndent + 2, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append(": "); + builders.CppMethodDefinitions.Append(": System::Runtime::InteropServices::_Exception(nullptr)\n"); + AppendIndent( + throwerIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(", System::Runtime::Serialization::ISerializable(nullptr)\n"); + AppendIndent( + throwerIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(", System::Exception(nullptr)\n"); + AppendIndent( + throwerIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(", System::SystemException(nullptr)\n"); + AppendIndent( + throwerIndent + 2, + builders.CppMethodDefinitions); + builders.CppMethodDefinitions.Append(", "); AppendCppTypeName( exceptionType, builders.CppMethodDefinitions); @@ -10331,6 +10500,7 @@ static void AppendCppTypeDefinitionBegin( string baseTypeName, string baseTypeNamespace, Type[] baseTypeTypeParams, + Type[] interfaceTypes, bool isStatic, int indent, StringBuilder output) @@ -10359,22 +10529,46 @@ static void AppendCppTypeDefinitionBegin( typeName, output); AppendCppTypeParameters(typeParams, output); - if (baseTypeName != null) + switch (typeKind) { - switch (typeKind) - { - case TypeKind.Class: - case TypeKind.ManagedStruct: - output.Append(" : "); + 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 "; + if ( + (baseTypeName != null && + (baseTypeNamespace != "System" || + baseTypeName != "Object")) || + (interfaceTypes == null || + interfaceTypes.Length == 0)) + { + output.Append(separator); + separator = ", virtual "; AppendCppTypeName( - baseTypeNamespace, - baseTypeName, + baseTypeNamespace ?? "System", + baseTypeName ?? "Object", output); AppendCppTypeParameters( baseTypeTypeParams, output); - break; - } + } + if (interfaceTypes != null) + { + foreach (Type interfaceType in interfaceTypes) + { + output.Append(separator); + separator = ", virtual "; + AppendCppTypeName( + interfaceType.Namespace, + interfaceType.Name, + output); + AppendCppTypeParameters( + interfaceType.GetGenericArguments(), + output); + } + } + break; } } output.Append('\n'); @@ -10552,6 +10746,7 @@ static int AppendCppMethodDefinitionsBegin( string baseTypeName, string baseTypeNamespace, Type[] baseTypeTypeParams, + Type[] interfaceTypes, bool isStatic, Action extraDefault, Action extraCopy, @@ -10584,12 +10779,19 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeName, output); output.Append("(decltype(nullptr) n)\n"); - AppendIndent(indent, output); - output.Append("\t: "); - AppendTypeNameWithoutGenericSuffix( - enclosingTypeName, - output); - output.Append("(Plugin::InternalUse::Only, 0)\n"); + 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"); extraDefault(indent + 1, "this->"); @@ -10611,19 +10813,24 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeName, output); output.Append("(Plugin::InternalUse iu, int32_t handle)\n"); - AppendIndent(indent, output); - output.Append("\t: "); - AppendCppTypeName( - baseTypeNamespace, - baseTypeName, - output); - AppendCppTypeParameters( - baseTypeTypeParams, - output); - output.Append("(iu, handle)\n"); + 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"); AppendIndent(indent + 1, output); + output.Append("Handle = handle;\n"); + AppendIndent(indent + 1, output); output.Append("if (handle)\n"); AppendIndent(indent + 1, output); output.Append("{\n"); @@ -10664,8 +10871,8 @@ static int AppendCppMethodDefinitionsBegin( enclosingTypeParams, output); output.Append("& other)\n"); - AppendIndent(indent, output); - output.Append("\t: "); + AppendIndent(indent + 1, output); + output.Append(": "); AppendTypeNameWithoutGenericSuffix( enclosingTypeName, output); @@ -12424,6 +12631,8 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CsharpGetDelegateCalls); RemoveTrailingChars(builders.CppFunctionPointers); RemoveTrailingChars(builders.CppTypeDeclarations); + RemoveTrailingChars(builders.CppTemplateDeclarations); + RemoveTrailingChars(builders.CppTemplateSpecializationDeclarations); RemoveTrailingChars(builders.CppTypeDefinitions); RemoveTrailingChars(builders.CppMethodDefinitions); RemoveTrailingChars(builders.CppInitParams); @@ -12527,6 +12736,16 @@ static void InjectBuilders( "/*BEGIN TYPE DECLARATIONS*/\n", "\n/*END TYPE DECLARATIONS*/", builders.CppTypeDeclarations.ToString()); + cppHeaderContents = InjectIntoString( + cppHeaderContents, + "/*BEGIN TEMPLATE DECLARATIONS*/\n", + "\n/*END TEMPLATE DECLARATIONS*/", + builders.CppTemplateDeclarations.ToString()); + cppHeaderContents = InjectIntoString( + cppHeaderContents, + "/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/\n", + "\n/*END TEMPLATE SPECIALIZATION DECLARATIONS*/", + builders.CppTemplateSpecializationDeclarations.ToString()); cppHeaderContents = InjectIntoString( cppHeaderContents, "/*BEGIN TYPE DEFINITIONS*/\n", diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 7c09fbb..4e364ad 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -4,25 +4,45 @@ ], "Types": [ { - "Name": "System.Diagnostics.Stopwatch", + "Name": " System.IDisposable" + }, + { + "Name": "UnityEngine.Vector3", "Constructors": [ { - "ParamTypes": [] + "ParamTypes": [ + "System.Single", + "System.Single", + "System.Single" + ] } ], "Methods": [ { - "Name": "Start", - "ParamTypes": [] + "Name": "Set", + "ParamTypes": [ + "System.Single", + "System.Single", + "System.Single" + ] }, { - "Name": "Reset", - "ParamTypes": [] + "Name": "x+y", + "ParamTypes": [ + "UnityEngine.Vector3", + "UnityEngine.Vector3" + ] + }, + { + "Name": "-x", + "ParamTypes": [ + "UnityEngine.Vector3" + ] } ], "Properties": [ { - "Name": "ElapsedMilliseconds", + "Name": "magnitude", "Get": {} } ] @@ -52,6 +72,266 @@ } ] }, + { + "Name": "UnityEngine.Component", + "Properties": [ + { + "Name": "transform", + "Get": {} + } + ] + }, + { + "Name": "UnityEngine.Transform", + "Properties": [ + { + "Name": "position", + "Get": {}, + "Set": { + "Exceptions": [ + "System.NullReferenceException" + ] + } + } + ] + }, + { + "Name": "UnityEngine.Color" + }, + { + "Name": "UnityEngine.GradientColorKey" + }, + { + "Name": "UnityEngine.Resolution", + "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.Generic.IEnumerable`1", + "GenericParams": [ + { + "Types": [ + "System.String" + ] + }, + { + "Types": [ + "System.Int32" + ] + }, + { + "Types": [ + "System.Single" + ] + }, + { + "Types": [ + "UnityEngine.RaycastHit" + ] + }, + { + "Types": [ + "UnityEngine.GradientColorKey" + ] + }, + { + "Types": [ + "UnityEngine.Resolution" + ] + } + ] + }, + { + "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" + }, + { + "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.IStyle" + }, + { + "Name": "System.Diagnostics.Stopwatch", + "Constructors": [ + { + "ParamTypes": [] + } + ], + "Methods": [ + { + "Name": "Start", + "ParamTypes": [] + }, + { + "Name": "Reset", + "ParamTypes": [] + } + ], + "Properties": [ + { + "Name": "ElapsedMilliseconds", + "Get": {} + } + ] + }, { "Name": "UnityEngine.GameObject", "Constructors": [ @@ -102,29 +382,6 @@ } ] }, - { - "Name": "UnityEngine.Component", - "Properties": [ - { - "Name": "transform", - "Get": {} - } - ] - }, - { - "Name": "UnityEngine.Transform", - "Properties": [ - { - "Name": "position", - "Get": {}, - "Set": { - "Exceptions": [ - "System.NullReferenceException" - ] - } - } - ] - }, { "Name": "UnityEngine.Debug", "Methods": [ @@ -209,47 +466,6 @@ } ] }, - { - "Name": "UnityEngine.Vector3", - "Constructors": [ - { - "ParamTypes": [ - "System.Single", - "System.Single", - "System.Single" - ] - } - ], - "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": {} - } - ] - }, { "Name": "UnityEngine.Quaternion" }, @@ -274,20 +490,6 @@ } ] }, - { - "Name": "UnityEngine.RaycastHit", - "MaxSimultaneous": 1000, - "Properties": [ - { - "Name": "point", - "Get": {} - }, - { - "Name": "transform", - "Get": {} - } - ] - }, { "Name": "UnityEngine.QueryTriggerInteraction" }, @@ -444,26 +646,6 @@ { "Name": "System.NullReferenceException" }, - { - "Name": "UnityEngine.Resolution", - "Properties": [ - { - "Name": "width", - "Get": {}, - "Set": {} - }, - { - "Name": "height", - "Get": {}, - "Set": {} - }, - { - "Name": "refreshRate", - "Get": {}, - "Set": {} - } - ] - }, { "Name": "UnityEngine.Screen", "Properties": [ @@ -502,12 +684,6 @@ } ] }, - { - "Name": "UnityEngine.Color" - }, - { - "Name": "UnityEngine.GradientColorKey" - }, { "Name": "UnityEngine.Gradient", "Constructors": [ @@ -649,18 +825,6 @@ {} ] }, - { - "Name": "System.Collections.ICollection", - "BaseTypes": [ - {} - ] - }, - { - "Name": "System.Collections.IList", - "BaseTypes": [ - {} - ] - }, { "Name": "System.Collections.Queue", "Properties": [ @@ -730,22 +894,6 @@ { "Name": "UnityEngine.Playables.PlayableHandle" }, - { - "Name": "UnityEngine.Playables.PlayableGraph" - }, - { - "Name": "UnityEngine.Animations.AnimationMixerPlayable", - "Methods": [ - { - "Name": "Create", - "ParamTypes": [ - "UnityEngine.Playables.PlayableGraph", - "System.Int32", - "System.Boolean" - ] - } - ] - }, { "Name": "UnityEngine.Experimental.UIElements.CallbackEventHandler" }, diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index e2ce580..b580994 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -49,23 +49,56 @@ namespace Plugin int32_t (*ArrayGetLength)(int32_t handle); /*BEGIN FUNCTION POINTERS*/ - int32_t (*SystemDiagnosticsStopwatchConstructor)(); - int64_t (*SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle); - void (*SystemDiagnosticsStopwatchMethodStart)(int32_t thisHandle); - void (*SystemDiagnosticsStopwatchMethodReset)(int32_t thisHandle); + UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); + float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz); + void (*UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ); + UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b); + UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a); + 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); System::Boolean (*UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle); System::Boolean (*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); + 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 (*UnityEngineResolutionPropertyGetWidth)(int32_t thisHandle); + void (*UnityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value); + int32_t (*UnityEngineResolutionPropertyGetHeight)(int32_t thisHandle); + void (*UnityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value); + int32_t (*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); + 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 (*BoxAnimationMixerPlayable)(int32_t valHandle); + int32_t (*UnboxAnimationMixerPlayable)(int32_t valHandle); + int32_t (*SystemDiagnosticsStopwatchConstructor)(); + int64_t (*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 (*UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type); - int32_t (*UnityEngineComponentPropertyGetTransform)(int32_t thisHandle); - UnityEngine::Vector3 (*UnityEngineTransformPropertyGetPosition)(int32_t thisHandle); - void (*UnityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value); void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle); System::Boolean (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value); @@ -75,25 +108,12 @@ namespace Plugin void (*UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32)(int32_t* bufferLength, int32_t* numBuffers); void (*UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte)(int32_t hostId, int32_t* addressHandle, int32_t* port, uint8_t* error); void (*UnityEngineNetworkingNetworkTransportMethodInit)(); - UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); - float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz); - void (*UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ); - UnityEngine::Vector3 (*UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b); - UnityEngine::Vector3 (*UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a); - int32_t (*BoxVector3)(UnityEngine::Vector3& val); - UnityEngine::Vector3 (*UnboxVector3)(int32_t valHandle); int32_t (*BoxQuaternion)(UnityEngine::Quaternion& val); UnityEngine::Quaternion (*UnboxQuaternion)(int32_t valHandle); float (*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); - 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 (*BoxQueryTriggerInteraction)(UnityEngine::QueryTriggerInteraction val); UnityEngine::QueryTriggerInteraction (*UnboxQueryTriggerInteraction)(int32_t valHandle); void (*ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)(int32_t handle); @@ -119,15 +139,6 @@ namespace Plugin int32_t (*SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)(int32_t thisHandle); void (*SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)(int32_t thisHandle, int32_t valueHandle); int32_t (*SystemExceptionConstructorSystemString)(int32_t messageHandle); - void (*ReleaseUnityEngineResolution)(int32_t handle); - int32_t (*UnityEngineResolutionPropertyGetWidth)(int32_t thisHandle); - void (*UnityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value); - int32_t (*UnityEngineResolutionPropertyGetHeight)(int32_t thisHandle); - void (*UnityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value); - int32_t (*UnityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle); - void (*UnityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value); - int32_t (*BoxResolution)(int32_t valHandle); - int32_t (*UnboxResolution)(int32_t valHandle); int32_t (*UnityEngineScreenPropertyGetResolutions)(); void (*ReleaseUnityEngineRay)(int32_t handle); int32_t (*UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction); @@ -135,10 +146,6 @@ namespace Plugin int32_t (*UnboxRay)(int32_t valHandle); int32_t (*UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle); int32_t (*UnityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle); - int32_t (*BoxColor)(UnityEngine::Color& val); - UnityEngine::Color (*UnboxColor)(int32_t valHandle); - int32_t (*BoxGradientColorKey)(UnityEngine::GradientColorKey& val); - UnityEngine::GradientColorKey (*UnboxGradientColorKey)(int32_t valHandle); int32_t (*UnityEngineGradientConstructor)(); int32_t (*UnityEngineGradientPropertyGetColorKeys)(int32_t thisHandle); void (*UnityEngineGradientPropertySetColorKeys)(int32_t thisHandle, int32_t valueHandle); @@ -167,10 +174,6 @@ namespace Plugin void (*SystemCollectionsGenericBaseIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle); void (*ReleaseSystemBaseStringComparer)(int32_t handle); void (*SystemBaseStringComparerConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsBaseICollection)(int32_t handle); - void (*SystemCollectionsBaseICollectionConstructor)(int32_t cppHandle, int32_t* handle); - void (*ReleaseSystemCollectionsBaseIList)(int32_t handle); - void (*SystemCollectionsBaseIListConstructor)(int32_t cppHandle, int32_t* handle); int32_t (*SystemCollectionsQueuePropertyGetCount)(int32_t thisHandle); void (*ReleaseSystemCollectionsBaseQueue)(int32_t handle); void (*SystemCollectionsBaseQueueConstructor)(int32_t cppHandle, int32_t* handle); @@ -183,13 +186,6 @@ namespace Plugin void (*ReleaseUnityEnginePlayablesPlayableHandle)(int32_t handle); int32_t (*BoxPlayableHandle)(int32_t valHandle); int32_t (*UnboxPlayableHandle)(int32_t valHandle); - 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 (*BoxAnimationMixerPlayable)(int32_t valHandle); - int32_t (*UnboxAnimationMixerPlayable)(int32_t valHandle); 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); @@ -359,6 +355,31 @@ namespace Plugin } /*BEGIN GLOBAL STATE AND FUNCTIONS*/ + int32_t RefCountsLenUnityEngineResolution; + int32_t* RefCountsUnityEngineResolution; + + void ReferenceManagedUnityEngineResolution(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + if (handle != 0) + { + RefCountsUnityEngineResolution[handle]++; + } + } + + void DereferenceManagedUnityEngineResolution(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + if (handle != 0) + { + int32_t numRemain = --RefCountsUnityEngineResolution[handle]; + if (numRemain == 0) + { + ReleaseUnityEngineResolution(handle); + } + } + } + int32_t RefCountsLenUnityEngineRaycastHit; int32_t* RefCountsUnityEngineRaycastHit; @@ -384,52 +405,77 @@ namespace Plugin } } - int32_t RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; - int32_t* RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + int32_t RefCountsLenUnityEnginePlayablesPlayableGraph; + int32_t* RefCountsUnityEnginePlayablesPlayableGraph; - void ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + void ReferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) { - assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); if (handle != 0) { - RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]++; + RefCountsUnityEnginePlayablesPlayableGraph[handle]++; } } - void DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + void DereferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) { - assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); + assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); if (handle != 0) { - int32_t numRemain = --RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]; + int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableGraph[handle]; if (numRemain == 0) { - ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(handle); + ReleaseUnityEnginePlayablesPlayableGraph(handle); } } } - int32_t RefCountsLenUnityEngineResolution; - int32_t* RefCountsUnityEngineResolution; + int32_t RefCountsLenUnityEngineAnimationsAnimationMixerPlayable; + int32_t* RefCountsUnityEngineAnimationsAnimationMixerPlayable; - void ReferenceManagedUnityEngineResolution(int32_t handle) + void ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); if (handle != 0) { - RefCountsUnityEngineResolution[handle]++; + RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]++; } } - void DereferenceManagedUnityEngineResolution(int32_t handle) + void DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) { - assert(handle >= 0 && handle < RefCountsLenUnityEngineResolution); + assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); if (handle != 0) { - int32_t numRemain = --RefCountsUnityEngineResolution[handle]; + int32_t numRemain = --RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]; if (numRemain == 0) { - ReleaseUnityEngineResolution(handle); + ReleaseUnityEngineAnimationsAnimationMixerPlayable(handle); + } + } + } + + int32_t RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + int32_t* RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; + + void ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); + if (handle != 0) + { + RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]++; + } + } + + void DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(int32_t handle) + { + assert(handle >= 0 && handle < RefCountsLenSystemCollectionsGenericKeyValuePairSystemString_SystemDouble); + if (handle != 0) + { + int32_t numRemain = --RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble[handle]; + if (numRemain == 0) + { + ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(handle); } } } @@ -559,56 +605,6 @@ namespace Plugin *pRelease = (System::BaseStringComparer*)NextFreeSystemBaseStringComparer; NextFreeSystemBaseStringComparer = pRelease; } - int32_t SystemCollectionsBaseICollectionFreeListSize; - System::Collections::BaseICollection** SystemCollectionsBaseICollectionFreeList; - System::Collections::BaseICollection** NextFreeSystemCollectionsBaseICollection; - - int32_t StoreSystemCollectionsBaseICollection(System::Collections::BaseICollection* del) - { - assert(NextFreeSystemCollectionsBaseICollection != nullptr); - System::Collections::BaseICollection** pNext = NextFreeSystemCollectionsBaseICollection; - NextFreeSystemCollectionsBaseICollection = (System::Collections::BaseICollection**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsBaseICollectionFreeList); - } - - System::Collections::BaseICollection* GetSystemCollectionsBaseICollection(int32_t handle) - { - assert(handle >= 0 && handle < SystemCollectionsBaseICollectionFreeListSize); - return SystemCollectionsBaseICollectionFreeList[handle]; - } - - void RemoveSystemCollectionsBaseICollection(int32_t handle) - { - System::Collections::BaseICollection** pRelease = SystemCollectionsBaseICollectionFreeList + handle; - *pRelease = (System::Collections::BaseICollection*)NextFreeSystemCollectionsBaseICollection; - NextFreeSystemCollectionsBaseICollection = pRelease; - } - int32_t SystemCollectionsBaseIListFreeListSize; - System::Collections::BaseIList** SystemCollectionsBaseIListFreeList; - System::Collections::BaseIList** NextFreeSystemCollectionsBaseIList; - - int32_t StoreSystemCollectionsBaseIList(System::Collections::BaseIList* del) - { - assert(NextFreeSystemCollectionsBaseIList != nullptr); - System::Collections::BaseIList** pNext = NextFreeSystemCollectionsBaseIList; - NextFreeSystemCollectionsBaseIList = (System::Collections::BaseIList**)*pNext; - *pNext = del; - return (int32_t)(pNext - SystemCollectionsBaseIListFreeList); - } - - System::Collections::BaseIList* GetSystemCollectionsBaseIList(int32_t handle) - { - assert(handle >= 0 && handle < SystemCollectionsBaseIListFreeListSize); - return SystemCollectionsBaseIListFreeList[handle]; - } - - void RemoveSystemCollectionsBaseIList(int32_t handle) - { - System::Collections::BaseIList** pRelease = SystemCollectionsBaseIListFreeList + handle; - *pRelease = (System::Collections::BaseIList*)NextFreeSystemCollectionsBaseIList; - NextFreeSystemCollectionsBaseIList = pRelease; - } int32_t SystemCollectionsBaseQueueFreeListSize; System::Collections::BaseQueue** SystemCollectionsBaseQueueFreeList; System::Collections::BaseQueue** NextFreeSystemCollectionsBaseQueue; @@ -709,56 +705,6 @@ namespace Plugin } } - int32_t RefCountsLenUnityEnginePlayablesPlayableGraph; - int32_t* RefCountsUnityEnginePlayablesPlayableGraph; - - void ReferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) - { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); - if (handle != 0) - { - RefCountsUnityEnginePlayablesPlayableGraph[handle]++; - } - } - - void DereferenceManagedUnityEnginePlayablesPlayableGraph(int32_t handle) - { - assert(handle >= 0 && handle < RefCountsLenUnityEnginePlayablesPlayableGraph); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEnginePlayablesPlayableGraph[handle]; - if (numRemain == 0) - { - ReleaseUnityEnginePlayablesPlayableGraph(handle); - } - } - } - - int32_t RefCountsLenUnityEngineAnimationsAnimationMixerPlayable; - int32_t* RefCountsUnityEngineAnimationsAnimationMixerPlayable; - - void ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) - { - assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); - if (handle != 0) - { - RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]++; - } - } - - void DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(int32_t handle) - { - assert(handle >= 0 && handle < RefCountsLenUnityEngineAnimationsAnimationMixerPlayable); - if (handle != 0) - { - int32_t numRemain = --RefCountsUnityEngineAnimationsAnimationMixerPlayable[handle]; - if (numRemain == 0) - { - ReleaseUnityEngineAnimationsAnimationMixerPlayable(handle); - } - } - } - int32_t RefCountsLenUnityEngineXRWSAInputInteractionSourcePose; int32_t* RefCountsUnityEngineXRWSAInputInteractionSourcePose; @@ -1100,6 +1046,11 @@ namespace Plugin namespace System { + Object::Object() + : Handle(0) + { + } + Object::Object(Plugin::InternalUse iu, int32_t handle) : Handle(handle) { @@ -1126,13 +1077,13 @@ namespace System } ValueType::ValueType(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - Handle = handle; } ValueType::ValueType(decltype(nullptr) n) + : Object(nullptr) { - Handle = 0; } String::String(decltype(nullptr) n) @@ -1216,196 +1167,112 @@ namespace System { } - Array::Array(Plugin::InternalUse iu, int32_t handle) + ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle) : Object(iu, handle) { } - Array::Array(decltype(nullptr) n) - : Object(Plugin::InternalUse::Only, 0) - { - } - - int32_t Array::GetLength() + ICloneable::ICloneable(decltype(nullptr) n) + : Object(nullptr) { - return Plugin::ArrayGetLength(Handle); } - int32_t Array::GetRank() + namespace Collections { - return 0; - } -} - -/*BEGIN METHOD DEFINITIONS*/ -namespace System -{ - namespace Diagnostics - { - Stopwatch::Stopwatch(decltype(nullptr) n) - : Stopwatch(Plugin::InternalUse::Only, 0) - { - } - - Stopwatch::Stopwatch(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Stopwatch::Stopwatch(const Stopwatch& other) - : Stopwatch(Plugin::InternalUse::Only, other.Handle) - { - } - - Stopwatch::Stopwatch(Stopwatch&& other) - : Stopwatch(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Stopwatch::~Stopwatch() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Stopwatch& Stopwatch::operator=(const Stopwatch& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Stopwatch& Stopwatch::operator=(decltype(nullptr) other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Stopwatch& Stopwatch::operator=(Stopwatch&& other) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; } - bool Stopwatch::operator==(const Stopwatch& other) const + IEnumerable::IEnumerable(decltype(nullptr) n) + : Object(nullptr) { - return Handle == other.Handle; } - bool Stopwatch::operator!=(const Stopwatch& other) const + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , IEnumerable(nullptr) { - return Handle != other.Handle; } - Stopwatch::Stopwatch() - : System::Object(nullptr) + ICollection::ICollection(decltype(nullptr) n) + : Object(nullptr) + , IEnumerable(nullptr) { - auto returnValue = Plugin::SystemDiagnosticsStopwatchConstructor(); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - } } - int64_t Stopwatch::GetElapsedMilliseconds() + IList::IList(Plugin::InternalUse iu, int32_t handle) + : Object(iu, handle) + , IEnumerable(nullptr) + , ICollection(nullptr) { - 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() + IList::IList(decltype(nullptr) n) + : Object(nullptr) + , IEnumerable(nullptr) + , ICollection(nullptr) { - 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; - } - } + 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) n) + : 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 { - Object::Object(decltype(nullptr) n) - : Object(Plugin::InternalUse::Only, 0) + IDisposable::IDisposable(decltype(nullptr) n) { } - Object::Object(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + IDisposable::IDisposable(Plugin::InternalUse iu, int32_t handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - Object::Object(const Object& other) - : Object(Plugin::InternalUse::Only, other.Handle) + IDisposable::IDisposable(const IDisposable& other) + : IDisposable(Plugin::InternalUse::Only, other.Handle) { } - Object::Object(Object&& other) - : Object(Plugin::InternalUse::Only, other.Handle) + IDisposable::IDisposable(IDisposable&& other) + : IDisposable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Object::~Object() + IDisposable::~IDisposable() { if (Handle) { @@ -1414,7 +1281,7 @@ namespace UnityEngine } } - Object& Object::operator=(const Object& other) + IDisposable& IDisposable::operator=(const IDisposable& other) { if (this->Handle) { @@ -1428,7 +1295,7 @@ namespace UnityEngine return *this; } - Object& Object::operator=(decltype(nullptr) other) + IDisposable& IDisposable::operator=(decltype(nullptr) other) { if (Handle) { @@ -1438,7 +1305,7 @@ namespace UnityEngine return *this; } - Object& Object::operator=(Object&& other) + IDisposable& IDisposable::operator=(IDisposable&& other) { if (Handle) { @@ -1449,19 +1316,26 @@ namespace UnityEngine return *this; } - bool Object::operator==(const Object& other) const + bool IDisposable::operator==(const IDisposable& other) const { return Handle == other.Handle; } - bool Object::operator!=(const Object& other) const + bool IDisposable::operator!=(const IDisposable& other) const { return Handle != other.Handle; } +} + +namespace UnityEngine +{ + Vector3::Vector3() + { + } - System::String Object::GetName() + Vector3::Vector3(float x, float y, float z) { - auto returnValue = Plugin::UnityEngineObjectPropertyGetName(Handle); + auto returnValue = Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(x, y, z); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1469,12 +1343,12 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return System::String(Plugin::InternalUse::Only, returnValue); + *this = returnValue; } - void Object::SetName(System::String& value) + float Vector3::GetMagnitude() { - Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); + auto returnValue = Plugin::UnityEngineVector3PropertyGetMagnitude(this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1482,11 +1356,24 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + return returnValue; } - System::Boolean Object::operator==(UnityEngine::Object& x) + void Vector3::Set(float newX, float newY, float newZ) { - auto returnValue = Plugin::UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(Handle, x.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) + { + auto returnValue = Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(*this, a); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1497,9 +1384,9 @@ namespace UnityEngine return returnValue; } - Object::operator System::Boolean() + UnityEngine::Vector3 Vector3::operator-() { - auto returnValue = Plugin::UnityEngineObjectMethodop_ImplicitUnityEngineObject(Handle); + auto returnValue = Plugin::UnityEngineVector3Methodop_UnaryNegationUnityEngineVector3(*this); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1511,34 +1398,66 @@ namespace UnityEngine } } +namespace System +{ + Object::Object(UnityEngine::Vector3& val) + { + 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; + } + } + + Object::operator UnityEngine::Vector3() + { + UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + namespace UnityEngine { - GameObject::GameObject(decltype(nullptr) n) - : GameObject(Plugin::InternalUse::Only, 0) + Object::Object(decltype(nullptr) n) { } - GameObject::GameObject(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Object(iu, handle) + Object::Object(Plugin::InternalUse iu, int32_t handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - GameObject::GameObject(const GameObject& other) - : GameObject(Plugin::InternalUse::Only, other.Handle) + Object::Object(const Object& other) + : Object(Plugin::InternalUse::Only, other.Handle) { } - GameObject::GameObject(GameObject&& other) - : GameObject(Plugin::InternalUse::Only, other.Handle) + Object::Object(Object&& other) + : Object(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - GameObject::~GameObject() + Object::~Object() { if (Handle) { @@ -1547,7 +1466,7 @@ namespace UnityEngine } } - GameObject& GameObject::operator=(const GameObject& other) + Object& Object::operator=(const Object& other) { if (this->Handle) { @@ -1561,7 +1480,7 @@ namespace UnityEngine return *this; } - GameObject& GameObject::operator=(decltype(nullptr) other) + Object& Object::operator=(decltype(nullptr) other) { if (Handle) { @@ -1571,7 +1490,7 @@ namespace UnityEngine return *this; } - GameObject& GameObject::operator=(GameObject&& other) + Object& Object::operator=(Object&& other) { if (Handle) { @@ -1582,55 +1501,19 @@ namespace UnityEngine return *this; } - bool GameObject::operator==(const GameObject& other) const + bool Object::operator==(const Object& other) const { return Handle == other.Handle; } - bool GameObject::operator!=(const GameObject& other) const + bool Object::operator!=(const Object& other) const { return Handle != other.Handle; } - GameObject::GameObject() - : UnityEngine::Object(nullptr) + System::String Object::GetName() { - 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); + auto returnValue = Plugin::UnityEngineObjectPropertyGetName(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1638,12 +1521,12 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); + return System::String(Plugin::InternalUse::Only, returnValue); } - template<> MyGame::MonoBehaviours::TestScript GameObject::AddComponent() + void Object::SetName(System::String& value) { - auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursTestScript(Handle); + Plugin::UnityEngineObjectPropertySetName(Handle, value.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1651,12 +1534,11 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return MyGame::MonoBehaviours::TestScript(Plugin::InternalUse::Only, returnValue); } - template<> MyGame::MonoBehaviours::AnotherScript GameObject::AddComponent() + System::Boolean Object::operator==(UnityEngine::Object& x) { - auto returnValue = Plugin::UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript(Handle); + auto returnValue = Plugin::UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject(Handle, x.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1664,12 +1546,12 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return MyGame::MonoBehaviours::AnotherScript(Plugin::InternalUse::Only, returnValue); + return returnValue; } - UnityEngine::GameObject GameObject::CreatePrimitive(UnityEngine::PrimitiveType type) + Object::operator System::Boolean() { - auto returnValue = Plugin::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType(type); + auto returnValue = Plugin::UnityEngineObjectMethodop_ImplicitUnityEngineObject(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1677,20 +1559,21 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::GameObject(Plugin::InternalUse::Only, returnValue); + return returnValue; } } namespace UnityEngine { Component::Component(decltype(nullptr) n) - : Component(Plugin::InternalUse::Only, 0) + : UnityEngine::Object(nullptr) { } Component::Component(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Object(iu, handle) + : UnityEngine::Object(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -1779,13 +1662,18 @@ namespace UnityEngine namespace UnityEngine { Transform::Transform(decltype(nullptr) n) - : Transform(Plugin::InternalUse::Only, 0) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , System::Collections::IEnumerable(nullptr) { } Transform::Transform(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Component(iu, handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , System::Collections::IEnumerable(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -1885,88 +1773,33 @@ namespace UnityEngine namespace UnityEngine { - Debug::Debug(decltype(nullptr) n) - : Debug(Plugin::InternalUse::Only, 0) - { - } - - Debug::Debug(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Debug::Debug(const Debug& other) - : Debug(Plugin::InternalUse::Only, other.Handle) - { - } - - Debug::Debug(Debug&& other) - : Debug(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Debug::~Debug() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Debug& Debug::operator=(const Debug& other) + Color::Color() { - 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) other) +} + +namespace System +{ + Object::Object(UnityEngine::Color& val) { - if (Handle) + int32_t handle = Plugin::BoxColor(val); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; - } - - Debug& Debug::operator=(Debug&& other) - { - if (Handle) + if (handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); + Handle = 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) + Object::operator UnityEngine::Color() { - Plugin::UnityEngineDebugMethodLogSystemObject(message.Handle); + UnityEngine::Color returnVal(Plugin::UnboxColor(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -1974,312 +1807,326 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + return returnVal; } } namespace UnityEngine { - namespace Assertions + GradientColorKey::GradientColorKey() { - 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) + } +} + +namespace System +{ + Object::Object(UnityEngine::GradientColorKey& val) + { + int32_t handle = Plugin::BoxGradientColorKey(val); + if (Plugin::unhandledCsharpException) { - Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions(value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - template<> void Assert::AreEqual(System::String& expected, System::String& actual) + if (handle) { - Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::ReferenceManagedClass(handle); + Handle = handle; } + } - template<> void Assert::AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual) + Object::operator UnityEngine::GradientColorKey() + { + UnityEngine::GradientColorKey returnVal(Plugin::UnboxGradientColorKey(Handle)); + if (Plugin::unhandledCsharpException) { - Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnVal; } } namespace UnityEngine { - Collision::Collision(decltype(nullptr) n) - : Collision(Plugin::InternalUse::Only, 0) + Resolution::Resolution(decltype(nullptr) n) + : System::ValueType(nullptr) { } - Collision::Collision(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + Resolution::Resolution(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) { + Handle = handle; if (handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedUnityEngineResolution(Handle); } } - Collision::Collision(const Collision& other) - : Collision(Plugin::InternalUse::Only, other.Handle) + Resolution::Resolution(const Resolution& other) + : Resolution(Plugin::InternalUse::Only, other.Handle) { } - Collision::Collision(Collision&& other) - : Collision(Plugin::InternalUse::Only, other.Handle) + Resolution::Resolution(Resolution&& other) + : Resolution(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Collision::~Collision() + Resolution::~Resolution() { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineResolution(Handle); Handle = 0; } } - Collision& Collision::operator=(const Collision& other) + Resolution& Resolution::operator=(const Resolution& other) { if (this->Handle) { - Plugin::DereferenceManagedClass(this->Handle); + Plugin::DereferenceManagedUnityEngineResolution(Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::ReferenceManagedUnityEngineResolution(Handle); } return *this; } - Collision& Collision::operator=(decltype(nullptr) other) + Resolution& Resolution::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineResolution(Handle); Handle = 0; } return *this; } - Collision& Collision::operator=(Collision&& other) + Resolution& Resolution::operator=(Resolution&& other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineResolution(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool Collision::operator==(const Collision& other) const + bool Resolution::operator==(const Resolution& other) const { return Handle == other.Handle; } - bool Collision::operator!=(const Collision& other) const + bool Resolution::operator!=(const Resolution& other) const { return Handle != other.Handle; } -} - -namespace UnityEngine -{ - Behaviour::Behaviour(decltype(nullptr) n) - : Behaviour(Plugin::InternalUse::Only, 0) - { - } - Behaviour::Behaviour(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Component(iu, handle) + int32_t Resolution::GetWidth() { - if (handle) + auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } - Behaviour::Behaviour(const Behaviour& other) - : Behaviour(Plugin::InternalUse::Only, other.Handle) - { - } - - Behaviour::Behaviour(Behaviour&& other) - : Behaviour(Plugin::InternalUse::Only, other.Handle) + void Resolution::SetWidth(int32_t value) { - other.Handle = 0; + Plugin::UnityEngineResolutionPropertySetWidth(Handle, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - Behaviour::~Behaviour() + int32_t Resolution::GetHeight() { - if (Handle) + auto returnValue = Plugin::UnityEngineResolutionPropertyGetHeight(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return returnValue; } - Behaviour& Behaviour::operator=(const Behaviour& other) + void Resolution::SetHeight(int32_t value) { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + Plugin::UnityEngineResolutionPropertySetHeight(Handle, value); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; } - Behaviour& Behaviour::operator=(decltype(nullptr) other) + int32_t Resolution::GetRefreshRate() { - if (Handle) + auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; + return returnValue; } - Behaviour& Behaviour::operator=(Behaviour&& other) + void Resolution::SetRefreshRate(int32_t value) { - if (Handle) + Plugin::UnityEngineResolutionPropertySetRefreshRate(Handle, value); + 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 Behaviour::operator==(const Behaviour& other) const +} + +namespace System +{ + Object::Object(UnityEngine::Resolution& val) { - return Handle == other.Handle; + int32_t handle = Plugin::BoxResolution(val.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + if (handle) + { + Plugin::ReferenceManagedClass(handle); + Handle = handle; + } } - bool Behaviour::operator!=(const Behaviour& other) const + Object::operator UnityEngine::Resolution() { - return Handle != other.Handle; + 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; } } namespace UnityEngine { - MonoBehaviour::MonoBehaviour(decltype(nullptr) n) - : MonoBehaviour(Plugin::InternalUse::Only, 0) + RaycastHit::RaycastHit(decltype(nullptr) n) + : System::ValueType(nullptr) { } - MonoBehaviour::MonoBehaviour(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Behaviour(iu, handle) + RaycastHit::RaycastHit(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) { + Handle = handle; if (handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); } } - MonoBehaviour::MonoBehaviour(const MonoBehaviour& other) - : MonoBehaviour(Plugin::InternalUse::Only, other.Handle) + RaycastHit::RaycastHit(const RaycastHit& other) + : RaycastHit(Plugin::InternalUse::Only, other.Handle) { } - MonoBehaviour::MonoBehaviour(MonoBehaviour&& other) - : MonoBehaviour(Plugin::InternalUse::Only, other.Handle) + RaycastHit::RaycastHit(RaycastHit&& other) + : RaycastHit(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - MonoBehaviour::~MonoBehaviour() + RaycastHit::~RaycastHit() { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); Handle = 0; } } - MonoBehaviour& MonoBehaviour::operator=(const MonoBehaviour& other) + RaycastHit& RaycastHit::operator=(const RaycastHit& other) { if (this->Handle) { - Plugin::DereferenceManagedClass(this->Handle); + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); } return *this; } - MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr) other) + RaycastHit& RaycastHit::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); Handle = 0; } return *this; } - MonoBehaviour& MonoBehaviour::operator=(MonoBehaviour&& other) + RaycastHit& RaycastHit::operator=(RaycastHit&& other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool MonoBehaviour::operator==(const MonoBehaviour& other) const + bool RaycastHit::operator==(const RaycastHit& other) const { return Handle == other.Handle; } - bool MonoBehaviour::operator!=(const MonoBehaviour& other) const + bool RaycastHit::operator!=(const RaycastHit& other) const { return Handle != other.Handle; } - UnityEngine::Transform MonoBehaviour::GetTransform() + UnityEngine::Vector3 RaycastHit::GetPoint() { - auto returnValue = Plugin::UnityEngineMonoBehaviourPropertyGetTransform(Handle); + auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetPoint(Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2287,94 +2134,57 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); - } -} - -namespace UnityEngine -{ - AudioSettings::AudioSettings(decltype(nullptr) n) - : AudioSettings(Plugin::InternalUse::Only, 0) - { - } - - AudioSettings::AudioSettings(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - AudioSettings::AudioSettings(const AudioSettings& other) - : AudioSettings(Plugin::InternalUse::Only, other.Handle) - { - } - - AudioSettings::AudioSettings(AudioSettings&& other) - : AudioSettings(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; + return returnValue; } - AudioSettings::~AudioSettings() + void RaycastHit::SetPoint(UnityEngine::Vector3& value) { - if (Handle) + Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } - AudioSettings& AudioSettings::operator=(const AudioSettings& other) + UnityEngine::Transform RaycastHit::GetTransform() { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetTransform(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::ReferenceManagedClass(this->Handle); + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; + return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); } - - AudioSettings& AudioSettings::operator=(decltype(nullptr) other) +} + +namespace System +{ + Object::Object(UnityEngine::RaycastHit& val) { - if (Handle) + int32_t handle = Plugin::BoxRaycastHit(val.Handle); + 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); + Handle = handle; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool AudioSettings::operator==(const AudioSettings& other) const - { - return Handle == other.Handle; - } - - bool AudioSettings::operator!=(const AudioSettings& other) const - { - return Handle != other.Handle; } - void AudioSettings::GetDSPBufferSize(int32_t* bufferLength, int32_t* numBuffers) + Object::operator UnityEngine::RaycastHit() { - Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(bufferLength, numBuffers); + UnityEngine::RaycastHit returnVal(Plugin::InternalUse::Only, Plugin::UnboxRaycastHit(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -2382,720 +2192,943 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + return returnVal; } } -namespace UnityEngine +namespace System { - namespace Networking + namespace Collections { - NetworkTransport::NetworkTransport(decltype(nullptr) n) - : NetworkTransport(Plugin::InternalUse::Only, 0) - { - } - - NetworkTransport::NetworkTransport(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + namespace Generic { - if (handle) + IEnumerable::IEnumerable(decltype(nullptr) n) + : System::Collections::IEnumerable(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) + + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - } - - NetworkTransport& NetworkTransport::operator=(const NetworkTransport& 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) { - Plugin::ReferenceManagedClass(this->Handle); + other.Handle = 0; } - return *this; - } - - NetworkTransport& NetworkTransport::operator=(decltype(nullptr) other) - { - if (Handle) + + IEnumerable::~IEnumerable() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - return *this; - } - - NetworkTransport& NetworkTransport::operator=(NetworkTransport&& other) - { - if (Handle) + + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { - Plugin::DereferenceManagedClass(Handle); + if (this->Handle) + { + 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 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) + + IEnumerable& IEnumerable::operator=(decltype(nullptr) other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - if (address->Handle) + + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { - Plugin::DereferenceManagedClass(address->Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - address->Handle = addressHandle; - if (address->Handle) + + bool IEnumerable::operator==(const IEnumerable& other) const { - Plugin::ReferenceManagedClass(address->Handle); + return Handle == other.Handle; } - } - - void NetworkTransport::Init() - { - Plugin::UnityEngineNetworkingNetworkTransportMethodInit(); - if (Plugin::unhandledCsharpException) + + bool IEnumerable::operator!=(const IEnumerable& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle != other.Handle; } } } } -namespace UnityEngine +namespace System { - Vector3::Vector3() - { - } - - Vector3::Vector3(float x, float y, float z) - { - auto returnValue = Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle(x, y, z); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - *this = returnValue; - } - - float Vector3::GetMagnitude() - { - auto returnValue = Plugin::UnityEngineVector3PropertyGetMagnitude(this); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void Vector3::Set(float newX, float newY, float newZ) + namespace Collections { - Plugin::UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle(this, newX, newY, newZ); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + IEnumerable::IEnumerable(decltype(nullptr) n) + : 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) other) + { + 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; + } } } - - UnityEngine::Vector3 Vector3::operator+(UnityEngine::Vector3& a) +} + +namespace System +{ + namespace Collections { - auto returnValue = Plugin::UnityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3(*this, a); - if (Plugin::unhandledCsharpException) + namespace Generic { - 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; + IEnumerable::IEnumerable(decltype(nullptr) n) + : 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) other) + { + 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; + } } - return returnValue; } } namespace System { - Object::Object(UnityEngine::Vector3& val) - { - 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; - } - } - - Object::operator UnityEngine::Vector3() + namespace Collections { - UnityEngine::Vector3 returnVal(Plugin::UnboxVector3(Handle)); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + IEnumerable::IEnumerable(decltype(nullptr) n) + : 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) other) + { + 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; + } } - return returnVal; } } -namespace UnityEngine +namespace System { - Quaternion::Quaternion() + namespace Collections { + namespace Generic + { + IEnumerable::IEnumerable(decltype(nullptr) n) + : 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) other) + { + 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; + } + } } } namespace System { - Object::Object(UnityEngine::Quaternion& val) + namespace Collections { - int32_t handle = Plugin::BoxQuaternion(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + namespace Generic { - 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; + IEnumerable::IEnumerable(decltype(nullptr) n) + : 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) other) + { + 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; + } } - return returnVal; } } -namespace UnityEngine +namespace System { - 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) + namespace Collections { - Plugin::UnityEngineMatrix4x4PropertySetItem(this, row, column, value); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + ICollection::ICollection(decltype(nullptr) n) + : 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) other) + { + 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 System { - Object::Object(UnityEngine::Matrix4x4& val) + namespace Collections { - int32_t handle = Plugin::BoxMatrix4x4(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + namespace Generic { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + ICollection::ICollection(decltype(nullptr) n) + : 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) other) + { + 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; + } } } - - Object::operator UnityEngine::Matrix4x4() +} + +namespace System +{ + namespace Collections { - UnityEngine::Matrix4x4 returnVal(Plugin::UnboxMatrix4x4(Handle)); - if (Plugin::unhandledCsharpException) + namespace Generic { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - -namespace UnityEngine -{ - RaycastHit::RaycastHit(decltype(nullptr) n) - : RaycastHit(Plugin::InternalUse::Only, 0) - { - } - - RaycastHit::RaycastHit(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); - } - } - - RaycastHit::RaycastHit(const RaycastHit& other) - : RaycastHit(Plugin::InternalUse::Only, other.Handle) - { - } - - RaycastHit::RaycastHit(RaycastHit&& other) - : RaycastHit(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - RaycastHit::~RaycastHit() - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); - Handle = 0; - } - } - - RaycastHit& RaycastHit::operator=(const RaycastHit& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedUnityEngineRaycastHit(Handle); - } - return *this; - } - - RaycastHit& RaycastHit::operator=(decltype(nullptr) other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); - Handle = 0; - } - return *this; - } - - RaycastHit& RaycastHit::operator=(RaycastHit&& other) - { - if (Handle) - { - Plugin::DereferenceManagedUnityEngineRaycastHit(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool RaycastHit::operator==(const RaycastHit& other) const - { - return Handle == other.Handle; - } - - bool RaycastHit::operator!=(const RaycastHit& other) const - { - return Handle != other.Handle; - } - - UnityEngine::Vector3 RaycastHit::GetPoint() - { - auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetPoint(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnValue; - } - - void RaycastHit::SetPoint(UnityEngine::Vector3& value) - { - Plugin::UnityEngineRaycastHitPropertySetPoint(Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - UnityEngine::Transform RaycastHit::GetTransform() - { - auto returnValue = Plugin::UnityEngineRaycastHitPropertyGetTransform(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return UnityEngine::Transform(Plugin::InternalUse::Only, returnValue); - } -} - -namespace System -{ - Object::Object(UnityEngine::RaycastHit& val) - { - int32_t handle = Plugin::BoxRaycastHit(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::RaycastHit() - { - UnityEngine::RaycastHit returnVal(Plugin::InternalUse::Only, Plugin::UnboxRaycastHit(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) n) - : KeyValuePair(Plugin::InternalUse::Only, 0) + ICollection::ICollection(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { } - KeyValuePair::KeyValuePair(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, handle) + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { + Handle = handle; if (handle) { - Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::ReferenceManagedClass(handle); } } - KeyValuePair::KeyValuePair(const KeyValuePair& other) - : KeyValuePair(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { } - KeyValuePair::KeyValuePair(KeyValuePair&& other) - : KeyValuePair(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - KeyValuePair::~KeyValuePair() + ICollection::~ICollection() { if (Handle) { - Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } } - KeyValuePair& KeyValuePair::operator=(const KeyValuePair& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { - Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::DereferenceManagedClass(this->Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::ReferenceManagedClass(this->Handle); } return *this; } - KeyValuePair& KeyValuePair::operator=(decltype(nullptr) other) + ICollection& ICollection::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::DereferenceManagedClass(Handle); Handle = 0; } return *this; } - KeyValuePair& KeyValuePair::operator=(KeyValuePair&& other) + ICollection& ICollection::operator=(ICollection&& other) { if (Handle) { - Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool KeyValuePair::operator==(const KeyValuePair& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool KeyValuePair::operator!=(const KeyValuePair& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + ICollection::ICollection(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + { + } - KeyValuePair::KeyValuePair(System::String& key, double value) - : System::ValueType(nullptr) + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { - auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(key.Handle, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + Plugin::ReferenceManagedClass(handle); } } - System::String KeyValuePair::GetKey() + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { - auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + } + + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + ICollection::~ICollection() + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return System::String(Plugin::InternalUse::Only, returnValue); } - double KeyValuePair::GetValue() + ICollection& ICollection::operator=(const ICollection& other) { - auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(Handle); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); } - return returnValue; + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; + } + + ICollection& ICollection::operator=(decltype(nullptr) other) + { + 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 System -{ - Object::Object(System::Collections::Generic::KeyValuePair& val) - { - 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)); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return returnVal; - } -} - namespace System { namespace Collections { namespace Generic { - List::List(decltype(nullptr) n) - : List(Plugin::InternalUse::Only, 0) + ICollection::ICollection(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { } - List::List(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - List::List(const List& other) - : List(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { } - List::List(List&& other) - : List(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - List::~List() + ICollection::~ICollection() { if (Handle) { @@ -3104,7 +3137,7 @@ namespace System } } - List& List::operator=(const List& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -3118,7 +3151,7 @@ namespace System return *this; } - List& List::operator=(decltype(nullptr) other) + ICollection& ICollection::operator=(decltype(nullptr) other) { if (Handle) { @@ -3128,7 +3161,7 @@ namespace System return *this; } - List& List::operator=(List&& other) + ICollection& ICollection::operator=(ICollection&& other) { if (Handle) { @@ -3139,82 +3172,15 @@ namespace System return *this; } - bool List::operator==(const List& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool List::operator!=(const List& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } - - List::List() - : System::Object(nullptr) - { - auto returnValue = Plugin::SystemCollectionsGenericListSystemStringConstructor(); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - Handle = returnValue; - if (returnValue) - { - Plugin::ReferenceManagedClass(returnValue); - } - } - - System::String List::GetItem(int32_t index) - { - auto returnValue = Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem(Handle, index); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::String(Plugin::InternalUse::Only, returnValue); - } - - void List::SetItem(int32_t index, System::String& value) - { - Plugin::SystemCollectionsGenericListSystemStringPropertySetItem(Handle, index, value.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - void List::Add(System::String& item) - { - Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString(Handle, item.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - 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; - } - } } } } @@ -3225,32 +3191,35 @@ namespace System { namespace Generic { - List::List(decltype(nullptr) n) - : List(Plugin::InternalUse::Only, 0) + ICollection::ICollection(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { } - List::List(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - List::List(const List& other) - : List(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { } - List::List(List&& other) - : List(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - List::~List() + ICollection::~ICollection() { if (Handle) { @@ -3259,7 +3228,7 @@ namespace System } } - List& List::operator=(const List& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -3273,7 +3242,7 @@ namespace System return *this; } - List& List::operator=(decltype(nullptr) other) + ICollection& ICollection::operator=(decltype(nullptr) other) { if (Handle) { @@ -3283,7 +3252,7 @@ namespace System return *this; } - List& List::operator=(List&& other) + ICollection& ICollection::operator=(ICollection&& other) { if (Handle) { @@ -3294,82 +3263,15 @@ namespace System return *this; } - bool List::operator==(const List& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool List::operator!=(const List& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } - - List::List() - : System::Object(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); - } - } - - 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) - { - Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } - - 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) - { - Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } } } } @@ -3380,32 +3282,37 @@ namespace System { namespace Generic { - LinkedListNode::LinkedListNode(decltype(nullptr) n) - : LinkedListNode(Plugin::InternalUse::Only, 0) + IList::IList(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - LinkedListNode::LinkedListNode(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + 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); } } - LinkedListNode::LinkedListNode(const LinkedListNode& other) - : LinkedListNode(Plugin::InternalUse::Only, other.Handle) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - LinkedListNode::LinkedListNode(LinkedListNode&& other) - : LinkedListNode(Plugin::InternalUse::Only, other.Handle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - LinkedListNode::~LinkedListNode() + IList::~IList() { if (Handle) { @@ -3414,7 +3321,7 @@ namespace System } } - LinkedListNode& LinkedListNode::operator=(const LinkedListNode& other) + IList& IList::operator=(const IList& other) { if (this->Handle) { @@ -3428,7 +3335,7 @@ namespace System return *this; } - LinkedListNode& LinkedListNode::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr) other) { if (Handle) { @@ -3438,7 +3345,7 @@ namespace System return *this; } - LinkedListNode& LinkedListNode::operator=(LinkedListNode&& other) + IList& IList::operator=(IList&& other) { if (Handle) { @@ -3449,57 +3356,107 @@ namespace System return *this; } - bool LinkedListNode::operator==(const LinkedListNode& other) const + bool IList::operator==(const IList& other) const { return Handle == other.Handle; } - bool LinkedListNode::operator!=(const LinkedListNode& other) const + bool IList::operator!=(const IList& other) const { return Handle != other.Handle; } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IList::IList(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + { + } - LinkedListNode::LinkedListNode(System::String& value) - : System::Object(nullptr) + IList::IList(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringConstructorSystemString(value.Handle); - 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) + } + + 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::ReferenceManagedClass(returnValue); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - System::String LinkedListNode::GetValue() + IList& IList::operator=(const IList& other) { - auto returnValue = Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertyGetValue(Handle); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); } - return System::String(Plugin::InternalUse::Only, returnValue); + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - void LinkedListNode::SetValue(System::String& value) + IList& IList::operator=(decltype(nullptr) other) { - Plugin::SystemCollectionsGenericLinkedListNodeSystemStringPropertySetValue(Handle, value.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; + } + + 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; } } } @@ -3507,36 +3464,41 @@ namespace System namespace System { - namespace Runtime + namespace Collections { - namespace CompilerServices + namespace Generic { - StrongBox::StrongBox(decltype(nullptr) n) - : StrongBox(Plugin::InternalUse::Only, 0) + IList::IList(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - StrongBox::StrongBox(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + 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); } } - StrongBox::StrongBox(const StrongBox& other) - : StrongBox(Plugin::InternalUse::Only, other.Handle) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - StrongBox::StrongBox(StrongBox&& other) - : StrongBox(Plugin::InternalUse::Only, other.Handle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - StrongBox::~StrongBox() + IList::~IList() { if (Handle) { @@ -3545,7 +3507,7 @@ namespace System } } - StrongBox& StrongBox::operator=(const StrongBox& other) + IList& IList::operator=(const IList& other) { if (this->Handle) { @@ -3559,7 +3521,7 @@ namespace System return *this; } - StrongBox& StrongBox::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr) other) { if (Handle) { @@ -3569,7 +3531,7 @@ namespace System return *this; } - StrongBox& StrongBox::operator=(StrongBox&& other) + IList& IList::operator=(IList&& other) { if (Handle) { @@ -3580,57 +3542,107 @@ namespace System return *this; } - bool StrongBox::operator==(const StrongBox& other) const + bool IList::operator==(const IList& other) const { return Handle == other.Handle; } - bool StrongBox::operator!=(const StrongBox& other) const + bool IList::operator!=(const IList& other) const { return Handle != other.Handle; } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + IList::IList(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) + { + } - StrongBox::StrongBox(System::String& value) - : System::Object(nullptr) + IList::IList(Plugin::InternalUse iu, int32_t handle) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { - auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringConstructorSystemString(value.Handle); - 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) + } + + 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::ReferenceManagedClass(returnValue); + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } } - System::String StrongBox::GetValue() + IList& IList::operator=(const IList& other) { - auto returnValue = Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue(Handle); - if (Plugin::unhandledCsharpException) + if (this->Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(this->Handle); } - return System::String(Plugin::InternalUse::Only, returnValue); + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - void StrongBox::SetValue(System::String& value) + IList& IList::operator=(decltype(nullptr) other) { - Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue(Handle, value.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; + } + + 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; } } } @@ -3640,34 +3652,39 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - Collection::Collection(decltype(nullptr) n) - : Collection(Plugin::InternalUse::Only, 0) + IList::IList(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - Collection::Collection(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + 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); } } - Collection::Collection(const Collection& other) - : Collection(Plugin::InternalUse::Only, other.Handle) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - Collection::Collection(Collection&& other) - : Collection(Plugin::InternalUse::Only, other.Handle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Collection::~Collection() + IList::~IList() { if (Handle) { @@ -3676,7 +3693,7 @@ namespace System } } - Collection& Collection::operator=(const Collection& other) + IList& IList::operator=(const IList& other) { if (this->Handle) { @@ -3690,7 +3707,7 @@ namespace System return *this; } - Collection& Collection::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr) other) { if (Handle) { @@ -3700,7 +3717,7 @@ namespace System return *this; } - Collection& Collection::operator=(Collection&& other) + IList& IList::operator=(IList&& other) { if (Handle) { @@ -3711,12 +3728,12 @@ namespace System return *this; } - bool Collection::operator==(const Collection& other) const + bool IList::operator==(const IList& other) const { return Handle == other.Handle; } - bool Collection::operator!=(const Collection& other) const + bool IList::operator!=(const IList& other) const { return Handle != other.Handle; } @@ -3728,34 +3745,39 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - KeyedCollection::KeyedCollection(decltype(nullptr) n) - : KeyedCollection(Plugin::InternalUse::Only, 0) + IList::IList(decltype(nullptr) n) + : System::Collections::IEnumerable(nullptr) + , System::Collections::Generic::IEnumerable(nullptr) + , System::Collections::Generic::ICollection(nullptr) { } - KeyedCollection::KeyedCollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::ObjectModel::Collection(iu, handle) + 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); } } - KeyedCollection::KeyedCollection(const KeyedCollection& other) - : KeyedCollection(Plugin::InternalUse::Only, other.Handle) + IList::IList(const IList& other) + : IList(Plugin::InternalUse::Only, other.Handle) { } - KeyedCollection::KeyedCollection(KeyedCollection&& other) - : KeyedCollection(Plugin::InternalUse::Only, other.Handle) + IList::IList(IList&& other) + : IList(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - KeyedCollection::~KeyedCollection() + IList::~IList() { if (Handle) { @@ -3764,7 +3786,7 @@ namespace System } } - KeyedCollection& KeyedCollection::operator=(const KeyedCollection& other) + IList& IList::operator=(const IList& other) { if (this->Handle) { @@ -3778,7 +3800,7 @@ namespace System return *this; } - KeyedCollection& KeyedCollection::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr) other) { if (Handle) { @@ -3788,7 +3810,7 @@ namespace System return *this; } - KeyedCollection& KeyedCollection::operator=(KeyedCollection&& other) + IList& IList::operator=(IList&& other) { if (Handle) { @@ -3799,12 +3821,12 @@ namespace System return *this; } - bool KeyedCollection::operator==(const KeyedCollection& other) const + bool IList::operator==(const IList& other) const { return Handle == other.Handle; } - bool KeyedCollection::operator!=(const KeyedCollection& other) const + bool IList::operator!=(const IList& other) const { return Handle != other.Handle; } @@ -3814,132 +3836,205 @@ namespace System namespace System { - Exception::Exception(decltype(nullptr) n) - : Exception(Plugin::InternalUse::Only, 0) - { - } - - Exception::Exception(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } - } - - Exception::Exception(const Exception& other) - : Exception(Plugin::InternalUse::Only, other.Handle) - { - } - - Exception::Exception(Exception&& other) - : Exception(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Exception::~Exception() - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - } - - Exception& Exception::operator=(const Exception& other) + namespace Runtime { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) + namespace Serialization { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - Exception& Exception::operator=(decltype(nullptr) other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; - } - - Exception& Exception::operator=(Exception&& other) - { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); + ISerializable::ISerializable(decltype(nullptr) n) + { + } + + ISerializable::ISerializable(Plugin::InternalUse iu, 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) other) + { + 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 Exception::operator==(const Exception& other) const - { - return Handle == other.Handle; - } - - bool Exception::operator!=(const Exception& other) const - { - return Handle != other.Handle; - } - - Exception::Exception(System::String& message) - : System::Object(nullptr) +} + +namespace System +{ + namespace Runtime { - 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) + namespace InteropServices { - Plugin::ReferenceManagedClass(returnValue); + _Exception::_Exception(decltype(nullptr) n) + { + } + + _Exception::_Exception(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + _Exception& _Exception::operator=(_Exception&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool _Exception::operator==(const _Exception& other) const + { + return Handle == other.Handle; + } + + bool _Exception::operator!=(const _Exception& other) const + { + return Handle != other.Handle; + } } } } namespace System { - SystemException::SystemException(decltype(nullptr) n) - : SystemException(Plugin::InternalUse::Only, 0) + IAppDomainSetup::IAppDomainSetup(decltype(nullptr) n) { } - SystemException::SystemException(Plugin::InternalUse iu, int32_t handle) - : System::Exception(iu, handle) + IAppDomainSetup::IAppDomainSetup(Plugin::InternalUse iu, int32_t handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - SystemException::SystemException(const SystemException& other) - : SystemException(Plugin::InternalUse::Only, other.Handle) + IAppDomainSetup::IAppDomainSetup(const IAppDomainSetup& other) + : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) { } - SystemException::SystemException(SystemException&& other) - : SystemException(Plugin::InternalUse::Only, other.Handle) + IAppDomainSetup::IAppDomainSetup(IAppDomainSetup&& other) + : IAppDomainSetup(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - SystemException::~SystemException() + IAppDomainSetup::~IAppDomainSetup() { if (Handle) { @@ -3948,7 +4043,7 @@ namespace System } } - SystemException& SystemException::operator=(const SystemException& other) + IAppDomainSetup& IAppDomainSetup::operator=(const IAppDomainSetup& other) { if (this->Handle) { @@ -3962,7 +4057,7 @@ namespace System return *this; } - SystemException& SystemException::operator=(decltype(nullptr) other) + IAppDomainSetup& IAppDomainSetup::operator=(decltype(nullptr) other) { if (Handle) { @@ -3972,7 +4067,7 @@ namespace System return *this; } - SystemException& SystemException::operator=(SystemException&& other) + IAppDomainSetup& IAppDomainSetup::operator=(IAppDomainSetup&& other) { if (Handle) { @@ -3983,12 +4078,12 @@ namespace System return *this; } - bool SystemException::operator==(const SystemException& other) const + bool IAppDomainSetup::operator==(const IAppDomainSetup& other) const { return Handle == other.Handle; } - bool SystemException::operator!=(const SystemException& other) const + bool IAppDomainSetup::operator!=(const IAppDomainSetup& other) const { return Handle != other.Handle; } @@ -3996,476 +4091,437 @@ namespace System namespace System { - NullReferenceException::NullReferenceException(decltype(nullptr) n) - : NullReferenceException(Plugin::InternalUse::Only, 0) - { - } - - NullReferenceException::NullReferenceException(Plugin::InternalUse iu, int32_t handle) - : System::SystemException(iu, handle) + namespace Collections { - if (handle) + IComparer::IComparer(decltype(nullptr) n) { - 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) + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - } - - NullReferenceException& NullReferenceException::operator=(const NullReferenceException& other) - { - if (this->Handle) + + IComparer::IComparer(const IComparer& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + IComparer::IComparer(IComparer&& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); + other.Handle = 0; } - return *this; - } - - NullReferenceException& NullReferenceException::operator=(decltype(nullptr) other) - { - if (Handle) + + IComparer::~IComparer() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - return *this; - } - - NullReferenceException& NullReferenceException::operator=(NullReferenceException&& other) - { - if (Handle) + + IComparer& IComparer::operator=(const IComparer& other) { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool NullReferenceException::operator==(const NullReferenceException& other) const - { - return Handle == other.Handle; - } - - bool NullReferenceException::operator!=(const NullReferenceException& other) const - { - return Handle != other.Handle; - } -} - -namespace UnityEngine -{ - Resolution::Resolution(decltype(nullptr) n) - : Resolution(Plugin::InternalUse::Only, 0) - { - } - - Resolution::Resolution(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, handle) - { - if (handle) - { - Plugin::ReferenceManagedUnityEngineResolution(Handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - } - - Resolution::Resolution(const Resolution& other) - : Resolution(Plugin::InternalUse::Only, other.Handle) - { - } - - Resolution::Resolution(Resolution&& other) - : Resolution(Plugin::InternalUse::Only, other.Handle) - { - other.Handle = 0; - } - - Resolution::~Resolution() - { - if (Handle) + + IComparer& IComparer::operator=(decltype(nullptr) other) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - } - - Resolution& Resolution::operator=(const Resolution& other) - { - if (this->Handle) + + IComparer& IComparer::operator=(IComparer&& other) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - this->Handle = other.Handle; - if (this->Handle) + + bool IComparer::operator==(const IComparer& other) const { - Plugin::ReferenceManagedUnityEngineResolution(Handle); + return Handle == other.Handle; } - return *this; - } - - Resolution& Resolution::operator=(decltype(nullptr) other) - { - if (Handle) + + bool IComparer::operator!=(const IComparer& other) const { - Plugin::DereferenceManagedUnityEngineResolution(Handle); - Handle = 0; + return Handle != other.Handle; } - return *this; } - - Resolution& Resolution::operator=(Resolution&& other) +} + +namespace System +{ + namespace Collections { - if (Handle) + IEqualityComparer::IEqualityComparer(decltype(nullptr) n) { - Plugin::DereferenceManagedUnityEngineResolution(Handle); } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Resolution::operator==(const Resolution& other) const - { - return Handle == other.Handle; - } - - bool Resolution::operator!=(const Resolution& other) const - { - return Handle != other.Handle; - } - - int32_t Resolution::GetWidth() - { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetWidth(Handle); - if (Plugin::unhandledCsharpException) + + IEqualityComparer::IEqualityComparer(Plugin::InternalUse iu, int32_t handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - return returnValue; - } - - void Resolution::SetWidth(int32_t value) - { - Plugin::UnityEngineResolutionPropertySetWidth(Handle, value); - if (Plugin::unhandledCsharpException) + + IEqualityComparer::IEqualityComparer(const IEqualityComparer& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.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) + + IEqualityComparer::IEqualityComparer(IEqualityComparer&& other) + : IEqualityComparer(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + other.Handle = 0; } - return returnValue; - } - - void Resolution::SetHeight(int32_t value) - { - Plugin::UnityEngineResolutionPropertySetHeight(Handle, value); - if (Plugin::unhandledCsharpException) + + IEqualityComparer::~IEqualityComparer() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - } - - int32_t Resolution::GetRefreshRate() - { - auto returnValue = Plugin::UnityEngineResolutionPropertyGetRefreshRate(Handle); - if (Plugin::unhandledCsharpException) + + IEqualityComparer& IEqualityComparer::operator=(const IEqualityComparer& 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 returnValue; - } - - void Resolution::SetRefreshRate(int32_t value) - { - Plugin::UnityEngineResolutionPropertySetRefreshRate(Handle, value); - if (Plugin::unhandledCsharpException) + + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr) other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - } -} - -namespace System -{ - Object::Object(UnityEngine::Resolution& val) - { - int32_t handle = Plugin::BoxResolution(val.Handle); - if (Plugin::unhandledCsharpException) + + IEqualityComparer& IEqualityComparer::operator=(IEqualityComparer&& other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - if (handle) + + bool IEqualityComparer::operator==(const IEqualityComparer& other) const { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + return Handle == other.Handle; } - } - - Object::operator UnityEngine::Resolution() - { - UnityEngine::Resolution returnVal(Plugin::InternalUse::Only, Plugin::UnboxResolution(Handle)); - if (Plugin::unhandledCsharpException) + + bool IEqualityComparer::operator!=(const IEqualityComparer& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle != other.Handle; } - return returnVal; } } -namespace UnityEngine +namespace System { - Screen::Screen(decltype(nullptr) n) - : Screen(Plugin::InternalUse::Only, 0) - { - } - - Screen::Screen(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + namespace Collections { - if (handle) + namespace Generic { - Plugin::ReferenceManagedClass(handle); + IEqualityComparer::IEqualityComparer(decltype(nullptr) n) + { + } + + IEqualityComparer::IEqualityComparer(Plugin::InternalUse iu, 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) other) + { + 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; + } } } - - 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() +} + +namespace System +{ + namespace Collections { - if (Handle) + namespace Generic { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + IEqualityComparer::IEqualityComparer(decltype(nullptr) n) + { + } + + IEqualityComparer::IEqualityComparer(Plugin::InternalUse iu, 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) other) + { + 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; + } } } - - Screen& Screen::operator=(const Screen& other) +} + +namespace UnityEngine +{ + namespace Playables { - if (this->Handle) + PlayableGraph::PlayableGraph(decltype(nullptr) n) + : System::ValueType(nullptr) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + PlayableGraph::PlayableGraph(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) { - Plugin::ReferenceManagedClass(this->Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + } } - return *this; - } - - Screen& Screen::operator=(decltype(nullptr) other) - { - if (Handle) + + PlayableGraph::PlayableGraph(const PlayableGraph& other) + : PlayableGraph(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - return *this; - } - - Screen& Screen::operator=(Screen&& other) - { - if (Handle) + + PlayableGraph::PlayableGraph(PlayableGraph&& other) + : PlayableGraph(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); + other.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) + + PlayableGraph::~PlayableGraph() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Handle = 0; + } } - return System::Array1(Plugin::InternalUse::Only, returnValue); - } -} - -namespace UnityEngine -{ - Ray::Ray(decltype(nullptr) n) - : Ray(Plugin::InternalUse::Only, 0) - { - } - - Ray::Ray(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, handle) - { - if (handle) + + PlayableGraph& PlayableGraph::operator=(const PlayableGraph& other) { - Plugin::ReferenceManagedUnityEngineRay(Handle); + if (this->Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + } + 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) - { - 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) other) - { - if (Handle) + + PlayableGraph& PlayableGraph::operator=(decltype(nullptr) other) { - Plugin::DereferenceManagedUnityEngineRay(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + Handle = 0; + } + return *this; } - return *this; - } - - Ray& Ray::operator=(Ray&& other) - { - if (Handle) + + PlayableGraph& PlayableGraph::operator=(PlayableGraph&& other) { - Plugin::DereferenceManagedUnityEngineRay(Handle); + if (Handle) + { + Plugin::DereferenceManagedUnityEnginePlayablesPlayableGraph(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - 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) - { - auto returnValue = Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3(origin, direction); - if (Plugin::unhandledCsharpException) + + bool PlayableGraph::operator==(const PlayableGraph& other) const { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + return Handle == other.Handle; } - Handle = returnValue; - if (returnValue) + + bool PlayableGraph::operator!=(const PlayableGraph& other) const { - Plugin::ReferenceManagedUnityEngineRay(Handle); + return Handle != other.Handle; } } } namespace System { - Object::Object(UnityEngine::Ray& val) + Object::Object(UnityEngine::Playables::PlayableGraph& val) { - int32_t handle = Plugin::BoxRay(val.Handle); + int32_t handle = Plugin::BoxPlayableGraph(val.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4480,9 +4536,9 @@ namespace System } } - Object::operator UnityEngine::Ray() + Object::operator UnityEngine::Playables::PlayableGraph() { - UnityEngine::Ray returnVal(Plugin::InternalUse::Only, Plugin::UnboxRay(Handle)); + UnityEngine::Playables::PlayableGraph returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableGraph(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4496,32 +4552,115 @@ namespace System namespace UnityEngine { - Physics::Physics(decltype(nullptr) n) - : Physics(Plugin::InternalUse::Only, 0) + namespace Playables + { + IPlayable::IPlayable(decltype(nullptr) n) + { + } + + IPlayable::IPlayable(Plugin::InternalUse iu, 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) other) + { + 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) n) { } - Physics::Physics(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + IEquatable::IEquatable(Plugin::InternalUse iu, int32_t handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - Physics::Physics(const Physics& other) - : Physics(Plugin::InternalUse::Only, other.Handle) + IEquatable::IEquatable(const IEquatable& other) + : IEquatable(Plugin::InternalUse::Only, other.Handle) { } - Physics::Physics(Physics&& other) - : Physics(Plugin::InternalUse::Only, other.Handle) + IEquatable::IEquatable(IEquatable&& other) + : IEquatable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Physics::~Physics() + IEquatable::~IEquatable() { if (Handle) { @@ -4530,7 +4669,7 @@ namespace UnityEngine } } - Physics& Physics::operator=(const Physics& other) + IEquatable& IEquatable::operator=(const IEquatable& other) { if (this->Handle) { @@ -4544,7 +4683,7 @@ namespace UnityEngine return *this; } - Physics& Physics::operator=(decltype(nullptr) other) + IEquatable& IEquatable::operator=(decltype(nullptr) other) { if (Handle) { @@ -4554,7 +4693,7 @@ namespace UnityEngine return *this; } - Physics& Physics::operator=(Physics&& other) + IEquatable& IEquatable::operator=(IEquatable&& other) { if (Handle) { @@ -4565,208 +4704,125 @@ namespace UnityEngine return *this; } - bool Physics::operator==(const Physics& other) const + bool IEquatable::operator==(const IEquatable& other) const { return Handle == other.Handle; } - bool Physics::operator!=(const Physics& other) const + bool IEquatable::operator!=(const IEquatable& 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) - { - 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 { - Color::Color() - { - } -} - -namespace System -{ - Object::Object(UnityEngine::Color& val) + namespace Animations { - int32_t handle = Plugin::BoxColor(val); - if (Plugin::unhandledCsharpException) + AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr) n) + : System::ValueType(nullptr) + , System::IEquatable(nullptr) + , UnityEngine::Playables::IPlayable(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - if (handle) + + AnimationMixerPlayable::AnimationMixerPlayable(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) + , System::IEquatable(nullptr) + , UnityEngine::Playables::IPlayable(nullptr) { - Plugin::ReferenceManagedClass(handle); Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + } } - } - - Object::operator UnityEngine::Color() - { - UnityEngine::Color returnVal(Plugin::UnboxColor(Handle)); - if (Plugin::unhandledCsharpException) + + AnimationMixerPlayable::AnimationMixerPlayable(const AnimationMixerPlayable& other) + : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - return returnVal; - } -} - -namespace UnityEngine -{ - GradientColorKey::GradientColorKey() - { - } -} - -namespace System -{ - Object::Object(UnityEngine::GradientColorKey& val) - { - int32_t handle = Plugin::BoxGradientColorKey(val); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (handle) + + AnimationMixerPlayable::AnimationMixerPlayable(AnimationMixerPlayable&& other) + : AnimationMixerPlayable(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(handle); - Handle = handle; + other.Handle = 0; } - } - - Object::operator UnityEngine::GradientColorKey() - { - UnityEngine::GradientColorKey returnVal(Plugin::UnboxGradientColorKey(Handle)); - if (Plugin::unhandledCsharpException) + + AnimationMixerPlayable::~AnimationMixerPlayable() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Handle = 0; + } } - return returnVal; - } -} - -namespace UnityEngine -{ - Gradient::Gradient(decltype(nullptr) n) - : Gradient(Plugin::InternalUse::Only, 0) - { - } - - Gradient::Gradient(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) + + AnimationMixerPlayable& AnimationMixerPlayable::operator=(const AnimationMixerPlayable& other) { - Plugin::ReferenceManagedClass(handle); + if (this->Handle) + { + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + } + return *this; } - } - - 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) + + AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr) other) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Handle = 0; + } + return *this; } - } - - Gradient& Gradient::operator=(const Gradient& other) - { - if (this->Handle) + + AnimationMixerPlayable& AnimationMixerPlayable::operator=(AnimationMixerPlayable&& other) { - Plugin::DereferenceManagedClass(this->Handle); + if (Handle) + { + Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - this->Handle = other.Handle; - if (this->Handle) + + bool AnimationMixerPlayable::operator==(const AnimationMixerPlayable& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle == other.Handle; } - return *this; - } - - Gradient& Gradient::operator=(decltype(nullptr) other) - { - if (Handle) + + bool AnimationMixerPlayable::operator!=(const AnimationMixerPlayable& other) const { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + return Handle != other.Handle; } - return *this; - } - - Gradient& Gradient::operator=(Gradient&& other) - { - if (Handle) + + UnityEngine::Animations::AnimationMixerPlayable AnimationMixerPlayable::Create(UnityEngine::Playables::PlayableGraph& graph, int32_t inputCount, System::Boolean normalizeWeights) { - Plugin::DereferenceManagedClass(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); } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool Gradient::operator==(const Gradient& other) const - { - return Handle == other.Handle; - } - - bool Gradient::operator!=(const Gradient& other) const - { - return Handle != other.Handle; } - - Gradient::Gradient() - : System::Object(nullptr) +} + +namespace System +{ + Object::Object(UnityEngine::Animations::AnimationMixerPlayable& val) { - auto returnValue = Plugin::UnityEngineGradientConstructor(); + int32_t handle = Plugin::BoxAnimationMixerPlayable(val.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4774,16 +4830,16 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - Handle = returnValue; - if (returnValue) + if (handle) { - Plugin::ReferenceManagedClass(returnValue); + Plugin::ReferenceManagedClass(handle); + Handle = handle; } } - System::Array1 Gradient::GetColorKeys() + Object::operator UnityEngine::Animations::AnimationMixerPlayable() { - auto returnValue = Plugin::UnityEngineGradientPropertyGetColorKeys(Handle); + UnityEngine::Animations::AnimationMixerPlayable returnVal(Plugin::InternalUse::Only, Plugin::UnboxAnimationMixerPlayable(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -4791,175 +4847,438 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return System::Array1(Plugin::InternalUse::Only, returnValue); + return returnVal; } - - void Gradient::SetColorKeys(System::Array1& value) +} + +namespace System +{ + namespace Runtime { - Plugin::UnityEngineGradientPropertySetColorKeys(Handle, value.Handle); - if (Plugin::unhandledCsharpException) + namespace CompilerServices { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + IStrongBox::IStrongBox(decltype(nullptr) n) + { + } + + 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) other) + { + 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 System +namespace UnityEngine { - AppDomainSetup::AppDomainSetup(decltype(nullptr) n) - : AppDomainSetup(Plugin::InternalUse::Only, 0) + namespace Experimental { - } - - AppDomainSetup::AppDomainSetup(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) + namespace UIElements { - Plugin::ReferenceManagedClass(handle); + IEventHandler::IEventHandler(decltype(nullptr) n) + { + } + + 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) other) + { + 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; + } } } - - 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() +} + +namespace UnityEngine +{ + namespace Experimental { - if (Handle) + namespace UIElements { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + IStyle::IStyle(decltype(nullptr) n) + { + } + + 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) other) + { + 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; + } } } - - AppDomainSetup& AppDomainSetup::operator=(const AppDomainSetup& other) +} + +namespace System +{ + namespace Diagnostics { - if (this->Handle) + Stopwatch::Stopwatch(decltype(nullptr) n) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + Stopwatch::Stopwatch(Plugin::InternalUse iu, int32_t handle) { - Plugin::ReferenceManagedClass(this->Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - return *this; - } - - AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr) other) - { - if (Handle) + + Stopwatch::Stopwatch(const Stopwatch& other) + : Stopwatch(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; } - return *this; - } - - AppDomainSetup& AppDomainSetup::operator=(AppDomainSetup&& other) - { - if (Handle) + + Stopwatch::Stopwatch(Stopwatch&& other) + : Stopwatch(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(Handle); + other.Handle = 0; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool AppDomainSetup::operator==(const AppDomainSetup& other) const - { - return Handle == other.Handle; - } - - bool AppDomainSetup::operator!=(const AppDomainSetup& other) const - { - return Handle != other.Handle; - } - - AppDomainSetup::AppDomainSetup() - : System::Object(nullptr) - { - auto returnValue = Plugin::SystemAppDomainSetupConstructor(); - if (Plugin::unhandledCsharpException) + + Stopwatch::~Stopwatch() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - Handle = returnValue; - if (returnValue) + + Stopwatch& Stopwatch::operator=(const Stopwatch& other) { - Plugin::ReferenceManagedClass(returnValue); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - } - - System::AppDomainInitializer AppDomainSetup::GetAppDomainInitializer() - { - auto returnValue = Plugin::SystemAppDomainSetupPropertyGetAppDomainInitializer(Handle); - if (Plugin::unhandledCsharpException) + + Stopwatch& Stopwatch::operator=(decltype(nullptr) other) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - return System::AppDomainInitializer(Plugin::InternalUse::Only, returnValue); - } + 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; + } + } - void AppDomainSetup::SetAppDomainInitializer(System::AppDomainInitializer& value) - { - Plugin::SystemAppDomainSetupPropertySetAppDomainInitializer(Handle, value.Handle); - if (Plugin::unhandledCsharpException) + void Stopwatch::Reset() { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::SystemDiagnosticsStopwatchMethodReset(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } } namespace UnityEngine { - Application::Application(decltype(nullptr) n) - : Application(Plugin::InternalUse::Only, 0) + GameObject::GameObject(decltype(nullptr) n) + : UnityEngine::Object(nullptr) { } - Application::Application(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + GameObject::GameObject(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::Object(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - Application::Application(const Application& other) - : Application(Plugin::InternalUse::Only, other.Handle) + GameObject::GameObject(const GameObject& other) + : GameObject(Plugin::InternalUse::Only, other.Handle) { } - Application::Application(Application&& other) - : Application(Plugin::InternalUse::Only, other.Handle) + GameObject::GameObject(GameObject&& other) + : GameObject(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - Application::~Application() + GameObject::~GameObject() { if (Handle) { @@ -4968,7 +5287,7 @@ namespace UnityEngine } } - Application& Application::operator=(const Application& other) + GameObject& GameObject::operator=(const GameObject& other) { if (this->Handle) { @@ -4982,7 +5301,7 @@ namespace UnityEngine return *this; } - Application& Application::operator=(decltype(nullptr) other) + GameObject& GameObject::operator=(decltype(nullptr) other) { if (Handle) { @@ -4992,7 +5311,7 @@ namespace UnityEngine return *this; } - Application& Application::operator=(Application&& other) + GameObject& GameObject::operator=(GameObject&& other) { if (Handle) { @@ -5003,19 +5322,20 @@ namespace UnityEngine return *this; } - bool Application::operator==(const Application& other) const + bool GameObject::operator==(const GameObject& other) const { return Handle == other.Handle; } - bool Application::operator!=(const Application& other) const + bool GameObject::operator!=(const GameObject& other) const { return Handle != other.Handle; } - void Application::AddOnBeforeRender(UnityEngine::Events::UnityAction& del) + GameObject::GameObject() + : UnityEngine::Object(nullptr) { - Plugin::UnityEngineApplicationAddEventOnBeforeRender(del.Handle); + auto returnValue = Plugin::UnityEngineGameObjectConstructor(); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5023,11 +5343,73 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedClass(returnValue); + } } - void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del) + GameObject::GameObject(System::String& name) + : UnityEngine::Object(nullptr) { - Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); + 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; @@ -5035,95 +5417,135 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } + return UnityEngine::GameObject(Plugin::InternalUse::Only, returnValue); } } namespace UnityEngine { - namespace SceneManagement + Debug::Debug(decltype(nullptr) n) { - SceneManager::SceneManager(decltype(nullptr) n) - : SceneManager(Plugin::InternalUse::Only, 0) + } + + Debug::Debug(Plugin::InternalUse iu, int32_t handle) + { + Handle = handle; + if (handle) { + Plugin::ReferenceManagedClass(handle); } - - SceneManager::SceneManager(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, 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) { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - SceneManager::SceneManager(const SceneManager& other) - : SceneManager(Plugin::InternalUse::Only, other.Handle) + } + + Debug& Debug::operator=(const Debug& other) + { + if (this->Handle) { + Plugin::DereferenceManagedClass(this->Handle); } - - SceneManager::SceneManager(SceneManager&& other) - : SceneManager(Plugin::InternalUse::Only, other.Handle) + this->Handle = other.Handle; + if (this->Handle) { - other.Handle = 0; + Plugin::ReferenceManagedClass(this->Handle); } - - SceneManager::~SceneManager() + return *this; + } + + Debug& Debug::operator=(decltype(nullptr) other) + { + if (Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - SceneManager& SceneManager::operator=(const SceneManager& other) + return *this; + } + + Debug& Debug::operator=(Debug&& 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); } - - SceneManager& SceneManager::operator=(decltype(nullptr) other) + 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) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - SceneManager& SceneManager::operator=(SceneManager&& other) + } +} + +namespace UnityEngine +{ + namespace Assertions + { + System::Boolean Assert::GetRaiseExceptions() { - if (Handle) + auto returnValue = Plugin::UnityEngineAssertionsAssertFieldGetRaiseExceptions(); + 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 SceneManager::operator==(const SceneManager& other) const - { - return Handle == other.Handle; + return returnValue; } - bool SceneManager::operator!=(const SceneManager& other) const + void Assert::SetRaiseExceptions(System::Boolean value) { - return Handle != other.Handle; + Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions(value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } - void SceneManager::AddSceneLoaded(UnityEngine::Events::UnityAction2& del) + template<> void Assert::AreEqual(System::String& expected, System::String& actual) { - Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded(del.Handle); + Plugin::UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString(expected.Handle, actual.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5133,9 +5555,9 @@ namespace UnityEngine } } - void SceneManager::RemoveSceneLoaded(UnityEngine::Events::UnityAction2& del) + template<> void Assert::AreEqual(UnityEngine::GameObject& expected, UnityEngine::GameObject& actual) { - Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded(del.Handle); + Plugin::UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject(expected.Handle, actual.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -5149,294 +5571,203 @@ namespace UnityEngine namespace UnityEngine { - namespace SceneManagement + Collision::Collision(decltype(nullptr) n) { - Scene::Scene(decltype(nullptr) n) - : Scene(Plugin::InternalUse::Only, 0) - { - } - - Scene::Scene(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, 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) other) - { - 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; - } } -} - -namespace System -{ - Object::Object(UnityEngine::SceneManagement::Scene& val) + + Collision::Collision(Plugin::InternalUse iu, int32_t handle) { - int32_t handle = Plugin::BoxScene(val.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); - Handle = handle; } } - Object::operator UnityEngine::SceneManagement::Scene() + Collision::Collision(const Collision& other) + : Collision(Plugin::InternalUse::Only, other.Handle) { - UnityEngine::SceneManagement::Scene returnVal(Plugin::InternalUse::Only, Plugin::UnboxScene(Handle)); - if (Plugin::unhandledCsharpException) + } + + Collision::Collision(Collision&& other) + : Collision(Plugin::InternalUse::Only, other.Handle) + { + other.Handle = 0; + } + + Collision::~Collision() + { + if (Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - return returnVal; } -} - -namespace System -{ - Object::Object(UnityEngine::SceneManagement::LoadSceneMode val) + + Collision& Collision::operator=(const Collision& other) { - int32_t handle = Plugin::BoxLoadSceneMode(val); - 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::SceneManagement::LoadSceneMode() + Collision& Collision::operator=(decltype(nullptr) other) { - UnityEngine::SceneManagement::LoadSceneMode returnVal(Plugin::UnboxLoadSceneMode(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; } -} - -namespace System -{ - namespace Collections + + Collision& Collision::operator=(Collision&& other) { - IEnumerator::IEnumerator(decltype(nullptr) n) - : IEnumerator(Plugin::InternalUse::Only, 0) + if (Handle) { + Plugin::DereferenceManagedClass(Handle); } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, 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) other) + 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) n) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + { + } + + Behaviour::Behaviour(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + { + Handle = handle; + if (handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + Plugin::ReferenceManagedClass(handle); } - - IEnumerator& IEnumerator::operator=(IEnumerator&& other) + } + + 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) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - bool IEnumerator::operator==(const IEnumerator& other) const + } + + Behaviour& Behaviour::operator=(const Behaviour& other) + { + if (this->Handle) { - return Handle == other.Handle; + Plugin::DereferenceManagedClass(this->Handle); } - - bool IEnumerator::operator!=(const IEnumerator& other) const + this->Handle = other.Handle; + if (this->Handle) { - return Handle != other.Handle; + Plugin::ReferenceManagedClass(this->Handle); } - - System::Object IEnumerator::GetCurrent() + return *this; + } + + Behaviour& Behaviour::operator=(decltype(nullptr) other) + { + if (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::DereferenceManagedClass(Handle); + Handle = 0; } - - System::Boolean IEnumerator::MoveNext() + return *this; + } + + Behaviour& Behaviour::operator=(Behaviour&& other) + { + 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 = 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 System +namespace UnityEngine { - EventArgs::EventArgs(decltype(nullptr) n) - : EventArgs(Plugin::InternalUse::Only, 0) + MonoBehaviour::MonoBehaviour(decltype(nullptr) n) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) { } - EventArgs::EventArgs(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + MonoBehaviour::MonoBehaviour(Plugin::InternalUse iu, int32_t handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - EventArgs::EventArgs(const EventArgs& other) - : EventArgs(Plugin::InternalUse::Only, other.Handle) + MonoBehaviour::MonoBehaviour(const MonoBehaviour& other) + : MonoBehaviour(Plugin::InternalUse::Only, other.Handle) { } - EventArgs::EventArgs(EventArgs&& other) - : EventArgs(Plugin::InternalUse::Only, other.Handle) + MonoBehaviour::MonoBehaviour(MonoBehaviour&& other) + : MonoBehaviour(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - EventArgs::~EventArgs() + MonoBehaviour::~MonoBehaviour() { if (Handle) { @@ -5445,7 +5776,7 @@ namespace System } } - EventArgs& EventArgs::operator=(const EventArgs& other) + MonoBehaviour& MonoBehaviour::operator=(const MonoBehaviour& other) { if (this->Handle) { @@ -5459,7 +5790,7 @@ namespace System return *this; } - EventArgs& EventArgs::operator=(decltype(nullptr) other) + MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr) other) { if (Handle) { @@ -5469,7 +5800,7 @@ namespace System return *this; } - EventArgs& EventArgs::operator=(EventArgs&& other) + MonoBehaviour& MonoBehaviour::operator=(MonoBehaviour&& other) { if (Handle) { @@ -5480,399 +5811,2346 @@ namespace System return *this; } - bool EventArgs::operator==(const EventArgs& other) const + bool MonoBehaviour::operator==(const MonoBehaviour& other) const { return Handle == other.Handle; } - bool EventArgs::operator!=(const EventArgs& other) const + 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 System +namespace UnityEngine { - namespace ComponentModel + AudioSettings::AudioSettings(decltype(nullptr) n) { - namespace Design + } + + AudioSettings::AudioSettings(Plugin::InternalUse iu, int32_t handle) + { + Handle = handle; + if (handle) { - ComponentEventArgs::ComponentEventArgs(decltype(nullptr) n) - : ComponentEventArgs(Plugin::InternalUse::Only, 0) - { - } - - ComponentEventArgs::ComponentEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(iu, 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) other) - { - 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; - } + 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + AudioSettings& AudioSettings::operator=(AudioSettings&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool AudioSettings::operator==(const AudioSettings& other) const + { + return Handle == other.Handle; + } + + bool AudioSettings::operator!=(const AudioSettings& other) const + { + return Handle != other.Handle; + } + + void AudioSettings::GetDSPBufferSize(int32_t* bufferLength, int32_t* numBuffers) + { + Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32(bufferLength, numBuffers); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } } -namespace System +namespace UnityEngine { - namespace ComponentModel + namespace Networking { - namespace Design + NetworkTransport::NetworkTransport(decltype(nullptr) n) { - ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr) n) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, 0) - { - } - - ComponentChangingEventArgs::ComponentChangingEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(iu, handle) + } + + NetworkTransport::NetworkTransport(Plugin::InternalUse iu, int32_t handle) + { + Handle = handle; + if (handle) { - if (handle) - { - Plugin::ReferenceManagedClass(handle); - } + Plugin::ReferenceManagedClass(handle); } - - ComponentChangingEventArgs::ComponentChangingEventArgs(const ComponentChangingEventArgs& other) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.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; } - - ComponentChangingEventArgs::ComponentChangingEventArgs(ComponentChangingEventArgs&& other) - : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) + } + + NetworkTransport& NetworkTransport::operator=(const NetworkTransport& other) + { + if (this->Handle) { - other.Handle = 0; + Plugin::DereferenceManagedClass(this->Handle); } - - ComponentChangingEventArgs::~ComponentChangingEventArgs() + this->Handle = other.Handle; + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } + Plugin::ReferenceManagedClass(this->Handle); } - - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(const ComponentChangingEventArgs& other) + return *this; + } + + NetworkTransport& NetworkTransport::operator=(decltype(nullptr) 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); + Handle = 0; } - - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr) other) + return *this; + } + + NetworkTransport& NetworkTransport::operator=(NetworkTransport&& other) + { + if (Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + Plugin::DereferenceManagedClass(Handle); } - - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(ComponentChangingEventArgs&& other) + 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) { - 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 ComponentChangingEventArgs::operator==(const ComponentChangingEventArgs& other) const + if (address->Handle) { - return Handle == other.Handle; + Plugin::DereferenceManagedClass(address->Handle); } - - bool ComponentChangingEventArgs::operator!=(const ComponentChangingEventArgs& other) const + address->Handle = addressHandle; + if (address->Handle) { - return Handle != other.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 { - namespace ComponentModel + Object::Object(UnityEngine::Quaternion& val) { - namespace Design + int32_t handle = Plugin::BoxQuaternion(val); + if (Plugin::unhandledCsharpException) { - ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr) n) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, 0) + 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) n) + : System::ValueType(nullptr) { } - ComponentChangedEventArgs::ComponentChangedEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(iu, handle) + KeyValuePair::KeyValuePair(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) { + Handle = handle; if (handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); } } - ComponentChangedEventArgs::ComponentChangedEventArgs(const ComponentChangedEventArgs& other) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) + KeyValuePair::KeyValuePair(const KeyValuePair& other) + : KeyValuePair(Plugin::InternalUse::Only, other.Handle) { } - ComponentChangedEventArgs::ComponentChangedEventArgs(ComponentChangedEventArgs&& other) - : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) + KeyValuePair::KeyValuePair(KeyValuePair&& other) + : KeyValuePair(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ComponentChangedEventArgs::~ComponentChangedEventArgs() + KeyValuePair::~KeyValuePair() { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); Handle = 0; } } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(const ComponentChangedEventArgs& other) + KeyValuePair& KeyValuePair::operator=(const KeyValuePair& other) { if (this->Handle) { - Plugin::DereferenceManagedClass(this->Handle); + Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); } return *this; } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr) other) + KeyValuePair& KeyValuePair::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); Handle = 0; } return *this; } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(ComponentChangedEventArgs&& other) + KeyValuePair& KeyValuePair::operator=(KeyValuePair&& other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool ComponentChangedEventArgs::operator==(const ComponentChangedEventArgs& other) const + bool KeyValuePair::operator==(const KeyValuePair& other) const { return Handle == other.Handle; } - bool ComponentChangedEventArgs::operator!=(const ComponentChangedEventArgs& other) const + bool KeyValuePair::operator!=(const KeyValuePair& other) const { return Handle != other.Handle; } + + KeyValuePair::KeyValuePair(System::String& key, double value) + : System::ValueType(nullptr) + { + auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoubleConstructorSystemString_SystemDouble(key.Handle, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + Handle = returnValue; + if (returnValue) + { + Plugin::ReferenceManagedSystemCollectionsGenericKeyValuePairSystemString_SystemDouble(Handle); + } + } + + System::String KeyValuePair::GetKey() + { + auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetKey(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::String(Plugin::InternalUse::Only, returnValue); + } + + double KeyValuePair::GetValue() + { + auto returnValue = Plugin::SystemCollectionsGenericKeyValuePairSystemString_SystemDoublePropertyGetValue(Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnValue; + } + } + } +} + +namespace System +{ + Object::Object(System::Collections::Generic::KeyValuePair& val) + { + 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)); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return returnVal; + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + List::List(decltype(nullptr) n) + : 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 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); + } + } + + 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + List& List::operator=(List&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool List::operator==(const List& other) const + { + return Handle == other.Handle; + } + + bool List::operator!=(const List& other) const + { + return Handle != other.Handle; + } + + List::List() + : System::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(int32_t index) + { + auto returnValue = Plugin::SystemCollectionsGenericListSystemStringPropertyGetItem(Handle, index); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::String(Plugin::InternalUse::Only, returnValue); + } + + void List::SetItem(int32_t index, System::String& value) + { + Plugin::SystemCollectionsGenericListSystemStringPropertySetItem(Handle, index, value.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + void List::Add(System::String& item) + { + Plugin::SystemCollectionsGenericListSystemStringMethodAddSystemString(Handle, item.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + 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 System +{ + namespace Collections + { + namespace Generic + { + List::List(decltype(nullptr) n) + : 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 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); + } + } + + 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + List& List::operator=(List&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool List::operator==(const List& other) const + { + return Handle == other.Handle; + } + + bool List::operator!=(const List& other) const + { + return Handle != other.Handle; + } + + List::List() + : System::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); + } + } + + 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) + { + Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + 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) + { + Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + LinkedListNode::LinkedListNode(decltype(nullptr) n) + { + } + + 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + LinkedListNode& LinkedListNode::operator=(LinkedListNode&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool LinkedListNode::operator==(const LinkedListNode& other) const + { + return Handle == other.Handle; + } + + bool LinkedListNode::operator!=(const LinkedListNode& other) const + { + return Handle != other.Handle; + } + + LinkedListNode::LinkedListNode(System::String& value) + { + 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) n) + : 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + StrongBox& StrongBox::operator=(StrongBox&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool StrongBox::operator==(const StrongBox& other) const + { + return Handle == other.Handle; + } + + bool StrongBox::operator!=(const StrongBox& other) const + { + return Handle != other.Handle; + } + + StrongBox::StrongBox(System::String& value) + : System::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 +{ + namespace Collections + { + namespace ObjectModel + { + Collection::Collection(decltype(nullptr) n) + : 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Collection& Collection::operator=(Collection&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Collection::operator==(const Collection& other) const + { + return Handle == other.Handle; + } + + bool Collection::operator!=(const Collection& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + namespace Collections + { + namespace ObjectModel + { + KeyedCollection::KeyedCollection(decltype(nullptr) n) + : 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + KeyedCollection& KeyedCollection::operator=(KeyedCollection&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool KeyedCollection::operator==(const KeyedCollection& other) const + { + return Handle == other.Handle; + } + + bool KeyedCollection::operator!=(const KeyedCollection& other) const + { + return Handle != other.Handle; + } + } + } +} + +namespace System +{ + Exception::Exception(decltype(nullptr) n) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + { + } + + Exception::Exception(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Exception& Exception::operator=(Exception&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Exception::operator==(const Exception& other) const + { + return Handle == other.Handle; + } + + bool Exception::operator!=(const Exception& other) const + { + return Handle != other.Handle; + } + + Exception::Exception(System::String& message) + : System::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) n) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + { + } + + SystemException::SystemException(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + SystemException& SystemException::operator=(SystemException&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool SystemException::operator==(const SystemException& other) const + { + return Handle == other.Handle; + } + + bool SystemException::operator!=(const SystemException& other) const + { + return Handle != other.Handle; + } +} + +namespace System +{ + NullReferenceException::NullReferenceException(decltype(nullptr) n) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + , System::SystemException(nullptr) + { + } + + NullReferenceException::NullReferenceException(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + NullReferenceException& NullReferenceException::operator=(NullReferenceException&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool NullReferenceException::operator==(const NullReferenceException& other) const + { + return Handle == other.Handle; + } + + bool NullReferenceException::operator!=(const NullReferenceException& other) const + { + return Handle != other.Handle; + } +} + +namespace UnityEngine +{ + Screen::Screen(decltype(nullptr) n) + { + } + + Screen::Screen(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Screen& Screen::operator=(Screen&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Screen::operator==(const Screen& other) const + { + return Handle == other.Handle; + } + + bool Screen::operator!=(const Screen& other) const + { + return Handle != other.Handle; + } + + System::Array1 Screen::GetResolutions() + { + auto returnValue = Plugin::UnityEngineScreenPropertyGetResolutions(); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + return System::Array1(Plugin::InternalUse::Only, returnValue); + } +} + +namespace UnityEngine +{ + Ray::Ray(decltype(nullptr) n) + : System::ValueType(nullptr) + { + } + + Ray::Ray(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) + { + 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) other) + { + 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) + : System::ValueType(nullptr) + { + 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); + } + } +} + +namespace System +{ + Object::Object(UnityEngine::Ray& val) + { + int32_t handle = Plugin::BoxRay(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::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) n) + { + } + + Physics::Physics(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Physics& Physics::operator=(Physics&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Physics::operator==(const Physics& other) const + { + return Handle == other.Handle; + } + + bool Physics::operator!=(const Physics& other) const + { + return Handle != other.Handle; + } + + int32_t Physics::RaycastNonAlloc(UnityEngine::Ray& ray, System::Array1& results) + { + auto returnValue = Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_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) n) + { + } + + Gradient::Gradient(Plugin::InternalUse iu, 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + Gradient& Gradient::operator=(Gradient&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool Gradient::operator==(const Gradient& other) const + { + return Handle == other.Handle; + } + + bool Gradient::operator!=(const Gradient& other) const + { + return Handle != other.Handle; + } + + Gradient::Gradient() + { + 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) n) + : 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) other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; + } + + AppDomainSetup& AppDomainSetup::operator=(AppDomainSetup&& other) + { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; + } + + bool AppDomainSetup::operator==(const AppDomainSetup& other) const + { + return Handle == other.Handle; + } + + bool AppDomainSetup::operator!=(const AppDomainSetup& other) const + { + return Handle != other.Handle; + } + + AppDomainSetup::AppDomainSetup() + : System::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) n) + { + } + + 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() + { + 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) other) + { + 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; } } -} - -namespace System -{ - namespace ComponentModel + + void Application::RemoveOnBeforeRender(UnityEngine::Events::UnityAction& del) { - namespace Design + Plugin::UnityEngineApplicationRemoveEventOnBeforeRender(del.Handle); + if (Plugin::unhandledCsharpException) { - ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr) n) - : ComponentRenameEventArgs(Plugin::InternalUse::Only, 0) - { - } - - ComponentRenameEventArgs::ComponentRenameEventArgs(Plugin::InternalUse iu, int32_t handle) - : System::EventArgs(iu, 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) other) - { - 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; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } } } -namespace System +namespace UnityEngine { - namespace ComponentModel + namespace SceneManagement { - MemberDescriptor::MemberDescriptor(decltype(nullptr) n) - : MemberDescriptor(Plugin::InternalUse::Only, 0) + SceneManager::SceneManager(decltype(nullptr) n) { } - MemberDescriptor::MemberDescriptor(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + SceneManager::SceneManager(Plugin::InternalUse iu, int32_t handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - MemberDescriptor::MemberDescriptor(const MemberDescriptor& other) - : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) + SceneManager::SceneManager(const SceneManager& other) + : SceneManager(Plugin::InternalUse::Only, other.Handle) { } - MemberDescriptor::MemberDescriptor(MemberDescriptor&& other) - : MemberDescriptor(Plugin::InternalUse::Only, other.Handle) + SceneManager::SceneManager(SceneManager&& other) + : SceneManager(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - MemberDescriptor::~MemberDescriptor() + SceneManager::~SceneManager() { if (Handle) { @@ -5881,7 +8159,7 @@ namespace System } } - MemberDescriptor& MemberDescriptor::operator=(const MemberDescriptor& other) + SceneManager& SceneManager::operator=(const SceneManager& other) { if (this->Handle) { @@ -5895,7 +8173,7 @@ namespace System return *this; } - MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr) other) + SceneManager& SceneManager::operator=(decltype(nullptr) other) { if (Handle) { @@ -5905,7 +8183,7 @@ namespace System return *this; } - MemberDescriptor& MemberDescriptor::operator=(MemberDescriptor&& other) + SceneManager& SceneManager::operator=(SceneManager&& other) { if (Handle) { @@ -5916,135 +8194,150 @@ namespace System return *this; } - bool MemberDescriptor::operator==(const MemberDescriptor& other) const + bool SceneManager::operator==(const SceneManager& other) const { return Handle == other.Handle; } - bool MemberDescriptor::operator!=(const MemberDescriptor& other) const + 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 System +namespace UnityEngine { - Object::Object(UnityEngine::PrimitiveType val) + namespace SceneManagement { - int32_t handle = Plugin::BoxPrimitiveType(val); - if (Plugin::unhandledCsharpException) + Scene::Scene(decltype(nullptr) n) + : System::ValueType(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - if (handle) + + Scene::Scene(Plugin::InternalUse iu, int32_t handle) + : System::ValueType(nullptr) { - Plugin::ReferenceManagedClass(handle); Handle = handle; + if (handle) + { + Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); + } } - } - - Object::operator UnityEngine::PrimitiveType() - { - UnityEngine::PrimitiveType returnVal(Plugin::UnboxPrimitiveType(Handle)); - if (Plugin::unhandledCsharpException) + + Scene::Scene(const Scene& other) + : Scene(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - return returnVal; - } -} - -namespace UnityEngine -{ - Time::Time(decltype(nullptr) n) - : Time(Plugin::InternalUse::Only, 0) - { - } - - Time::Time(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) + + Scene::Scene(Scene&& other) + : Scene(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(handle); + other.Handle = 0; } - } - - 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) + + Scene::~Scene() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + 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) other) + { + 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; } - } - - Time& Time::operator=(const Time& other) - { - if (this->Handle) + + bool Scene::operator==(const Scene& other) const { - Plugin::DereferenceManagedClass(this->Handle); + return Handle == other.Handle; } - this->Handle = other.Handle; - if (this->Handle) + + bool Scene::operator!=(const Scene& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle != other.Handle; } - return *this; } - - Time& Time::operator=(decltype(nullptr) other) +} + +namespace System +{ + Object::Object(UnityEngine::SceneManagement::Scene& val) { - if (Handle) + int32_t handle = Plugin::BoxScene(val.Handle); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - return *this; - } - - Time& Time::operator=(Time&& other) - { - if (Handle) + if (handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); + Handle = 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() + Object::operator UnityEngine::SceneManagement::Scene() { - auto returnValue = Plugin::UnityEngineTimePropertyGetDeltaTime(); + UnityEngine::SceneManagement::Scene returnVal(Plugin::InternalUse::Only, Plugin::UnboxScene(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6052,15 +8345,15 @@ namespace UnityEngine ex->ThrowReferenceToThis(); delete ex; } - return returnValue; + return returnVal; } } namespace System { - Object::Object(System::IO::FileMode val) + Object::Object(UnityEngine::SceneManagement::LoadSceneMode val) { - int32_t handle = Plugin::BoxFileMode(val); + int32_t handle = Plugin::BoxLoadSceneMode(val); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6075,9 +8368,9 @@ namespace System } } - Object::operator System::IO::FileMode() + Object::operator UnityEngine::SceneManagement::LoadSceneMode() { - System::IO::FileMode returnVal(Plugin::UnboxFileMode(Handle)); + UnityEngine::SceneManagement::LoadSceneMode returnVal(Plugin::UnboxLoadSceneMode(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6091,203 +8384,228 @@ namespace System namespace System { - MarshalByRefObject::MarshalByRefObject(decltype(nullptr) n) - : MarshalByRefObject(Plugin::InternalUse::Only, 0) - { - } - - MarshalByRefObject::MarshalByRefObject(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + namespace Collections { - if (handle) + IEnumerator::IEnumerator(decltype(nullptr) n) { - 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) + + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - } - - MarshalByRefObject& MarshalByRefObject::operator=(const MarshalByRefObject& other) - { - if (this->Handle) + + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { - Plugin::DereferenceManagedClass(this->Handle); } - this->Handle = other.Handle; - if (this->Handle) + + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { - Plugin::ReferenceManagedClass(this->Handle); + other.Handle = 0; } - return *this; - } - - MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr) other) - { - if (Handle) + + IEnumerator::~IEnumerator() { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - return *this; - } - - MarshalByRefObject& MarshalByRefObject::operator=(MarshalByRefObject&& other) - { - if (Handle) + + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { - Plugin::DereferenceManagedClass(Handle); + if (this->Handle) + { + 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 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) n) - : Stream(Plugin::InternalUse::Only, 0) + + IEnumerator& IEnumerator::operator=(decltype(nullptr) other) { + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - Stream::Stream(Plugin::InternalUse iu, int32_t handle) - : System::MarshalByRefObject(iu, handle) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { - if (handle) + if (Handle) { - Plugin::ReferenceManagedClass(handle); + Plugin::DereferenceManagedClass(Handle); } + Handle = other.Handle; + other.Handle = 0; + return *this; } - Stream::Stream(const Stream& other) - : Stream(Plugin::InternalUse::Only, other.Handle) + bool IEnumerator::operator==(const IEnumerator& other) const { + return Handle == other.Handle; } - Stream::Stream(Stream&& other) - : Stream(Plugin::InternalUse::Only, other.Handle) + bool IEnumerator::operator!=(const IEnumerator& other) const { - other.Handle = 0; + return Handle != other.Handle; } - Stream::~Stream() + System::Object IEnumerator::GetCurrent() { - if (Handle) + auto returnValue = Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent(Handle); + if (Plugin::unhandledCsharpException) { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } + return System::Object(Plugin::InternalUse::Only, returnValue); } - Stream& Stream::operator=(const Stream& other) + 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 +{ + EventArgs::EventArgs(decltype(nullptr) n) + { + } + + EventArgs::EventArgs(Plugin::InternalUse iu, 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) { - 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; } - - Stream& Stream::operator=(decltype(nullptr) other) + } + + EventArgs& EventArgs::operator=(const EventArgs& other) + { + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; - } - return *this; + Plugin::DereferenceManagedClass(this->Handle); } - - Stream& Stream::operator=(Stream&& other) + this->Handle = other.Handle; + if (this->Handle) { - if (Handle) - { - Plugin::DereferenceManagedClass(Handle); - } - Handle = other.Handle; - other.Handle = 0; - return *this; + Plugin::ReferenceManagedClass(this->Handle); } - - bool Stream::operator==(const Stream& other) const + return *this; + } + + EventArgs& EventArgs::operator=(decltype(nullptr) other) + { + if (Handle) { - return Handle == other.Handle; + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - bool Stream::operator!=(const Stream& other) const + return *this; + } + + EventArgs& EventArgs::operator=(EventArgs&& other) + { + if (Handle) { - return Handle != other.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 Collections + namespace ComponentModel { - namespace Generic + namespace Design { - IComparer::IComparer(decltype(nullptr) n) - : IComparer(Plugin::InternalUse::Only, 0) + ComponentEventArgs::ComponentEventArgs(decltype(nullptr) n) + : System::EventArgs(nullptr) { } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + ComponentEventArgs::ComponentEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentEventArgs::ComponentEventArgs(const ComponentEventArgs& other) + : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) { } - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentEventArgs::ComponentEventArgs(ComponentEventArgs&& other) + : ComponentEventArgs(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IComparer::~IComparer() + ComponentEventArgs::~ComponentEventArgs() { if (Handle) { @@ -6296,7 +8614,7 @@ namespace System } } - IComparer& IComparer::operator=(const IComparer& other) + ComponentEventArgs& ComponentEventArgs::operator=(const ComponentEventArgs& other) { if (this->Handle) { @@ -6310,7 +8628,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr) other) { if (Handle) { @@ -6320,7 +8638,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(IComparer&& other) + ComponentEventArgs& ComponentEventArgs::operator=(ComponentEventArgs&& other) { if (Handle) { @@ -6331,12 +8649,12 @@ namespace System return *this; } - bool IComparer::operator==(const IComparer& other) const + bool ComponentEventArgs::operator==(const ComponentEventArgs& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool ComponentEventArgs::operator!=(const ComponentEventArgs& other) const { return Handle != other.Handle; } @@ -6346,36 +8664,37 @@ namespace System namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - IComparer::IComparer(decltype(nullptr) n) - : IComparer(Plugin::InternalUse::Only, 0) + ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr) n) + : System::EventArgs(nullptr) { } - IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + ComponentChangingEventArgs::ComponentChangingEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - IComparer::IComparer(const IComparer& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentChangingEventArgs::ComponentChangingEventArgs(const ComponentChangingEventArgs& other) + : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) { } - IComparer::IComparer(IComparer&& other) - : IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentChangingEventArgs::ComponentChangingEventArgs(ComponentChangingEventArgs&& other) + : ComponentChangingEventArgs(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IComparer::~IComparer() + ComponentChangingEventArgs::~ComponentChangingEventArgs() { if (Handle) { @@ -6384,7 +8703,7 @@ namespace System } } - IComparer& IComparer::operator=(const IComparer& other) + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(const ComponentChangingEventArgs& other) { if (this->Handle) { @@ -6398,7 +8717,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr) other) { if (Handle) { @@ -6408,7 +8727,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(IComparer&& other) + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(ComponentChangingEventArgs&& other) { if (Handle) { @@ -6419,12 +8738,12 @@ namespace System return *this; } - bool IComparer::operator==(const IComparer& other) const + bool ComponentChangingEventArgs::operator==(const ComponentChangingEventArgs& other) const { return Handle == other.Handle; } - bool IComparer::operator!=(const IComparer& other) const + bool ComponentChangingEventArgs::operator!=(const ComponentChangingEventArgs& other) const { return Handle != other.Handle; } @@ -6434,99 +8753,46 @@ namespace System namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - BaseIComparer::BaseIComparer() - : System::Collections::Generic::IComparer(nullptr) - { - 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; - } - } - - BaseIComparer::BaseIComparer(decltype(nullptr) n) - : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, 0) + ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr) n) + : System::EventArgs(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); } - BaseIComparer::BaseIComparer(const BaseIComparer& other) - : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentChangedEventArgs::ComponentChangedEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - if (Handle) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - BaseIComparer::BaseIComparer(BaseIComparer&& other) - : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentChangedEventArgs::ComponentChangedEventArgs(const ComponentChangedEventArgs& other) + : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) - : System::Collections::Generic::IComparer(iu, handle) + ComponentChangedEventArgs::ComponentChangedEventArgs(ComponentChangedEventArgs&& other) + : ComponentChangedEventArgs(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - BaseIComparer::~BaseIComparer() + ComponentChangedEventArgs::~ComponentChangedEventArgs() { - 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) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(const ComponentChangedEventArgs& other) { if (this->Handle) { @@ -6540,86 +8806,35 @@ namespace System return *this; } - BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr) other) { 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; - } - } } - Handle = 0; return *this; } - BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(ComponentChangedEventArgs&& 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; - } - } + 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; + return *this; } - int32_t BaseIComparer::Compare(int32_t x, int32_t y) + bool ComponentChangedEventArgs::operator==(const ComponentChangedEventArgs& other) const { - return {}; + return Handle == other.Handle; } - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemInt32Compare(int32_t cppHandle, int32_t x, int32_t y) + bool ComponentChangedEventArgs::operator!=(const ComponentChangedEventArgs& other) const { - 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 Handle != other.Handle; } } } @@ -6627,99 +8842,46 @@ namespace System namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - 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) n) - : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, 0) + ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr) n) + : System::EventArgs(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); } - BaseIComparer::BaseIComparer(const BaseIComparer& other) - : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentRenameEventArgs::ComponentRenameEventArgs(Plugin::InternalUse iu, int32_t handle) + : System::EventArgs(nullptr) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - if (Handle) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - BaseIComparer::BaseIComparer(BaseIComparer&& other) - : System::Collections::Generic::IComparer(Plugin::InternalUse::Only, other.Handle) + ComponentRenameEventArgs::ComponentRenameEventArgs(const ComponentRenameEventArgs& other) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) - : System::Collections::Generic::IComparer(iu, handle) + ComponentRenameEventArgs::ComponentRenameEventArgs(ComponentRenameEventArgs&& other) + : ComponentRenameEventArgs(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - BaseIComparer::~BaseIComparer() + ComponentRenameEventArgs::~ComponentRenameEventArgs() { - 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) + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(const ComponentRenameEventArgs& other) { if (this->Handle) { @@ -6733,121 +8895,184 @@ namespace System return *this; } - BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr) other) { 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) + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(ComponentRenameEventArgs&& 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 + bool ComponentRenameEventArgs::operator==(const ComponentRenameEventArgs& other) const { return Handle == other.Handle; } - bool BaseIComparer::operator!=(const BaseIComparer& other) const + bool ComponentRenameEventArgs::operator!=(const ComponentRenameEventArgs& other) const { return Handle != other.Handle; } - - int32_t BaseIComparer::Compare(System::String& x, System::String& y) + } + } +} + +namespace System +{ + namespace ComponentModel + { + MemberDescriptor::MemberDescriptor(decltype(nullptr) n) + { + } + + MemberDescriptor::MemberDescriptor(Plugin::InternalUse iu, int32_t handle) + { + Handle = handle; + if (handle) { - return {}; + Plugin::ReferenceManagedClass(handle); } - - DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) + } + + 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) { - 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 {}; - } + 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) other) + { + 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 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 System +namespace UnityEngine { - StringComparer::StringComparer(decltype(nullptr) n) - : StringComparer(Plugin::InternalUse::Only, 0) + Time::Time(decltype(nullptr) n) { } - StringComparer::StringComparer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + Time::Time(Plugin::InternalUse iu, int32_t handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - StringComparer::StringComparer(const StringComparer& other) - : StringComparer(Plugin::InternalUse::Only, other.Handle) + Time::Time(const Time& other) + : Time(Plugin::InternalUse::Only, other.Handle) { } - StringComparer::StringComparer(StringComparer&& other) - : StringComparer(Plugin::InternalUse::Only, other.Handle) + Time::Time(Time&& other) + : Time(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - StringComparer::~StringComparer() + Time::~Time() { if (Handle) { @@ -6856,7 +9081,7 @@ namespace System } } - StringComparer& StringComparer::operator=(const StringComparer& other) + Time& Time::operator=(const Time& other) { if (this->Handle) { @@ -6870,7 +9095,7 @@ namespace System return *this; } - StringComparer& StringComparer::operator=(decltype(nullptr) other) + Time& Time::operator=(decltype(nullptr) other) { if (Handle) { @@ -6880,7 +9105,7 @@ namespace System return *this; } - StringComparer& StringComparer::operator=(StringComparer&& other) + Time& Time::operator=(Time&& other) { if (Handle) { @@ -6891,26 +9116,35 @@ namespace System return *this; } - bool StringComparer::operator==(const StringComparer& other) const + bool Time::operator==(const Time& other) const { return Handle == other.Handle; } - bool StringComparer::operator!=(const StringComparer& other) const + 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 { - BaseStringComparer::BaseStringComparer() - : System::StringComparer(nullptr) + Object::Object(System::IO::FileMode val) { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemBaseStringComparerConstructor(cppHandle, handle); + int32_t handle = Plugin::BoxFileMode(val); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6918,15 +9152,16 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } - else + if (handle) { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; + Plugin::ReferenceManagedClass(handle); + Handle = handle; } + } + + Object::operator System::IO::FileMode() + { + System::IO::FileMode returnVal(Plugin::UnboxFileMode(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -6934,65 +9169,46 @@ namespace System ex->ThrowReferenceToThis(); delete ex; } + return returnVal; } - - BaseStringComparer::BaseStringComparer(decltype(nullptr) n) - : System::StringComparer(Plugin::InternalUse::Only, 0) +} + +namespace System +{ + MarshalByRefObject::MarshalByRefObject(decltype(nullptr) n) { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); } - BaseStringComparer::BaseStringComparer(const BaseStringComparer& other) - : System::StringComparer(Plugin::InternalUse::Only, other.Handle) + MarshalByRefObject::MarshalByRefObject(Plugin::InternalUse iu, int32_t handle) { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - if (Handle) + Handle = handle; + if (handle) { - Plugin::ReferenceManagedClass(Handle); + Plugin::ReferenceManagedClass(handle); } } - BaseStringComparer::BaseStringComparer(BaseStringComparer&& other) - : System::StringComparer(Plugin::InternalUse::Only, other.Handle) + MarshalByRefObject::MarshalByRefObject(const MarshalByRefObject& other) + : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; } - BaseStringComparer::BaseStringComparer(Plugin::InternalUse iu, int32_t handle) - : System::StringComparer(iu, handle) + MarshalByRefObject::MarshalByRefObject(MarshalByRefObject&& other) + : MarshalByRefObject(Plugin::InternalUse::Only, other.Handle) { - CppHandle = Plugin::StoreSystemBaseStringComparer(this); - if (Handle) - { - Plugin::ReferenceManagedClass(Handle); - } + other.Handle = 0; } - BaseStringComparer::~BaseStringComparer() + MarshalByRefObject::~MarshalByRefObject() { - Plugin::RemoveSystemBaseStringComparer(CppHandle); - CppHandle = 0; if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(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) + MarshalByRefObject& MarshalByRefObject::operator=(const MarshalByRefObject& other) { if (this->Handle) { @@ -7006,174 +9222,71 @@ namespace System return *this; } - BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr) other) + MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr) other) { if (Handle) { - int32_t handle = Handle; + Plugin::DereferenceManagedClass(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) + MarshalByRefObject& MarshalByRefObject::operator=(MarshalByRefObject&& 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; - } - } + Plugin::DereferenceManagedClass(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool BaseStringComparer::operator==(const BaseStringComparer& other) const + bool MarshalByRefObject::operator==(const MarshalByRefObject& other) const { return Handle == other.Handle; } - bool BaseStringComparer::operator!=(const BaseStringComparer& other) const + bool MarshalByRefObject::operator!=(const MarshalByRefObject& other) const { return Handle != other.Handle; } - - int32_t 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 {}; - } - } - - int32_t 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 + namespace IO { - ICollection::ICollection(decltype(nullptr) n) - : ICollection(Plugin::InternalUse::Only, 0) + Stream::Stream(decltype(nullptr) n) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + Stream::Stream(Plugin::InternalUse iu, int32_t handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + Stream::Stream(const Stream& other) + : Stream(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + Stream::Stream(Stream&& other) + : Stream(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + Stream::~Stream() { if (Handle) { @@ -7182,7 +9295,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + Stream& Stream::operator=(const Stream& other) { if (this->Handle) { @@ -7196,7 +9309,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + Stream& Stream::operator=(decltype(nullptr) other) { if (Handle) { @@ -7206,7 +9319,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + Stream& Stream::operator=(Stream&& other) { if (Handle) { @@ -7217,12 +9330,12 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool Stream::operator==(const Stream& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + bool Stream::operator!=(const Stream& other) const { return Handle != other.Handle; } @@ -7233,371 +9346,368 @@ namespace System { namespace Collections { - BaseICollection::BaseICollection() - : System::Collections::ICollection(nullptr) + namespace Generic { - CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsBaseICollectionConstructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) + IComparer::IComparer(decltype(nullptr) n) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; } - if (Handle) + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) { - Plugin::ReferenceManagedClass(Handle); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - else + + IComparer::IComparer(const IComparer& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) { - Plugin::RemoveSystemCollectionsBaseICollection(CppHandle); - CppHandle = 0; } - if (Plugin::unhandledCsharpException) + + IComparer::IComparer(IComparer&& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + other.Handle = 0; } - } - - BaseICollection::BaseICollection(decltype(nullptr) n) - : System::Collections::ICollection(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); - } - - BaseICollection::BaseICollection(const BaseICollection& other) - : System::Collections::ICollection(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); - if (Handle) + + IComparer::~IComparer() { - Plugin::ReferenceManagedClass(Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - } - - BaseICollection::BaseICollection(BaseICollection&& other) - : System::Collections::ICollection(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseICollection::BaseICollection(Plugin::InternalUse iu, int32_t handle) - : System::Collections::ICollection(iu, handle) - { - CppHandle = Plugin::StoreSystemCollectionsBaseICollection(this); - if (Handle) + + IComparer& IComparer::operator=(const IComparer& other) { - Plugin::ReferenceManagedClass(Handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - } - - BaseICollection::~BaseICollection() - { - Plugin::RemoveSystemCollectionsBaseICollection(CppHandle); - CppHandle = 0; - if (Handle) + + IComparer& IComparer::operator=(decltype(nullptr) other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseSystemCollectionsBaseICollection(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } + return *this; } - } - - BaseICollection& BaseICollection::operator=(const BaseICollection& other) - { - if (this->Handle) + + IComparer& IComparer::operator=(IComparer&& other) { - Plugin::DereferenceManagedClass(this->Handle); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - this->Handle = other.Handle; - if (this->Handle) + + bool IComparer::operator==(const IComparer& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle == other.Handle; } - return *this; - } - - BaseICollection& BaseICollection::operator=(decltype(nullptr) other) - { - if (Handle) + + bool IComparer::operator!=(const IComparer& other) const { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsBaseICollection(handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - } + return Handle != other.Handle; } - Handle = 0; - return *this; } - - BaseICollection& BaseICollection::operator=(BaseICollection&& other) + } +} + +namespace System +{ + namespace Collections + { + namespace Generic { - Plugin::RemoveSystemCollectionsBaseICollection(CppHandle); - CppHandle = 0; - if (Handle) + IComparer::IComparer(decltype(nullptr) n) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) - { - Plugin::ReleaseSystemCollectionsBaseICollection(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 BaseICollection::operator==(const BaseICollection& other) const - { - return Handle == other.Handle; - } - - bool BaseICollection::operator!=(const BaseICollection& other) const - { - return Handle != other.Handle; - } - - void BaseICollection::CopyTo(System::Array& array, int32_t index) - { - } - - DLLEXPORT void SystemCollectionsICollectionCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) - { - try + + IComparer::IComparer(Plugin::InternalUse iu, int32_t handle) { - auto array = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsBaseICollection(cppHandle)->CopyTo(array, index); + Handle = handle; + if (handle) + { + Plugin::ReferenceManagedClass(handle); + } } - catch (System::Exception ex) + + IComparer::IComparer(const IComparer& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) { - Plugin::SetException(ex.Handle); } - catch (...) + + IComparer::IComparer(IComparer&& other) + : IComparer(Plugin::InternalUse::Only, other.Handle) { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + other.Handle = 0; } - } - - System::Collections::IEnumerator BaseICollection::GetEnumerator() - { - return nullptr; - } - - DLLEXPORT int32_t SystemCollectionsICollectionGetEnumerator(int32_t cppHandle) - { - try + + IComparer::~IComparer() { - return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetEnumerator().Handle; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } } - catch (System::Exception ex) + + IComparer& IComparer::operator=(const IComparer& other) { - Plugin::SetException(ex.Handle); - return {}; + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - catch (...) + + IComparer& IComparer::operator=(decltype(nullptr) other) { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; + } + return *this; } - } - - int32_t BaseICollection::GetCount() - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsICollectionGetCount(int32_t cppHandle) - { - try + + IComparer& IComparer::operator=(IComparer&& other) { - return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetCount(); + if (Handle) + { + Plugin::DereferenceManagedClass(Handle); + } + Handle = other.Handle; + other.Handle = 0; + return *this; } - catch (System::Exception ex) + + bool IComparer::operator==(const IComparer& other) const { - Plugin::SetException(ex.Handle); - return {}; + return Handle == other.Handle; } - catch (...) + + bool IComparer::operator!=(const IComparer& other) const { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + return Handle != other.Handle; } } - - System::Boolean BaseICollection::GetIsSynchronized() - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsICollectionGetIsSynchronized(int32_t cppHandle) + } +} + +namespace System +{ + namespace Collections + { + namespace Generic { - try + BaseIComparer::BaseIComparer() + : System::Collections::Generic::IComparer(nullptr) { - return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetIsSynchronized(); + 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; + } } - catch (System::Exception ex) + + BaseIComparer::BaseIComparer(decltype(nullptr) n) + : System::Collections::Generic::IComparer(nullptr) { - Plugin::SetException(ex.Handle); - return {}; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); } - catch (...) + + BaseIComparer::BaseIComparer(const BaseIComparer& other) + : System::Collections::Generic::IComparer(nullptr) { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + Handle = other.Handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - System::Object BaseICollection::GetSyncRoot() - { - return nullptr; - } - - DLLEXPORT int32_t SystemCollectionsICollectionGetSyncRoot(int32_t cppHandle) - { - try + + BaseIComparer::BaseIComparer(BaseIComparer&& other) + : System::Collections::Generic::IComparer(nullptr) { - return Plugin::GetSystemCollectionsBaseICollection(cppHandle)->GetSyncRoot().Handle; + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; } - catch (System::Exception ex) + + BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) + : System::Collections::Generic::IComparer(nullptr) { - Plugin::SetException(ex.Handle); - return {}; + Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - catch (...) + + BaseIComparer::~BaseIComparer() { - System::String msg = "Unhandled exception invoking System::Collections::ICollection"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + 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; + } + } + } } - } - } -} - -namespace System -{ - namespace Collections - { - IList::IList(decltype(nullptr) n) - : IList(Plugin::InternalUse::Only, 0) - { - } - - IList::IList(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) - { - if (handle) + + BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) { - Plugin::ReferenceManagedClass(handle); + if (this->Handle) + { + Plugin::DereferenceManagedClass(this->Handle); + } + this->Handle = other.Handle; + if (this->Handle) + { + Plugin::ReferenceManagedClass(this->Handle); + } + return *this; } - } - - 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) + + BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) { - Plugin::DereferenceManagedClass(Handle); + 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; } - } - - IList& IList::operator=(const IList& other) - { - if (this->Handle) + + BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) { - Plugin::DereferenceManagedClass(this->Handle); + 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; } - this->Handle = other.Handle; - if (this->Handle) + + bool BaseIComparer::operator==(const BaseIComparer& other) const { - Plugin::ReferenceManagedClass(this->Handle); + return Handle == other.Handle; } - return *this; - } - - IList& IList::operator=(decltype(nullptr) other) - { - if (Handle) + + bool BaseIComparer::operator!=(const BaseIComparer& other) const { - Plugin::DereferenceManagedClass(Handle); - Handle = 0; + return Handle != other.Handle; } - return *this; - } - - IList& IList::operator=(IList&& other) - { - if (Handle) + + int32_t BaseIComparer::Compare(int32_t x, int32_t y) { - Plugin::DereferenceManagedClass(Handle); + 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 {}; + } } - 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; } } } @@ -7606,552 +9716,550 @@ namespace System { namespace Collections { - BaseIList::BaseIList() - : System::Collections::IList(nullptr) + namespace Generic { - CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); - int32_t* handle = &Handle; - int32_t cppHandle = CppHandle; - Plugin::SystemCollectionsBaseIListConstructor(cppHandle, handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } - if (Handle) + BaseIComparer::BaseIComparer() + : System::Collections::Generic::IComparer(nullptr) { - Plugin::ReferenceManagedClass(Handle); + 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; + } } - else + + BaseIComparer::BaseIComparer(decltype(nullptr) n) + : System::Collections::Generic::IComparer(nullptr) { - Plugin::RemoveSystemCollectionsBaseIList(CppHandle); - CppHandle = 0; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); } - if (Plugin::unhandledCsharpException) + + BaseIComparer::BaseIComparer(const BaseIComparer& other) + : System::Collections::Generic::IComparer(nullptr) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Handle = other.Handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - BaseIList::BaseIList(decltype(nullptr) n) - : System::Collections::IList(Plugin::InternalUse::Only, 0) - { - CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); - } - - BaseIList::BaseIList(const BaseIList& other) - : System::Collections::IList(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); - if (Handle) + + BaseIComparer::BaseIComparer(BaseIComparer&& other) + : System::Collections::Generic::IComparer(nullptr) { - Plugin::ReferenceManagedClass(Handle); + Handle = other.Handle; + CppHandle = other.CppHandle; + other.Handle = 0; + other.CppHandle = 0; } - } - - BaseIList::BaseIList(BaseIList&& other) - : System::Collections::IList(Plugin::InternalUse::Only, other.Handle) - { - CppHandle = other.CppHandle; - other.Handle = 0; - other.CppHandle = 0; - } - - BaseIList::BaseIList(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IList(iu, handle) - { - CppHandle = Plugin::StoreSystemCollectionsBaseIList(this); - if (Handle) + + BaseIComparer::BaseIComparer(Plugin::InternalUse iu, int32_t handle) + : System::Collections::Generic::IComparer(nullptr) { - Plugin::ReferenceManagedClass(Handle); + Handle = handle; + CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); + if (Handle) + { + Plugin::ReferenceManagedClass(Handle); + } } - } - - BaseIList::~BaseIList() - { - Plugin::RemoveSystemCollectionsBaseIList(CppHandle); - CppHandle = 0; - if (Handle) + + BaseIComparer::~BaseIComparer() { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + Plugin::RemoveSystemCollectionsGenericBaseIComparerSystemString(CppHandle); + CppHandle = 0; + if (Handle) { - Plugin::ReleaseSystemCollectionsBaseIList(handle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } } - } - - BaseIList& BaseIList::operator=(const BaseIList& other) - { - if (this->Handle) - { - Plugin::DereferenceManagedClass(this->Handle); - } - this->Handle = other.Handle; - if (this->Handle) - { - Plugin::ReferenceManagedClass(this->Handle); - } - return *this; - } - - BaseIList& BaseIList::operator=(decltype(nullptr) other) - { - if (Handle) + + BaseIComparer& BaseIComparer::operator=(const BaseIComparer& other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (this->Handle) { - Plugin::ReleaseSystemCollectionsBaseIList(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 = 0; - return *this; - } - - BaseIList& BaseIList::operator=(BaseIList&& other) - { - Plugin::RemoveSystemCollectionsBaseIList(CppHandle); - CppHandle = 0; - if (Handle) + + BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) { - int32_t handle = Handle; - Handle = 0; - if (Plugin::DereferenceManagedClassNoRelease(handle)) + if (Handle) { - Plugin::ReleaseSystemCollectionsBaseIList(handle); - if (Plugin::unhandledCsharpException) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } + Handle = 0; + return *this; } - Handle = other.Handle; - other.Handle = 0; - return *this; - } - - bool BaseIList::operator==(const BaseIList& other) const - { - return Handle == other.Handle; - } - - bool BaseIList::operator!=(const BaseIList& other) const - { - return Handle != other.Handle; - } - - int32_t BaseIList::Add(System::Object& value) - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsIListAdd(int32_t cppHandle, int32_t valueHandle) - { - try - { - auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->Add(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } - } - - void BaseIList::Clear() - { - } - - DLLEXPORT void SystemCollectionsIListClear(int32_t cppHandle) - { - try - { - Plugin::GetSystemCollectionsBaseIList(cppHandle)->Clear(); - } - catch (System::Exception ex) + + BaseIComparer& BaseIComparer::operator=(BaseIComparer&& other) { - Plugin::SetException(ex.Handle); + 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; } - catch (...) + + bool BaseIComparer::operator==(const BaseIComparer& other) const { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + return Handle == other.Handle; } - } - - System::Boolean BaseIList::Contains(System::Object& value) - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsIListContains(int32_t cppHandle, int32_t valueHandle) - { - try + + bool BaseIComparer::operator!=(const BaseIComparer& other) const { - auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->Contains(value); + return Handle != other.Handle; } - catch (System::Exception ex) + + int32_t BaseIComparer::Compare(System::String& x, System::String& y) { - Plugin::SetException(ex.Handle); return {}; } - catch (...) + + DLLEXPORT int32_t SystemCollectionsGenericIComparerSystemStringCompare(int32_t cppHandle, int32_t xHandle, int32_t yHandle) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + 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 {}; + } } } - - int32_t BaseIList::IndexOf(System::Object& value) + } +} + +namespace System +{ + StringComparer::StringComparer(decltype(nullptr) n) + : 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) { - return {}; + Plugin::ReferenceManagedClass(handle); } - - DLLEXPORT int32_t SystemCollectionsIListIndexOf(int32_t cppHandle, int32_t valueHandle) + } + + 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) { - try - { - auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->IndexOf(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - void BaseIList::Insert(int32_t index, System::Object& value) + } + + StringComparer& StringComparer::operator=(const StringComparer& other) + { + if (this->Handle) { + Plugin::DereferenceManagedClass(this->Handle); } - - DLLEXPORT void SystemCollectionsIListInsert(int32_t cppHandle, int32_t index, int32_t valueHandle) + this->Handle = other.Handle; + if (this->Handle) { - try - { - auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsBaseIList(cppHandle)->Insert(index, value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + Plugin::ReferenceManagedClass(this->Handle); } - - void BaseIList::Remove(System::Object& value) + return *this; + } + + StringComparer& StringComparer::operator=(decltype(nullptr) other) + { + if (Handle) { + Plugin::DereferenceManagedClass(Handle); + Handle = 0; } - - DLLEXPORT void SystemCollectionsIListRemove(int32_t cppHandle, int32_t valueHandle) + return *this; + } + + StringComparer& StringComparer::operator=(StringComparer&& other) + { + if (Handle) { - try - { - auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsBaseIList(cppHandle)->Remove(value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + Plugin::DereferenceManagedClass(Handle); } - - void BaseIList::RemoveAt(int32_t index) + 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); + 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; } - - DLLEXPORT void SystemCollectionsIListRemoveAt(int32_t cppHandle, int32_t index) + if (Handle) { - try - { - Plugin::GetSystemCollectionsBaseIList(cppHandle)->RemoveAt(index); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + Plugin::ReferenceManagedClass(Handle); } - - System::Collections::IEnumerator BaseIList::GetEnumerator() + else { - return nullptr; + Plugin::RemoveSystemBaseStringComparer(CppHandle); + CppHandle = 0; } - - DLLEXPORT int32_t SystemCollectionsIListGetEnumerator(int32_t cppHandle) + if (Plugin::unhandledCsharpException) { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetEnumerator().Handle; - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - void BaseIList::CopyTo(System::Array& array, int32_t index) + } + + BaseStringComparer::BaseStringComparer(decltype(nullptr) n) + : 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) + { + Handle = handle; + CppHandle = Plugin::StoreSystemBaseStringComparer(this); + if (Handle) { + Plugin::ReferenceManagedClass(Handle); } - - DLLEXPORT void SystemCollectionsIListCopyTo(int32_t cppHandle, int32_t arrayHandle, int32_t index) + } + + BaseStringComparer::~BaseStringComparer() + { + Plugin::RemoveSystemBaseStringComparer(CppHandle); + CppHandle = 0; + if (Handle) { - try - { - auto array = System::Array(Plugin::InternalUse::Only, arrayHandle); - Plugin::GetSystemCollectionsBaseIList(cppHandle)->CopyTo(array, index); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); + Plugin::ReleaseSystemBaseStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } - - System::Boolean BaseIList::GetIsFixedSize() - { - return {}; - } - - DLLEXPORT int32_t SystemCollectionsIListGetIsFixedSize(int32_t cppHandle) + } + + BaseStringComparer& BaseStringComparer::operator=(const BaseStringComparer& other) + { + if (this->Handle) { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetIsFixedSize(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + Plugin::DereferenceManagedClass(this->Handle); } - - System::Boolean BaseIList::GetIsReadOnly() + this->Handle = other.Handle; + if (this->Handle) { - return {}; + Plugin::ReferenceManagedClass(this->Handle); } - - DLLEXPORT int32_t SystemCollectionsIListGetIsReadOnly(int32_t cppHandle) + return *this; + } + + BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr) other) + { + if (Handle) { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetIsReadOnly(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + Plugin::ReleaseSystemBaseStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } - - System::Object BaseIList::GetItem(int32_t index) - { - return nullptr; - } - - DLLEXPORT int32_t SystemCollectionsIListGetItem(int32_t cppHandle, int32_t index) + Handle = 0; + return *this; + } + + BaseStringComparer& BaseStringComparer::operator=(BaseStringComparer&& other) + { + Plugin::RemoveSystemBaseStringComparer(CppHandle); + CppHandle = 0; + if (Handle) { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetItem(index).Handle; - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) + int32_t handle = Handle; + Handle = 0; + if (Plugin::DereferenceManagedClassNoRelease(handle)) { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; + Plugin::ReleaseSystemBaseStringComparer(handle); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } } } - - void BaseIList::SetItem(int32_t index, System::Object& value) + 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; + } + + int32_t 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); } - - DLLEXPORT void SystemCollectionsIListSetItem(int32_t cppHandle, int32_t index, int32_t valueHandle) + catch (System::Exception ex) { - try - { - auto value = System::Object(Plugin::InternalUse::Only, valueHandle); - Plugin::GetSystemCollectionsBaseIList(cppHandle)->SetItem(index, value); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - } + Plugin::SetException(ex.Handle); + return {}; } - - int32_t BaseIList::GetCount() + catch (...) { + System::String msg = "Unhandled exception invoking System::StringComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); return {}; } - - DLLEXPORT int32_t SystemCollectionsIListGetCount(int32_t cppHandle) + } + + 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 { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetCount(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + auto x = System::String(Plugin::InternalUse::Only, xHandle); + auto y = System::String(Plugin::InternalUse::Only, yHandle); + return Plugin::GetSystemBaseStringComparer(cppHandle)->Equals(x, y); } - - System::Boolean BaseIList::GetIsSynchronized() + catch (System::Exception ex) { + Plugin::SetException(ex.Handle); return {}; } - - DLLEXPORT int32_t SystemCollectionsIListGetIsSynchronized(int32_t cppHandle) + catch (...) { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetIsSynchronized(); - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + System::String msg = "Unhandled exception invoking System::StringComparer"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return {}; } - - System::Object BaseIList::GetSyncRoot() + } + + int32_t BaseStringComparer::GetHashCode(System::String& obj) + { + return {}; + } + + DLLEXPORT int32_t SystemStringComparerGetHashCode(int32_t cppHandle, int32_t objHandle) + { + try { - return nullptr; + auto obj = System::String(Plugin::InternalUse::Only, objHandle); + return Plugin::GetSystemBaseStringComparer(cppHandle)->GetHashCode(obj); } - - DLLEXPORT int32_t SystemCollectionsIListGetSyncRoot(int32_t cppHandle) - { - try - { - return Plugin::GetSystemCollectionsBaseIList(cppHandle)->GetSyncRoot().Handle; - } - catch (System::Exception ex) - { - Plugin::SetException(ex.Handle); - return {}; - } - catch (...) - { - System::String msg = "Unhandled exception invoking System::Collections::IList"; - System::Exception ex(msg); - Plugin::SetException(ex.Handle); - return {}; - } + 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 {}; } } } @@ -8161,13 +10269,18 @@ namespace System namespace Collections { Queue::Queue(decltype(nullptr) n) - : Queue(Plugin::InternalUse::Only, 0) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) { } Queue::Queue(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -8259,7 +10372,10 @@ namespace System namespace Collections { BaseQueue::BaseQueue() - : System::Collections::Queue(nullptr) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) { CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); int32_t* handle = &Handle; @@ -8291,14 +10407,21 @@ namespace System } BaseQueue::BaseQueue(decltype(nullptr) n) - : System::Collections::Queue(Plugin::InternalUse::Only, 0) + : 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::Collections::Queue(Plugin::InternalUse::Only, other.Handle) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); if (Handle) { @@ -8307,16 +10430,24 @@ namespace System } BaseQueue::BaseQueue(BaseQueue&& other) - : System::Collections::Queue(Plugin::InternalUse::Only, other.Handle) + : 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::Collections::Queue(iu, handle) + : System::ICloneable(nullptr) + , System::Collections::IEnumerable(nullptr) + , System::Collections::ICollection(nullptr) + , System::Collections::Queue(nullptr) { + Handle = handle; CppHandle = Plugin::StoreSystemCollectionsBaseQueue(this); if (Handle) { @@ -8451,13 +10582,12 @@ namespace System namespace Design { IComponentChangeService::IComponentChangeService(decltype(nullptr) n) - : IComponentChangeService(Plugin::InternalUse::Only, 0) { } IComponentChangeService::IComponentChangeService(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -8539,7 +10669,7 @@ namespace System namespace Design { BaseIComponentChangeService::BaseIComponentChangeService() - : System::ComponentModel::Design::IComponentChangeService(nullptr) + : System::ComponentModel::Design::IComponentChangeService(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); int32_t* handle = &Handle; @@ -8571,14 +10701,15 @@ namespace System } BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr) n) - : System::ComponentModel::Design::IComponentChangeService(Plugin::InternalUse::Only, 0) + : System::ComponentModel::Design::IComponentChangeService(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); } BaseIComponentChangeService::BaseIComponentChangeService(const BaseIComponentChangeService& other) - : System::ComponentModel::Design::IComponentChangeService(Plugin::InternalUse::Only, other.Handle) + : System::ComponentModel::Design::IComponentChangeService(nullptr) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); if (Handle) { @@ -8587,16 +10718,18 @@ namespace System } BaseIComponentChangeService::BaseIComponentChangeService(BaseIComponentChangeService&& other) - : System::ComponentModel::Design::IComponentChangeService(Plugin::InternalUse::Only, other.Handle) + : System::ComponentModel::Design::IComponentChangeService(nullptr) { + Handle = other.Handle; CppHandle = other.CppHandle; other.Handle = 0; other.CppHandle = 0; } BaseIComponentChangeService::BaseIComponentChangeService(Plugin::InternalUse iu, int32_t handle) - : System::ComponentModel::Design::IComponentChangeService(iu, handle) + : System::ComponentModel::Design::IComponentChangeService(nullptr) { + Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); if (Handle) { @@ -9077,13 +11210,18 @@ namespace System namespace IO { FileStream::FileStream(decltype(nullptr) n) - : FileStream(Plugin::InternalUse::Only, 0) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) { } FileStream::FileStream(Plugin::InternalUse iu, int32_t handle) - : System::IO::Stream(iu, handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -9156,7 +11294,9 @@ namespace System } FileStream::FileStream(System::String& path, System::IO::FileMode mode) - : System::IO::Stream(nullptr) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) { auto returnValue = Plugin::SystemIOFileStreamConstructorSystemString_SystemIOFileMode(path.Handle, mode); if (Plugin::unhandledCsharpException) @@ -9192,7 +11332,10 @@ namespace System namespace IO { BaseFileStream::BaseFileStream(System::String& path, System::IO::FileMode mode) - : System::IO::FileStream(nullptr) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { CppHandle = Plugin::StoreSystemIOBaseFileStream(this); int32_t* handle = &Handle; @@ -9224,14 +11367,21 @@ namespace System } BaseFileStream::BaseFileStream(decltype(nullptr) n) - : System::IO::FileStream(Plugin::InternalUse::Only, 0) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { CppHandle = Plugin::StoreSystemIOBaseFileStream(this); } BaseFileStream::BaseFileStream(const BaseFileStream& other) - : System::IO::FileStream(Plugin::InternalUse::Only, other.Handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemIOBaseFileStream(this); if (Handle) { @@ -9240,16 +11390,24 @@ namespace System } BaseFileStream::BaseFileStream(BaseFileStream&& other) - : System::IO::FileStream(Plugin::InternalUse::Only, other.Handle) + : 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::IO::FileStream(iu, handle) + : System::MarshalByRefObject(nullptr) + , System::IDisposable(nullptr) + , System::IO::Stream(nullptr) + , System::IO::FileStream(nullptr) { + Handle = handle; CppHandle = Plugin::StoreSystemIOBaseFileStream(this); if (Handle) { @@ -9379,13 +11537,14 @@ namespace UnityEngine namespace Playables { PlayableHandle::PlayableHandle(decltype(nullptr) n) - : PlayableHandle(Plugin::InternalUse::Only, 0) + : System::ValueType(nullptr) { } PlayableHandle::PlayableHandle(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, handle) + : System::ValueType(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); @@ -9396,323 +11555,74 @@ namespace UnityEngine : 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) other) - { - 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; - } - } -} - -namespace System -{ - Object::Object(UnityEngine::Playables::PlayableHandle& val) - { - int32_t handle = Plugin::BoxPlayableHandle(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::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 Playables - { - PlayableGraph::PlayableGraph(decltype(nullptr) n) - : PlayableGraph(Plugin::InternalUse::Only, 0) - { - } - - PlayableGraph::PlayableGraph(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, 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) other) - { - 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; - } - } -} - -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 Animations - { - AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr) n) - : AnimationMixerPlayable(Plugin::InternalUse::Only, 0) - { - } - - AnimationMixerPlayable::AnimationMixerPlayable(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, 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) + + PlayableHandle::PlayableHandle(PlayableHandle&& other) + : PlayableHandle(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - AnimationMixerPlayable::~AnimationMixerPlayable() + PlayableHandle::~PlayableHandle() { if (Handle) { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); Handle = 0; } } - AnimationMixerPlayable& AnimationMixerPlayable::operator=(const AnimationMixerPlayable& other) + PlayableHandle& PlayableHandle::operator=(const PlayableHandle& other) { if (this->Handle) { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Plugin::ReferenceManagedUnityEnginePlayablesPlayableHandle(Handle); } return *this; } - AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr) other) + PlayableHandle& PlayableHandle::operator=(decltype(nullptr) other) { if (Handle) { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); Handle = 0; } return *this; } - AnimationMixerPlayable& AnimationMixerPlayable::operator=(AnimationMixerPlayable&& other) + PlayableHandle& PlayableHandle::operator=(PlayableHandle&& other) { if (Handle) { - Plugin::DereferenceManagedUnityEngineAnimationsAnimationMixerPlayable(Handle); + Plugin::DereferenceManagedUnityEnginePlayablesPlayableHandle(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool AnimationMixerPlayable::operator==(const AnimationMixerPlayable& other) const + bool PlayableHandle::operator==(const PlayableHandle& other) const { return Handle == other.Handle; } - bool AnimationMixerPlayable::operator!=(const AnimationMixerPlayable& other) const + bool PlayableHandle::operator!=(const PlayableHandle& other) const { return Handle != other.Handle; } - - UnityEngine::Animations::AnimationMixerPlayable AnimationMixerPlayable::Create(UnityEngine::Playables::PlayableGraph& graph, int32_t 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); - } } } namespace System { - Object::Object(UnityEngine::Animations::AnimationMixerPlayable& val) + Object::Object(UnityEngine::Playables::PlayableHandle& val) { - int32_t handle = Plugin::BoxAnimationMixerPlayable(val.Handle); + int32_t handle = Plugin::BoxPlayableHandle(val.Handle); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9727,9 +11637,9 @@ namespace System } } - Object::operator UnityEngine::Animations::AnimationMixerPlayable() + Object::operator UnityEngine::Playables::PlayableHandle() { - UnityEngine::Animations::AnimationMixerPlayable returnVal(Plugin::InternalUse::Only, Plugin::UnboxAnimationMixerPlayable(Handle)); + UnityEngine::Playables::PlayableHandle returnVal(Plugin::InternalUse::Only, Plugin::UnboxPlayableHandle(Handle)); if (Plugin::unhandledCsharpException) { System::Exception* ex = Plugin::unhandledCsharpException; @@ -9748,13 +11658,14 @@ namespace UnityEngine namespace UIElements { CallbackEventHandler::CallbackEventHandler(decltype(nullptr) n) - : CallbackEventHandler(Plugin::InternalUse::Only, 0) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) { } CallbackEventHandler::CallbackEventHandler(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -9836,13 +11747,18 @@ namespace UnityEngine namespace UIElements { VisualElement::VisualElement(decltype(nullptr) n) - : VisualElement(Plugin::InternalUse::Only, 0) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::IStyle(nullptr) { } VisualElement::VisualElement(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::Experimental::UIElements::CallbackEventHandler(iu, handle) + : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) + , UnityEngine::Experimental::UIElements::IStyle(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -10027,13 +11943,14 @@ namespace UnityEngine namespace Input { InteractionSourcePose::InteractionSourcePose(decltype(nullptr) n) - : InteractionSourcePose(Plugin::InternalUse::Only, 0) + : System::ValueType(nullptr) { } InteractionSourcePose::InteractionSourcePose(Plugin::InternalUse iu, int32_t handle) - : System::ValueType(iu, handle) + : System::ValueType(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedUnityEngineXRWSAInputInteractionSourcePose(Handle); @@ -10556,13 +12473,20 @@ namespace MyGame namespace MonoBehaviours { TestScript::TestScript(decltype(nullptr) n) - : TestScript(Plugin::InternalUse::Only, 0) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) { } TestScript::TestScript(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::MonoBehaviour(iu, handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -10641,13 +12565,20 @@ namespace MyGame namespace MonoBehaviours { AnotherScript::AnotherScript(decltype(nullptr) n) - : AnotherScript(Plugin::InternalUse::Only, 0) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) { } AnotherScript::AnotherScript(Plugin::InternalUse iu, int32_t handle) - : UnityEngine::MonoBehaviour(iu, handle) + : UnityEngine::Object(nullptr) + , UnityEngine::Component(nullptr) + , UnityEngine::Behaviour(nullptr) + , UnityEngine::MonoBehaviour(nullptr) { + Handle = handle; if (handle) { Plugin::ReferenceManagedClass(handle); @@ -10758,14 +12689,29 @@ namespace Plugin namespace System { Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + : 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 iu, int32_t handle) - : System::Array(iu, 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); @@ -10845,7 +12791,14 @@ namespace System } Array1::Array1(int32_t length0) - : System::Array(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) { auto returnValue = Plugin::SystemSystemInt32Array1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -11036,14 +12989,29 @@ namespace Plugin namespace System { Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + : 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 iu, int32_t handle) - : System::Array(iu, 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); @@ -11123,7 +13091,14 @@ namespace System } Array1::Array1(int32_t length0) - : System::Array(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) { auto returnValue = Plugin::SystemSystemSingleArray1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -11166,7 +13141,11 @@ namespace System namespace System { Array2::Array2(decltype(nullptr) n) - : Array2(Plugin::InternalUse::Only, 0) + : 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; @@ -11174,8 +13153,13 @@ namespace System } Array2::Array2(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, 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); @@ -11269,7 +13253,11 @@ namespace System } Array2::Array2(int32_t length0, int32_t length1) - : System::Array(nullptr) + : 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) @@ -11334,7 +13322,11 @@ namespace System namespace System { Array3::Array3(decltype(nullptr) n) - : Array3(Plugin::InternalUse::Only, 0) + : 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; @@ -11343,8 +13335,13 @@ namespace System } Array3::Array3(Plugin::InternalUse iu, int32_t handle) - : System::Array(iu, 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); @@ -11445,7 +13442,11 @@ namespace System } Array3::Array3(int32_t length0, int32_t length1, int32_t length2) - : System::Array(nullptr) + : 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) @@ -11545,14 +13546,29 @@ namespace Plugin namespace System { Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + : 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 iu, int32_t handle) - : System::Array(iu, 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); @@ -11632,7 +13648,14 @@ namespace System } Array1::Array1(int32_t length0) - : System::Array(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) { auto returnValue = Plugin::SystemSystemStringArray1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -11709,14 +13732,29 @@ namespace Plugin namespace System { Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + : 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 iu, int32_t handle) - : System::Array(iu, 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); @@ -11796,7 +13834,14 @@ namespace System } Array1::Array1(int32_t length0) - : System::Array(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) { auto returnValue = Plugin::UnityEngineUnityEngineResolutionArray1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -11873,14 +13918,29 @@ namespace Plugin namespace System { Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + : 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 iu, int32_t handle) - : System::Array(iu, 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); @@ -11960,7 +14020,14 @@ namespace System } Array1::Array1(int32_t length0) - : System::Array(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) { auto returnValue = Plugin::UnityEngineUnityEngineRaycastHitArray1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -12037,14 +14104,29 @@ namespace Plugin namespace System { Array1::Array1(decltype(nullptr) n) - : Array1(Plugin::InternalUse::Only, 0) + : 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 iu, int32_t handle) - : System::Array(iu, 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); @@ -12124,7 +14206,14 @@ namespace System } Array1::Array1(int32_t length0) - : System::Array(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) { auto returnValue = Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1(length0); if (Plugin::unhandledCsharpException) @@ -12167,7 +14256,6 @@ namespace System namespace System { Action::Action() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemAction(this); int32_t* handle = &Handle; @@ -12201,15 +14289,14 @@ namespace System } Action::Action(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemAction(this); ClassHandle = 0; } Action::Action(const Action& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemAction(this); if (Handle) { @@ -12219,8 +14306,8 @@ namespace System } Action::Action(Action&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -12229,8 +14316,8 @@ namespace System } Action::Action(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemAction(this); if (Handle) { @@ -12404,7 +14491,6 @@ namespace System namespace System { Action1::Action1() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemActionSystemSingle(this); int32_t* handle = &Handle; @@ -12438,15 +14524,14 @@ namespace System } Action1::Action1(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemActionSystemSingle(this); ClassHandle = 0; } Action1::Action1(const Action1& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemActionSystemSingle(this); if (Handle) { @@ -12456,8 +14541,8 @@ namespace System } Action1::Action1(Action1&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -12466,8 +14551,8 @@ namespace System } Action1::Action1(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemActionSystemSingle(this); if (Handle) { @@ -12641,7 +14726,6 @@ namespace System namespace System { Action2::Action2() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); int32_t* handle = &Handle; @@ -12675,15 +14759,14 @@ namespace System } Action2::Action2(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); ClassHandle = 0; } Action2::Action2(const Action2& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); if (Handle) { @@ -12693,8 +14776,8 @@ namespace System } Action2::Action2(Action2&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -12703,8 +14786,8 @@ namespace System } Action2::Action2(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); if (Handle) { @@ -12878,7 +14961,6 @@ namespace System namespace System { Func3::Func3() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); int32_t* handle = &Handle; @@ -12912,15 +14994,14 @@ namespace System } Func3::Func3(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); ClassHandle = 0; } Func3::Func3(const Func3& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); if (Handle) { @@ -12930,8 +15011,8 @@ namespace System } Func3::Func3(Func3&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -12940,8 +15021,8 @@ namespace System } Func3::Func3(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); if (Handle) { @@ -13119,7 +15200,6 @@ namespace System namespace System { Func3::Func3() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); int32_t* handle = &Handle; @@ -13153,15 +15233,14 @@ namespace System } Func3::Func3(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); ClassHandle = 0; } Func3::Func3(const Func3& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); if (Handle) { @@ -13171,8 +15250,8 @@ namespace System } Func3::Func3(Func3&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -13181,8 +15260,8 @@ namespace System } Func3::Func3(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); if (Handle) { @@ -13360,7 +15439,6 @@ namespace System namespace System { AppDomainInitializer::AppDomainInitializer() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemAppDomainInitializer(this); int32_t* handle = &Handle; @@ -13394,15 +15472,14 @@ namespace System } AppDomainInitializer::AppDomainInitializer(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemAppDomainInitializer(this); ClassHandle = 0; } AppDomainInitializer::AppDomainInitializer(const AppDomainInitializer& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemAppDomainInitializer(this); if (Handle) { @@ -13412,8 +15489,8 @@ namespace System } AppDomainInitializer::AppDomainInitializer(AppDomainInitializer&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -13422,8 +15499,8 @@ namespace System } AppDomainInitializer::AppDomainInitializer(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemAppDomainInitializer(this); if (Handle) { @@ -13600,7 +15677,6 @@ namespace UnityEngine namespace Events { UnityAction::UnityAction() - : System::Object(nullptr) { CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); int32_t* handle = &Handle; @@ -13634,15 +15710,14 @@ namespace UnityEngine } UnityAction::UnityAction(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); ClassHandle = 0; } UnityAction::UnityAction(const UnityAction& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); if (Handle) { @@ -13652,8 +15727,8 @@ namespace UnityEngine } UnityAction::UnityAction(UnityAction&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -13662,8 +15737,8 @@ namespace UnityEngine } UnityAction::UnityAction(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); if (Handle) { @@ -13840,7 +15915,6 @@ namespace UnityEngine namespace Events { UnityAction2::UnityAction2() - : System::Object(nullptr) { CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); int32_t* handle = &Handle; @@ -13874,15 +15948,14 @@ namespace UnityEngine } UnityAction2::UnityAction2(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); ClassHandle = 0; } UnityAction2::UnityAction2(const UnityAction2& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); if (Handle) { @@ -13892,8 +15965,8 @@ namespace UnityEngine } UnityAction2::UnityAction2(UnityAction2&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -13902,8 +15975,8 @@ namespace UnityEngine } UnityAction2::UnityAction2(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); if (Handle) { @@ -14083,7 +16156,6 @@ namespace System namespace Design { ComponentEventHandler::ComponentEventHandler() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); int32_t* handle = &Handle; @@ -14117,15 +16189,14 @@ namespace System } ComponentEventHandler::ComponentEventHandler(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); ClassHandle = 0; } ComponentEventHandler::ComponentEventHandler(const ComponentEventHandler& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); if (Handle) { @@ -14135,8 +16206,8 @@ namespace System } ComponentEventHandler::ComponentEventHandler(ComponentEventHandler&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -14145,8 +16216,8 @@ namespace System } ComponentEventHandler::ComponentEventHandler(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); if (Handle) { @@ -14328,7 +16399,6 @@ namespace System namespace Design { ComponentChangingEventHandler::ComponentChangingEventHandler() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); int32_t* handle = &Handle; @@ -14362,15 +16432,14 @@ namespace System } ComponentChangingEventHandler::ComponentChangingEventHandler(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); ClassHandle = 0; } ComponentChangingEventHandler::ComponentChangingEventHandler(const ComponentChangingEventHandler& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); if (Handle) { @@ -14380,8 +16449,8 @@ namespace System } ComponentChangingEventHandler::ComponentChangingEventHandler(ComponentChangingEventHandler&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -14390,8 +16459,8 @@ namespace System } ComponentChangingEventHandler::ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); if (Handle) { @@ -14573,7 +16642,6 @@ namespace System namespace Design { ComponentChangedEventHandler::ComponentChangedEventHandler() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); int32_t* handle = &Handle; @@ -14607,15 +16675,14 @@ namespace System } ComponentChangedEventHandler::ComponentChangedEventHandler(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); ClassHandle = 0; } ComponentChangedEventHandler::ComponentChangedEventHandler(const ComponentChangedEventHandler& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); if (Handle) { @@ -14625,8 +16692,8 @@ namespace System } ComponentChangedEventHandler::ComponentChangedEventHandler(ComponentChangedEventHandler&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -14635,8 +16702,8 @@ namespace System } ComponentChangedEventHandler::ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); if (Handle) { @@ -14818,7 +16885,6 @@ namespace System namespace Design { ComponentRenameEventHandler::ComponentRenameEventHandler() - : System::Object(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); int32_t* handle = &Handle; @@ -14852,15 +16918,14 @@ namespace System } ComponentRenameEventHandler::ComponentRenameEventHandler(decltype(nullptr) n) - : System::Object(Plugin::InternalUse::Only, 0) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); ClassHandle = 0; } ComponentRenameEventHandler::ComponentRenameEventHandler(const ComponentRenameEventHandler& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); if (Handle) { @@ -14870,8 +16935,8 @@ namespace System } ComponentRenameEventHandler::ComponentRenameEventHandler(ComponentRenameEventHandler&& other) - : System::Object(Plugin::InternalUse::Only, other.Handle) { + Handle = other.Handle; CppHandle = other.CppHandle; ClassHandle = other.ClassHandle; other.Handle = 0; @@ -14880,8 +16945,8 @@ namespace System } ComponentRenameEventHandler::ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle) - : System::Object(iu, handle) { + Handle = handle; CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); if (Handle) { @@ -15061,7 +17126,11 @@ namespace System struct NullReferenceExceptionThrower : System::NullReferenceException { NullReferenceExceptionThrower(int32_t handle) - : System::NullReferenceException(Plugin::InternalUse::Only, handle) + : System::Runtime::InteropServices::_Exception(nullptr) + , System::Runtime::Serialization::ISerializable(nullptr) + , System::Exception(nullptr) + , System::SystemException(nullptr) + , System::NullReferenceException(Plugin::InternalUse::Only, handle) { } @@ -15098,23 +17167,56 @@ DLLEXPORT void Init( void (*setException)(int32_t handle), int32_t (*arrayGetLength)(int32_t handle), /*BEGIN INIT PARAMS*/ - int32_t (*systemDiagnosticsStopwatchConstructor)(), - int64_t (*systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds)(int32_t thisHandle), - void (*systemDiagnosticsStopwatchMethodStart)(int32_t thisHandle), - void (*systemDiagnosticsStopwatchMethodReset)(int32_t thisHandle), + UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), + float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), + void (*unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ), + UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b), + UnityEngine::Vector3 (*unityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a), + 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), System::Boolean (*unityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle), System::Boolean (*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), + 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 (*unityEngineResolutionPropertyGetWidth)(int32_t thisHandle), + void (*unityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value), + int32_t (*unityEngineResolutionPropertyGetHeight)(int32_t thisHandle), + void (*unityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value), + int32_t (*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), + 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 (*boxAnimationMixerPlayable)(int32_t valHandle), + int32_t (*unboxAnimationMixerPlayable)(int32_t valHandle), + int32_t (*systemDiagnosticsStopwatchConstructor)(), + int64_t (*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 (*unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type), - int32_t (*unityEngineComponentPropertyGetTransform)(int32_t thisHandle), - UnityEngine::Vector3 (*unityEngineTransformPropertyGetPosition)(int32_t thisHandle), - void (*unityEngineTransformPropertySetPosition)(int32_t thisHandle, UnityEngine::Vector3& value), void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), System::Boolean (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value), @@ -15124,25 +17226,12 @@ DLLEXPORT void Init( void (*unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32)(int32_t* bufferLength, int32_t* numBuffers), void (*unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte)(int32_t hostId, int32_t* addressHandle, int32_t* port, uint8_t* error), void (*unityEngineNetworkingNetworkTransportMethodInit)(), - UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), - float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), - void (*unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ), - UnityEngine::Vector3 (*unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& a, UnityEngine::Vector3& b), - UnityEngine::Vector3 (*unityEngineVector3Methodop_UnaryNegationUnityEngineVector3)(UnityEngine::Vector3& a), - int32_t (*boxVector3)(UnityEngine::Vector3& val), - UnityEngine::Vector3 (*unboxVector3)(int32_t valHandle), int32_t (*boxQuaternion)(UnityEngine::Quaternion& val), UnityEngine::Quaternion (*unboxQuaternion)(int32_t valHandle), float (*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), - 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 (*boxQueryTriggerInteraction)(UnityEngine::QueryTriggerInteraction val), UnityEngine::QueryTriggerInteraction (*unboxQueryTriggerInteraction)(int32_t valHandle), void (*releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble)(int32_t handle), @@ -15168,15 +17257,6 @@ DLLEXPORT void Init( int32_t (*systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue)(int32_t thisHandle), void (*systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue)(int32_t thisHandle, int32_t valueHandle), int32_t (*systemExceptionConstructorSystemString)(int32_t messageHandle), - void (*releaseUnityEngineResolution)(int32_t handle), - int32_t (*unityEngineResolutionPropertyGetWidth)(int32_t thisHandle), - void (*unityEngineResolutionPropertySetWidth)(int32_t thisHandle, int32_t value), - int32_t (*unityEngineResolutionPropertyGetHeight)(int32_t thisHandle), - void (*unityEngineResolutionPropertySetHeight)(int32_t thisHandle, int32_t value), - int32_t (*unityEngineResolutionPropertyGetRefreshRate)(int32_t thisHandle), - void (*unityEngineResolutionPropertySetRefreshRate)(int32_t thisHandle, int32_t value), - int32_t (*boxResolution)(int32_t valHandle), - int32_t (*unboxResolution)(int32_t valHandle), int32_t (*unityEngineScreenPropertyGetResolutions)(), void (*releaseUnityEngineRay)(int32_t handle), int32_t (*unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3)(UnityEngine::Vector3& origin, UnityEngine::Vector3& direction), @@ -15184,10 +17264,6 @@ DLLEXPORT void Init( int32_t (*unboxRay)(int32_t valHandle), int32_t (*unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1)(int32_t rayHandle, int32_t resultsHandle), int32_t (*unityEnginePhysicsMethodRaycastAllUnityEngineRay)(int32_t rayHandle), - int32_t (*boxColor)(UnityEngine::Color& val), - UnityEngine::Color (*unboxColor)(int32_t valHandle), - int32_t (*boxGradientColorKey)(UnityEngine::GradientColorKey& val), - UnityEngine::GradientColorKey (*unboxGradientColorKey)(int32_t valHandle), int32_t (*unityEngineGradientConstructor)(), int32_t (*unityEngineGradientPropertyGetColorKeys)(int32_t thisHandle), void (*unityEngineGradientPropertySetColorKeys)(int32_t thisHandle, int32_t valueHandle), @@ -15216,10 +17292,6 @@ DLLEXPORT void Init( void (*systemCollectionsGenericBaseIComparerSystemStringConstructor)(int32_t cppHandle, int32_t* handle), void (*releaseSystemBaseStringComparer)(int32_t handle), void (*systemBaseStringComparerConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsBaseICollection)(int32_t handle), - void (*systemCollectionsBaseICollectionConstructor)(int32_t cppHandle, int32_t* handle), - void (*releaseSystemCollectionsBaseIList)(int32_t handle), - void (*systemCollectionsBaseIListConstructor)(int32_t cppHandle, int32_t* handle), int32_t (*systemCollectionsQueuePropertyGetCount)(int32_t thisHandle), void (*releaseSystemCollectionsBaseQueue)(int32_t handle), void (*systemCollectionsBaseQueueConstructor)(int32_t cppHandle, int32_t* handle), @@ -15232,13 +17304,6 @@ DLLEXPORT void Init( void (*releaseUnityEnginePlayablesPlayableHandle)(int32_t handle), int32_t (*boxPlayableHandle)(int32_t valHandle), int32_t (*unboxPlayableHandle)(int32_t valHandle), - 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 (*boxAnimationMixerPlayable)(int32_t valHandle), - int32_t (*unboxAnimationMixerPlayable)(int32_t valHandle), 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), @@ -15373,23 +17438,60 @@ DLLEXPORT void Init( Plugin::SetException = setException; Plugin::ArrayGetLength = arrayGetLength; /*BEGIN INIT BODY*/ - Plugin::SystemDiagnosticsStopwatchConstructor = systemDiagnosticsStopwatchConstructor; - Plugin::SystemDiagnosticsStopwatchPropertyGetElapsedMilliseconds = systemDiagnosticsStopwatchPropertyGetElapsedMilliseconds; - Plugin::SystemDiagnosticsStopwatchMethodStart = systemDiagnosticsStopwatchMethodStart; - Plugin::SystemDiagnosticsStopwatchMethodReset = systemDiagnosticsStopwatchMethodReset; + 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::BoxColor = boxColor; + Plugin::UnboxColor = unboxColor; + Plugin::BoxGradientColorKey = boxGradientColorKey; + Plugin::UnboxGradientColorKey = unboxGradientColorKey; + Plugin::ReleaseUnityEngineResolution = releaseUnityEngineResolution; + Plugin::RefCountsUnityEngineResolution = new int32_t[maxManagedObjects](); + 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 = new int32_t[1000](); + Plugin::UnityEngineRaycastHitPropertyGetPoint = unityEngineRaycastHitPropertyGetPoint; + Plugin::UnityEngineRaycastHitPropertySetPoint = unityEngineRaycastHitPropertySetPoint; + Plugin::UnityEngineRaycastHitPropertyGetTransform = unityEngineRaycastHitPropertyGetTransform; + Plugin::BoxRaycastHit = boxRaycastHit; + Plugin::UnboxRaycastHit = unboxRaycastHit; + Plugin::ReleaseUnityEnginePlayablesPlayableGraph = releaseUnityEnginePlayablesPlayableGraph; + Plugin::RefCountsUnityEnginePlayablesPlayableGraph = new int32_t[maxManagedObjects](); + Plugin::BoxPlayableGraph = boxPlayableGraph; + Plugin::UnboxPlayableGraph = unboxPlayableGraph; + Plugin::ReleaseUnityEngineAnimationsAnimationMixerPlayable = releaseUnityEngineAnimationsAnimationMixerPlayable; + Plugin::RefCountsUnityEngineAnimationsAnimationMixerPlayable = new int32_t[maxManagedObjects](); + 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::UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType = unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType; - Plugin::UnityEngineComponentPropertyGetTransform = unityEngineComponentPropertyGetTransform; - Plugin::UnityEngineTransformPropertyGetPosition = unityEngineTransformPropertyGetPosition; - Plugin::UnityEngineTransformPropertySetPosition = unityEngineTransformPropertySetPosition; Plugin::UnityEngineDebugMethodLogSystemObject = unityEngineDebugMethodLogSystemObject; Plugin::UnityEngineAssertionsAssertFieldGetRaiseExceptions = unityEngineAssertionsAssertFieldGetRaiseExceptions; Plugin::UnityEngineAssertionsAssertFieldSetRaiseExceptions = unityEngineAssertionsAssertFieldSetRaiseExceptions; @@ -15399,26 +17501,12 @@ DLLEXPORT void Init( Plugin::UnityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32 = unityEngineAudioSettingsMethodGetDSPBufferSizeSystemInt32_SystemInt32; Plugin::UnityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte = unityEngineNetworkingNetworkTransportMethodGetBroadcastConnectionInfoSystemInt32_SystemString_SystemInt32_SystemByte; Plugin::UnityEngineNetworkingNetworkTransportMethodInit = unityEngineNetworkingNetworkTransportMethodInit; - 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::BoxQuaternion = boxQuaternion; Plugin::UnboxQuaternion = unboxQuaternion; Plugin::UnityEngineMatrix4x4PropertyGetItem = unityEngineMatrix4x4PropertyGetItem; Plugin::UnityEngineMatrix4x4PropertySetItem = unityEngineMatrix4x4PropertySetItem; Plugin::BoxMatrix4x4 = boxMatrix4x4; Plugin::UnboxMatrix4x4 = unboxMatrix4x4; - Plugin::ReleaseUnityEngineRaycastHit = releaseUnityEngineRaycastHit; - Plugin::RefCountsUnityEngineRaycastHit = new int32_t[1000](); - Plugin::UnityEngineRaycastHitPropertyGetPoint = unityEngineRaycastHitPropertyGetPoint; - Plugin::UnityEngineRaycastHitPropertySetPoint = unityEngineRaycastHitPropertySetPoint; - Plugin::UnityEngineRaycastHitPropertyGetTransform = unityEngineRaycastHitPropertyGetTransform; - Plugin::BoxRaycastHit = boxRaycastHit; - Plugin::UnboxRaycastHit = unboxRaycastHit; Plugin::BoxQueryTriggerInteraction = boxQueryTriggerInteraction; Plugin::UnboxQueryTriggerInteraction = unboxQueryTriggerInteraction; Plugin::ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; @@ -15445,16 +17533,6 @@ DLLEXPORT void Init( Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue = systemRuntimeCompilerServicesStrongBoxSystemStringFieldGetValue; Plugin::SystemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue = systemRuntimeCompilerServicesStrongBoxSystemStringFieldSetValue; Plugin::SystemExceptionConstructorSystemString = systemExceptionConstructorSystemString; - Plugin::ReleaseUnityEngineResolution = releaseUnityEngineResolution; - Plugin::RefCountsUnityEngineResolution = new int32_t[maxManagedObjects](); - 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::UnityEngineScreenPropertyGetResolutions = unityEngineScreenPropertyGetResolutions; Plugin::ReleaseUnityEngineRay = releaseUnityEngineRay; Plugin::RefCountsUnityEngineRay = new int32_t[maxManagedObjects](); @@ -15463,10 +17541,6 @@ DLLEXPORT void Init( Plugin::UnboxRay = unboxRay; Plugin::UnityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1 = unityEnginePhysicsMethodRaycastNonAllocUnityEngineRay_UnityEngineRaycastHitArray1; Plugin::UnityEnginePhysicsMethodRaycastAllUnityEngineRay = unityEnginePhysicsMethodRaycastAllUnityEngineRay; - Plugin::BoxColor = boxColor; - Plugin::UnboxColor = unboxColor; - Plugin::BoxGradientColorKey = boxGradientColorKey; - Plugin::UnboxGradientColorKey = unboxGradientColorKey; Plugin::UnityEngineGradientConstructor = unityEngineGradientConstructor; Plugin::UnityEngineGradientPropertyGetColorKeys = unityEngineGradientPropertyGetColorKeys; Plugin::UnityEngineGradientPropertySetColorKeys = unityEngineGradientPropertySetColorKeys; @@ -15520,26 +17594,6 @@ DLLEXPORT void Init( NextFreeSystemBaseStringComparer = SystemBaseStringComparerFreeList + 1; Plugin::ReleaseSystemBaseStringComparer = releaseSystemBaseStringComparer; Plugin::SystemBaseStringComparerConstructor = systemBaseStringComparerConstructor; - SystemCollectionsBaseICollectionFreeListSize = maxManagedObjects; - SystemCollectionsBaseICollectionFreeList = new System::Collections::BaseICollection*[SystemCollectionsBaseICollectionFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsBaseICollectionFreeListSize - 1; i < end; ++i) - { - SystemCollectionsBaseICollectionFreeList[i] = (System::Collections::BaseICollection*)(SystemCollectionsBaseICollectionFreeList + i + 1); - } - SystemCollectionsBaseICollectionFreeList[SystemCollectionsBaseICollectionFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsBaseICollection = SystemCollectionsBaseICollectionFreeList + 1; - Plugin::ReleaseSystemCollectionsBaseICollection = releaseSystemCollectionsBaseICollection; - Plugin::SystemCollectionsBaseICollectionConstructor = systemCollectionsBaseICollectionConstructor; - SystemCollectionsBaseIListFreeListSize = maxManagedObjects; - SystemCollectionsBaseIListFreeList = new System::Collections::BaseIList*[SystemCollectionsBaseIListFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsBaseIListFreeListSize - 1; i < end; ++i) - { - SystemCollectionsBaseIListFreeList[i] = (System::Collections::BaseIList*)(SystemCollectionsBaseIListFreeList + i + 1); - } - SystemCollectionsBaseIListFreeList[SystemCollectionsBaseIListFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsBaseIList = SystemCollectionsBaseIListFreeList + 1; - Plugin::ReleaseSystemCollectionsBaseIList = releaseSystemCollectionsBaseIList; - Plugin::SystemCollectionsBaseIListConstructor = systemCollectionsBaseIListConstructor; Plugin::SystemCollectionsQueuePropertyGetCount = systemCollectionsQueuePropertyGetCount; SystemCollectionsBaseQueueFreeListSize = maxManagedObjects; SystemCollectionsBaseQueueFreeList = new System::Collections::BaseQueue*[SystemCollectionsBaseQueueFreeListSize]; @@ -15577,15 +17631,6 @@ DLLEXPORT void Init( Plugin::RefCountsUnityEnginePlayablesPlayableHandle = new int32_t[maxManagedObjects](); Plugin::BoxPlayableHandle = boxPlayableHandle; Plugin::UnboxPlayableHandle = unboxPlayableHandle; - Plugin::ReleaseUnityEnginePlayablesPlayableGraph = releaseUnityEnginePlayablesPlayableGraph; - Plugin::RefCountsUnityEnginePlayablesPlayableGraph = new int32_t[maxManagedObjects](); - Plugin::BoxPlayableGraph = boxPlayableGraph; - Plugin::UnboxPlayableGraph = unboxPlayableGraph; - Plugin::ReleaseUnityEngineAnimationsAnimationMixerPlayable = releaseUnityEngineAnimationsAnimationMixerPlayable; - Plugin::RefCountsUnityEngineAnimationsAnimationMixerPlayable = new int32_t[maxManagedObjects](); - Plugin::UnityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean = unityEngineAnimationsAnimationMixerPlayableMethodCreateUnityEnginePlayablesPlayableGraph_SystemInt32_SystemBoolean; - Plugin::BoxAnimationMixerPlayable = boxAnimationMixerPlayable; - Plugin::UnboxAnimationMixerPlayable = unboxAnimationMixerPlayable; Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1 = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1; Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemString; Plugin::BoxInteractionSourcePositionAccuracy = boxInteractionSourcePositionAccuracy; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index 040361b..cf746c0 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -207,115 +207,25 @@ namespace System using Double = double; } -/*BEGIN TYPE DECLARATIONS*/ +/*BEGIN TEMPLATE DECLARATIONS*/ namespace System { - namespace Diagnostics - { - struct Stopwatch; - } -} - -namespace UnityEngine -{ - struct Object; -} - -namespace UnityEngine -{ - struct GameObject; -} - -namespace UnityEngine -{ - struct Component; -} - -namespace UnityEngine -{ - struct Transform; -} - -namespace UnityEngine -{ - struct Debug; -} - -namespace UnityEngine -{ - namespace Assertions + namespace Collections { - namespace Assert + namespace Generic { + template struct IEnumerable; } } } -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 Vector3; -} - -namespace UnityEngine -{ - struct Quaternion; -} - -namespace UnityEngine -{ - struct Matrix4x4; -} - -namespace UnityEngine -{ - struct RaycastHit; -} - -namespace UnityEngine -{ - enum struct QueryTriggerInteraction : int32_t - { - UseGlobal = 0, - Ignore = 1, - Collide = 2 - }; -} - namespace System { namespace Collections { namespace Generic { - template struct KeyValuePair; + template struct ICollection; } } } @@ -326,7 +236,7 @@ namespace System { namespace Generic { - template<> struct KeyValuePair; + template struct IList; } } } @@ -337,20 +247,14 @@ namespace System { namespace Generic { - template struct List; + template struct IEqualityComparer; } } } namespace System { - namespace Collections - { - namespace Generic - { - template<> struct List; - } - } + template struct IEquatable; } namespace System @@ -359,7 +263,7 @@ namespace System { namespace Generic { - template<> struct List; + template struct KeyValuePair; } } } @@ -370,7 +274,7 @@ namespace System { namespace Generic { - template struct LinkedListNode; + template struct List; } } } @@ -381,7 +285,7 @@ namespace System { namespace Generic { - template<> struct LinkedListNode; + template struct LinkedListNode; } } } @@ -399,11 +303,11 @@ namespace System namespace System { - namespace Runtime + namespace Collections { - namespace CompilerServices + namespace ObjectModel { - template<> struct StrongBox; + template struct Collection; } } } @@ -414,7 +318,7 @@ namespace System { namespace ObjectModel { - template struct Collection; + template struct KeyedCollection; } } } @@ -423,9 +327,9 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template<> struct Collection; + template struct IComparer; } } } @@ -434,9 +338,9 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template struct KeyedCollection; + template struct BaseIComparer; } } } @@ -445,232 +349,334 @@ namespace System { namespace Collections { - namespace ObjectModel + namespace Generic { - template<> struct KeyedCollection; + template struct BaseIComparer; } } } namespace System { - struct Exception; + template struct Action1; } namespace System { - struct SystemException; + template struct Action2; } namespace System { - struct NullReferenceException; + template struct Func3; } -namespace UnityEngine +namespace System { - struct Resolution; + template struct Func3; } namespace UnityEngine { - struct Screen; + namespace Events + { + template struct UnityAction2; + } } +/*END TEMPLATE DECLARATIONS*/ -namespace UnityEngine +/*BEGIN TYPE DECLARATIONS*/ +namespace System { - struct Ray; + struct IDisposable; } namespace UnityEngine { - struct Physics; + struct Vector3; } namespace UnityEngine { - struct Color; + struct Object; } namespace UnityEngine { - struct GradientColorKey; + struct Component; } namespace UnityEngine { - struct Gradient; + struct Transform; } -namespace System +namespace UnityEngine { - struct AppDomainSetup; + struct Color; } namespace UnityEngine { - struct Application; + struct GradientColorKey; } namespace UnityEngine { - namespace SceneManagement - { - struct SceneManager; - } + struct Resolution; } namespace UnityEngine { - namespace SceneManagement + struct RaycastHit; +} + +namespace System +{ + namespace Runtime { - struct Scene; + namespace Serialization + { + struct ISerializable; + } } } -namespace UnityEngine +namespace System { - namespace SceneManagement + namespace Runtime { - enum struct LoadSceneMode : int32_t + namespace InteropServices { - Single = 0, - Additive = 1 - }; + struct _Exception; + } } } +namespace System +{ + struct IAppDomainSetup; +} + namespace System { namespace Collections { - struct IEnumerator; + struct IComparer; } } namespace System { - struct EventArgs; + namespace Collections + { + struct IEqualityComparer; + } } -namespace System +namespace UnityEngine { - namespace ComponentModel + namespace Playables { - namespace Design - { - struct ComponentEventArgs; - } + struct PlayableGraph; + } +} + +namespace UnityEngine +{ + namespace Playables + { + struct IPlayable; + } +} + +namespace UnityEngine +{ + namespace Animations + { + struct AnimationMixerPlayable; } } namespace System { - namespace ComponentModel + namespace Runtime { - namespace Design + namespace CompilerServices { - struct ComponentChangingEventArgs; + struct IStrongBox; } } } -namespace System +namespace UnityEngine { - namespace ComponentModel + namespace Experimental { - namespace Design + namespace UIElements { - struct ComponentChangedEventArgs; + struct IEventHandler; } } } -namespace System +namespace UnityEngine { - namespace ComponentModel + namespace Experimental { - namespace Design + namespace UIElements { - struct ComponentRenameEventArgs; + struct IStyle; } } } namespace System { - namespace ComponentModel + namespace Diagnostics { - struct MemberDescriptor; + struct Stopwatch; } } namespace UnityEngine { - enum struct PrimitiveType : int32_t - { - Sphere = 0, - Capsule = 1, - Cylinder = 2, - Cube = 3, - Plane = 4, - Quad = 5 - }; + struct GameObject; } namespace UnityEngine { - struct Time; + struct Debug; } -namespace System +namespace UnityEngine { - namespace IO + namespace Assertions { - enum struct FileMode : int32_t + namespace Assert { - CreateNew = 1, - Create = 2, - Open = 3, - OpenOrCreate = 4, - Truncate = 5, - Append = 6 - }; + } + } +} + +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 +{ + enum struct QueryTriggerInteraction : int32_t + { + UseGlobal = 0, + Ignore = 1, + Collide = 2 + }; +} + namespace System { - struct MarshalByRefObject; + struct Exception; } namespace System { - namespace IO + 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 Stream; + struct SceneManager; } } -namespace System +namespace UnityEngine { - namespace Collections + namespace SceneManagement { - namespace Generic - { - template struct IComparer; - } + struct Scene; } } -namespace System +namespace UnityEngine { - namespace Collections + namespace SceneManagement { - namespace Generic + enum struct LoadSceneMode : int32_t { - template<> struct IComparer; - } + Single = 0, + Additive = 1 + }; } } @@ -678,97 +684,122 @@ namespace System { namespace Collections { - namespace Generic - { - template<> struct IComparer; - } + struct IEnumerator; } } namespace System { - namespace Collections + struct EventArgs; +} + +namespace System +{ + namespace ComponentModel { - namespace Generic + namespace Design { - template struct BaseIComparer; + struct ComponentEventArgs; } } } namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - template struct BaseIComparer; + struct ComponentChangingEventArgs; } } } namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - template<> struct BaseIComparer; + struct ComponentChangedEventArgs; } } } namespace System { - namespace Collections + namespace ComponentModel { - namespace Generic + namespace Design { - template<> struct BaseIComparer; + struct ComponentRenameEventArgs; } } } namespace System { - struct StringComparer; + namespace ComponentModel + { + struct MemberDescriptor; + } } -namespace System +namespace UnityEngine { - struct BaseStringComparer; + enum struct PrimitiveType : int32_t + { + Sphere = 0, + Capsule = 1, + Cylinder = 2, + Cube = 3, + Plane = 4, + Quad = 5 + }; +} + +namespace UnityEngine +{ + struct Time; } namespace System { - namespace Collections + namespace IO { - struct ICollection; + enum struct FileMode : int32_t + { + CreateNew = 1, + Create = 2, + Open = 3, + OpenOrCreate = 4, + Truncate = 5, + Append = 6 + }; } } namespace System { - namespace Collections - { - struct BaseICollection; - } + struct MarshalByRefObject; } namespace System { - namespace Collections + namespace IO { - struct IList; + struct Stream; } } namespace System { - namespace Collections - { - struct BaseIList; - } + struct StringComparer; +} + +namespace System +{ + struct BaseStringComparer; } namespace System @@ -833,22 +864,6 @@ namespace UnityEngine } } -namespace UnityEngine -{ - namespace Playables - { - struct PlayableGraph; - } -} - -namespace UnityEngine -{ - namespace Animations - { - struct AnimationMixerPlayable; - } -} - namespace UnityEngine { namespace Experimental @@ -951,229 +966,550 @@ namespace MyGame } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy1_1; + struct Action; } namespace System { - template<> struct Array1; + struct AppDomainInitializer; } -namespace Plugin +namespace UnityEngine { - template<> struct ArrayElementProxy1_1; + namespace Events + { + struct UnityAction; + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy1_2; + namespace ComponentModel + { + namespace Design + { + struct ComponentEventHandler; + } + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy2_2; -} - -namespace Plugin + namespace ComponentModel + { + namespace Design + { + struct ComponentChangingEventHandler; + } + } +} + +namespace System { - template<> struct ArrayElementProxy1_3; + namespace ComponentModel + { + namespace Design + { + struct ComponentChangedEventHandler; + } + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy2_3; + namespace ComponentModel + { + namespace Design + { + struct ComponentRenameEventHandler; + } + } } +/*END TYPE DECLARATIONS*/ -namespace Plugin +/*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/ +namespace System { - template<> struct ArrayElementProxy3_3; + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable; + } + } } namespace System { - template<> struct Array1; + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable; + } + } } namespace System { - template<> struct Array2; + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable; + } + } } namespace System { - template<> struct Array3; + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable; + } + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy1_1; + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable; + } + } } namespace System { - template<> struct Array1; + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable; + } + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy1_1; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } namespace System { - template<> struct Array1; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy1_1; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } namespace System { - template<> struct Array1; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } -namespace Plugin +namespace System { - template<> struct ArrayElementProxy1_1; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } namespace System { - template<> struct Array1; + namespace Collections + { + namespace Generic + { + template<> struct ICollection; + } + } } namespace System { - struct Action; + namespace Collections + { + namespace Generic + { + template<> struct IList; + } + } } namespace System { - template struct Action1; + namespace Collections + { + namespace Generic + { + template<> struct IList; + } + } } namespace System { - template<> struct Action1; + namespace Collections + { + namespace Generic + { + template<> struct IList; + } + } } namespace System { - template struct Action2; + namespace Collections + { + namespace Generic + { + template<> struct IList; + } + } } namespace System { - template<> struct Action2; + namespace Collections + { + namespace Generic + { + template<> struct IList; + } + } } namespace System { - template struct Func3; + namespace Collections + { + namespace Generic + { + template<> struct IList; + } + } } namespace System { - template struct Func3; + namespace Collections + { + namespace Generic + { + template<> struct IEqualityComparer; + } + } } namespace System { - template<> struct Func3; + namespace Collections + { + namespace Generic + { + template<> struct IEqualityComparer; + } + } } namespace System { - template<> struct Func3; + template<> struct IEquatable; } namespace System { - struct AppDomainInitializer; + namespace Collections + { + namespace Generic + { + template<> struct KeyValuePair; + } + } } -namespace UnityEngine +namespace System { - namespace Events + namespace Collections { - struct UnityAction; + namespace Generic + { + template<> struct List; + } } } -namespace UnityEngine +namespace System { - namespace Events + namespace Collections { - template struct UnityAction2; + namespace Generic + { + template<> struct List; + } } } -namespace UnityEngine +namespace System { - namespace Events + namespace Collections { - template<> struct UnityAction2; + namespace Generic + { + template<> struct LinkedListNode; + } } } namespace System { - namespace ComponentModel + namespace Runtime { - namespace Design + namespace CompilerServices { - struct ComponentEventHandler; + template<> struct StrongBox; } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace ObjectModel { - struct ComponentChangingEventHandler; + template<> struct Collection; } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace ObjectModel { - struct ComponentChangedEventHandler; + template<> struct KeyedCollection; } } } namespace System { - namespace ComponentModel + namespace Collections { - namespace Design + namespace Generic { - struct ComponentRenameEventHandler; + template<> struct IComparer; } } } -/*END TYPE DECLARATIONS*/ -//////////////////////////////////////////////////////////////// -// C# type definitions -//////////////////////////////////////////////////////////////// +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IComparer; + } + } +} namespace System { - struct Object + namespace Collections + { + namespace Generic + { + template<> struct BaseIComparer; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct BaseIComparer; + } + } +} + +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 { int32_t Handle; + Object(); Object(Plugin::InternalUse iu, int32_t handle); Object(decltype(nullptr) n); virtual ~Object() = default; @@ -1184,24 +1520,28 @@ namespace System /*BEGIN BOXING METHOD DECLARATIONS*/ Object(UnityEngine::Vector3& val); 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::RaycastHit& val); - explicit operator UnityEngine::RaycastHit(); Object(UnityEngine::QueryTriggerInteraction val); explicit operator UnityEngine::QueryTriggerInteraction(); Object(System::Collections::Generic::KeyValuePair& val); explicit operator System::Collections::Generic::KeyValuePair(); - Object(UnityEngine::Resolution& val); - explicit operator UnityEngine::Resolution(); Object(UnityEngine::Ray& val); explicit operator UnityEngine::Ray(); - Object(UnityEngine::Color& val); - explicit operator UnityEngine::Color(); - Object(UnityEngine::GradientColorKey& val); - explicit operator UnityEngine::GradientColorKey(); Object(UnityEngine::SceneManagement::Scene& val); explicit operator UnityEngine::SceneManagement::Scene(); Object(UnityEngine::SceneManagement::LoadSceneMode val); @@ -1212,10 +1552,6 @@ namespace System explicit operator System::IO::FileMode(); Object(UnityEngine::Playables::PlayableHandle& val); explicit operator UnityEngine::Playables::PlayableHandle(); - Object(UnityEngine::Playables::PlayableGraph& val); - explicit operator UnityEngine::Playables::PlayableGraph(); - Object(UnityEngine::Animations::AnimationMixerPlayable& val); - explicit operator UnityEngine::Animations::AnimationMixerPlayable(); Object(UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy val); explicit operator UnityEngine::XR::WSA::Input::InteractionSourcePositionAccuracy(); Object(UnityEngine::XR::WSA::Input::InteractionSourceNode val); @@ -1249,14 +1585,13 @@ namespace System /*END BOXING METHOD DECLARATIONS*/ }; - struct ValueType + struct ValueType : virtual Object { - int32_t Handle; ValueType(Plugin::InternalUse iu, int32_t handle); ValueType(decltype(nullptr) n); }; - struct String : Object + struct String : virtual Object { String(Plugin::InternalUse iu, int32_t handle); String(decltype(nullptr) n); @@ -1269,30 +1604,923 @@ namespace System String(const char* chars); }; - struct Array : Object + struct ICloneable : virtual Object + { + ICloneable(Plugin::InternalUse iu, int32_t handle); + ICloneable(decltype(nullptr) n); + }; + + namespace Collections + { + struct IEnumerable : virtual Object + { + IEnumerable(Plugin::InternalUse iu, int32_t handle); + IEnumerable(decltype(nullptr) n); + }; + + struct ICollection : virtual IEnumerable + { + ICollection(Plugin::InternalUse iu, int32_t handle); + ICollection(decltype(nullptr) n); + }; + + struct IList : virtual ICollection, virtual IEnumerable + { + IList(Plugin::InternalUse iu, int32_t handle); + IList(decltype(nullptr) n); + }; + } + + struct Array : virtual ICloneable, virtual Collections::IList + { + Array(Plugin::InternalUse iu, int32_t handle); + Array(decltype(nullptr) n); + int32_t GetLength(); + int32_t GetRank(); + }; +} + +//////////////////////////////////////////////////////////////// +// Global variables +//////////////////////////////////////////////////////////////// + +namespace Plugin +{ + extern System::String NullString; +} + +/*BEGIN TYPE DEFINITIONS*/ +namespace System +{ + struct IDisposable : virtual System::Object + { + IDisposable(decltype(nullptr) n); + IDisposable(Plugin::InternalUse iu, int32_t handle); + IDisposable(const IDisposable& other); + IDisposable(IDisposable&& other); + virtual ~IDisposable(); + IDisposable& operator=(const IDisposable& other); + IDisposable& operator=(decltype(nullptr) other); + IDisposable& operator=(IDisposable&& other); + bool operator==(const IDisposable& other) const; + bool operator!=(const IDisposable& other) const; + }; +} + +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); + UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); + UnityEngine::Vector3 operator-(); + }; +} + +namespace UnityEngine +{ + struct Object : virtual System::Object + { + Object(decltype(nullptr) n); + Object(Plugin::InternalUse iu, int32_t handle); + Object(const Object& other); + Object(Object&& other); + virtual ~Object(); + Object& operator=(const Object& other); + Object& operator=(decltype(nullptr) other); + 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) n); + Component(Plugin::InternalUse iu, int32_t handle); + Component(const Component& other); + Component(Component&& other); + virtual ~Component(); + Component& operator=(const Component& other); + Component& operator=(decltype(nullptr) other); + 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) n); + Transform(Plugin::InternalUse iu, int32_t handle); + Transform(const Transform& other); + Transform(Transform&& other); + virtual ~Transform(); + Transform& operator=(const Transform& other); + Transform& operator=(decltype(nullptr) other); + 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 UnityEngine +{ + struct Color + { + Color(); + float r; + float g; + float b; + float a; + }; +} + +namespace UnityEngine +{ + struct GradientColorKey + { + GradientColorKey(); + UnityEngine::Color color; + float time; + }; +} + +namespace UnityEngine +{ + struct Resolution : virtual System::ValueType + { + Resolution(decltype(nullptr) n); + Resolution(Plugin::InternalUse iu, int32_t handle); + Resolution(const Resolution& other); + Resolution(Resolution&& other); + virtual ~Resolution(); + Resolution& operator=(const Resolution& other); + Resolution& operator=(decltype(nullptr) other); + 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); + }; +} + +namespace UnityEngine +{ + struct RaycastHit : virtual System::ValueType + { + RaycastHit(decltype(nullptr) n); + RaycastHit(Plugin::InternalUse iu, int32_t handle); + RaycastHit(const RaycastHit& other); + RaycastHit(RaycastHit&& other); + virtual ~RaycastHit(); + RaycastHit& operator=(const RaycastHit& other); + RaycastHit& operator=(decltype(nullptr) other); + 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(); + }; +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr) n); + 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) other); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr) n); + 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) other); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr) n); + 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) other); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr) n); + 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) other); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr) n); + 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) other); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IEnumerable : virtual System::Collections::IEnumerable + { + IEnumerable(decltype(nullptr) n); + 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) other); + IEnumerable& operator=(IEnumerable&& other); + bool operator==(const IEnumerable& other) const; + bool operator!=(const IEnumerable& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct ICollection : virtual System::Collections::Generic::IEnumerable + { + ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(ICollection&& other); + bool operator==(const ICollection& other) const; + bool operator!=(const ICollection& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + template<> struct IList : virtual System::Collections::Generic::ICollection + { + IList(decltype(nullptr) n); + 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) other); + IList& operator=(IList&& other); + bool operator==(const IList& other) const; + bool operator!=(const IList& other) const; + }; + } + } +} + +namespace System +{ + namespace Runtime + { + namespace Serialization + { + struct ISerializable : virtual System::Object + { + ISerializable(decltype(nullptr) n); + 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) other); + 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) n); + _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) other); + _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) n); + 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) other); + 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) n); + 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) other); + 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) n); + 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) other); + 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) n); + 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) other); + 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) n); + 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) other); + IEqualityComparer& operator=(IEqualityComparer&& other); + bool operator==(const IEqualityComparer& other) const; + bool operator!=(const IEqualityComparer& other) const; + }; + } + } +} + +namespace UnityEngine +{ + namespace Playables + { + struct PlayableGraph : virtual System::ValueType + { + PlayableGraph(decltype(nullptr) n); + 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) other); + PlayableGraph& operator=(PlayableGraph&& other); + bool operator==(const PlayableGraph& other) const; + bool operator!=(const PlayableGraph& other) const; + }; + } +} + +namespace UnityEngine +{ + namespace Playables + { + struct IPlayable : virtual System::Object + { + IPlayable(decltype(nullptr) n); + 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) other); + 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) n); + 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) other); + IEquatable& operator=(IEquatable&& other); + bool operator==(const IEquatable& other) const; + bool operator!=(const IEquatable& other) const; + }; +} + +namespace UnityEngine +{ + namespace Animations + { + struct AnimationMixerPlayable : virtual System::ValueType, virtual System::IEquatable, virtual UnityEngine::Playables::IPlayable + { + AnimationMixerPlayable(decltype(nullptr) n); + 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) other); + 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); + }; + } +} + +namespace System +{ + namespace Runtime { - Array(Plugin::InternalUse iu, int32_t handle); - Array(decltype(nullptr) n); - int32_t GetLength(); - int32_t GetRank(); - }; + namespace CompilerServices + { + struct IStrongBox : virtual System::Object + { + IStrongBox(decltype(nullptr) n); + 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) other); + IStrongBox& operator=(IStrongBox&& other); + bool operator==(const IStrongBox& other) const; + bool operator!=(const IStrongBox& other) const; + }; + } + } } -//////////////////////////////////////////////////////////////// -// Global variables -//////////////////////////////////////////////////////////////// +namespace UnityEngine +{ + namespace Experimental + { + namespace UIElements + { + struct IEventHandler : virtual System::Object + { + IEventHandler(decltype(nullptr) n); + 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) other); + IEventHandler& operator=(IEventHandler&& other); + bool operator==(const IEventHandler& other) const; + bool operator!=(const IEventHandler& other) const; + }; + } + } +} -namespace Plugin +namespace UnityEngine { - extern System::String NullString; + namespace Experimental + { + namespace UIElements + { + struct IStyle : virtual System::Object + { + IStyle(decltype(nullptr) n); + 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) other); + IStyle& operator=(IStyle&& other); + bool operator==(const IStyle& other) const; + bool operator!=(const IStyle& other) const; + }; + } + } } -/*BEGIN TYPE DEFINITIONS*/ namespace System { namespace Diagnostics { - struct Stopwatch : System::Object + struct Stopwatch : virtual System::Object { Stopwatch(decltype(nullptr) n); Stopwatch(Plugin::InternalUse iu, int32_t handle); @@ -1314,28 +2542,7 @@ namespace System namespace UnityEngine { - struct Object : System::Object - { - Object(decltype(nullptr) n); - Object(Plugin::InternalUse iu, int32_t handle); - Object(const Object& other); - Object(Object&& other); - virtual ~Object(); - Object& operator=(const Object& other); - Object& operator=(decltype(nullptr) other); - 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 GameObject : UnityEngine::Object + struct GameObject : virtual UnityEngine::Object { GameObject(decltype(nullptr) n); GameObject(Plugin::InternalUse iu, int32_t handle); @@ -1357,44 +2564,7 @@ namespace UnityEngine namespace UnityEngine { - struct Component : UnityEngine::Object - { - Component(decltype(nullptr) n); - Component(Plugin::InternalUse iu, int32_t handle); - Component(const Component& other); - Component(Component&& other); - virtual ~Component(); - Component& operator=(const Component& other); - Component& operator=(decltype(nullptr) other); - Component& operator=(Component&& other); - bool operator==(const Component& other) const; - bool operator!=(const Component& other) const; - UnityEngine::Transform GetTransform(); - }; -} - -namespace UnityEngine -{ - struct Transform : UnityEngine::Component - { - Transform(decltype(nullptr) n); - Transform(Plugin::InternalUse iu, int32_t handle); - Transform(const Transform& other); - Transform(Transform&& other); - virtual ~Transform(); - Transform& operator=(const Transform& other); - Transform& operator=(decltype(nullptr) other); - 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 UnityEngine -{ - struct Debug : System::Object + struct Debug : virtual System::Object { Debug(decltype(nullptr) n); Debug(Plugin::InternalUse iu, int32_t handle); @@ -1425,7 +2595,7 @@ namespace UnityEngine namespace UnityEngine { - struct Collision : System::Object + struct Collision : virtual System::Object { Collision(decltype(nullptr) n); Collision(Plugin::InternalUse iu, int32_t handle); @@ -1442,7 +2612,7 @@ namespace UnityEngine namespace UnityEngine { - struct Behaviour : UnityEngine::Component + struct Behaviour : virtual UnityEngine::Component { Behaviour(decltype(nullptr) n); Behaviour(Plugin::InternalUse iu, int32_t handle); @@ -1459,7 +2629,7 @@ namespace UnityEngine namespace UnityEngine { - struct MonoBehaviour : UnityEngine::Behaviour + struct MonoBehaviour : virtual UnityEngine::Behaviour { MonoBehaviour(decltype(nullptr) n); MonoBehaviour(Plugin::InternalUse iu, int32_t handle); @@ -1477,7 +2647,7 @@ namespace UnityEngine namespace UnityEngine { - struct AudioSettings : System::Object + struct AudioSettings : virtual System::Object { AudioSettings(decltype(nullptr) n); AudioSettings(Plugin::InternalUse iu, int32_t handle); @@ -1497,7 +2667,7 @@ namespace UnityEngine { namespace Networking { - struct NetworkTransport : System::Object + struct NetworkTransport : virtual System::Object { NetworkTransport(decltype(nullptr) n); NetworkTransport(Plugin::InternalUse iu, int32_t handle); @@ -1515,22 +2685,6 @@ namespace UnityEngine } } -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); - UnityEngine::Vector3 operator+(UnityEngine::Vector3& a); - UnityEngine::Vector3 operator-(); - }; -} - namespace UnityEngine { struct Quaternion @@ -1569,33 +2723,13 @@ namespace UnityEngine }; } -namespace UnityEngine -{ - struct RaycastHit : System::ValueType - { - RaycastHit(decltype(nullptr) n); - RaycastHit(Plugin::InternalUse iu, int32_t handle); - RaycastHit(const RaycastHit& other); - RaycastHit(RaycastHit&& other); - virtual ~RaycastHit(); - RaycastHit& operator=(const RaycastHit& other); - RaycastHit& operator=(decltype(nullptr) other); - 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(); - }; -} - namespace System { namespace Collections { namespace Generic { - template<> struct KeyValuePair : System::ValueType + template<> struct KeyValuePair : virtual System::ValueType { KeyValuePair(decltype(nullptr) n); KeyValuePair(Plugin::InternalUse iu, int32_t handle); @@ -1621,7 +2755,7 @@ namespace System { namespace Generic { - template<> struct List : System::Object + template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList { List(decltype(nullptr) n); List(Plugin::InternalUse iu, int32_t handle); @@ -1649,7 +2783,7 @@ namespace System { namespace Generic { - template<> struct List : System::Object + template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList { List(decltype(nullptr) n); List(Plugin::InternalUse iu, int32_t handle); @@ -1677,7 +2811,7 @@ namespace System { namespace Generic { - template<> struct LinkedListNode : System::Object + template<> struct LinkedListNode : virtual System::Object { LinkedListNode(decltype(nullptr) n); LinkedListNode(Plugin::InternalUse iu, int32_t handle); @@ -1703,7 +2837,7 @@ namespace System { namespace CompilerServices { - template<> struct StrongBox : System::Object + template<> struct StrongBox : virtual System::Runtime::CompilerServices::IStrongBox { StrongBox(decltype(nullptr) n); StrongBox(Plugin::InternalUse iu, int32_t handle); @@ -1729,7 +2863,7 @@ namespace System { namespace ObjectModel { - template<> struct Collection : System::Object + template<> struct Collection : virtual System::Collections::IList, virtual System::Collections::Generic::IList { Collection(decltype(nullptr) n); Collection(Plugin::InternalUse iu, int32_t handle); @@ -1752,7 +2886,7 @@ namespace System { namespace ObjectModel { - template<> struct KeyedCollection : System::Collections::ObjectModel::Collection + template<> struct KeyedCollection : virtual System::Collections::ObjectModel::Collection, virtual System::Collections::IList, virtual System::Collections::Generic::IList { KeyedCollection(decltype(nullptr) n); KeyedCollection(Plugin::InternalUse iu, int32_t handle); @@ -1771,7 +2905,7 @@ namespace System namespace System { - struct Exception : System::Object + struct Exception : virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { Exception(decltype(nullptr) n); Exception(Plugin::InternalUse iu, int32_t handle); @@ -1789,7 +2923,7 @@ namespace System namespace System { - struct SystemException : System::Exception + struct SystemException : virtual System::Exception, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { SystemException(decltype(nullptr) n); SystemException(Plugin::InternalUse iu, int32_t handle); @@ -1806,7 +2940,7 @@ namespace System namespace System { - struct NullReferenceException : System::SystemException + struct NullReferenceException : virtual System::SystemException, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { NullReferenceException(decltype(nullptr) n); NullReferenceException(Plugin::InternalUse iu, int32_t handle); @@ -1823,30 +2957,7 @@ namespace System namespace UnityEngine { - struct Resolution : System::ValueType - { - Resolution(decltype(nullptr) n); - Resolution(Plugin::InternalUse iu, int32_t handle); - Resolution(const Resolution& other); - Resolution(Resolution&& other); - virtual ~Resolution(); - Resolution& operator=(const Resolution& other); - Resolution& operator=(decltype(nullptr) other); - 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); - }; -} - -namespace UnityEngine -{ - struct Screen : System::Object + struct Screen : virtual System::Object { Screen(decltype(nullptr) n); Screen(Plugin::InternalUse iu, int32_t handle); @@ -1864,7 +2975,7 @@ namespace UnityEngine namespace UnityEngine { - struct Ray : System::ValueType + struct Ray : virtual System::ValueType { Ray(decltype(nullptr) n); Ray(Plugin::InternalUse iu, int32_t handle); @@ -1882,7 +2993,7 @@ namespace UnityEngine namespace UnityEngine { - struct Physics : System::Object + struct Physics : virtual System::Object { Physics(decltype(nullptr) n); Physics(Plugin::InternalUse iu, int32_t handle); @@ -1901,29 +3012,7 @@ namespace UnityEngine namespace UnityEngine { - struct Color - { - Color(); - float r; - float g; - float b; - float a; - }; -} - -namespace UnityEngine -{ - struct GradientColorKey - { - GradientColorKey(); - UnityEngine::Color color; - float time; - }; -} - -namespace UnityEngine -{ - struct Gradient : System::Object + struct Gradient : virtual System::Object { Gradient(decltype(nullptr) n); Gradient(Plugin::InternalUse iu, int32_t handle); @@ -1943,7 +3032,7 @@ namespace UnityEngine namespace System { - struct AppDomainSetup : System::Object + struct AppDomainSetup : virtual System::IAppDomainSetup { AppDomainSetup(decltype(nullptr) n); AppDomainSetup(Plugin::InternalUse iu, int32_t handle); @@ -1963,7 +3052,7 @@ namespace System namespace UnityEngine { - struct Application : System::Object + struct Application : virtual System::Object { Application(decltype(nullptr) n); Application(Plugin::InternalUse iu, int32_t handle); @@ -1984,7 +3073,7 @@ namespace UnityEngine { namespace SceneManagement { - struct SceneManager : System::Object + struct SceneManager : virtual System::Object { SceneManager(decltype(nullptr) n); SceneManager(Plugin::InternalUse iu, int32_t handle); @@ -2006,7 +3095,7 @@ namespace UnityEngine { namespace SceneManagement { - struct Scene : System::ValueType + struct Scene : virtual System::ValueType { Scene(decltype(nullptr) n); Scene(Plugin::InternalUse iu, int32_t handle); @@ -2026,7 +3115,7 @@ namespace System { namespace Collections { - struct IEnumerator : System::Object + struct IEnumerator : virtual System::Object { IEnumerator(decltype(nullptr) n); IEnumerator(Plugin::InternalUse iu, int32_t handle); @@ -2046,7 +3135,7 @@ namespace System namespace System { - struct EventArgs : System::Object + struct EventArgs : virtual System::Object { EventArgs(decltype(nullptr) n); EventArgs(Plugin::InternalUse iu, int32_t handle); @@ -2067,7 +3156,7 @@ namespace System { namespace Design { - struct ComponentEventArgs : System::EventArgs + struct ComponentEventArgs : virtual System::EventArgs { ComponentEventArgs(decltype(nullptr) n); ComponentEventArgs(Plugin::InternalUse iu, int32_t handle); @@ -2090,7 +3179,7 @@ namespace System { namespace Design { - struct ComponentChangingEventArgs : System::EventArgs + struct ComponentChangingEventArgs : virtual System::EventArgs { ComponentChangingEventArgs(decltype(nullptr) n); ComponentChangingEventArgs(Plugin::InternalUse iu, int32_t handle); @@ -2113,7 +3202,7 @@ namespace System { namespace Design { - struct ComponentChangedEventArgs : System::EventArgs + struct ComponentChangedEventArgs : virtual System::EventArgs { ComponentChangedEventArgs(decltype(nullptr) n); ComponentChangedEventArgs(Plugin::InternalUse iu, int32_t handle); @@ -2136,7 +3225,7 @@ namespace System { namespace Design { - struct ComponentRenameEventArgs : System::EventArgs + struct ComponentRenameEventArgs : virtual System::EventArgs { ComponentRenameEventArgs(decltype(nullptr) n); ComponentRenameEventArgs(Plugin::InternalUse iu, int32_t handle); @@ -2157,7 +3246,7 @@ namespace System { namespace ComponentModel { - struct MemberDescriptor : System::Object + struct MemberDescriptor : virtual System::Object { MemberDescriptor(decltype(nullptr) n); MemberDescriptor(Plugin::InternalUse iu, int32_t handle); @@ -2175,7 +3264,7 @@ namespace System namespace UnityEngine { - struct Time : System::Object + struct Time : virtual System::Object { Time(decltype(nullptr) n); Time(Plugin::InternalUse iu, int32_t handle); @@ -2193,7 +3282,7 @@ namespace UnityEngine namespace System { - struct MarshalByRefObject : System::Object + struct MarshalByRefObject : virtual System::Object { MarshalByRefObject(decltype(nullptr) n); MarshalByRefObject(Plugin::InternalUse iu, int32_t handle); @@ -2212,7 +3301,7 @@ namespace System { namespace IO { - struct Stream : System::MarshalByRefObject + struct Stream : virtual System::MarshalByRefObject, virtual System::IDisposable { Stream(decltype(nullptr) n); Stream(Plugin::InternalUse iu, int32_t handle); @@ -2234,7 +3323,7 @@ namespace System { namespace Generic { - template<> struct IComparer : System::Object + template<> struct IComparer : virtual System::Object { IComparer(decltype(nullptr) n); IComparer(Plugin::InternalUse iu, int32_t handle); @@ -2257,7 +3346,7 @@ namespace System { namespace Generic { - template<> struct IComparer : System::Object + template<> struct IComparer : virtual System::Object { IComparer(decltype(nullptr) n); IComparer(Plugin::InternalUse iu, int32_t handle); @@ -2280,7 +3369,7 @@ namespace System { namespace Generic { - template<> struct BaseIComparer : System::Collections::Generic::IComparer + template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer { BaseIComparer(decltype(nullptr) n); BaseIComparer(Plugin::InternalUse iu, int32_t handle); @@ -2306,7 +3395,7 @@ namespace System { namespace Generic { - template<> struct BaseIComparer : System::Collections::Generic::IComparer + template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer { BaseIComparer(decltype(nullptr) n); BaseIComparer(Plugin::InternalUse iu, int32_t handle); @@ -2328,7 +3417,7 @@ namespace System namespace System { - struct StringComparer : System::Object + struct StringComparer : virtual System::Collections::IComparer, virtual System::Collections::Generic::IComparer, virtual System::Collections::IEqualityComparer, virtual System::Collections::Generic::IEqualityComparer { StringComparer(decltype(nullptr) n); StringComparer(Plugin::InternalUse iu, int32_t handle); @@ -2345,7 +3434,7 @@ namespace System namespace System { - struct BaseStringComparer : System::StringComparer + struct BaseStringComparer : virtual System::StringComparer { BaseStringComparer(decltype(nullptr) n); BaseStringComparer(Plugin::InternalUse iu, int32_t handle); @@ -2369,112 +3458,7 @@ namespace System { namespace Collections { - struct ICollection : System::Object - { - ICollection(decltype(nullptr) n); - 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) other); - ICollection& operator=(ICollection&& other); - bool operator==(const ICollection& other) const; - bool operator!=(const ICollection& other) const; - }; - } -} - -namespace System -{ - namespace Collections - { - struct BaseICollection : System::Collections::ICollection - { - BaseICollection(decltype(nullptr) n); - BaseICollection(Plugin::InternalUse iu, int32_t handle); - BaseICollection(const BaseICollection& other); - BaseICollection(BaseICollection&& other); - virtual ~BaseICollection(); - BaseICollection& operator=(const BaseICollection& other); - BaseICollection& operator=(decltype(nullptr) other); - BaseICollection& operator=(BaseICollection&& other); - bool operator==(const BaseICollection& other) const; - bool operator!=(const BaseICollection& other) const; - int32_t CppHandle; - BaseICollection(); - virtual void CopyTo(System::Array& array, int32_t index); - virtual System::Collections::IEnumerator GetEnumerator(); - virtual int32_t GetCount(); - virtual System::Boolean GetIsSynchronized(); - virtual System::Object GetSyncRoot(); - }; - } -} - -namespace System -{ - namespace Collections - { - struct IList : System::Object - { - IList(decltype(nullptr) n); - 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) other); - IList& operator=(IList&& other); - bool operator==(const IList& other) const; - bool operator!=(const IList& other) const; - }; - } -} - -namespace System -{ - namespace Collections - { - struct BaseIList : System::Collections::IList - { - BaseIList(decltype(nullptr) n); - BaseIList(Plugin::InternalUse iu, int32_t handle); - BaseIList(const BaseIList& other); - BaseIList(BaseIList&& other); - virtual ~BaseIList(); - BaseIList& operator=(const BaseIList& other); - BaseIList& operator=(decltype(nullptr) other); - BaseIList& operator=(BaseIList&& other); - bool operator==(const BaseIList& other) const; - bool operator!=(const BaseIList& other) const; - int32_t CppHandle; - BaseIList(); - virtual int32_t Add(System::Object& value); - virtual void Clear(); - virtual System::Boolean Contains(System::Object& value); - virtual int32_t IndexOf(System::Object& value); - virtual void Insert(int32_t index, System::Object& value); - virtual void Remove(System::Object& value); - virtual void RemoveAt(int32_t index); - virtual System::Collections::IEnumerator GetEnumerator(); - virtual void CopyTo(System::Array& array, int32_t index); - virtual System::Boolean GetIsFixedSize(); - virtual System::Boolean GetIsReadOnly(); - virtual System::Object GetItem(int32_t index); - virtual void SetItem(int32_t index, System::Object& value); - virtual int32_t GetCount(); - virtual System::Boolean GetIsSynchronized(); - virtual System::Object GetSyncRoot(); - }; - } -} - -namespace System -{ - namespace Collections - { - struct Queue : System::Object + struct Queue : virtual System::ICloneable, virtual System::Collections::ICollection { Queue(decltype(nullptr) n); Queue(Plugin::InternalUse iu, int32_t handle); @@ -2495,7 +3479,7 @@ namespace System { namespace Collections { - struct BaseQueue : System::Collections::Queue + struct BaseQueue : virtual System::Collections::Queue { BaseQueue(decltype(nullptr) n); BaseQueue(Plugin::InternalUse iu, int32_t handle); @@ -2520,7 +3504,7 @@ namespace System { namespace Design { - struct IComponentChangeService : System::Object + struct IComponentChangeService : virtual System::Object { IComponentChangeService(decltype(nullptr) n); IComponentChangeService(Plugin::InternalUse iu, int32_t handle); @@ -2543,7 +3527,7 @@ namespace System { namespace Design { - struct BaseIComponentChangeService : System::ComponentModel::Design::IComponentChangeService + struct BaseIComponentChangeService : virtual System::ComponentModel::Design::IComponentChangeService { BaseIComponentChangeService(decltype(nullptr) n); BaseIComponentChangeService(Plugin::InternalUse iu, int32_t handle); @@ -2582,7 +3566,7 @@ namespace System { namespace IO { - struct FileStream : System::IO::Stream + struct FileStream : virtual System::IO::Stream, virtual System::IDisposable { FileStream(decltype(nullptr) n); FileStream(Plugin::InternalUse iu, int32_t handle); @@ -2604,7 +3588,7 @@ namespace System { namespace IO { - struct BaseFileStream : System::IO::FileStream + struct BaseFileStream : virtual System::IO::FileStream { BaseFileStream(decltype(nullptr) n); BaseFileStream(Plugin::InternalUse iu, int32_t handle); @@ -2627,7 +3611,7 @@ namespace UnityEngine { namespace Playables { - struct PlayableHandle : System::ValueType + struct PlayableHandle : virtual System::ValueType { PlayableHandle(decltype(nullptr) n); PlayableHandle(Plugin::InternalUse iu, int32_t handle); @@ -2643,54 +3627,13 @@ namespace UnityEngine } } -namespace UnityEngine -{ - namespace Playables - { - struct PlayableGraph : System::ValueType - { - PlayableGraph(decltype(nullptr) n); - 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) other); - PlayableGraph& operator=(PlayableGraph&& other); - bool operator==(const PlayableGraph& other) const; - bool operator!=(const PlayableGraph& other) const; - }; - } -} - -namespace UnityEngine -{ - namespace Animations - { - struct AnimationMixerPlayable : System::ValueType - { - AnimationMixerPlayable(decltype(nullptr) n); - 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) other); - 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); - }; - } -} - namespace UnityEngine { namespace Experimental { namespace UIElements { - struct CallbackEventHandler : System::Object + struct CallbackEventHandler : virtual UnityEngine::Experimental::UIElements::IEventHandler { CallbackEventHandler(decltype(nullptr) n); CallbackEventHandler(Plugin::InternalUse iu, int32_t handle); @@ -2713,7 +3656,7 @@ namespace UnityEngine { namespace UIElements { - struct VisualElement : UnityEngine::Experimental::UIElements::CallbackEventHandler + struct VisualElement : virtual UnityEngine::Experimental::UIElements::CallbackEventHandler, virtual UnityEngine::Experimental::UIElements::IEventHandler, virtual UnityEngine::Experimental::UIElements::IStyle { VisualElement(decltype(nullptr) n); VisualElement(Plugin::InternalUse iu, int32_t handle); @@ -2753,7 +3696,7 @@ namespace UnityEngine { namespace Input { - struct InteractionSourcePose : System::ValueType + struct InteractionSourcePose : virtual System::ValueType { InteractionSourcePose(decltype(nullptr) n); InteractionSourcePose(Plugin::InternalUse iu, int32_t handle); @@ -2776,7 +3719,7 @@ namespace MyGame { namespace MonoBehaviours { - struct TestScript : UnityEngine::MonoBehaviour + struct TestScript : virtual UnityEngine::MonoBehaviour { TestScript(decltype(nullptr) n); TestScript(Plugin::InternalUse iu, int32_t handle); @@ -2800,7 +3743,7 @@ namespace MyGame { namespace MonoBehaviours { - struct AnotherScript : UnityEngine::MonoBehaviour + struct AnotherScript : virtual UnityEngine::MonoBehaviour { AnotherScript(decltype(nullptr) n); AnotherScript(Plugin::InternalUse iu, int32_t handle); @@ -2832,7 +3775,7 @@ namespace Plugin namespace System { - template<> struct Array1 : System::Array + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); @@ -2927,7 +3870,7 @@ namespace Plugin namespace System { - template<> struct Array1 : System::Array + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); @@ -2949,7 +3892,7 @@ namespace System namespace System { - template<> struct Array2 : System::Array + template<> struct Array2 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList { Array2(decltype(nullptr) n); Array2(Plugin::InternalUse iu, int32_t handle); @@ -2973,7 +3916,7 @@ namespace System namespace System { - template<> struct Array3 : System::Array + template<> struct Array3 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList { Array3(decltype(nullptr) n); Array3(Plugin::InternalUse iu, int32_t handle); @@ -3009,7 +3952,7 @@ namespace Plugin namespace System { - template<> struct Array1 : System::Array + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); @@ -3043,7 +3986,7 @@ namespace Plugin namespace System { - template<> struct Array1 : System::Array + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); @@ -3077,7 +4020,7 @@ namespace Plugin namespace System { - template<> struct Array1 : System::Array + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); @@ -3111,7 +4054,7 @@ namespace Plugin namespace System { - template<> struct Array1 : System::Array + template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { Array1(decltype(nullptr) n); Array1(Plugin::InternalUse iu, int32_t handle); @@ -3133,7 +4076,7 @@ namespace System namespace System { - struct Action : System::Object + struct Action : virtual System::Object { Action(decltype(nullptr) n); Action(Plugin::InternalUse iu, int32_t handle); @@ -3157,7 +4100,7 @@ namespace System namespace System { - template<> struct Action1 : System::Object + template<> struct Action1 : virtual System::Object { Action1(decltype(nullptr) n); Action1(Plugin::InternalUse iu, int32_t handle); @@ -3181,7 +4124,7 @@ namespace System namespace System { - template<> struct Action2 : System::Object + template<> struct Action2 : virtual System::Object { Action2(decltype(nullptr) n); Action2(Plugin::InternalUse iu, int32_t handle); @@ -3205,7 +4148,7 @@ namespace System namespace System { - template<> struct Func3 : System::Object + template<> struct Func3 : virtual System::Object { Func3(decltype(nullptr) n); Func3(Plugin::InternalUse iu, int32_t handle); @@ -3229,7 +4172,7 @@ namespace System namespace System { - template<> struct Func3 : System::Object + template<> struct Func3 : virtual System::Object { Func3(decltype(nullptr) n); Func3(Plugin::InternalUse iu, int32_t handle); @@ -3253,7 +4196,7 @@ namespace System namespace System { - struct AppDomainInitializer : System::Object + struct AppDomainInitializer : virtual System::Object { AppDomainInitializer(decltype(nullptr) n); AppDomainInitializer(Plugin::InternalUse iu, int32_t handle); @@ -3279,7 +4222,7 @@ namespace UnityEngine { namespace Events { - struct UnityAction : System::Object + struct UnityAction : virtual System::Object { UnityAction(decltype(nullptr) n); UnityAction(Plugin::InternalUse iu, int32_t handle); @@ -3306,7 +4249,7 @@ namespace UnityEngine { namespace Events { - template<> struct UnityAction2 : System::Object + template<> struct UnityAction2 : virtual System::Object { UnityAction2(decltype(nullptr) n); UnityAction2(Plugin::InternalUse iu, int32_t handle); @@ -3335,7 +4278,7 @@ namespace System { namespace Design { - struct ComponentEventHandler : System::Object + struct ComponentEventHandler : virtual System::Object { ComponentEventHandler(decltype(nullptr) n); ComponentEventHandler(Plugin::InternalUse iu, int32_t handle); @@ -3365,7 +4308,7 @@ namespace System { namespace Design { - struct ComponentChangingEventHandler : System::Object + struct ComponentChangingEventHandler : virtual System::Object { ComponentChangingEventHandler(decltype(nullptr) n); ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle); @@ -3395,7 +4338,7 @@ namespace System { namespace Design { - struct ComponentChangedEventHandler : System::Object + struct ComponentChangedEventHandler : virtual System::Object { ComponentChangedEventHandler(decltype(nullptr) n); ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle); @@ -3425,7 +4368,7 @@ namespace System { namespace Design { - struct ComponentRenameEventHandler : System::Object + struct ComponentRenameEventHandler : virtual System::Object { ComponentRenameEventHandler(decltype(nullptr) n); ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle); From f9c3a6f775b9dd9236dbe8cbf2d8075a73012530 Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Fri, 12 Jan 2018 23:49:19 -0800 Subject: [PATCH 23/65] Add support for hot reloading --- README.md | 4 +- Unity/Assets/NativeScript/Bindings.cs | 168 +++++-- Unity/Assets/NativeScript/BootScene.unity | 4 +- Unity/Assets/NativeScript/BootScript.cs | 59 ++- .../Assets/NativeScript/Editor/EditorMenus.cs | 31 ++ .../NativeScript/Editor/EditorMenus.cs.meta | 13 + .../NativeScript/Editor/GenerateBindings.cs | 241 ++++++---- Unity/Assets/NativeScriptConstants.cs | 2 +- Unity/Assets/NativeScriptTypes.json | 4 +- Unity/CppSource/Game/Game.cpp | 55 ++- Unity/CppSource/NativeScript/Bindings.cpp | 424 +++++++++++------- 11 files changed, 696 insertions(+), 309 deletions(-) create mode 100644 Unity/Assets/NativeScript/Editor/EditorMenus.cs create mode 100644 Unity/Assets/NativeScript/Editor/EditorMenus.cs.meta diff --git a/README.md b/README.md index 3a766ab..ff70cd5 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ C++ is the standard language for video games as well as many other fields. By pr Vector3 position(1.0f, 2.0f, 3.0f); transform.SetPosition(position); -* No need to reload the Unity editor when changing C++ +* Hot reloading: change C++ without restarting the game * Handle `MonoBehaviour` messages in C++ > @@ -112,6 +112,8 @@ Almost all projects will see a net performance win by reducing garbage collectio [Testing and benchmarks article](https://jacksondunstan.com/articles/3952) +[Optimizations article](https://jacksondunstan.com/articles/4311) + # Project Structure When scripting in C++, C# is used only as a "binding" layer so Unity can call C++ functions and C++ functions can call the Unity API. A code generator is used to generate most of these bindings according to the needs of your project. diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index 51b1c0b..bb527ea 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -1,6 +1,7 @@ using AOT; using System; +using System.Collections; using System.IO; using System.Runtime.InteropServices; @@ -251,30 +252,68 @@ public static void Remove(int handle) } } + /// + /// A reusable version of UnityEngine.WaitForSecondsRealtime to avoid + /// GC allocs + /// + class ReusableWaitForSecondsRealtime : CustomYieldInstruction + { + private float waitTime; + + public float WaitTime + { + set + { + waitTime = Time.realtimeSinceStartup + value; + } + } + + public override bool keepWaiting + { + get + { + return Time.realtimeSinceStartup < waitTime; + } + } + + public ReusableWaitForSecondsRealtime(float time) + { + WaitTime = time; + } + } + // Name of the plugin when using [DllImport] - const string PluginName = "NativeScript"; + const string PLUGIN_NAME = "NativeScript"; // Path to load the plugin from when running inside the editor #if UNITY_EDITOR_OSX - const string PluginPath = "/Plugins/Editor/NativeScript.bundle/Contents/MacOS/NativeScript"; + const string PLUGIN_PATH = "/Plugins/Editor/NativeScript.bundle/Contents/MacOS/NativeScript"; #elif UNITY_EDITOR_LINUX - const string PluginPath = "/Plugins/Editor/libNativeScript.so"; + const string PLUGIN_PATH = "/Plugins/Editor/libNativeScript.so"; #elif UNITY_EDITOR_WIN - const string PluginPath = "/Plugins/Editor/NativeScript.dll"; + const string PLUGIN_PATH = "/Plugins/Editor/NativeScript.dll"; #endif - + + enum InitMode : byte + { + FirstBoot, + Reload + } + #if UNITY_EDITOR // Handle to the C++ DLL static IntPtr libraryHandle; delegate void InitDelegate( - int maxManagedObjects, + IntPtr memory, + int memorySize, + InitMode initMode, IntPtr releaseObject, IntPtr stringNew, IntPtr setException, IntPtr arrayGetLength, /*BEGIN INIT PARAMS*/ - IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, + int maxManagedObjects, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3PropertyGetMagnitude, IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, @@ -754,13 +793,15 @@ static T GetDelegate( #else [DllImport(PluginName)] static extern void Init( - int maxManagedObjects, + IntPtr memory, + int memorySize, + initMode initMode, IntPtr releaseObject, IntPtr stringNew, IntPtr setException, IntPtr arrayGetLength, /*BEGIN INIT PARAMS*/ - IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, + int maxManagedObjects, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3PropertyGetMagnitude, IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, @@ -1416,38 +1457,95 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate void SystemComponentModelDesignComponentRenameEventHandlerRemoveDelegate(int thisHandle, int delHandle); /*END DELEGATE TYPES*/ + private static readonly string pluginPath = Application.dataPath + PLUGIN_PATH; public static Exception UnhandledCppException; public static SetCsharpExceptionDelegate SetCsharpException; + private static IntPtr memory; + private static int memorySize; /// /// Open the C++ plugin and call its PluginMain() /// /// - /// - /// Maximum number of simultaneous managed objects that the C++ plugin - /// uses. + /// + /// Number of bytes of memory to make available to the C++ plugin /// - public static void Open( - int maxManagedObjects) + public static void Open(int memorySize) { - ObjectStore.Init(maxManagedObjects); - /*BEGIN STRUCTSTORE INIT CALLS*/ - NativeScript.Bindings.StructStore.Init(maxManagedObjects); + /*BEGIN STORE INIT CALLS*/ + NativeScript.Bindings.ObjectStore.Init(1000); + NativeScript.Bindings.StructStore.Init(1000); NativeScript.Bindings.StructStore.Init(1000); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore>.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - NativeScript.Bindings.StructStore.Init(maxManagedObjects); - /*END STRUCTSTORE INIT CALLS*/ + 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*/ + Bindings.memorySize = memorySize; + memory = Marshal.AllocHGlobal(memorySize); + OpenPlugin(InitMode.FirstBoot); + } + + // Reloading requires dynamic loading of the C++ plugin, which is only + // available in the editor +#if UNITY_EDITOR + /// + /// Reload the C++ plugin. Its memory is intact and false is passed for + /// the isFirstBoot parameter of PluginMain(). + /// + public static void Reload() + { + ClosePlugin(); + OpenPlugin(InitMode.Reload); + } + + /// + /// Poll the plugin for changes and reload if any are found. + /// + /// + /// + /// Number of seconds between polls. + /// + /// + /// + /// Enumerator for this iterator function. Can be passed to + /// MonoBehaviour.StartCoroutine for easy usage. + /// + public static IEnumerator AutoReload(float pollTime) + { + // Get the original time + long lastWriteTime = File.GetLastWriteTime(pluginPath).Ticks; + + ReusableWaitForSecondsRealtime poll + = new ReusableWaitForSecondsRealtime(pollTime); + do + { + // Poll. Reload if the last write time changed. + long cur = File.GetLastWriteTime(pluginPath).Ticks; + if (cur != lastWriteTime) + { + Debug.Log("reloading at " + DateTime.Now); + lastWriteTime = cur; + Reload(); + } + + // Wait to poll again + poll.WaitTime = pollTime; + yield return poll; + } + while (true); + } +#endif + + private static void OpenPlugin(InitMode initMode) + { #if UNITY_EDITOR - // Open native library - libraryHandle = OpenLibrary( - Application.dataPath + PluginPath); + libraryHandle = OpenLibrary(pluginPath); InitDelegate Init = GetDelegate( libraryHandle, "Init"); @@ -1498,17 +1596,18 @@ public static void Open( SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke = GetDelegate(libraryHandle, "SystemComponentModelDesignComponentRenameEventHandlerNativeInvoke"); SetCsharpExceptionSystemNullReferenceException = GetDelegate(libraryHandle, "SetCsharpExceptionSystemNullReferenceException"); /*END MONOBEHAVIOUR GETDELEGATE CALLS*/ - #endif - // Init C++ library Init( - maxManagedObjects, + memory, + memorySize, + initMode, Marshal.GetFunctionPointerForDelegate(new ReleaseObjectDelegate(ReleaseObject)), Marshal.GetFunctionPointerForDelegate(new StringNewDelegate(StringNew)), Marshal.GetFunctionPointerForDelegate(new SetExceptionDelegate(SetException)), Marshal.GetFunctionPointerForDelegate(new ArrayGetLengthDelegate(ArrayGetLength)), /*BEGIN INIT CALL*/ + 1000, Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3PropertyGetMagnitudeDelegate(UnityEngineVector3PropertyGetMagnitude)), Marshal.GetFunctionPointerForDelegate(new UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingleDelegate(UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)), @@ -1781,6 +1880,13 @@ public static void Open( /// public static void Close() { + ClosePlugin(); + Marshal.FreeHGlobal(memory); + memory = IntPtr.Zero; + } + + private static void ClosePlugin() + { #if UNITY_EDITOR CloseLibrary(libraryHandle); libraryHandle = IntPtr.Zero; diff --git a/Unity/Assets/NativeScript/BootScene.unity b/Unity/Assets/NativeScript/BootScene.unity index c38824f..4c9bb79 100644 --- a/Unity/Assets/NativeScript/BootScene.unity +++ b/Unity/Assets/NativeScript/BootScene.unity @@ -139,7 +139,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6b5575a60b7c04c7a87ff4e161573c66, type: 3} m_Name: m_EditorClassIdentifier: - MaxManagedObjects: 1024 + MemorySize: 16777216 + AutoReload: 1 + AutoReloadPollTime: 1 --- !u!4 &643357610 Transform: m_ObjectHideFlags: 0 diff --git a/Unity/Assets/NativeScript/BootScript.cs b/Unity/Assets/NativeScript/BootScript.cs index 356f3a5..7ca6ee0 100644 --- a/Unity/Assets/NativeScript/BootScript.cs +++ b/Unity/Assets/NativeScript/BootScript.cs @@ -5,21 +5,74 @@ namespace NativeScript /// /// Script to run at app startup that initializes and runs the native plugin /// + /// /// /// Jackson Dunstan, 2017, http://JacksonDunstan.com /// + /// /// /// MIT /// - class BootScript : MonoBehaviour + public class BootScript : MonoBehaviour { - public int MaxManagedObjects = 1024; + public int MemorySize = 1024 * 1024 * 16; + + // Reloading requires dynamic loading of the C++ plugin, which is only + // available in the editor +#if UNITY_EDITOR + public bool AutoReload; + + public float AutoReloadPollTime = 1.0f; + private float lastAutoReloadPollTime; + private Coroutine autoReloadCoroutine; +#endif void Awake() { +#if UNITY_EDITOR + lastAutoReloadPollTime = AutoReloadPollTime; +#endif DontDestroyOnLoad(gameObject); - Bindings.Open(MaxManagedObjects); + Bindings.Open(MemorySize); + } + +#if UNITY_EDITOR + void Update() + { + if (AutoReload) + { + if (AutoReloadPollTime > 0) + { + // Not started yet. Start. + if (autoReloadCoroutine == null) + { + lastAutoReloadPollTime = AutoReloadPollTime; + autoReloadCoroutine = StartCoroutine( + Bindings.AutoReload( + AutoReloadPollTime)); + } + // Poll time changed. Restart. + else if (AutoReloadPollTime != lastAutoReloadPollTime) + { + StopCoroutine(autoReloadCoroutine); + lastAutoReloadPollTime = AutoReloadPollTime; + autoReloadCoroutine = StartCoroutine( + Bindings.AutoReload( + AutoReloadPollTime)); + } + } + } + else + { + // Not stopped yet. Stop. + if (autoReloadCoroutine != null) + { + StopCoroutine(autoReloadCoroutine); + autoReloadCoroutine = null; + } + } } +#endif void OnApplicationQuit() { diff --git a/Unity/Assets/NativeScript/Editor/EditorMenus.cs b/Unity/Assets/NativeScript/Editor/EditorMenus.cs new file mode 100644 index 0000000..12866f1 --- /dev/null +++ b/Unity/Assets/NativeScript/Editor/EditorMenus.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using UnityEditor; + +namespace NativeScript +{ + /// + /// Menus for the Unity Editor + /// + /// + /// + /// Jackson Dunstan, 2018, http://JacksonDunstan.com + /// + /// + /// + /// MIT + /// + public static class EditorMenus + { + [MenuItem("NativeScript/Generate Bindings #%g")] + public static void Generate() + { + GenerateBindings.Generate(); + } + + [MenuItem("NativeScript/Reload Plugin #%r")] + public static void Reload() + { + Bindings.Reload(); + } + } +} diff --git a/Unity/Assets/NativeScript/Editor/EditorMenus.cs.meta b/Unity/Assets/NativeScript/Editor/EditorMenus.cs.meta new file mode 100644 index 0000000..ae3469a --- /dev/null +++ b/Unity/Assets/NativeScript/Editor/EditorMenus.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5aad51de55c544325a293e98c996a550 +timeCreated: 1515806821 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index 48f3d07..ebec6cf 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -131,6 +131,8 @@ class JsonDelegate [Serializable] class JsonDocument { + public int MaxSimultaneousObjects; + public int DefaultMaxSimultaneous; public string[] Assemblies; public JsonType[] Types; public JsonMonoBehaviour[] MonoBehaviours; @@ -146,7 +148,7 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpDelegateTypes = new StringBuilder(InitialStringBuilderCapacity); - public readonly StringBuilder CsharpStructStoreInitCalls = + public readonly StringBuilder CsharpStoreInitCalls = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CsharpInitCall = new StringBuilder(InitialStringBuilderCapacity); @@ -178,6 +180,8 @@ class StringBuilders new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppInitBody = new StringBuilder(InitialStringBuilderCapacity); + public readonly StringBuilder CppInitBodyFirstBoot = + new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppMonoBehaviourMessages = new StringBuilder(InitialStringBuilderCapacity); public readonly StringBuilder CppGlobalStateAndFunctions = @@ -264,6 +268,9 @@ public MessageInfo( } } + const int DEFAULT_MAX_SIMULTANEOUS = 1000; + const int DEFAULT_MAX_SIMULTANEOUS_OBJECTS = 1000; + static readonly MessageInfo[] messageInfos = new[] { new MessageInfo("Awake"), new MessageInfo("FixedUpdate"), @@ -382,7 +389,6 @@ static readonly FieldOrderComparer DefaultFieldOrderComparer // Restore unused field types #pragma warning restore CS0649 - [MenuItem("NativeScript/Generate Bindings #%g")] public static void Generate() { EditorPrefs.DeleteKey(PostCompileWorkPref); @@ -518,22 +524,47 @@ 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 + 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(",\n"); + + // C# ObjectStore Init call + builders.CsharpStoreInitCalls.Append( + "\t\t\tNativeScript.Bindings.ObjectStore.Init("); + builders.CsharpStoreInitCalls.Append(defaultMaxSimultaneous); + builders.CsharpStoreInitCalls.Append(");\n"); + // Generate types if (doc.Types != null) { foreach (JsonType jsonType in doc.Types) { - AppendType( + Type type = GetType(jsonType.Name, assemblies); + TypeKind typeKind = GetTypeKind(type); + totalMaxSimultaneous += AppendType( jsonType, + type, + typeKind, assemblies, + defaultMaxSimultaneous, builders); if (jsonType.BaseTypes != null) { // C++ template declaration if necessary - Type type = GetType( - jsonType.Name, - assemblies); Type[] genericArgTypes = type.GetGenericArguments(); string cppBaseTypeName = "Base" + type.Name; if (!IsStatic(type)) @@ -560,12 +591,13 @@ static void DoPostCompileWork(bool canRefreshAssetDb) cppBaseTypeName, jsonBaseType, assemblies, + defaultMaxSimultaneous, builders); } } } } - + // Generate boxing and unboxing for primitive types foreach (Type type in PRIMITIVE_TYPES) { @@ -607,6 +639,7 @@ static void DoPostCompileWork(bool canRefreshAssetDb) AppendDelegate( del, assemblies, + defaultMaxSimultaneous, builders); } } @@ -642,7 +675,7 @@ static JsonDocument LoadJson() { string jsonPath = Path.Combine( Application.dataPath, - NativeScriptConstants.ExposedTypesJsonPath); + NativeScriptConstants.JSON_CONFIG_PATH); string json = File.ReadAllText(jsonPath); return JsonUtility.FromJson(json); } @@ -1295,13 +1328,14 @@ static void AppendTypeNameWithoutSuffixes( } } - static void AppendType( + static int AppendType( JsonType jsonType, + Type type, + TypeKind typeKind, Assembly[] assemblies, + int defaultMaxSimultaneous, StringBuilders builders) { - Type type = GetType(jsonType.Name, assemblies); - TypeKind typeKind = GetTypeKind(type); if (typeKind == TypeKind.Enum) { AppendEnum( @@ -1312,9 +1346,11 @@ static void AppendType( typeKind, null, builders); + return 0; } else { + int totalMaxSimultaneous = 0; Type[] genericArgTypes = type.GetGenericArguments(); if (jsonType.GenericParams != null) { @@ -1334,15 +1370,17 @@ static void AppendType( jsonGenericParams.Types, assemblies); Type genericType = type.MakeGenericType(typeParams); - int? maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 + int maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 ? jsonGenericParams.MaxSimultaneous : jsonType.MaxSimultaneous != 0 ? jsonType.MaxSimultaneous - : default(int?); + : defaultMaxSimultaneous; + totalMaxSimultaneous += maxSimultaneous; AppendType( jsonType, genericArgTypes, genericType, + typeKind, typeParams, maxSimultaneous, assemblies, @@ -1359,13 +1397,15 @@ static void AppendType( } else { - int? maxSimultaneous = jsonType.MaxSimultaneous != 0 + int maxSimultaneous = jsonType.MaxSimultaneous != 0 ? jsonType.MaxSimultaneous - : default(int?); + : defaultMaxSimultaneous; + totalMaxSimultaneous += maxSimultaneous; AppendType( jsonType, genericArgTypes, type, + typeKind, null, maxSimultaneous, assemblies, @@ -1379,6 +1419,7 @@ static void AppendType( builders); } } + return totalMaxSimultaneous; } } @@ -1386,35 +1427,24 @@ static void AppendType( JsonType jsonType, Type[] genericArgTypes, Type type, + TypeKind typeKind, Type[] typeParams, - int? maxSimultaneous, + int maxSimultaneous, Assembly[] assemblies, StringBuilders builders) { bool isStatic = IsStatic(type); - TypeKind typeKind = GetTypeKind(type); if (!isStatic && typeKind == TypeKind.ManagedStruct) { // C# StructStore Init call - builders.CsharpStructStoreInitCalls.Append( + builders.CsharpStoreInitCalls.Append( "\t\t\tNativeScript.Bindings.StructStore<"); AppendCsharpTypeName( type, - builders.CsharpStructStoreInitCalls); - builders.CsharpStructStoreInitCalls.Append( - ">.Init("); - if (maxSimultaneous.HasValue) - { - builders.CsharpStructStoreInitCalls.Append( - maxSimultaneous.Value); - } - else - { - builders.CsharpStructStoreInitCalls.Append( - "maxManagedObjects"); - } - builders.CsharpStructStoreInitCalls.Append( - ");\n"); + builders.CsharpStoreInitCalls); + builders.CsharpStoreInitCalls.Append(">.Init("); + builders.CsharpStoreInitCalls.Append(maxSimultaneous); + builders.CsharpStoreInitCalls.Append(");\n"); // Build function name suffix builders.TempStrBuilder.Length = 0; @@ -1525,16 +1555,15 @@ static void AppendType( // C++ init body for handle array length builders.CppInitBody.Append("\tPlugin::RefCounts"); builders.CppInitBody.Append(funcNameSuffix); - builders.CppInitBody.Append(" = new int32_t["); - if (maxSimultaneous.HasValue) - { - builders.CppInitBody.Append(maxSimultaneous.Value); - } - else - { - builders.CppInitBody.Append("maxManagedObjects"); - } - builders.CppInitBody.Append("]();\n"); + 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"); // C++ ref count state and functions builders.CppGlobalStateAndFunctions.Append("\tint32_t RefCountsLen"); @@ -1751,11 +1780,12 @@ static void AppendBaseType( string cppBaseTypeName, JsonBaseType jsonBaseType, Assembly[] assemblies, + int defaultMaxSimultaneous, StringBuilders builders) { - int? maxSimultaneous = jsonBaseType.MaxSimultaneous != 0 + int maxSimultaneous = jsonBaseType.MaxSimultaneous != 0 ? jsonBaseType.MaxSimultaneous - : default(int?); + : defaultMaxSimultaneous; if (jsonBaseType.GenericTypes != null) { Type[] typeParams = GetTypes( @@ -5766,6 +5796,7 @@ static void AppendArraySetItem( static void AppendDelegate( JsonDelegate jsonDelegate, Assembly[] assemblies, + int defaultMaxSimultaneous, StringBuilders builders) { Type type = GetType( @@ -5812,11 +5843,11 @@ static void AppendDelegate( string cppTypeName = builders.TempStrBuilder.ToString(); // Max simultaneous handles of this type - int? maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 + int maxSimultaneous = jsonGenericParams.MaxSimultaneous != 0 ? jsonGenericParams.MaxSimultaneous : jsonDelegate.MaxSimultaneous != 0 ? jsonDelegate.MaxSimultaneous - : default(int?); + : defaultMaxSimultaneous; AppendDelegate( genericType, @@ -5828,9 +5859,9 @@ static void AppendDelegate( } else { - int? maxSimultaneous = jsonDelegate.MaxSimultaneous != 0 + int maxSimultaneous = jsonDelegate.MaxSimultaneous != 0 ? jsonDelegate.MaxSimultaneous - : default(int?); + : defaultMaxSimultaneous; AppendDelegate( type, type.Name, @@ -5844,7 +5875,7 @@ static void AppendDelegate( Type type, string cppTypeName, Type[] typeParams, - int? maxSimultaneous, + int maxSimultaneous, StringBuilders builders) { builders.TempStrBuilder.Length = 0; @@ -5980,7 +6011,8 @@ static void AppendDelegate( cppTypeName, maxSimultaneous, bindingTypeName, - builders.CppInitBody); + builders.CppInitBody, + builders.CppInitBodyFirstBoot); // C++ type definition (begin) AppendCppTypeDefinitionBegin( @@ -6527,7 +6559,7 @@ static void AppendBaseType( JsonBaseType jsonBaseType, string cppBaseTypeName, Type[] typeParams, - int? maxSimultaneous, + int maxSimultaneous, Assembly[] assemblies, StringBuilders builders) { @@ -6701,7 +6733,8 @@ static void AppendBaseType( cppBaseTypeName, maxSimultaneous, bindingTypeName, - builders.CppInitBody); + builders.CppInitBody, + builders.CppInitBodyFirstBoot); // C++ type definition (begin) AppendCppTypeDefinitionBegin( @@ -9412,25 +9445,20 @@ static void AppendCppFreeListInit( Type type, Type[] typeParams, string cppTypeName, - int? maxSimultaneous, + int maxSimultaneous, string typeName, - StringBuilder output) + StringBuilder output, + StringBuilder outputFirstBoot) { - output.Append('\t'); + output.Append("\tPlugin::"); output.Append(typeName); output.Append("FreeListSize = "); - if (maxSimultaneous.HasValue) - { - output.Append(maxSimultaneous); - } - else - { - output.Append("maxManagedObjects"); - } + output.Append(maxSimultaneous); output.Append(";\n"); - output.Append("\t"); + + output.Append("\tPlugin::"); output.Append(typeName); - output.Append("FreeList = new "); + output.Append("FreeList = ("); AppendCppTypeName( type.Namespace, cppTypeName, @@ -9438,16 +9466,11 @@ static void AppendCppFreeListInit( AppendCppTypeParameters( typeParams, output); - output.Append("*["); - output.Append(typeName); - output.Append("FreeListSize];\n"); - output.Append("\tfor (int32_t i = 0, end = "); - output.Append(typeName); - output.Append("FreeListSize - 1; i < end; ++i)\n"); - output.Append("\t{\n"); - output.Append("\t "); - output.Append(typeName); - output.Append("FreeList[i] = ("); + output.Append("**)curMemory;\n"); + + output.Append("\tcurMemory += "); + output.Append(maxSimultaneous); + output.Append(" * sizeof("); AppendCppTypeName( type.Namespace, cppTypeName, @@ -9455,20 +9478,42 @@ static void AppendCppFreeListInit( AppendCppTypeParameters( typeParams, output); - output.Append("*)("); - output.Append(typeName); - output.Append("FreeList + i + 1);\n"); - output.Append("\t}\n"); - output.Append('\t'); - output.Append(typeName); - output.Append("FreeList["); - output.Append(typeName); - output.Append("FreeListSize - 1] = nullptr;\n"); - output.Append("\tNextFree"); - output.Append(typeName); - output.Append(" = "); - output.Append(typeName); - output.Append("FreeList + 1;\n"); + output.Append("*);\n"); + + output.Append("\t\n"); + + 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.Append("\t\t\tPlugin::"); + outputFirstBoot.Append(typeName); + outputFirstBoot.Append("FreeList[i] = ("); + AppendCppTypeName( + type.Namespace, + cppTypeName, + outputFirstBoot); + AppendCppTypeParameters( + typeParams, + outputFirstBoot); + outputFirstBoot.Append("*)(Plugin::"); + outputFirstBoot.Append(typeName); + outputFirstBoot.Append("FreeList + i + 1);\n"); + outputFirstBoot.Append("\t\t}\n"); + + outputFirstBoot.Append("\t\tPlugin::"); + outputFirstBoot.Append(typeName); + outputFirstBoot.Append("FreeList[Plugin::"); + outputFirstBoot.Append(typeName); + outputFirstBoot.Append("FreeListSize - 1] = nullptr;\n"); + + outputFirstBoot.Append("\t\tPlugin::NextFree"); + outputFirstBoot.Append(typeName); + outputFirstBoot.Append(" = Plugin::"); + outputFirstBoot.Append(typeName); + outputFirstBoot.Append("FreeList + 1;\n"); + + outputFirstBoot.Append("\t\t\n"); } static void AppendCppFreeListStateAndFunctions( @@ -12621,7 +12666,7 @@ static void RemoveTrailingChars( { RemoveTrailingChars(builders.CsharpInitParams); RemoveTrailingChars(builders.CsharpDelegateTypes); - RemoveTrailingChars(builders.CsharpStructStoreInitCalls); + RemoveTrailingChars(builders.CsharpStoreInitCalls); RemoveTrailingChars(builders.CsharpInitCall); RemoveTrailingChars(builders.CsharpBaseTypes); RemoveTrailingChars(builders.CsharpFunctions); @@ -12629,6 +12674,7 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CsharpDelegates); RemoveTrailingChars(builders.CsharpImports); RemoveTrailingChars(builders.CsharpGetDelegateCalls); + RemoveTrailingChars(builders.CsharpGetDelegateCalls); RemoveTrailingChars(builders.CppFunctionPointers); RemoveTrailingChars(builders.CppTypeDeclarations); RemoveTrailingChars(builders.CppTemplateDeclarations); @@ -12637,10 +12683,10 @@ static void RemoveTrailingChars( RemoveTrailingChars(builders.CppMethodDefinitions); RemoveTrailingChars(builders.CppInitParams); RemoveTrailingChars(builders.CppInitBody); + RemoveTrailingChars(builders.CppInitBodyFirstBoot); RemoveTrailingChars(builders.CppMonoBehaviourMessages); RemoveTrailingChars(builders.CppGlobalStateAndFunctions); RemoveTrailingChars(builders.CppBoxingMethodDeclarations); - RemoveTrailingChars(builders.CppStringDefaultParams); } // Remove trailing chars (e.g. commas) for last elements @@ -12688,9 +12734,9 @@ static void InjectBuilders( builders.CsharpDelegateTypes.ToString()); csharpContents = InjectIntoString( csharpContents, - "/*BEGIN STRUCTSTORE INIT CALLS*/\n", - "\n\t\t\t/*END STRUCTSTORE INIT CALLS*/", - builders.CsharpStructStoreInitCalls.ToString()); + "/*BEGIN STORE INIT CALLS*/\n", + "\n\t\t\t/*END STORE INIT CALLS*/", + builders.CsharpStoreInitCalls.ToString()); csharpContents = InjectIntoString( csharpContents, "/*BEGIN INIT CALL*/\n", @@ -12766,6 +12812,11 @@ static void InjectBuilders( "/*BEGIN INIT BODY*/\n", "\n\t/*END INIT BODY*/", builders.CppInitBody.ToString()); + cppSourceContents = InjectIntoString( + cppSourceContents, + "/*BEGIN INIT BODY FIRST BOOT*/\n", + "\n\t\t/*END INIT BODY FIRST BOOT*/", + builders.CppInitBodyFirstBoot.ToString()); cppSourceContents = InjectIntoString( cppSourceContents, "/*BEGIN MONOBEHAVIOUR MESSAGES*/\n", diff --git a/Unity/Assets/NativeScriptConstants.cs b/Unity/Assets/NativeScriptConstants.cs index 8d8f46e..54e6923 100644 --- a/Unity/Assets/NativeScriptConstants.cs +++ b/Unity/Assets/NativeScriptConstants.cs @@ -13,5 +13,5 @@ public static class NativeScriptConstants /// /// Path within the Unity project to the exposed types JSON file /// - public const string ExposedTypesJsonPath = "NativeScriptTypes.json"; + public const string JSON_CONFIG_PATH = "NativeScriptTypes.json"; } \ No newline at end of file diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 4e364ad..2013316 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -500,7 +500,8 @@ "Types": [ "System.String", "System.Double" - ] + ], + "MaxSimultaneous": 20 } ], "Constructors": [ @@ -657,6 +658,7 @@ }, { "Name": "UnityEngine.Ray", + "MaxSimultaneous": 10, "Constructors": [ { "ParamTypes": [ diff --git a/Unity/CppSource/Game/Game.cpp b/Unity/CppSource/Game/Game.cpp index f7caf26..a44f151 100644 --- a/Unity/CppSource/Game/Game.cpp +++ b/Unity/CppSource/Game/Game.cpp @@ -13,16 +13,37 @@ using namespace System; using namespace UnityEngine; +namespace +{ + struct GameState + { + int32_t NumCreated; + float Dir; + }; + + GameState* gameState; +} + // Called when the plugin is initialized // This is mostly full of test code. Feel free to remove it all. -void PluginMain() +void PluginMain( + void* memory, + int32_t memorySize, + bool isFirstBoot) { - String message("Game booted up"); - Debug::Log(message); - - String name("GameObject with a TestScript"); - GameObject go(name); - go.AddComponent(); + gameState = (GameState*)memory; + if (isFirstBoot) + { + String message("Game booted up"); + Debug::Log(message); + + gameState->NumCreated = 0; + gameState->Dir = 1.0f; + + String name("GameObject with a TestScript"); + GameObject go(name); + go.AddComponent(); + } } void MyGame::MonoBehaviours::TestScript::Awake() @@ -45,16 +66,15 @@ void MyGame::MonoBehaviours::TestScript::OnCollisionEnter(UnityEngine::Collision void MyGame::MonoBehaviours::TestScript::Update() { - static int32_t numCreated = 0; - if (numCreated < 10) + if (gameState->NumCreated < 10) { GameObject go; Transform transform = go.GetTransform(); - float comp = (float)numCreated; + float comp = (float)gameState->NumCreated; Vector3 position(comp, comp*10.0f, comp*100.0f); transform.SetPosition(position); - numCreated++; - if (numCreated == 10) + gameState->NumCreated++; + if (gameState->NumCreated == 10) { String message("Done spawning game objects"); Debug::Log(message); @@ -78,19 +98,18 @@ void MyGame::MonoBehaviours::AnotherScript::Update() Transform transform = GetTransform(); Vector3 pos = transform.GetPosition(); const float speed = 1.2f; - static float dir = 1.0f; - static float min = -1.5f; - static float max = 1.5f; - Vector3 offset(Time::GetDeltaTime() * speed * dir, 0, 0); + 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) { - dir = -dir; + gameState->Dir *= -1.0f; newPos.x = max - (newPos.x - max); } else if (newPos.x < min) { - dir = -dir; + gameState->Dir *= -1.0f; newPos.x = min + (min - newPos.x); } transform.SetPosition(newPos); diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index b580994..16eb64f 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -21,6 +21,9 @@ // For malloc(), etc. #include +// For memset(), etc. +#include + // Macro to put before functions that need to be exposed to C# #ifdef _WIN32 #define DLLEXPORT extern "C" __declspec(dllexport) @@ -17153,20 +17156,32 @@ DLLEXPORT void SetCsharpExceptionSystemNullReferenceException(int32_t handle) //////////////////////////////////////////////////////////////// // Called when the plugin is initialized -extern void PluginMain(); +extern void PluginMain( + void* memory, + int32_t memorySize, + bool isFirstBoot); //////////////////////////////////////////////////////////////// // C++ functions for C# to call //////////////////////////////////////////////////////////////// +enum class InitMode : uint8_t +{ + FirstBoot, + Reload +}; + // Init the plugin DLLEXPORT void Init( - int32_t maxManagedObjects, + 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), /*BEGIN INIT PARAMS*/ + int32_t maxManagedObjects, UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), void (*unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ), @@ -17426,11 +17441,12 @@ DLLEXPORT void Init( void (*systemComponentModelDesignComponentRenameEventHandlerInvoke)(int32_t thisHandle, int32_t senderHandle, int32_t eHandle) /*END INIT PARAMS*/) { - using namespace Plugin; + uint8_t* curMemory = memory; // Init managed object ref counting Plugin::RefCountsLenClass = maxManagedObjects; - Plugin::RefCountsClass = new int32_t[maxManagedObjects](); + Plugin::RefCountsClass = (int32_t*)curMemory; + curMemory += maxManagedObjects * sizeof(int32_t); // Init pointers to C# functions Plugin::StringNew = stringNew; @@ -17457,7 +17473,9 @@ DLLEXPORT void Init( Plugin::BoxGradientColorKey = boxGradientColorKey; Plugin::UnboxGradientColorKey = unboxGradientColorKey; Plugin::ReleaseUnityEngineResolution = releaseUnityEngineResolution; - Plugin::RefCountsUnityEngineResolution = new int32_t[maxManagedObjects](); + Plugin::RefCountsUnityEngineResolution = (int32_t*)curMemory; + curMemory += 1000 * sizeof(int32_t); + Plugin::RefCountsLenUnityEngineResolution = 1000; Plugin::UnityEngineResolutionPropertyGetWidth = unityEngineResolutionPropertyGetWidth; Plugin::UnityEngineResolutionPropertySetWidth = unityEngineResolutionPropertySetWidth; Plugin::UnityEngineResolutionPropertyGetHeight = unityEngineResolutionPropertyGetHeight; @@ -17467,18 +17485,24 @@ DLLEXPORT void Init( Plugin::BoxResolution = boxResolution; Plugin::UnboxResolution = unboxResolution; Plugin::ReleaseUnityEngineRaycastHit = releaseUnityEngineRaycastHit; - Plugin::RefCountsUnityEngineRaycastHit = new int32_t[1000](); + 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::ReleaseUnityEnginePlayablesPlayableGraph = releaseUnityEnginePlayablesPlayableGraph; - Plugin::RefCountsUnityEnginePlayablesPlayableGraph = new int32_t[maxManagedObjects](); + Plugin::RefCountsUnityEnginePlayablesPlayableGraph = (int32_t*)curMemory; + curMemory += 1000 * sizeof(int32_t); + Plugin::RefCountsLenUnityEnginePlayablesPlayableGraph = 1000; Plugin::BoxPlayableGraph = boxPlayableGraph; Plugin::UnboxPlayableGraph = unboxPlayableGraph; Plugin::ReleaseUnityEngineAnimationsAnimationMixerPlayable = releaseUnityEngineAnimationsAnimationMixerPlayable; - Plugin::RefCountsUnityEngineAnimationsAnimationMixerPlayable = new int32_t[maxManagedObjects](); + 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; @@ -17510,7 +17534,9 @@ DLLEXPORT void Init( Plugin::BoxQueryTriggerInteraction = boxQueryTriggerInteraction; Plugin::UnboxQueryTriggerInteraction = unboxQueryTriggerInteraction; Plugin::ReleaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = releaseSystemCollectionsGenericKeyValuePairSystemString_SystemDouble; - Plugin::RefCountsSystemCollectionsGenericKeyValuePairSystemString_SystemDouble = new int32_t[maxManagedObjects](); + 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; @@ -17535,7 +17561,9 @@ DLLEXPORT void Init( Plugin::SystemExceptionConstructorSystemString = systemExceptionConstructorSystemString; Plugin::UnityEngineScreenPropertyGetResolutions = unityEngineScreenPropertyGetResolutions; Plugin::ReleaseUnityEngineRay = releaseUnityEngineRay; - Plugin::RefCountsUnityEngineRay = new int32_t[maxManagedObjects](); + Plugin::RefCountsUnityEngineRay = (int32_t*)curMemory; + curMemory += 10 * sizeof(int32_t); + Plugin::RefCountsLenUnityEngineRay = 10; Plugin::UnityEngineRayConstructorUnityEngineVector3_UnityEngineVector3 = unityEngineRayConstructorUnityEngineVector3_UnityEngineVector3; Plugin::BoxRay = boxRay; Plugin::UnboxRay = unboxRay; @@ -17552,7 +17580,9 @@ DLLEXPORT void Init( Plugin::UnityEngineSceneManagementSceneManagerAddEventSceneLoaded = unityEngineSceneManagementSceneManagerAddEventSceneLoaded; Plugin::UnityEngineSceneManagementSceneManagerRemoveEventSceneLoaded = unityEngineSceneManagementSceneManagerRemoveEventSceneLoaded; Plugin::ReleaseUnityEngineSceneManagementScene = releaseUnityEngineSceneManagementScene; - Plugin::RefCountsUnityEngineSceneManagementScene = new int32_t[maxManagedObjects](); + Plugin::RefCountsUnityEngineSceneManagementScene = (int32_t*)curMemory; + curMemory += 1000 * sizeof(int32_t); + Plugin::RefCountsLenUnityEngineSceneManagementScene = 1000; Plugin::BoxScene = boxScene; Plugin::UnboxScene = unboxScene; Plugin::BoxLoadSceneMode = boxLoadSceneMode; @@ -17564,71 +17594,49 @@ DLLEXPORT void Init( Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; Plugin::BoxFileMode = boxFileMode; Plugin::UnboxFileMode = unboxFileMode; - SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize = maxManagedObjects; - SystemCollectionsGenericBaseIComparerSystemInt32FreeList = new System::Collections::Generic::BaseIComparer*[SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize]; - for (int32_t i = 0, end = SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1; i < end; ++i) - { - SystemCollectionsGenericBaseIComparerSystemInt32FreeList[i] = (System::Collections::Generic::BaseIComparer*)(SystemCollectionsGenericBaseIComparerSystemInt32FreeList + i + 1); - } - SystemCollectionsGenericBaseIComparerSystemInt32FreeList[SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize - 1] = nullptr; - NextFreeSystemCollectionsGenericBaseIComparerSystemInt32 = SystemCollectionsGenericBaseIComparerSystemInt32FreeList + 1; + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeListSize = 1000; + Plugin::SystemCollectionsGenericBaseIComparerSystemInt32FreeList = (System::Collections::Generic::BaseIComparer**)curMemory; + curMemory += 1000 * sizeof(System::Collections::Generic::BaseIComparer*); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemInt32 = releaseSystemCollectionsGenericBaseIComparerSystemInt32; Plugin::SystemCollectionsGenericBaseIComparerSystemInt32Constructor = systemCollectionsGenericBaseIComparerSystemInt32Constructor; - SystemCollectionsGenericBaseIComparerSystemStringFreeListSize = maxManagedObjects; - SystemCollectionsGenericBaseIComparerSystemStringFreeList = new System::Collections::Generic::BaseIComparer*[SystemCollectionsGenericBaseIComparerSystemStringFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsGenericBaseIComparerSystemStringFreeListSize - 1; i < end; ++i) - { - SystemCollectionsGenericBaseIComparerSystemStringFreeList[i] = (System::Collections::Generic::BaseIComparer*)(SystemCollectionsGenericBaseIComparerSystemStringFreeList + i + 1); - } - SystemCollectionsGenericBaseIComparerSystemStringFreeList[SystemCollectionsGenericBaseIComparerSystemStringFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsGenericBaseIComparerSystemString = SystemCollectionsGenericBaseIComparerSystemStringFreeList + 1; + Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeListSize = 1000; + Plugin::SystemCollectionsGenericBaseIComparerSystemStringFreeList = (System::Collections::Generic::BaseIComparer**)curMemory; + curMemory += 1000 * sizeof(System::Collections::Generic::BaseIComparer*); + Plugin::ReleaseSystemCollectionsGenericBaseIComparerSystemString = releaseSystemCollectionsGenericBaseIComparerSystemString; Plugin::SystemCollectionsGenericBaseIComparerSystemStringConstructor = systemCollectionsGenericBaseIComparerSystemStringConstructor; - SystemBaseStringComparerFreeListSize = maxManagedObjects; - SystemBaseStringComparerFreeList = new System::BaseStringComparer*[SystemBaseStringComparerFreeListSize]; - for (int32_t i = 0, end = SystemBaseStringComparerFreeListSize - 1; i < end; ++i) - { - SystemBaseStringComparerFreeList[i] = (System::BaseStringComparer*)(SystemBaseStringComparerFreeList + i + 1); - } - SystemBaseStringComparerFreeList[SystemBaseStringComparerFreeListSize - 1] = nullptr; - NextFreeSystemBaseStringComparer = SystemBaseStringComparerFreeList + 1; + Plugin::SystemBaseStringComparerFreeListSize = 1000; + Plugin::SystemBaseStringComparerFreeList = (System::BaseStringComparer**)curMemory; + curMemory += 1000 * sizeof(System::BaseStringComparer*); + Plugin::ReleaseSystemBaseStringComparer = releaseSystemBaseStringComparer; Plugin::SystemBaseStringComparerConstructor = systemBaseStringComparerConstructor; Plugin::SystemCollectionsQueuePropertyGetCount = systemCollectionsQueuePropertyGetCount; - SystemCollectionsBaseQueueFreeListSize = maxManagedObjects; - SystemCollectionsBaseQueueFreeList = new System::Collections::BaseQueue*[SystemCollectionsBaseQueueFreeListSize]; - for (int32_t i = 0, end = SystemCollectionsBaseQueueFreeListSize - 1; i < end; ++i) - { - SystemCollectionsBaseQueueFreeList[i] = (System::Collections::BaseQueue*)(SystemCollectionsBaseQueueFreeList + i + 1); - } - SystemCollectionsBaseQueueFreeList[SystemCollectionsBaseQueueFreeListSize - 1] = nullptr; - NextFreeSystemCollectionsBaseQueue = SystemCollectionsBaseQueueFreeList + 1; + Plugin::SystemCollectionsBaseQueueFreeListSize = 1000; + Plugin::SystemCollectionsBaseQueueFreeList = (System::Collections::BaseQueue**)curMemory; + curMemory += 1000 * sizeof(System::Collections::BaseQueue*); + Plugin::ReleaseSystemCollectionsBaseQueue = releaseSystemCollectionsBaseQueue; Plugin::SystemCollectionsBaseQueueConstructor = systemCollectionsBaseQueueConstructor; - SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize = maxManagedObjects; - SystemComponentModelDesignBaseIComponentChangeServiceFreeList = new System::ComponentModel::Design::BaseIComponentChangeService*[SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize]; - for (int32_t i = 0, end = SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize - 1; i < end; ++i) - { - SystemComponentModelDesignBaseIComponentChangeServiceFreeList[i] = (System::ComponentModel::Design::BaseIComponentChangeService*)(SystemComponentModelDesignBaseIComponentChangeServiceFreeList + i + 1); - } - SystemComponentModelDesignBaseIComponentChangeServiceFreeList[SystemComponentModelDesignBaseIComponentChangeServiceFreeListSize - 1] = nullptr; - NextFreeSystemComponentModelDesignBaseIComponentChangeService = SystemComponentModelDesignBaseIComponentChangeServiceFreeList + 1; + 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; - SystemIOBaseFileStreamFreeListSize = maxManagedObjects; - SystemIOBaseFileStreamFreeList = new System::IO::BaseFileStream*[SystemIOBaseFileStreamFreeListSize]; - for (int32_t i = 0, end = SystemIOBaseFileStreamFreeListSize - 1; i < end; ++i) - { - SystemIOBaseFileStreamFreeList[i] = (System::IO::BaseFileStream*)(SystemIOBaseFileStreamFreeList + i + 1); - } - SystemIOBaseFileStreamFreeList[SystemIOBaseFileStreamFreeListSize - 1] = nullptr; - NextFreeSystemIOBaseFileStream = SystemIOBaseFileStreamFreeList + 1; + 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 = new int32_t[maxManagedObjects](); + Plugin::RefCountsUnityEnginePlayablesPlayableHandle = (int32_t*)curMemory; + curMemory += 1000 * sizeof(int32_t); + Plugin::RefCountsLenUnityEnginePlayablesPlayableHandle = 1000; Plugin::BoxPlayableHandle = boxPlayableHandle; Plugin::UnboxPlayableHandle = unboxPlayableHandle; Plugin::UnityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1 = unityEngineExperimentalUIElementsUQueryExtensionsMethodQUnityEngineExperimentalUIElementsVisualElement_SystemString_SystemStringArray1; @@ -17638,7 +17646,9 @@ DLLEXPORT void Init( Plugin::BoxInteractionSourceNode = boxInteractionSourceNode; Plugin::UnboxInteractionSourceNode = unboxInteractionSourceNode; Plugin::ReleaseUnityEngineXRWSAInputInteractionSourcePose = releaseUnityEngineXRWSAInputInteractionSourcePose; - Plugin::RefCountsUnityEngineXRWSAInputInteractionSourcePose = new int32_t[maxManagedObjects](); + Plugin::RefCountsUnityEngineXRWSAInputInteractionSourcePose = (int32_t*)curMemory; + curMemory += 1000 * sizeof(int32_t); + Plugin::RefCountsLenUnityEngineXRWSAInputInteractionSourcePose = 1000; Plugin::UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode = unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode; Plugin::BoxInteractionSourcePose = boxInteractionSourcePose; Plugin::UnboxInteractionSourcePose = unboxInteractionSourcePose; @@ -17692,157 +17702,109 @@ DLLEXPORT void Init( Plugin::UnityEngineUnityEngineGradientColorKeyArray1Constructor1 = unityEngineUnityEngineGradientColorKeyArray1Constructor1; Plugin::UnityEngineGradientColorKeyArray1GetItem1 = unityEngineGradientColorKeyArray1GetItem1; Plugin::UnityEngineGradientColorKeyArray1SetItem1 = unityEngineGradientColorKeyArray1SetItem1; - SystemActionFreeListSize = maxManagedObjects; - SystemActionFreeList = new System::Action*[SystemActionFreeListSize]; - for (int32_t i = 0, end = SystemActionFreeListSize - 1; i < end; ++i) - { - SystemActionFreeList[i] = (System::Action*)(SystemActionFreeList + i + 1); - } - SystemActionFreeList[SystemActionFreeListSize - 1] = nullptr; - NextFreeSystemAction = SystemActionFreeList + 1; + 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; - SystemActionSystemSingleFreeListSize = maxManagedObjects; - SystemActionSystemSingleFreeList = new System::Action1*[SystemActionSystemSingleFreeListSize]; - for (int32_t i = 0, end = SystemActionSystemSingleFreeListSize - 1; i < end; ++i) - { - SystemActionSystemSingleFreeList[i] = (System::Action1*)(SystemActionSystemSingleFreeList + i + 1); - } - SystemActionSystemSingleFreeList[SystemActionSystemSingleFreeListSize - 1] = nullptr; - NextFreeSystemActionSystemSingle = SystemActionSystemSingleFreeList + 1; + 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; - SystemActionSystemSingle_SystemSingleFreeListSize = 100; - SystemActionSystemSingle_SystemSingleFreeList = new System::Action2*[SystemActionSystemSingle_SystemSingleFreeListSize]; - for (int32_t i = 0, end = SystemActionSystemSingle_SystemSingleFreeListSize - 1; i < end; ++i) - { - SystemActionSystemSingle_SystemSingleFreeList[i] = (System::Action2*)(SystemActionSystemSingle_SystemSingleFreeList + i + 1); - } - SystemActionSystemSingle_SystemSingleFreeList[SystemActionSystemSingle_SystemSingleFreeListSize - 1] = nullptr; - NextFreeSystemActionSystemSingle_SystemSingle = SystemActionSystemSingle_SystemSingleFreeList + 1; + 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; - SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize = 50; - SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList = new System::Func3*[SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize]; - for (int32_t i = 0, end = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1; i < end; ++i) - { - SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[i] = (System::Func3*)(SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + i + 1); - } - SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList[SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeListSize - 1] = nullptr; - NextFreeSystemFuncSystemInt32_SystemSingle_SystemDouble = SystemFuncSystemInt32_SystemSingle_SystemDoubleFreeList + 1; + 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; - SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize = 25; - SystemFuncSystemInt16_SystemInt32_SystemStringFreeList = new System::Func3*[SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize]; - for (int32_t i = 0, end = SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1; i < end; ++i) - { - SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[i] = (System::Func3*)(SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + i + 1); - } - SystemFuncSystemInt16_SystemInt32_SystemStringFreeList[SystemFuncSystemInt16_SystemInt32_SystemStringFreeListSize - 1] = nullptr; - NextFreeSystemFuncSystemInt16_SystemInt32_SystemString = SystemFuncSystemInt16_SystemInt32_SystemStringFreeList + 1; + 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; - SystemAppDomainInitializerFreeListSize = maxManagedObjects; - SystemAppDomainInitializerFreeList = new System::AppDomainInitializer*[SystemAppDomainInitializerFreeListSize]; - for (int32_t i = 0, end = SystemAppDomainInitializerFreeListSize - 1; i < end; ++i) - { - SystemAppDomainInitializerFreeList[i] = (System::AppDomainInitializer*)(SystemAppDomainInitializerFreeList + i + 1); - } - SystemAppDomainInitializerFreeList[SystemAppDomainInitializerFreeListSize - 1] = nullptr; - NextFreeSystemAppDomainInitializer = SystemAppDomainInitializerFreeList + 1; + 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; - UnityEngineEventsUnityActionFreeListSize = maxManagedObjects; - UnityEngineEventsUnityActionFreeList = new UnityEngine::Events::UnityAction*[UnityEngineEventsUnityActionFreeListSize]; - for (int32_t i = 0, end = UnityEngineEventsUnityActionFreeListSize - 1; i < end; ++i) - { - UnityEngineEventsUnityActionFreeList[i] = (UnityEngine::Events::UnityAction*)(UnityEngineEventsUnityActionFreeList + i + 1); - } - UnityEngineEventsUnityActionFreeList[UnityEngineEventsUnityActionFreeListSize - 1] = nullptr; - NextFreeUnityEngineEventsUnityAction = UnityEngineEventsUnityActionFreeList + 1; + 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; - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize = 10; - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList = new UnityEngine::Events::UnityAction2*[UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize]; - for (int32_t i = 0, end = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1; i < end; ++i) - { - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[i] = (UnityEngine::Events::UnityAction2*)(UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + i + 1); - } - UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList[UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeListSize - 1] = nullptr; - NextFreeUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode = UnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneModeFreeList + 1; + 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; - SystemComponentModelDesignComponentEventHandlerFreeListSize = maxManagedObjects; - SystemComponentModelDesignComponentEventHandlerFreeList = new System::ComponentModel::Design::ComponentEventHandler*[SystemComponentModelDesignComponentEventHandlerFreeListSize]; - for (int32_t i = 0, end = SystemComponentModelDesignComponentEventHandlerFreeListSize - 1; i < end; ++i) - { - SystemComponentModelDesignComponentEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentEventHandler*)(SystemComponentModelDesignComponentEventHandlerFreeList + i + 1); - } - SystemComponentModelDesignComponentEventHandlerFreeList[SystemComponentModelDesignComponentEventHandlerFreeListSize - 1] = nullptr; - NextFreeSystemComponentModelDesignComponentEventHandler = SystemComponentModelDesignComponentEventHandlerFreeList + 1; + 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; - SystemComponentModelDesignComponentChangingEventHandlerFreeListSize = maxManagedObjects; - SystemComponentModelDesignComponentChangingEventHandlerFreeList = new System::ComponentModel::Design::ComponentChangingEventHandler*[SystemComponentModelDesignComponentChangingEventHandlerFreeListSize]; - for (int32_t i = 0, end = SystemComponentModelDesignComponentChangingEventHandlerFreeListSize - 1; i < end; ++i) - { - SystemComponentModelDesignComponentChangingEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangingEventHandler*)(SystemComponentModelDesignComponentChangingEventHandlerFreeList + i + 1); - } - SystemComponentModelDesignComponentChangingEventHandlerFreeList[SystemComponentModelDesignComponentChangingEventHandlerFreeListSize - 1] = nullptr; - NextFreeSystemComponentModelDesignComponentChangingEventHandler = SystemComponentModelDesignComponentChangingEventHandlerFreeList + 1; + 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; - SystemComponentModelDesignComponentChangedEventHandlerFreeListSize = maxManagedObjects; - SystemComponentModelDesignComponentChangedEventHandlerFreeList = new System::ComponentModel::Design::ComponentChangedEventHandler*[SystemComponentModelDesignComponentChangedEventHandlerFreeListSize]; - for (int32_t i = 0, end = SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1; i < end; ++i) - { - SystemComponentModelDesignComponentChangedEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangedEventHandler*)(SystemComponentModelDesignComponentChangedEventHandlerFreeList + i + 1); - } - SystemComponentModelDesignComponentChangedEventHandlerFreeList[SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1] = nullptr; - NextFreeSystemComponentModelDesignComponentChangedEventHandler = SystemComponentModelDesignComponentChangedEventHandlerFreeList + 1; + 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; - SystemComponentModelDesignComponentRenameEventHandlerFreeListSize = maxManagedObjects; - SystemComponentModelDesignComponentRenameEventHandlerFreeList = new System::ComponentModel::Design::ComponentRenameEventHandler*[SystemComponentModelDesignComponentRenameEventHandlerFreeListSize]; - for (int32_t i = 0, end = SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1; i < end; ++i) - { - SystemComponentModelDesignComponentRenameEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentRenameEventHandler*)(SystemComponentModelDesignComponentRenameEventHandlerFreeList + i + 1); - } - SystemComponentModelDesignComponentRenameEventHandlerFreeList[SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1] = nullptr; - NextFreeSystemComponentModelDesignComponentRenameEventHandler = SystemComponentModelDesignComponentRenameEventHandlerFreeList + 1; + 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; @@ -17850,9 +17812,155 @@ DLLEXPORT void Init( Plugin::SystemComponentModelDesignComponentRenameEventHandlerInvoke = systemComponentModelDesignComponentRenameEventHandlerInvoke; /*END INIT BODY*/ + // Make sure there was enough memory + int32_t usedMemory = curMemory - (uint8_t*)memory; + if (usedMemory > memorySize) + { + System::String msg = "Plugin memory size is too low"; + System::Exception ex(msg); + Plugin::SetException(ex.Handle); + return; + } + + if (initMode == InitMode::FirstBoot) + { + 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) + { + Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentChangedEventHandler*)(Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList + i + 1); + } + Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList[Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeListSize - 1] = nullptr; + Plugin::NextFreeSystemComponentModelDesignComponentChangedEventHandler = Plugin::SystemComponentModelDesignComponentChangedEventHandlerFreeList + 1; + + for (int32_t i = 0, end = Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1; i < end; ++i) + { + Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList[i] = (System::ComponentModel::Design::ComponentRenameEventHandler*)(Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList + i + 1); + } + Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList[Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeListSize - 1] = nullptr; + Plugin::NextFreeSystemComponentModelDesignComponentRenameEventHandler = Plugin::SystemComponentModelDesignComponentRenameEventHandlerFreeList + 1; + /*END INIT BODY FIRST BOOT*/ + } + try { - PluginMain(); + PluginMain( + curMemory, + memorySize - usedMemory, + initMode == InitMode::FirstBoot); } catch (System::Exception ex) { From 0f37ca2eef5dc96c624eae2b0c23699e7a950b1b Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sun, 14 Jan 2018 22:33:01 -0800 Subject: [PATCH 24/65] Support "range for loops" for arrays, IEnumerator, and IEnumerator --- Unity/Assets/NativeScript/Bindings.cs | 499 ++- .../NativeScript/Editor/GenerateBindings.cs | 460 ++- Unity/Assets/NativeScriptTypes.json | 95 +- Unity/CppSource/NativeScript/Bindings.cpp | 3224 +++++++++++++---- Unity/CppSource/NativeScript/Bindings.h | 1335 +++++-- 5 files changed, 4624 insertions(+), 989 deletions(-) diff --git a/Unity/Assets/NativeScript/Bindings.cs b/Unity/Assets/NativeScript/Bindings.cs index bb527ea..825944f 100644 --- a/Unity/Assets/NativeScript/Bindings.cs +++ b/Unity/Assets/NativeScript/Bindings.cs @@ -303,7 +303,7 @@ enum InitMode : byte #if UNITY_EDITOR // Handle to the C++ DLL static IntPtr libraryHandle; - + delegate void InitDelegate( IntPtr memory, int memorySize, @@ -312,8 +312,11 @@ delegate void InitDelegate( IntPtr stringNew, IntPtr setException, IntPtr arrayGetLength, + IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ - int maxManagedObjects, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, + int maxManagedObjects, + IntPtr systemIDisposableMethodDispose, + IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3PropertyGetMagnitude, IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, @@ -327,6 +330,7 @@ delegate void InitDelegate( IntPtr unityEngineComponentPropertyGetTransform, IntPtr unityEngineTransformPropertyGetPosition, IntPtr unityEngineTransformPropertySetPosition, + IntPtr unityEngineTransformMethodSetParentUnityEngineTransform, IntPtr boxColor, IntPtr unboxColor, IntPtr boxGradientColorKey, @@ -346,6 +350,20 @@ delegate void InitDelegate( IntPtr unityEngineRaycastHitPropertyGetTransform, IntPtr boxRaycastHit, 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, @@ -425,8 +443,6 @@ delegate void InitDelegate( IntPtr unboxScene, IntPtr boxLoadSceneMode, IntPtr unboxLoadSceneMode, - IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, - IntPtr systemCollectionsIEnumeratorMethodMoveNext, IntPtr boxPrimitiveType, IntPtr unboxPrimitiveType, IntPtr unityEngineTimePropertyGetDeltaTime, @@ -800,8 +816,11 @@ static extern void Init( IntPtr stringNew, IntPtr setException, IntPtr arrayGetLength, + IntPtr enumerableGetEnumerator, /*BEGIN INIT PARAMS*/ - int maxManagedObjects, IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, + int maxManagedObjects, + IntPtr systemIDisposableMethodDispose, + IntPtr unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3PropertyGetMagnitude, IntPtr unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle, IntPtr unityEngineVector3Methodop_AdditionUnityEngineVector3_UnityEngineVector3, @@ -815,6 +834,7 @@ static extern void Init( IntPtr unityEngineComponentPropertyGetTransform, IntPtr unityEngineTransformPropertyGetPosition, IntPtr unityEngineTransformPropertySetPosition, + IntPtr unityEngineTransformMethodSetParentUnityEngineTransform, IntPtr boxColor, IntPtr unboxColor, IntPtr boxGradientColorKey, @@ -834,6 +854,20 @@ static extern void Init( IntPtr unityEngineRaycastHitPropertyGetTransform, IntPtr boxRaycastHit, 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, @@ -913,8 +947,6 @@ static extern void Init( IntPtr unboxScene, IntPtr boxLoadSceneMode, IntPtr unboxLoadSceneMode, - IntPtr systemCollectionsIEnumeratorPropertyGetCurrent, - IntPtr systemCollectionsIEnumeratorMethodMoveNext, IntPtr boxPrimitiveType, IntPtr unboxPrimitiveType, IntPtr unityEngineTimePropertyGetDeltaTime, @@ -1196,8 +1228,10 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int StringNewDelegate(string chars); delegate void SetExceptionDelegate(int handle); delegate int ArrayGetLengthDelegate(int handle); + delegate int EnumerableGetEnumeratorDelegate(int handle); /*BEGIN DELEGATE TYPES*/ + 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); @@ -1212,6 +1246,7 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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); @@ -1231,6 +1266,20 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke 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 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); @@ -1310,8 +1359,6 @@ IntPtr systemComponentModelDesignComponentRenameEventHandlerInvoke delegate int UnboxSceneDelegate(int valHandle); delegate int BoxLoadSceneModeDelegate(UnityEngine.SceneManagement.LoadSceneMode val); delegate UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneModeDelegate(int valHandle); - delegate int SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(int thisHandle); - delegate bool SystemCollectionsIEnumeratorMethodMoveNextDelegate(int thisHandle); delegate int BoxPrimitiveTypeDelegate(UnityEngine.PrimitiveType val); delegate UnityEngine.PrimitiveType UnboxPrimitiveTypeDelegate(int valHandle); delegate float UnityEngineTimePropertyGetDeltaTimeDelegate(); @@ -1606,8 +1653,10 @@ private static void OpenPlugin(InitMode initMode) 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 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)), @@ -1622,6 +1671,7 @@ private static void OpenPlugin(InitMode initMode) 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)), @@ -1641,6 +1691,20 @@ private static void OpenPlugin(InitMode initMode) 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 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)), @@ -1720,8 +1784,6 @@ private static void OpenPlugin(InitMode initMode) Marshal.GetFunctionPointerForDelegate(new UnboxSceneDelegate(UnboxScene)), Marshal.GetFunctionPointerForDelegate(new BoxLoadSceneModeDelegate(BoxLoadSceneMode)), Marshal.GetFunctionPointerForDelegate(new UnboxLoadSceneModeDelegate(UnboxLoadSceneMode)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorPropertyGetCurrentDelegate(SystemCollectionsIEnumeratorPropertyGetCurrent)), - Marshal.GetFunctionPointerForDelegate(new SystemCollectionsIEnumeratorMethodMoveNextDelegate(SystemCollectionsIEnumeratorMethodMoveNext)), Marshal.GetFunctionPointerForDelegate(new BoxPrimitiveTypeDelegate(BoxPrimitiveType)), Marshal.GetFunctionPointerForDelegate(new UnboxPrimitiveTypeDelegate(UnboxPrimitiveType)), Marshal.GetFunctionPointerForDelegate(new UnityEngineTimePropertyGetDeltaTimeDelegate(UnityEngineTimePropertyGetDeltaTime)), @@ -1927,6 +1989,12 @@ static int ArrayGetLength(int handle) return ((Array)ObjectStore.Get(handle)).Length; } + [MonoPInvokeCallback(typeof(EnumerableGetEnumeratorDelegate))] + static int EnumerableGetEnumerator(int handle) + { + return ObjectStore.Store(((IEnumerable)ObjectStore.Get(handle)).GetEnumerator()); + } + /*BEGIN BASE TYPES*/ class SystemCollectionsGenericBaseIComparerSystemInt32 : System.Collections.Generic.IComparer { @@ -2753,6 +2821,26 @@ public void NativeInvoke(object sender, System.ComponentModel.Design.ComponentRe /*END BASE TYPES*/ /*BEGIN FUNCTIONS*/ + [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) { @@ -3062,6 +3150,27 @@ static void UnityEngineTransformPropertySetPosition(int thisHandle, ref UnityEng } } + [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) { @@ -3487,6 +3596,328 @@ static int UnboxRaycastHit(int valHandle) } } + [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(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(ReleaseUnityEnginePlayablesPlayableGraphDelegate))] static void ReleaseUnityEnginePlayablesPlayableGraph(int handle) { @@ -5231,52 +5662,6 @@ static UnityEngine.SceneManagement.LoadSceneMode UnboxLoadSceneMode(int valHandl } } - [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(BoxPrimitiveTypeDelegate))] static int BoxPrimitiveType(UnityEngine.PrimitiveType val) { diff --git a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs index ebec6cf..2b6735c 100644 --- a/Unity/Assets/NativeScript/Editor/GenerateBindings.cs +++ b/Unity/Assets/NativeScript/Editor/GenerateBindings.cs @@ -1771,6 +1771,38 @@ static void AppendType( AppendCppMethodDefinitionsEnd( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); + + // Generate iterator if this type implements IEnumerable + Type[] allInterfaces = type.GetInterfaces(); + foreach (Type interfaceType in allInterfaces) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition() == typeof(IEnumerable<>)) + { + builders.TempStrBuilder.Length = 0; + AppendNamespace( + type.Namespace, + string.Empty, + builders.TempStrBuilder); + AppendTypeNameWithoutGenericSuffix( + type.Name, + builders.TempStrBuilder); + AppendTypeNames( + typeParams, + builders.TempStrBuilder); + string bindingEnumerableTypeName = builders.TempStrBuilder.ToString(); + + Type elementType = interfaceType.GetGenericArguments()[0]; + AppendGenericEnumerableIterator( + type, + typeof(IEnumerator<>).MakeGenericType(elementType), + elementType, + bindingEnumerableTypeName, + builders.CppTypeDefinitions, + builders.CppMethodDefinitions); + break; + } + } } static void AppendBaseType( @@ -2543,7 +2575,7 @@ static void AppendConstructor( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); + builders.CppMethodDefinitions.Append('\n'); // C++ init params AppendCppInitParam( @@ -4526,9 +4558,365 @@ static void AppendArray( AppendCppMethodDefinitionsEnd( cppMethodDefinitionsIndent, builders.CppMethodDefinitions); + + if (rank == 1) + { + AppendArrayIterator( + elementType, + cppGenericArrayTypeName, + bindingArrayTypeName, + builders.CppTypeDefinitions, + builders.CppMethodDefinitions); + } } } + static void AppendArrayIterator( + Type elementType, + string cppGenericArrayTypeName, + string bindingArrayTypeName, + StringBuilder cppTypeDefinitions, + StringBuilder cppMethodDefinitions) + { + // Iterator type definition + cppTypeDefinitions.Append("namespace Plugin\n"); + cppTypeDefinitions.Append("{\n"); + cppTypeDefinitions.Append("\tstruct "); + cppTypeDefinitions.Append(bindingArrayTypeName); + cppTypeDefinitions.Append("Iterator\n"); + cppTypeDefinitions.Append("\t{\n"); + cppTypeDefinitions.Append("\t\tSystem::"); + cppTypeDefinitions.Append(cppGenericArrayTypeName); + cppTypeDefinitions.Append("& array;\n"); + cppTypeDefinitions.Append("\t\tint index;\n"); + cppTypeDefinitions.Append("\t\t"); + cppTypeDefinitions.Append(bindingArrayTypeName); + cppTypeDefinitions.Append("Iterator(System::"); + cppTypeDefinitions.Append(cppGenericArrayTypeName); + cppTypeDefinitions.Append("& array, int32_t index);\n"); + cppTypeDefinitions.Append("\t\t"); + cppTypeDefinitions.Append(bindingArrayTypeName); + cppTypeDefinitions.Append("Iterator& operator++();\n"); + cppTypeDefinitions.Append("\t\tbool operator!=(const "); + cppTypeDefinitions.Append(bindingArrayTypeName); + cppTypeDefinitions.Append("Iterator& other);\n"); + cppTypeDefinitions.Append("\t\t"); + AppendCppTypeName( + elementType, + cppTypeDefinitions); + cppTypeDefinitions.Append(" operator*();\n"); + cppTypeDefinitions.Append("\t};\n"); + cppTypeDefinitions.Append("}\n"); + cppTypeDefinitions.Append('\n'); + + // begin() and end() declarations + cppTypeDefinitions.Append("namespace System\n"); + cppTypeDefinitions.Append("{\n"); + cppTypeDefinitions.Append("\tPlugin::"); + cppTypeDefinitions.Append(bindingArrayTypeName); + cppTypeDefinitions.Append("Iterator begin(System::"); + cppTypeDefinitions.Append(cppGenericArrayTypeName); + cppTypeDefinitions.Append("& array);\n"); + cppTypeDefinitions.Append("\tPlugin::"); + cppTypeDefinitions.Append(bindingArrayTypeName); + cppTypeDefinitions.Append("Iterator end(System::"); + cppTypeDefinitions.Append(cppGenericArrayTypeName); + cppTypeDefinitions.Append("& array);\n"); + cppTypeDefinitions.Append("}\n"); + cppTypeDefinitions.Append('\n'); + + // Iterator method definitions + cppMethodDefinitions.Append("namespace Plugin\n"); + cppMethodDefinitions.Append("{\n"); + 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.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.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.Append('\t'); + AppendCppTypeName( + elementType, + cppMethodDefinitions); + 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'); + + // begin() and end() definitions + cppMethodDefinitions.Append("namespace System\n"); + cppMethodDefinitions.Append("{\n"); + cppMethodDefinitions.Append("\tPlugin::"); + cppMethodDefinitions.Append(bindingArrayTypeName); + cppMethodDefinitions.Append("Iterator begin(System::"); + cppMethodDefinitions.Append(cppGenericArrayTypeName); + cppMethodDefinitions.Append("& array)\n"); + cppMethodDefinitions.Append("\t{\n"); + cppMethodDefinitions.Append("\t\treturn Plugin::"); + cppMethodDefinitions.Append(bindingArrayTypeName); + cppMethodDefinitions.Append("Iterator(array, 0);\n"); + cppMethodDefinitions.Append("\t}\n"); + cppMethodDefinitions.Append("\t\n"); + cppMethodDefinitions.Append("\tPlugin::"); + cppMethodDefinitions.Append(bindingArrayTypeName); + cppMethodDefinitions.Append("Iterator end(System::"); + cppMethodDefinitions.Append(cppGenericArrayTypeName); + cppMethodDefinitions.Append("& array)\n"); + cppMethodDefinitions.Append("\t{\n"); + 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'); + } + + static void AppendGenericEnumerableIterator( + Type enumerableType, + Type enumeratorType, + Type elementType, + string bindingEnumerableTypeName, + StringBuilder cppTypeDefinitions, + StringBuilder cppMethodDefinitions) + { + // Iterator type definition + cppTypeDefinitions.Append("namespace Plugin\n"); + cppTypeDefinitions.Append("{\n"); + cppTypeDefinitions.Append("\tstruct "); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator\n"); + cppTypeDefinitions.Append("\t{\n"); + cppTypeDefinitions.Append("\t\t"); + AppendCppTypeName( + enumeratorType, + cppTypeDefinitions); + cppTypeDefinitions.Append(" enumerator;\n"); + cppTypeDefinitions.Append("\t\tbool hasMore;\n"); + cppTypeDefinitions.Append("\t\t"); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator(decltype(nullptr));\n"); + cppTypeDefinitions.Append("\t\t"); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator("); + AppendCppTypeName( + enumerableType, + cppTypeDefinitions); + cppTypeDefinitions.Append("& enumerable);\n"); + cppTypeDefinitions.Append("\t\t~"); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator();\n"); + cppTypeDefinitions.Append("\t\t"); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator& operator++();\n"); + cppTypeDefinitions.Append("\t\tbool operator!=(const "); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator& other);\n"); + cppTypeDefinitions.Append("\t\t"); + AppendCppTypeName( + elementType, + cppTypeDefinitions); + cppTypeDefinitions.Append(" operator*();\n"); + cppTypeDefinitions.Append("\t};\n"); + cppTypeDefinitions.Append("}\n"); + cppTypeDefinitions.Append('\n'); + + // begin() and end() declarations + int indent = AppendNamespaceBeginning( + enumerableType.Namespace, + cppTypeDefinitions); + AppendIndent( + indent, + cppTypeDefinitions); + cppTypeDefinitions.Append("Plugin::"); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator begin("); + AppendCppTypeName( + enumerableType, + cppTypeDefinitions); + cppTypeDefinitions.Append("& enumerable);\n"); + AppendIndent( + indent, + cppTypeDefinitions); + cppTypeDefinitions.Append("Plugin::"); + cppTypeDefinitions.Append(bindingEnumerableTypeName); + cppTypeDefinitions.Append("Iterator end("); + AppendCppTypeName( + enumerableType, + cppTypeDefinitions); + cppTypeDefinitions.Append("& enumerable);\n"); + AppendNamespaceEnding( + indent, + cppTypeDefinitions); + cppTypeDefinitions.Append('\n'); + + // Iterator method definitions + cppMethodDefinitions.Append("namespace Plugin\n"); + cppMethodDefinitions.Append("{\n"); + 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.Append('\t'); + cppMethodDefinitions.Append(bindingEnumerableTypeName); + cppMethodDefinitions.Append("Iterator::"); + cppMethodDefinitions.Append(bindingEnumerableTypeName); + cppMethodDefinitions.Append("Iterator("); + AppendCppTypeName( + 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.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.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.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.Append('\t'); + AppendCppTypeName( + elementType, + cppMethodDefinitions); + 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'); + + // begin() and end() definitions + indent = AppendNamespaceBeginning( + enumerableType.Namespace, + cppMethodDefinitions); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append("Plugin::"); + cppMethodDefinitions.Append(bindingEnumerableTypeName); + cppMethodDefinitions.Append("Iterator begin("); + AppendCppTypeName( + enumerableType, + cppMethodDefinitions); + cppMethodDefinitions.Append("& enumerable)\n"); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + cppMethodDefinitions); + cppMethodDefinitions.Append("return Plugin::"); + cppMethodDefinitions.Append(bindingEnumerableTypeName); + cppMethodDefinitions.Append("Iterator(enumerable);\n"); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append("}\n"); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append('\n'); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append("Plugin::"); + cppMethodDefinitions.Append(bindingEnumerableTypeName); + cppMethodDefinitions.Append("Iterator end("); + AppendCppTypeName( + enumerableType, + cppMethodDefinitions); + cppMethodDefinitions.Append("& enumerable)\n"); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append("{\n"); + AppendIndent( + indent + 1, + cppMethodDefinitions); + cppMethodDefinitions.Append("return Plugin::"); + cppMethodDefinitions.Append(bindingEnumerableTypeName); + cppMethodDefinitions.Append("Iterator(nullptr);\n"); + AppendIndent( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append("}\n"); + AppendNamespaceEnding( + indent, + cppMethodDefinitions); + cppMethodDefinitions.Append('\n'); + } + static void AppendCppArrayIndexOperatorMethodDefinition( int rank, int indent, @@ -5261,7 +5649,7 @@ static void AppendArrayConstructor( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); + builders.CppMethodDefinitions.Append('\n'); } static void AppendArrayCppGetLengthFunction( @@ -6342,7 +6730,7 @@ static void AppendDelegate( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); + builders.CppMethodDefinitions.Append('\n'); // C++ remove AppendCppMethodDefinitionBegin( @@ -6374,7 +6762,7 @@ static void AppendDelegate( AppendIndent( indent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); + builders.CppMethodDefinitions.Append('\n'); // C# GetDelegate call AppendCsharpGetDelegateCall( @@ -6387,7 +6775,7 @@ static void AppendDelegate( // C# class (beginning) builders.CsharpBaseTypes.Append("\t\tclass "); builders.CsharpBaseTypes.Append(bindingTypeName); - builders.CsharpBaseTypes.Append("\n"); + builders.CsharpBaseTypes.Append('\n'); builders.CsharpBaseTypes.Append("\t\t{\n"); // C# class fields @@ -6975,7 +7363,7 @@ static void AppendBaseType( type, builders.CsharpBaseTypes); } - builders.CsharpBaseTypes.Append("\n"); + builders.CsharpBaseTypes.Append('\n'); builders.CsharpBaseTypes.Append("\t\t{\n"); // C# class fields @@ -8074,7 +8462,7 @@ static void AppendCsharpBaseTypeCppMethodCallMethod( AppendCsharpTypeName( invokeMethod.ReturnType, output); - output.Append(" "); + output.Append(' '); output.Append(funcName); output.Append("("); AppendCsharpParams( @@ -8442,7 +8830,7 @@ static void AppendCppBaseTypeMethodInvokeBindingFunction( AppendIndent( indent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeInequalityOperator( @@ -8670,7 +9058,7 @@ static void AppendCppBaseTypeMoveAssignmentOperator( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeAssignmentOperatorNullptr( @@ -8698,7 +9086,7 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( typeParams, output); output.Append( - "::operator=(decltype(nullptr) other)\n"); + "::operator=(decltype(nullptr))\n"); AppendIndent( cppMethodDefinitionsIndent, output); @@ -8786,7 +9174,7 @@ static void AppendCppBaseTypeAssignmentOperatorNullptr( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeAssignmentOperatorSameType( @@ -8853,7 +9241,7 @@ static void AppendCppBaseTypeAssignmentOperatorSameType( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeDestructor( @@ -8961,7 +9349,7 @@ static void AppendCppBaseTypeDestructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeHandleConstructor( @@ -9050,7 +9438,7 @@ static void AppendCppBaseTypeHandleConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeMoveConstructor( @@ -9142,7 +9530,7 @@ static void AppendCppBaseTypeMoveConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeCopyConstructor( @@ -9238,7 +9626,7 @@ static void AppendCppBaseTypeCopyConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeNullptrConstructor( @@ -9266,7 +9654,7 @@ static void AppendCppBaseTypeNullptrConstructor( AppendTypeNameWithoutGenericSuffix( cppTypeName, output); - output.Append("(decltype(nullptr) n)\n"); + output.Append("(decltype(nullptr))\n"); string separator = ": "; foreach (Type interfaceType in interfaceTypes) { @@ -9304,7 +9692,7 @@ static void AppendCppBaseTypeNullptrConstructor( AppendIndent( cppMethodDefinitionsIndent, output); - output.Append("\n"); + output.Append('\n'); } static void AppendCppBaseTypeConstructor( @@ -9962,7 +10350,7 @@ static void AppendExceptions( AppendIndent( throwerIndent, builders.CppMethodDefinitions); - builders.CppMethodDefinitions.Append("\n"); + builders.CppMethodDefinitions.Append('\n'); AppendIndent( throwerIndent + 1, builders.CppMethodDefinitions); @@ -10635,7 +11023,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("(decltype(nullptr) n);\n"); + output.Append("(decltype(nullptr));\n"); // Constructor from handle AppendIndent(indent + 1, output); @@ -10718,7 +11106,7 @@ static void AppendCppTypeDefinitionBegin( AppendCppTypeParameters( typeParams, output); - output.Append("& operator=(decltype(nullptr) other);\n"); + output.Append("& operator=(decltype(nullptr));\n"); // Move assignment operator to same type AppendIndent(indent + 1, output); @@ -10823,7 +11211,7 @@ static int AppendCppMethodDefinitionsBegin( AppendTypeNameWithoutGenericSuffix( enclosingTypeName, output); - output.Append("(decltype(nullptr) n)\n"); + output.Append("(decltype(nullptr))\n"); string separator = ": "; foreach (Type interfaceType in interfaceTypes) { @@ -10843,7 +11231,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Handle constructor AppendIndent(indent, output); @@ -10894,7 +11282,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Copy constructor AppendIndent(indent, output); @@ -10928,7 +11316,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Move constructor AppendIndent(indent, output); @@ -10965,7 +11353,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Destructor AppendIndent(indent, output); @@ -11005,7 +11393,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Assignment operator to same type AppendIndent(indent, output); @@ -11047,7 +11435,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Assignment operator to nullptr AppendIndent(indent, output); @@ -11064,7 +11452,7 @@ static int AppendCppMethodDefinitionsBegin( AppendCppTypeParameters( enclosingTypeParams, output); - output.Append("::operator=(decltype(nullptr) other)\n"); + output.Append("::operator=(decltype(nullptr))\n"); AppendIndent(indent, output); output.Append("{\n"); AppendIndent(indent + 1, output); @@ -11089,7 +11477,7 @@ static int AppendCppMethodDefinitionsBegin( AppendIndent(indent, output); output.Append("}\n"); AppendIndent(indent, output); - output.Append("\n"); + output.Append('\n'); // Move assignment operator to same type AppendIndent(indent, output); @@ -12277,7 +12665,17 @@ static void AppendCppFunctionPointer( StringBuilder output) { // Return type - if (IsFullValueType(returnType)) + if (returnType == typeof(bool)) + { + // C linkage requires us to use primitive types + output.Append("int32_t"); + } + else if (returnType == typeof(char)) + { + // C linkage requires us to use primitive types + output.Append("int16_t"); + } + else if (IsFullValueType(returnType)) { AppendCppTypeName(returnType, output); } diff --git a/Unity/Assets/NativeScriptTypes.json b/Unity/Assets/NativeScriptTypes.json index 2013316..7e8f7a3 100644 --- a/Unity/Assets/NativeScriptTypes.json +++ b/Unity/Assets/NativeScriptTypes.json @@ -4,7 +4,13 @@ ], "Types": [ { - "Name": " System.IDisposable" + "Name": " System.IDisposable", + "Methods": [ + { + "Name": "Dispose", + "ParamTypes": [] + } + ] }, { "Name": "UnityEngine.Vector3", @@ -83,6 +89,14 @@ }, { "Name": "UnityEngine.Transform", + "Methods": [ + { + "Name": "SetParent", + "ParamTypes": [ + "UnityEngine.Transform" + ] + } + ], "Properties": [ { "Name": "position", @@ -135,6 +149,63 @@ } ] }, + { + "Name": "System.Collections.IEnumerator", + "Methods": [ + { + "Name": "MoveNext", + "ParamTypes": [] + } + ], + "Properties": [ + { + "Name": "Current", + "Get": {}, + "Set": {} + } + ] + }, + { + "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": [ @@ -168,6 +239,12 @@ "UnityEngine.Resolution" ] } + ], + "Methods": [ + { + "Name": "GetEnumerator", + "ParamTypes": [] + } ] }, { @@ -738,22 +815,6 @@ { "Name": "UnityEngine.SceneManagement.LoadSceneMode" }, - { - "Name": "System.Collections.IEnumerator", - "Methods": [ - { - "Name": "MoveNext", - "ParamTypes": [] - } - ], - "Properties": [ - { - "Name": "Current", - "Get": {}, - "Set": {} - } - ] - }, { "Name": "System.EventArgs" }, diff --git a/Unity/CppSource/NativeScript/Bindings.cpp b/Unity/CppSource/NativeScript/Bindings.cpp index 16eb64f..875abad 100644 --- a/Unity/CppSource/NativeScript/Bindings.cpp +++ b/Unity/CppSource/NativeScript/Bindings.cpp @@ -40,6 +40,44 @@ 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 //////////////////////////////////////////////////////////////// @@ -50,8 +88,10 @@ namespace Plugin int32_t (*StringNew)(const char* chars); void (*SetException)(int32_t handle); int32_t (*ArrayGetLength)(int32_t handle); + int32_t (*EnumerableGetEnumerator)(int32_t handle); /*BEGIN FUNCTION POINTERS*/ + void (*SystemIDisposableMethodDispose)(int32_t thisHandle); UnityEngine::Vector3 (*UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z); float (*UnityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz); void (*UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ); @@ -61,11 +101,12 @@ namespace Plugin UnityEngine::Vector3 (*UnboxVector3)(int32_t valHandle); int32_t (*UnityEngineObjectPropertyGetName)(int32_t thisHandle); void (*UnityEngineObjectPropertySetName)(int32_t thisHandle, int32_t valueHandle); - System::Boolean (*UnityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle); - System::Boolean (*UnityEngineObjectMethodop_ImplicitUnityEngineObject)(int32_t existsHandle); + int32_t (*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); @@ -85,6 +126,20 @@ namespace Plugin 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); + 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); @@ -103,7 +158,7 @@ namespace Plugin int32_t (*UnityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript)(int32_t thisHandle); int32_t (*UnityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type); void (*UnityEngineDebugMethodLogSystemObject)(int32_t messageHandle); - System::Boolean (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); + int32_t (*UnityEngineAssertionsAssertFieldGetRaiseExceptions)(); void (*UnityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value); void (*UnityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle); void (*UnityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle); @@ -164,8 +219,6 @@ namespace Plugin int32_t (*UnboxScene)(int32_t valHandle); int32_t (*BoxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val); UnityEngine::SceneManagement::LoadSceneMode (*UnboxLoadSceneMode)(int32_t valHandle); - int32_t (*SystemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle); - System::Boolean (*SystemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle); int32_t (*BoxPrimitiveType)(UnityEngine::PrimitiveType val); UnityEngine::PrimitiveType (*UnboxPrimitiveType)(int32_t valHandle); float (*UnityEngineTimePropertyGetDeltaTime)(); @@ -196,11 +249,11 @@ namespace Plugin int32_t (*BoxInteractionSourceNode)(UnityEngine::XR::WSA::Input::InteractionSourceNode val); UnityEngine::XR::WSA::Input::InteractionSourceNode (*UnboxInteractionSourceNode)(int32_t valHandle); void (*ReleaseUnityEngineXRWSAInputInteractionSourcePose)(int32_t handle); - System::Boolean (*UnityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)(int32_t thisHandle, UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node); + 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); - System::Boolean (*UnboxBoolean)(int32_t valHandle); + int32_t (*UnboxBoolean)(int32_t valHandle); int32_t (*BoxSByte)(int8_t val); int8_t (*UnboxSByte)(int32_t valHandle); int32_t (*BoxByte)(uint8_t val); @@ -218,7 +271,7 @@ namespace Plugin int32_t (*BoxUInt64)(uint64_t val); uint64_t (*UnboxUInt64)(int32_t valHandle); int32_t (*BoxChar)(System::Char val); - System::Char (*UnboxChar)(int32_t valHandle); + int16_t (*UnboxChar)(int32_t valHandle); int32_t (*BoxSingle)(float val); float (*UnboxSingle)(int32_t valHandle); int32_t (*BoxDouble)(double val); @@ -1059,17 +1112,17 @@ namespace System { } - Object::Object(decltype(nullptr) n) + Object::Object(decltype(nullptr)) : Handle(0) { } - bool Object::operator==(decltype(nullptr) other) const + bool Object::operator==(decltype(nullptr)) const { return Handle == 0; } - bool Object::operator!=(decltype(nullptr) other) const + bool Object::operator!=(decltype(nullptr)) const { return Handle != 0; } @@ -1084,12 +1137,12 @@ namespace System { } - ValueType::ValueType(decltype(nullptr) n) + ValueType::ValueType(decltype(nullptr)) : Object(nullptr) { } - String::String(decltype(nullptr) n) + String::String(decltype(nullptr)) : Object(Plugin::InternalUse::Only, 0) { } @@ -1144,7 +1197,7 @@ namespace System return *this; } - String& String::operator=(decltype(nullptr) other) + String& String::operator=(decltype(nullptr)) { if (Handle) { @@ -1175,7 +1228,7 @@ namespace System { } - ICloneable::ICloneable(decltype(nullptr) n) + ICloneable::ICloneable(decltype(nullptr)) : Object(nullptr) { } @@ -1187,18 +1240,37 @@ namespace System { } - IEnumerable::IEnumerable(decltype(nullptr) n) + 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) n) + ICollection::ICollection(decltype(nullptr)) : Object(nullptr) , IEnumerable(nullptr) { @@ -1211,7 +1283,7 @@ namespace System { } - IList::IList(decltype(nullptr) n) + IList::IList(decltype(nullptr)) : Object(nullptr) , IEnumerable(nullptr) , ICollection(nullptr) @@ -1228,7 +1300,7 @@ namespace System { } - Array::Array(decltype(nullptr) n) + Array::Array(decltype(nullptr)) : Object(nullptr) , ICloneable(nullptr) , Collections::IEnumerable(nullptr) @@ -1251,7 +1323,7 @@ namespace System /*BEGIN METHOD DEFINITIONS*/ namespace System { - IDisposable::IDisposable(decltype(nullptr) n) + IDisposable::IDisposable(decltype(nullptr)) { } @@ -1298,7 +1370,7 @@ namespace System return *this; } - IDisposable& IDisposable::operator=(decltype(nullptr) other) + IDisposable& IDisposable::operator=(decltype(nullptr)) { if (Handle) { @@ -1328,6 +1400,18 @@ namespace System { 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 UnityEngine @@ -1436,7 +1520,7 @@ namespace System namespace UnityEngine { - Object::Object(decltype(nullptr) n) + Object::Object(decltype(nullptr)) { } @@ -1483,7 +1567,7 @@ namespace UnityEngine return *this; } - Object& Object::operator=(decltype(nullptr) other) + Object& Object::operator=(decltype(nullptr)) { if (Handle) { @@ -1568,7 +1652,7 @@ namespace UnityEngine namespace UnityEngine { - Component::Component(decltype(nullptr) n) + Component::Component(decltype(nullptr)) : UnityEngine::Object(nullptr) { } @@ -1617,7 +1701,7 @@ namespace UnityEngine return *this; } - Component& Component::operator=(decltype(nullptr) other) + Component& Component::operator=(decltype(nullptr)) { if (Handle) { @@ -1664,7 +1748,7 @@ namespace UnityEngine namespace UnityEngine { - Transform::Transform(decltype(nullptr) n) + Transform::Transform(decltype(nullptr)) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , System::Collections::IEnumerable(nullptr) @@ -1717,7 +1801,7 @@ namespace UnityEngine return *this; } - Transform& Transform::operator=(decltype(nullptr) other) + Transform& Transform::operator=(decltype(nullptr)) { if (Handle) { @@ -1772,6 +1856,18 @@ namespace UnityEngine 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 UnityEngine @@ -1856,7 +1952,7 @@ namespace System namespace UnityEngine { - Resolution::Resolution(decltype(nullptr) n) + Resolution::Resolution(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -1905,7 +2001,7 @@ namespace UnityEngine return *this; } - Resolution& Resolution::operator=(decltype(nullptr) other) + Resolution& Resolution::operator=(decltype(nullptr)) { if (Handle) { @@ -2047,7 +2143,7 @@ namespace System namespace UnityEngine { - RaycastHit::RaycastHit(decltype(nullptr) n) + RaycastHit::RaycastHit(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -2096,7 +2192,7 @@ namespace UnityEngine return *this; } - RaycastHit& RaycastHit::operator=(decltype(nullptr) other) + RaycastHit& RaycastHit::operator=(decltype(nullptr)) { if (Handle) { @@ -2199,19 +2295,131 @@ namespace System } } +namespace System +{ + namespace Collections + { + IEnumerator::IEnumerator(decltype(nullptr)) + { + } + + IEnumerator::IEnumerator(Plugin::InternalUse iu, 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 Collections { namespace Generic { - IEnumerable::IEnumerable(decltype(nullptr) n) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -2220,18 +2428,18 @@ namespace System } } - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEnumerable::~IEnumerable() + IEnumerator::~IEnumerator() { if (Handle) { @@ -2240,7 +2448,7 @@ namespace System } } - IEnumerable& IEnumerable::operator=(const IEnumerable& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -2254,7 +2462,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(decltype(nullptr) other) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -2264,7 +2472,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(IEnumerable&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -2275,15 +2483,28 @@ namespace System return *this; } - bool IEnumerable::operator==(const IEnumerable& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool IEnumerable::operator!=(const IEnumerable& other) const + 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); + } } } } @@ -2294,13 +2515,15 @@ namespace System { namespace Generic { - IEnumerable::IEnumerable(decltype(nullptr) n) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -2309,18 +2532,18 @@ namespace System } } - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEnumerable::~IEnumerable() + IEnumerator::~IEnumerator() { if (Handle) { @@ -2329,7 +2552,7 @@ namespace System } } - IEnumerable& IEnumerable::operator=(const IEnumerable& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -2343,7 +2566,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(decltype(nullptr) other) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -2353,7 +2576,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(IEnumerable&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -2364,15 +2587,28 @@ namespace System return *this; } - bool IEnumerable::operator==(const IEnumerable& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool IEnumerable::operator!=(const IEnumerable& other) const + 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; + } } } } @@ -2383,13 +2619,15 @@ namespace System { namespace Generic { - IEnumerable::IEnumerable(decltype(nullptr) n) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -2398,18 +2636,18 @@ namespace System } } - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEnumerable::~IEnumerable() + IEnumerator::~IEnumerator() { if (Handle) { @@ -2418,7 +2656,7 @@ namespace System } } - IEnumerable& IEnumerable::operator=(const IEnumerable& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -2432,7 +2670,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(decltype(nullptr) other) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -2442,7 +2680,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(IEnumerable&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -2453,15 +2691,28 @@ namespace System return *this; } - bool IEnumerable::operator==(const IEnumerable& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool IEnumerable::operator!=(const IEnumerable& other) const + 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; + } } } } @@ -2472,13 +2723,15 @@ namespace System { namespace Generic { - IEnumerable::IEnumerable(decltype(nullptr) n) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -2487,18 +2740,18 @@ namespace System } } - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEnumerable::~IEnumerable() + IEnumerator::~IEnumerator() { if (Handle) { @@ -2507,7 +2760,7 @@ namespace System } } - IEnumerable& IEnumerable::operator=(const IEnumerable& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -2521,7 +2774,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(decltype(nullptr) other) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -2531,7 +2784,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(IEnumerable&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -2542,15 +2795,28 @@ namespace System return *this; } - bool IEnumerable::operator==(const IEnumerable& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool IEnumerable::operator!=(const IEnumerable& 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); + } } } } @@ -2561,13 +2827,15 @@ namespace System { namespace Generic { - IEnumerable::IEnumerable(decltype(nullptr) n) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -2576,18 +2844,18 @@ namespace System } } - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEnumerable::~IEnumerable() + IEnumerator::~IEnumerator() { if (Handle) { @@ -2596,7 +2864,7 @@ namespace System } } - IEnumerable& IEnumerable::operator=(const IEnumerable& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -2610,7 +2878,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(decltype(nullptr) other) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -2620,7 +2888,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(IEnumerable&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -2631,15 +2899,28 @@ namespace System return *this; } - bool IEnumerable::operator==(const IEnumerable& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool IEnumerable::operator!=(const IEnumerable& 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; + } } } } @@ -2650,13 +2931,15 @@ namespace System { namespace Generic { - IEnumerable::IEnumerable(decltype(nullptr) n) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(decltype(nullptr)) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { } - IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) - : System::Collections::IEnumerable(nullptr) + IEnumerator::IEnumerator(Plugin::InternalUse iu, int32_t handle) + : System::IDisposable(nullptr) + , System::Collections::IEnumerator(nullptr) { Handle = handle; if (handle) @@ -2665,18 +2948,18 @@ namespace System } } - IEnumerable::IEnumerable(const IEnumerable& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(const IEnumerator& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { } - IEnumerable::IEnumerable(IEnumerable&& other) - : IEnumerable(Plugin::InternalUse::Only, other.Handle) + IEnumerator::IEnumerator(IEnumerator&& other) + : IEnumerator(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IEnumerable::~IEnumerable() + IEnumerator::~IEnumerator() { if (Handle) { @@ -2685,7 +2968,7 @@ namespace System } } - IEnumerable& IEnumerable::operator=(const IEnumerable& other) + IEnumerator& IEnumerator::operator=(const IEnumerator& other) { if (this->Handle) { @@ -2699,7 +2982,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(decltype(nullptr) other) + IEnumerator& IEnumerator::operator=(decltype(nullptr)) { if (Handle) { @@ -2709,7 +2992,7 @@ namespace System return *this; } - IEnumerable& IEnumerable::operator=(IEnumerable&& other) + IEnumerator& IEnumerator::operator=(IEnumerator&& other) { if (Handle) { @@ -2720,15 +3003,28 @@ namespace System return *this; } - bool IEnumerable::operator==(const IEnumerable& other) const + bool IEnumerator::operator==(const IEnumerator& other) const { return Handle == other.Handle; } - bool IEnumerable::operator!=(const IEnumerable& 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); + } } } } @@ -2739,15 +3035,13 @@ namespace System { namespace Generic { - ICollection::ICollection(decltype(nullptr) n) + IEnumerable::IEnumerable(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -2756,18 +3050,18 @@ namespace System } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + IEnumerable::~IEnumerable() { if (Handle) { @@ -2776,7 +3070,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -2790,7 +3084,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -2800,7 +3094,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -2811,15 +3105,28 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + 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); + } } } } @@ -2830,15 +3137,13 @@ namespace System { namespace Generic { - ICollection::ICollection(decltype(nullptr) n) + IEnumerable::IEnumerable(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -2847,18 +3152,18 @@ namespace System } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + IEnumerable::~IEnumerable() { if (Handle) { @@ -2867,7 +3172,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -2881,7 +3186,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -2891,7 +3196,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -2902,15 +3207,28 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + 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); + } } } } @@ -2921,15 +3239,13 @@ namespace System { namespace Generic { - ICollection::ICollection(decltype(nullptr) n) + IEnumerable::IEnumerable(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -2938,18 +3254,18 @@ namespace System } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + IEnumerable::~IEnumerable() { if (Handle) { @@ -2958,7 +3274,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -2972,7 +3288,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -2982,7 +3298,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -2993,15 +3309,28 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + 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); + } } } } @@ -3012,15 +3341,13 @@ namespace System { namespace Generic { - ICollection::ICollection(decltype(nullptr) n) + IEnumerable::IEnumerable(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -3029,18 +3356,18 @@ namespace System } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + IEnumerable::~IEnumerable() { if (Handle) { @@ -3049,7 +3376,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -3063,7 +3390,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -3073,7 +3400,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -3084,15 +3411,28 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + 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); + } } } } @@ -3103,15 +3443,13 @@ namespace System { namespace Generic { - ICollection::ICollection(decltype(nullptr) n) + IEnumerable::IEnumerable(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -3120,18 +3458,18 @@ namespace System } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + IEnumerable::~IEnumerable() { if (Handle) { @@ -3140,7 +3478,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -3154,7 +3492,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -3164,7 +3502,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -3175,15 +3513,28 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& other) const + 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); + } } } } @@ -3194,15 +3545,13 @@ namespace System { namespace Generic { - ICollection::ICollection(decltype(nullptr) n) + IEnumerable::IEnumerable(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { } - ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) + IEnumerable::IEnumerable(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) - , System::Collections::Generic::IEnumerable(nullptr) { Handle = handle; if (handle) @@ -3211,18 +3560,18 @@ namespace System } } - ICollection::ICollection(const ICollection& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(const IEnumerable& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { } - ICollection::ICollection(ICollection&& other) - : ICollection(Plugin::InternalUse::Only, other.Handle) + IEnumerable::IEnumerable(IEnumerable&& other) + : IEnumerable(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - ICollection::~ICollection() + IEnumerable::~IEnumerable() { if (Handle) { @@ -3231,7 +3580,7 @@ namespace System } } - ICollection& ICollection::operator=(const ICollection& other) + IEnumerable& IEnumerable::operator=(const IEnumerable& other) { if (this->Handle) { @@ -3245,7 +3594,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(decltype(nullptr) other) + IEnumerable& IEnumerable::operator=(decltype(nullptr)) { if (Handle) { @@ -3255,7 +3604,7 @@ namespace System return *this; } - ICollection& ICollection::operator=(ICollection&& other) + IEnumerable& IEnumerable::operator=(IEnumerable&& other) { if (Handle) { @@ -3266,15 +3615,28 @@ namespace System return *this; } - bool ICollection::operator==(const ICollection& other) const + bool IEnumerable::operator==(const IEnumerable& other) const { return Handle == other.Handle; } - bool ICollection::operator!=(const ICollection& 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); + } } } } @@ -3285,17 +3647,15 @@ namespace System { namespace Generic { - IList::IList(decltype(nullptr) n) + ICollection::ICollection(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) { } - IList::IList(Plugin::InternalUse iu, int32_t handle) + ICollection::ICollection(Plugin::InternalUse iu, int32_t handle) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) - , System::Collections::Generic::ICollection(nullptr) { Handle = handle; if (handle) @@ -3304,18 +3664,18 @@ namespace System } } - IList::IList(const IList& other) - : IList(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(const ICollection& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { } - IList::IList(IList&& other) - : IList(Plugin::InternalUse::Only, other.Handle) + ICollection::ICollection(ICollection&& other) + : ICollection(Plugin::InternalUse::Only, other.Handle) { other.Handle = 0; } - IList::~IList() + ICollection::~ICollection() { if (Handle) { @@ -3324,7 +3684,7 @@ namespace System } } - IList& IList::operator=(const IList& other) + ICollection& ICollection::operator=(const ICollection& other) { if (this->Handle) { @@ -3338,7 +3698,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + ICollection& ICollection::operator=(decltype(nullptr)) { if (Handle) { @@ -3348,7 +3708,7 @@ namespace System return *this; } - IList& IList::operator=(IList&& other) + ICollection& ICollection::operator=(ICollection&& other) { if (Handle) { @@ -3359,12 +3719,12 @@ namespace System return *this; } - bool IList::operator==(const IList& other) const + bool ICollection::operator==(const ICollection& other) const { return Handle == other.Handle; } - bool IList::operator!=(const IList& other) const + bool ICollection::operator!=(const ICollection& other) const { return Handle != other.Handle; } @@ -3372,13 +3732,967 @@ namespace System } } -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 + { + 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 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 +{ + 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; + } + + int32_t 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 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 +{ + 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; + } + + float 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 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 +{ + 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 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 +{ + 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 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 +{ + 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 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; + } + } + } +} + +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) n) + IList::IList(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) , System::Collections::Generic::ICollection(nullptr) @@ -3431,7 +4745,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { @@ -3465,13 +4779,71 @@ 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 Generic { - IList::IList(decltype(nullptr) n) + IList::IList(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) , System::Collections::Generic::ICollection(nullptr) @@ -3524,7 +4896,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { @@ -3547,12 +4919,70 @@ namespace System bool IList::operator==(const IList& other) const { - return Handle == other.Handle; + 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; + } + + float SystemCollectionsGenericIListSystemSingleIterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericIListSystemSingleIterator begin(System::Collections::Generic::IList& enumerable) + { + return Plugin::SystemCollectionsGenericIListSystemSingleIterator(enumerable); } - bool IList::operator!=(const IList& other) const + Plugin::SystemCollectionsGenericIListSystemSingleIterator end(System::Collections::Generic::IList& enumerable) { - return Handle != other.Handle; + return Plugin::SystemCollectionsGenericIListSystemSingleIterator(nullptr); } } } @@ -3564,7 +4994,7 @@ namespace System { namespace Generic { - IList::IList(decltype(nullptr) n) + IList::IList(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) , System::Collections::Generic::ICollection(nullptr) @@ -3617,7 +5047,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { @@ -3651,13 +5081,71 @@ namespace System } } +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) n) + IList::IList(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) , System::Collections::Generic::ICollection(nullptr) @@ -3710,7 +5198,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { @@ -3744,13 +5232,71 @@ namespace System } } +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) n) + IList::IList(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::Generic::IEnumerable(nullptr) , System::Collections::Generic::ICollection(nullptr) @@ -3803,7 +5349,7 @@ namespace System return *this; } - IList& IList::operator=(decltype(nullptr) other) + IList& IList::operator=(decltype(nullptr)) { if (Handle) { @@ -3837,13 +5383,71 @@ namespace System } } +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 Runtime { namespace Serialization { - ISerializable::ISerializable(decltype(nullptr) n) + ISerializable::ISerializable(decltype(nullptr)) { } @@ -3890,7 +5494,7 @@ namespace System return *this; } - ISerializable& ISerializable::operator=(decltype(nullptr) other) + ISerializable& ISerializable::operator=(decltype(nullptr)) { if (Handle) { @@ -3930,7 +5534,7 @@ namespace System { namespace InteropServices { - _Exception::_Exception(decltype(nullptr) n) + _Exception::_Exception(decltype(nullptr)) { } @@ -3977,7 +5581,7 @@ namespace System return *this; } - _Exception& _Exception::operator=(decltype(nullptr) other) + _Exception& _Exception::operator=(decltype(nullptr)) { if (Handle) { @@ -4013,7 +5617,7 @@ namespace System namespace System { - IAppDomainSetup::IAppDomainSetup(decltype(nullptr) n) + IAppDomainSetup::IAppDomainSetup(decltype(nullptr)) { } @@ -4060,7 +5664,7 @@ namespace System return *this; } - IAppDomainSetup& IAppDomainSetup::operator=(decltype(nullptr) other) + IAppDomainSetup& IAppDomainSetup::operator=(decltype(nullptr)) { if (Handle) { @@ -4096,7 +5700,7 @@ namespace System { namespace Collections { - IComparer::IComparer(decltype(nullptr) n) + IComparer::IComparer(decltype(nullptr)) { } @@ -4143,7 +5747,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + IComparer& IComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -4180,7 +5784,7 @@ namespace System { namespace Collections { - IEqualityComparer::IEqualityComparer(decltype(nullptr) n) + IEqualityComparer::IEqualityComparer(decltype(nullptr)) { } @@ -4227,7 +5831,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr) other) + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -4266,7 +5870,7 @@ namespace System { namespace Generic { - IEqualityComparer::IEqualityComparer(decltype(nullptr) n) + IEqualityComparer::IEqualityComparer(decltype(nullptr)) { } @@ -4313,7 +5917,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr) other) + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -4353,7 +5957,7 @@ namespace System { namespace Generic { - IEqualityComparer::IEqualityComparer(decltype(nullptr) n) + IEqualityComparer::IEqualityComparer(decltype(nullptr)) { } @@ -4400,7 +6004,7 @@ namespace System return *this; } - IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr) other) + IEqualityComparer& IEqualityComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -4438,7 +6042,7 @@ namespace UnityEngine { namespace Playables { - PlayableGraph::PlayableGraph(decltype(nullptr) n) + PlayableGraph::PlayableGraph(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -4487,7 +6091,7 @@ namespace UnityEngine return *this; } - PlayableGraph& PlayableGraph::operator=(decltype(nullptr) other) + PlayableGraph& PlayableGraph::operator=(decltype(nullptr)) { if (Handle) { @@ -4557,7 +6161,7 @@ namespace UnityEngine { namespace Playables { - IPlayable::IPlayable(decltype(nullptr) n) + IPlayable::IPlayable(decltype(nullptr)) { } @@ -4604,7 +6208,7 @@ namespace UnityEngine return *this; } - IPlayable& IPlayable::operator=(decltype(nullptr) other) + IPlayable& IPlayable::operator=(decltype(nullptr)) { if (Handle) { @@ -4639,7 +6243,7 @@ namespace UnityEngine namespace System { - IEquatable::IEquatable(decltype(nullptr) n) + IEquatable::IEquatable(decltype(nullptr)) { } @@ -4686,7 +6290,7 @@ namespace System return *this; } - IEquatable& IEquatable::operator=(decltype(nullptr) other) + IEquatable& IEquatable::operator=(decltype(nullptr)) { if (Handle) { @@ -4722,7 +6326,7 @@ namespace UnityEngine { namespace Animations { - AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr) n) + AnimationMixerPlayable::AnimationMixerPlayable(decltype(nullptr)) : System::ValueType(nullptr) , System::IEquatable(nullptr) , UnityEngine::Playables::IPlayable(nullptr) @@ -4775,7 +6379,7 @@ namespace UnityEngine return *this; } - AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr) other) + AnimationMixerPlayable& AnimationMixerPlayable::operator=(decltype(nullptr)) { if (Handle) { @@ -4860,7 +6464,7 @@ namespace System { namespace CompilerServices { - IStrongBox::IStrongBox(decltype(nullptr) n) + IStrongBox::IStrongBox(decltype(nullptr)) { } @@ -4907,7 +6511,7 @@ namespace System return *this; } - IStrongBox& IStrongBox::operator=(decltype(nullptr) other) + IStrongBox& IStrongBox::operator=(decltype(nullptr)) { if (Handle) { @@ -4947,7 +6551,7 @@ namespace UnityEngine { namespace UIElements { - IEventHandler::IEventHandler(decltype(nullptr) n) + IEventHandler::IEventHandler(decltype(nullptr)) { } @@ -4994,7 +6598,7 @@ namespace UnityEngine return *this; } - IEventHandler& IEventHandler::operator=(decltype(nullptr) other) + IEventHandler& IEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -5034,7 +6638,7 @@ namespace UnityEngine { namespace UIElements { - IStyle::IStyle(decltype(nullptr) n) + IStyle::IStyle(decltype(nullptr)) { } @@ -5081,7 +6685,7 @@ namespace UnityEngine return *this; } - IStyle& IStyle::operator=(decltype(nullptr) other) + IStyle& IStyle::operator=(decltype(nullptr)) { if (Handle) { @@ -5119,7 +6723,7 @@ namespace System { namespace Diagnostics { - Stopwatch::Stopwatch(decltype(nullptr) n) + Stopwatch::Stopwatch(decltype(nullptr)) { } @@ -5166,7 +6770,7 @@ namespace System return *this; } - Stopwatch& Stopwatch::operator=(decltype(nullptr) other) + Stopwatch& Stopwatch::operator=(decltype(nullptr)) { if (Handle) { @@ -5255,7 +6859,7 @@ namespace System namespace UnityEngine { - GameObject::GameObject(decltype(nullptr) n) + GameObject::GameObject(decltype(nullptr)) : UnityEngine::Object(nullptr) { } @@ -5304,7 +6908,7 @@ namespace UnityEngine return *this; } - GameObject& GameObject::operator=(decltype(nullptr) other) + GameObject& GameObject::operator=(decltype(nullptr)) { if (Handle) { @@ -5426,7 +7030,7 @@ namespace UnityEngine namespace UnityEngine { - Debug::Debug(decltype(nullptr) n) + Debug::Debug(decltype(nullptr)) { } @@ -5473,7 +7077,7 @@ namespace UnityEngine return *this; } - Debug& Debug::operator=(decltype(nullptr) other) + Debug& Debug::operator=(decltype(nullptr)) { if (Handle) { @@ -5574,7 +7178,7 @@ namespace UnityEngine namespace UnityEngine { - Collision::Collision(decltype(nullptr) n) + Collision::Collision(decltype(nullptr)) { } @@ -5621,7 +7225,7 @@ namespace UnityEngine return *this; } - Collision& Collision::operator=(decltype(nullptr) other) + Collision& Collision::operator=(decltype(nullptr)) { if (Handle) { @@ -5655,7 +7259,7 @@ namespace UnityEngine namespace UnityEngine { - Behaviour::Behaviour(decltype(nullptr) n) + Behaviour::Behaviour(decltype(nullptr)) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) { @@ -5706,7 +7310,7 @@ namespace UnityEngine return *this; } - Behaviour& Behaviour::operator=(decltype(nullptr) other) + Behaviour& Behaviour::operator=(decltype(nullptr)) { if (Handle) { @@ -5740,7 +7344,7 @@ namespace UnityEngine namespace UnityEngine { - MonoBehaviour::MonoBehaviour(decltype(nullptr) n) + MonoBehaviour::MonoBehaviour(decltype(nullptr)) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -5793,7 +7397,7 @@ namespace UnityEngine return *this; } - MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr) other) + MonoBehaviour& MonoBehaviour::operator=(decltype(nullptr)) { if (Handle) { @@ -5840,7 +7444,7 @@ namespace UnityEngine namespace UnityEngine { - AudioSettings::AudioSettings(decltype(nullptr) n) + AudioSettings::AudioSettings(decltype(nullptr)) { } @@ -5887,7 +7491,7 @@ namespace UnityEngine return *this; } - AudioSettings& AudioSettings::operator=(decltype(nullptr) other) + AudioSettings& AudioSettings::operator=(decltype(nullptr)) { if (Handle) { @@ -5935,7 +7539,7 @@ namespace UnityEngine { namespace Networking { - NetworkTransport::NetworkTransport(decltype(nullptr) n) + NetworkTransport::NetworkTransport(decltype(nullptr)) { } @@ -5982,7 +7586,7 @@ namespace UnityEngine return *this; } - NetworkTransport& NetworkTransport::operator=(decltype(nullptr) other) + NetworkTransport& NetworkTransport::operator=(decltype(nullptr)) { if (Handle) { @@ -6193,7 +7797,7 @@ namespace System { namespace Generic { - KeyValuePair::KeyValuePair(decltype(nullptr) n) + KeyValuePair::KeyValuePair(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -6242,7 +7846,7 @@ namespace System return *this; } - KeyValuePair& KeyValuePair::operator=(decltype(nullptr) other) + KeyValuePair& KeyValuePair::operator=(decltype(nullptr)) { if (Handle) { @@ -6359,7 +7963,7 @@ namespace System { namespace Generic { - List::List(decltype(nullptr) n) + List::List(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) @@ -6418,7 +8022,7 @@ namespace System return *this; } - List& List::operator=(decltype(nullptr) other) + List& List::operator=(decltype(nullptr)) { if (Handle) { @@ -6524,13 +8128,71 @@ 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 Generic { - List::List(decltype(nullptr) n) + List::List(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) @@ -6589,7 +8251,7 @@ namespace System return *this; } - List& List::operator=(decltype(nullptr) other) + List& List::operator=(decltype(nullptr)) { if (Handle) { @@ -6658,38 +8320,96 @@ namespace System void List::SetItem(int32_t index, int32_t value) { - Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + Plugin::SystemCollectionsGenericListSystemInt32PropertySetItem(Handle, index, value); + if (Plugin::unhandledCsharpException) + { + System::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; + } + } + + 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) + { + 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; + } + + int32_t SystemCollectionsGenericListSystemInt32Iterator::operator*() + { + return enumerator.GetCurrent(); + } +} + +namespace System +{ + namespace Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericListSystemInt32Iterator begin(System::Collections::Generic::List& enumerable) + { + return Plugin::SystemCollectionsGenericListSystemInt32Iterator(enumerable); } - 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) + Plugin::SystemCollectionsGenericListSystemInt32Iterator end(System::Collections::Generic::List& enumerable) { - Plugin::SystemCollectionsGenericListSystemInt32MethodSortSystemCollectionsGenericIComparer(Handle, comparer.Handle); - if (Plugin::unhandledCsharpException) - { - System::Exception* ex = Plugin::unhandledCsharpException; - Plugin::unhandledCsharpException = nullptr; - ex->ThrowReferenceToThis(); - delete ex; - } + return Plugin::SystemCollectionsGenericListSystemInt32Iterator(nullptr); } } } @@ -6701,7 +8421,7 @@ namespace System { namespace Generic { - LinkedListNode::LinkedListNode(decltype(nullptr) n) + LinkedListNode::LinkedListNode(decltype(nullptr)) { } @@ -6748,7 +8468,7 @@ namespace System return *this; } - LinkedListNode& LinkedListNode::operator=(decltype(nullptr) other) + LinkedListNode& LinkedListNode::operator=(decltype(nullptr)) { if (Handle) { @@ -6830,7 +8550,7 @@ namespace System { namespace CompilerServices { - StrongBox::StrongBox(decltype(nullptr) n) + StrongBox::StrongBox(decltype(nullptr)) : System::Runtime::CompilerServices::IStrongBox(nullptr) { } @@ -6879,7 +8599,7 @@ namespace System return *this; } - StrongBox& StrongBox::operator=(decltype(nullptr) other) + StrongBox& StrongBox::operator=(decltype(nullptr)) { if (Handle) { @@ -6962,7 +8682,7 @@ namespace System { namespace ObjectModel { - Collection::Collection(decltype(nullptr) n) + Collection::Collection(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) @@ -7021,7 +8741,7 @@ namespace System return *this; } - Collection& Collection::operator=(decltype(nullptr) other) + Collection& Collection::operator=(decltype(nullptr)) { if (Handle) { @@ -7055,13 +8775,71 @@ namespace System } } +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; + } + + int32_t 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) n) + KeyedCollection::KeyedCollection(decltype(nullptr)) : System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) , System::Collections::IList(nullptr) @@ -7122,7 +8900,7 @@ namespace System return *this; } - KeyedCollection& KeyedCollection::operator=(decltype(nullptr) other) + KeyedCollection& KeyedCollection::operator=(decltype(nullptr)) { if (Handle) { @@ -7156,9 +8934,67 @@ namespace System } } +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; + } + + int32_t 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 { - Exception::Exception(decltype(nullptr) n) + Exception::Exception(decltype(nullptr)) : System::Runtime::InteropServices::_Exception(nullptr) , System::Runtime::Serialization::ISerializable(nullptr) { @@ -7209,7 +9045,7 @@ namespace System return *this; } - Exception& Exception::operator=(decltype(nullptr) other) + Exception& Exception::operator=(decltype(nullptr)) { if (Handle) { @@ -7262,7 +9098,7 @@ namespace System namespace System { - SystemException::SystemException(decltype(nullptr) n) + SystemException::SystemException(decltype(nullptr)) : System::Runtime::InteropServices::_Exception(nullptr) , System::Runtime::Serialization::ISerializable(nullptr) , System::Exception(nullptr) @@ -7315,7 +9151,7 @@ namespace System return *this; } - SystemException& SystemException::operator=(decltype(nullptr) other) + SystemException& SystemException::operator=(decltype(nullptr)) { if (Handle) { @@ -7349,7 +9185,7 @@ namespace System namespace System { - NullReferenceException::NullReferenceException(decltype(nullptr) n) + NullReferenceException::NullReferenceException(decltype(nullptr)) : System::Runtime::InteropServices::_Exception(nullptr) , System::Runtime::Serialization::ISerializable(nullptr) , System::Exception(nullptr) @@ -7404,7 +9240,7 @@ namespace System return *this; } - NullReferenceException& NullReferenceException::operator=(decltype(nullptr) other) + NullReferenceException& NullReferenceException::operator=(decltype(nullptr)) { if (Handle) { @@ -7438,7 +9274,7 @@ namespace System namespace UnityEngine { - Screen::Screen(decltype(nullptr) n) + Screen::Screen(decltype(nullptr)) { } @@ -7485,7 +9321,7 @@ namespace UnityEngine return *this; } - Screen& Screen::operator=(decltype(nullptr) other) + Screen& Screen::operator=(decltype(nullptr)) { if (Handle) { @@ -7532,7 +9368,7 @@ namespace UnityEngine namespace UnityEngine { - Ray::Ray(decltype(nullptr) n) + Ray::Ray(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -7581,7 +9417,7 @@ namespace UnityEngine return *this; } - Ray& Ray::operator=(decltype(nullptr) other) + Ray& Ray::operator=(decltype(nullptr)) { if (Handle) { @@ -7666,7 +9502,7 @@ namespace System namespace UnityEngine { - Physics::Physics(decltype(nullptr) n) + Physics::Physics(decltype(nullptr)) { } @@ -7713,7 +9549,7 @@ namespace UnityEngine return *this; } - Physics& Physics::operator=(decltype(nullptr) other) + Physics& Physics::operator=(decltype(nullptr)) { if (Handle) { @@ -7773,7 +9609,7 @@ namespace UnityEngine namespace UnityEngine { - Gradient::Gradient(decltype(nullptr) n) + Gradient::Gradient(decltype(nullptr)) { } @@ -7820,7 +9656,7 @@ namespace UnityEngine return *this; } - Gradient& Gradient::operator=(decltype(nullptr) other) + Gradient& Gradient::operator=(decltype(nullptr)) { if (Handle) { @@ -7896,7 +9732,7 @@ namespace UnityEngine namespace System { - AppDomainSetup::AppDomainSetup(decltype(nullptr) n) + AppDomainSetup::AppDomainSetup(decltype(nullptr)) : System::IAppDomainSetup(nullptr) { } @@ -7945,7 +9781,7 @@ namespace System return *this; } - AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr) other) + AppDomainSetup& AppDomainSetup::operator=(decltype(nullptr)) { if (Handle) { @@ -8022,7 +9858,7 @@ namespace System namespace UnityEngine { - Application::Application(decltype(nullptr) n) + Application::Application(decltype(nullptr)) { } @@ -8069,7 +9905,7 @@ namespace UnityEngine return *this; } - Application& Application::operator=(decltype(nullptr) other) + Application& Application::operator=(decltype(nullptr)) { if (Handle) { @@ -8129,7 +9965,7 @@ namespace UnityEngine { namespace SceneManagement { - SceneManager::SceneManager(decltype(nullptr) n) + SceneManager::SceneManager(decltype(nullptr)) { } @@ -8176,7 +10012,7 @@ namespace UnityEngine return *this; } - SceneManager& SceneManager::operator=(decltype(nullptr) other) + SceneManager& SceneManager::operator=(decltype(nullptr)) { if (Handle) { @@ -8237,7 +10073,7 @@ namespace UnityEngine { namespace SceneManagement { - Scene::Scene(decltype(nullptr) n) + Scene::Scene(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -8272,232 +10108,122 @@ namespace UnityEngine } } - 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) other) - { - 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; - } - } -} - -namespace System -{ - Object::Object(UnityEngine::SceneManagement::Scene& val) - { - int32_t handle = Plugin::BoxScene(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::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 System -{ - Object::Object(UnityEngine::SceneManagement::LoadSceneMode val) - { - int32_t handle = Plugin::BoxLoadSceneMode(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::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 -{ - namespace Collections - { - IEnumerator::IEnumerator(decltype(nullptr) n) - { - } - - IEnumerator::IEnumerator(Plugin::InternalUse iu, 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) + Scene& Scene::operator=(const Scene& other) { if (this->Handle) { - Plugin::DereferenceManagedClass(this->Handle); + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); } this->Handle = other.Handle; if (this->Handle) { - Plugin::ReferenceManagedClass(this->Handle); + Plugin::ReferenceManagedUnityEngineSceneManagementScene(Handle); } return *this; } - IEnumerator& IEnumerator::operator=(decltype(nullptr) other) + Scene& Scene::operator=(decltype(nullptr)) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); Handle = 0; } return *this; } - IEnumerator& IEnumerator::operator=(IEnumerator&& other) + Scene& Scene::operator=(Scene&& other) { if (Handle) { - Plugin::DereferenceManagedClass(Handle); + Plugin::DereferenceManagedUnityEngineSceneManagementScene(Handle); } Handle = other.Handle; other.Handle = 0; return *this; } - bool IEnumerator::operator==(const IEnumerator& other) const + bool Scene::operator==(const Scene& other) const { return Handle == other.Handle; } - bool IEnumerator::operator!=(const IEnumerator& other) const + bool Scene::operator!=(const Scene& other) const { return Handle != other.Handle; } - - System::Object IEnumerator::GetCurrent() + } +} + +namespace System +{ + Object::Object(UnityEngine::SceneManagement::Scene& val) + { + int32_t handle = Plugin::BoxScene(val.Handle); + if (Plugin::unhandledCsharpException) { - 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::Exception* ex = Plugin::unhandledCsharpException; + Plugin::unhandledCsharpException = nullptr; + ex->ThrowReferenceToThis(); + delete ex; } - - System::Boolean IEnumerator::MoveNext() + 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::ReferenceManagedClass(handle); + Handle = handle; + } + } + + 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 System +{ + Object::Object(UnityEngine::SceneManagement::LoadSceneMode val) + { + int32_t handle = Plugin::BoxLoadSceneMode(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::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) n) + EventArgs::EventArgs(decltype(nullptr)) { } @@ -8544,7 +10270,7 @@ namespace System return *this; } - EventArgs& EventArgs::operator=(decltype(nullptr) other) + EventArgs& EventArgs::operator=(decltype(nullptr)) { if (Handle) { @@ -8582,7 +10308,7 @@ namespace System { namespace Design { - ComponentEventArgs::ComponentEventArgs(decltype(nullptr) n) + ComponentEventArgs::ComponentEventArgs(decltype(nullptr)) : System::EventArgs(nullptr) { } @@ -8631,7 +10357,7 @@ namespace System return *this; } - ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr) other) + ComponentEventArgs& ComponentEventArgs::operator=(decltype(nullptr)) { if (Handle) { @@ -8671,7 +10397,7 @@ namespace System { namespace Design { - ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr) n) + ComponentChangingEventArgs::ComponentChangingEventArgs(decltype(nullptr)) : System::EventArgs(nullptr) { } @@ -8720,7 +10446,7 @@ namespace System return *this; } - ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr) other) + ComponentChangingEventArgs& ComponentChangingEventArgs::operator=(decltype(nullptr)) { if (Handle) { @@ -8760,7 +10486,7 @@ namespace System { namespace Design { - ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr) n) + ComponentChangedEventArgs::ComponentChangedEventArgs(decltype(nullptr)) : System::EventArgs(nullptr) { } @@ -8809,7 +10535,7 @@ namespace System return *this; } - ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr) other) + ComponentChangedEventArgs& ComponentChangedEventArgs::operator=(decltype(nullptr)) { if (Handle) { @@ -8849,7 +10575,7 @@ namespace System { namespace Design { - ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr) n) + ComponentRenameEventArgs::ComponentRenameEventArgs(decltype(nullptr)) : System::EventArgs(nullptr) { } @@ -8898,7 +10624,7 @@ namespace System return *this; } - ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr) other) + ComponentRenameEventArgs& ComponentRenameEventArgs::operator=(decltype(nullptr)) { if (Handle) { @@ -8936,7 +10662,7 @@ namespace System { namespace ComponentModel { - MemberDescriptor::MemberDescriptor(decltype(nullptr) n) + MemberDescriptor::MemberDescriptor(decltype(nullptr)) { } @@ -8983,7 +10709,7 @@ namespace System return *this; } - MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr) other) + MemberDescriptor& MemberDescriptor::operator=(decltype(nullptr)) { if (Handle) { @@ -9051,7 +10777,7 @@ namespace System namespace UnityEngine { - Time::Time(decltype(nullptr) n) + Time::Time(decltype(nullptr)) { } @@ -9098,7 +10824,7 @@ namespace UnityEngine return *this; } - Time& Time::operator=(decltype(nullptr) other) + Time& Time::operator=(decltype(nullptr)) { if (Handle) { @@ -9178,7 +10904,7 @@ namespace System namespace System { - MarshalByRefObject::MarshalByRefObject(decltype(nullptr) n) + MarshalByRefObject::MarshalByRefObject(decltype(nullptr)) { } @@ -9225,7 +10951,7 @@ namespace System return *this; } - MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr) other) + MarshalByRefObject& MarshalByRefObject::operator=(decltype(nullptr)) { if (Handle) { @@ -9261,7 +10987,7 @@ namespace System { namespace IO { - Stream::Stream(decltype(nullptr) n) + Stream::Stream(decltype(nullptr)) : System::MarshalByRefObject(nullptr) , System::IDisposable(nullptr) { @@ -9312,7 +11038,7 @@ namespace System return *this; } - Stream& Stream::operator=(decltype(nullptr) other) + Stream& Stream::operator=(decltype(nullptr)) { if (Handle) { @@ -9351,7 +11077,7 @@ namespace System { namespace Generic { - IComparer::IComparer(decltype(nullptr) n) + IComparer::IComparer(decltype(nullptr)) { } @@ -9398,7 +11124,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + IComparer& IComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -9438,7 +11164,7 @@ namespace System { namespace Generic { - IComparer::IComparer(decltype(nullptr) n) + IComparer::IComparer(decltype(nullptr)) { } @@ -9485,7 +11211,7 @@ namespace System return *this; } - IComparer& IComparer::operator=(decltype(nullptr) other) + IComparer& IComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -9557,7 +11283,7 @@ namespace System } } - BaseIComparer::BaseIComparer(decltype(nullptr) n) + BaseIComparer::BaseIComparer(decltype(nullptr)) : System::Collections::Generic::IComparer(nullptr) { CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemInt32(this); @@ -9630,7 +11356,7 @@ namespace System return *this; } - BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) + BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -9753,7 +11479,7 @@ namespace System } } - BaseIComparer::BaseIComparer(decltype(nullptr) n) + BaseIComparer::BaseIComparer(decltype(nullptr)) : System::Collections::Generic::IComparer(nullptr) { CppHandle = Plugin::StoreSystemCollectionsGenericBaseIComparerSystemString(this); @@ -9826,7 +11552,7 @@ namespace System return *this; } - BaseIComparer& BaseIComparer::operator=(decltype(nullptr) other) + BaseIComparer& BaseIComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -9915,7 +11641,7 @@ namespace System namespace System { - StringComparer::StringComparer(decltype(nullptr) n) + StringComparer::StringComparer(decltype(nullptr)) : System::Collections::IComparer(nullptr) , System::Collections::Generic::IComparer(nullptr) , System::Collections::IEqualityComparer(nullptr) @@ -9970,7 +11696,7 @@ namespace System return *this; } - StringComparer& StringComparer::operator=(decltype(nullptr) other) + StringComparer& StringComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -10040,7 +11766,7 @@ namespace System } } - BaseStringComparer::BaseStringComparer(decltype(nullptr) n) + BaseStringComparer::BaseStringComparer(decltype(nullptr)) : System::Collections::IComparer(nullptr) , System::Collections::Generic::IComparer(nullptr) , System::Collections::IEqualityComparer(nullptr) @@ -10129,7 +11855,7 @@ namespace System return *this; } - BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr) other) + BaseStringComparer& BaseStringComparer::operator=(decltype(nullptr)) { if (Handle) { @@ -10271,7 +11997,7 @@ namespace System { namespace Collections { - Queue::Queue(decltype(nullptr) n) + Queue::Queue(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -10324,7 +12050,7 @@ namespace System return *this; } - Queue& Queue::operator=(decltype(nullptr) other) + Queue& Queue::operator=(decltype(nullptr)) { if (Handle) { @@ -10409,7 +12135,7 @@ namespace System } } - BaseQueue::BaseQueue(decltype(nullptr) n) + BaseQueue::BaseQueue(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -10494,7 +12220,7 @@ namespace System return *this; } - BaseQueue& BaseQueue::operator=(decltype(nullptr) other) + BaseQueue& BaseQueue::operator=(decltype(nullptr)) { if (Handle) { @@ -10584,7 +12310,7 @@ namespace System { namespace Design { - IComponentChangeService::IComponentChangeService(decltype(nullptr) n) + IComponentChangeService::IComponentChangeService(decltype(nullptr)) { } @@ -10631,7 +12357,7 @@ namespace System return *this; } - IComponentChangeService& IComponentChangeService::operator=(decltype(nullptr) other) + IComponentChangeService& IComponentChangeService::operator=(decltype(nullptr)) { if (Handle) { @@ -10703,7 +12429,7 @@ namespace System } } - BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr) n) + BaseIComponentChangeService::BaseIComponentChangeService(decltype(nullptr)) : System::ComponentModel::Design::IComponentChangeService(nullptr) { CppHandle = Plugin::StoreSystemComponentModelDesignBaseIComponentChangeService(this); @@ -10776,7 +12502,7 @@ namespace System return *this; } - BaseIComponentChangeService& BaseIComponentChangeService::operator=(decltype(nullptr) other) + BaseIComponentChangeService& BaseIComponentChangeService::operator=(decltype(nullptr)) { if (Handle) { @@ -11212,7 +12938,7 @@ namespace System { namespace IO { - FileStream::FileStream(decltype(nullptr) n) + FileStream::FileStream(decltype(nullptr)) : System::MarshalByRefObject(nullptr) , System::IDisposable(nullptr) , System::IO::Stream(nullptr) @@ -11265,7 +12991,7 @@ namespace System return *this; } - FileStream& FileStream::operator=(decltype(nullptr) other) + FileStream& FileStream::operator=(decltype(nullptr)) { if (Handle) { @@ -11369,7 +13095,7 @@ namespace System } } - BaseFileStream::BaseFileStream(decltype(nullptr) n) + BaseFileStream::BaseFileStream(decltype(nullptr)) : System::MarshalByRefObject(nullptr) , System::IDisposable(nullptr) , System::IO::Stream(nullptr) @@ -11454,7 +13180,7 @@ namespace System return *this; } - BaseFileStream& BaseFileStream::operator=(decltype(nullptr) other) + BaseFileStream& BaseFileStream::operator=(decltype(nullptr)) { if (Handle) { @@ -11539,7 +13265,7 @@ namespace UnityEngine { namespace Playables { - PlayableHandle::PlayableHandle(decltype(nullptr) n) + PlayableHandle::PlayableHandle(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -11588,7 +13314,7 @@ namespace UnityEngine return *this; } - PlayableHandle& PlayableHandle::operator=(decltype(nullptr) other) + PlayableHandle& PlayableHandle::operator=(decltype(nullptr)) { if (Handle) { @@ -11660,7 +13386,7 @@ namespace UnityEngine { namespace UIElements { - CallbackEventHandler::CallbackEventHandler(decltype(nullptr) n) + CallbackEventHandler::CallbackEventHandler(decltype(nullptr)) : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) { } @@ -11709,7 +13435,7 @@ namespace UnityEngine return *this; } - CallbackEventHandler& CallbackEventHandler::operator=(decltype(nullptr) other) + CallbackEventHandler& CallbackEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -11749,7 +13475,7 @@ namespace UnityEngine { namespace UIElements { - VisualElement::VisualElement(decltype(nullptr) n) + VisualElement::VisualElement(decltype(nullptr)) : UnityEngine::Experimental::UIElements::IEventHandler(nullptr) , UnityEngine::Experimental::UIElements::CallbackEventHandler(nullptr) , UnityEngine::Experimental::UIElements::IStyle(nullptr) @@ -11802,7 +13528,7 @@ namespace UnityEngine return *this; } - VisualElement& VisualElement::operator=(decltype(nullptr) other) + VisualElement& VisualElement::operator=(decltype(nullptr)) { if (Handle) { @@ -11945,7 +13671,7 @@ namespace UnityEngine { namespace Input { - InteractionSourcePose::InteractionSourcePose(decltype(nullptr) n) + InteractionSourcePose::InteractionSourcePose(decltype(nullptr)) : System::ValueType(nullptr) { } @@ -11994,7 +13720,7 @@ namespace UnityEngine return *this; } - InteractionSourcePose& InteractionSourcePose::operator=(decltype(nullptr) other) + InteractionSourcePose& InteractionSourcePose::operator=(decltype(nullptr)) { if (Handle) { @@ -12475,7 +14201,7 @@ namespace MyGame { namespace MonoBehaviours { - TestScript::TestScript(decltype(nullptr) n) + TestScript::TestScript(decltype(nullptr)) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -12530,7 +14256,7 @@ namespace MyGame return *this; } - TestScript& TestScript::operator=(decltype(nullptr) other) + TestScript& TestScript::operator=(decltype(nullptr)) { if (Handle) { @@ -12567,7 +14293,7 @@ namespace MyGame { namespace MonoBehaviours { - AnotherScript::AnotherScript(decltype(nullptr) n) + AnotherScript::AnotherScript(decltype(nullptr)) : UnityEngine::Object(nullptr) , UnityEngine::Component(nullptr) , UnityEngine::Behaviour(nullptr) @@ -12622,7 +14348,7 @@ namespace MyGame return *this; } - AnotherScript& AnotherScript::operator=(decltype(nullptr) other) + AnotherScript& AnotherScript::operator=(decltype(nullptr)) { if (Handle) { @@ -12691,7 +14417,7 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -12760,7 +14486,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -12841,6 +14567,44 @@ namespace System } } +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; + } + + int32_t 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 iu, int32_t handle, int32_t index0) @@ -12991,7 +14755,7 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -13060,7 +14824,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -13141,9 +14905,47 @@ namespace System } } +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; + } + + float 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) n) + Array2::Array2(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -13218,7 +15020,7 @@ namespace System return *this; } - Array2& Array2::operator=(decltype(nullptr) other) + Array2& Array2::operator=(decltype(nullptr)) { if (Handle) { @@ -13324,7 +15126,7 @@ namespace System namespace System { - Array3::Array3(decltype(nullptr) n) + Array3::Array3(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -13405,7 +15207,7 @@ namespace System return *this; } - Array3& Array3::operator=(decltype(nullptr) other) + Array3& Array3::operator=(decltype(nullptr)) { if (Handle) { @@ -13548,7 +15350,7 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -13617,7 +15419,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -13698,6 +15500,44 @@ namespace System } } +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 iu, int32_t handle, int32_t index0) @@ -13734,7 +15574,7 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -13803,7 +15643,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -13884,6 +15724,44 @@ namespace System } } +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 iu, int32_t handle, int32_t index0) @@ -13920,7 +15798,7 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -13989,7 +15867,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -14070,6 +15948,44 @@ namespace System } } +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 iu, int32_t handle, int32_t index0) @@ -14106,7 +16022,7 @@ namespace Plugin namespace System { - Array1::Array1(decltype(nullptr) n) + Array1::Array1(decltype(nullptr)) : System::ICloneable(nullptr) , System::Collections::IEnumerable(nullptr) , System::Collections::ICollection(nullptr) @@ -14175,7 +16091,7 @@ namespace System return *this; } - Array1& Array1::operator=(decltype(nullptr) other) + Array1& Array1::operator=(decltype(nullptr)) { if (Handle) { @@ -14256,6 +16172,44 @@ namespace System } } +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() @@ -14291,7 +16245,7 @@ namespace System } } - Action::Action(decltype(nullptr) n) + Action::Action(decltype(nullptr)) { CppHandle = Plugin::StoreSystemAction(this); ClassHandle = 0; @@ -14368,7 +16322,7 @@ namespace System return *this; } - Action& Action::operator=(decltype(nullptr) other) + Action& Action::operator=(decltype(nullptr)) { if (Handle) { @@ -14526,7 +16480,7 @@ namespace System } } - Action1::Action1(decltype(nullptr) n) + Action1::Action1(decltype(nullptr)) { CppHandle = Plugin::StoreSystemActionSystemSingle(this); ClassHandle = 0; @@ -14603,7 +16557,7 @@ namespace System return *this; } - Action1& Action1::operator=(decltype(nullptr) other) + Action1& Action1::operator=(decltype(nullptr)) { if (Handle) { @@ -14761,7 +16715,7 @@ namespace System } } - Action2::Action2(decltype(nullptr) n) + Action2::Action2(decltype(nullptr)) { CppHandle = Plugin::StoreSystemActionSystemSingle_SystemSingle(this); ClassHandle = 0; @@ -14838,7 +16792,7 @@ namespace System return *this; } - Action2& Action2::operator=(decltype(nullptr) other) + Action2& Action2::operator=(decltype(nullptr)) { if (Handle) { @@ -14996,7 +16950,7 @@ namespace System } } - Func3::Func3(decltype(nullptr) n) + Func3::Func3(decltype(nullptr)) { CppHandle = Plugin::StoreSystemFuncSystemInt32_SystemSingle_SystemDouble(this); ClassHandle = 0; @@ -15073,7 +17027,7 @@ namespace System return *this; } - Func3& Func3::operator=(decltype(nullptr) other) + Func3& Func3::operator=(decltype(nullptr)) { if (Handle) { @@ -15235,7 +17189,7 @@ namespace System } } - Func3::Func3(decltype(nullptr) n) + Func3::Func3(decltype(nullptr)) { CppHandle = Plugin::StoreSystemFuncSystemInt16_SystemInt32_SystemString(this); ClassHandle = 0; @@ -15312,7 +17266,7 @@ namespace System return *this; } - Func3& Func3::operator=(decltype(nullptr) other) + Func3& Func3::operator=(decltype(nullptr)) { if (Handle) { @@ -15474,7 +17428,7 @@ namespace System } } - AppDomainInitializer::AppDomainInitializer(decltype(nullptr) n) + AppDomainInitializer::AppDomainInitializer(decltype(nullptr)) { CppHandle = Plugin::StoreSystemAppDomainInitializer(this); ClassHandle = 0; @@ -15551,7 +17505,7 @@ namespace System return *this; } - AppDomainInitializer& AppDomainInitializer::operator=(decltype(nullptr) other) + AppDomainInitializer& AppDomainInitializer::operator=(decltype(nullptr)) { if (Handle) { @@ -15712,7 +17666,7 @@ namespace UnityEngine } } - UnityAction::UnityAction(decltype(nullptr) n) + UnityAction::UnityAction(decltype(nullptr)) { CppHandle = Plugin::StoreUnityEngineEventsUnityAction(this); ClassHandle = 0; @@ -15789,7 +17743,7 @@ namespace UnityEngine return *this; } - UnityAction& UnityAction::operator=(decltype(nullptr) other) + UnityAction& UnityAction::operator=(decltype(nullptr)) { if (Handle) { @@ -15950,7 +17904,7 @@ namespace UnityEngine } } - UnityAction2::UnityAction2(decltype(nullptr) n) + UnityAction2::UnityAction2(decltype(nullptr)) { CppHandle = Plugin::StoreUnityEngineEventsUnityActionUnityEngineSceneManagementScene_UnityEngineSceneManagementLoadSceneMode(this); ClassHandle = 0; @@ -16027,7 +17981,7 @@ namespace UnityEngine return *this; } - UnityAction2& UnityAction2::operator=(decltype(nullptr) other) + UnityAction2& UnityAction2::operator=(decltype(nullptr)) { if (Handle) { @@ -16191,7 +18145,7 @@ namespace System } } - ComponentEventHandler::ComponentEventHandler(decltype(nullptr) n) + ComponentEventHandler::ComponentEventHandler(decltype(nullptr)) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentEventHandler(this); ClassHandle = 0; @@ -16268,7 +18222,7 @@ namespace System return *this; } - ComponentEventHandler& ComponentEventHandler::operator=(decltype(nullptr) other) + ComponentEventHandler& ComponentEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -16434,7 +18388,7 @@ namespace System } } - ComponentChangingEventHandler::ComponentChangingEventHandler(decltype(nullptr) n) + ComponentChangingEventHandler::ComponentChangingEventHandler(decltype(nullptr)) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangingEventHandler(this); ClassHandle = 0; @@ -16511,7 +18465,7 @@ namespace System return *this; } - ComponentChangingEventHandler& ComponentChangingEventHandler::operator=(decltype(nullptr) other) + ComponentChangingEventHandler& ComponentChangingEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -16677,7 +18631,7 @@ namespace System } } - ComponentChangedEventHandler::ComponentChangedEventHandler(decltype(nullptr) n) + ComponentChangedEventHandler::ComponentChangedEventHandler(decltype(nullptr)) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentChangedEventHandler(this); ClassHandle = 0; @@ -16754,7 +18708,7 @@ namespace System return *this; } - ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(decltype(nullptr) other) + ComponentChangedEventHandler& ComponentChangedEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -16920,7 +18874,7 @@ namespace System } } - ComponentRenameEventHandler::ComponentRenameEventHandler(decltype(nullptr) n) + ComponentRenameEventHandler::ComponentRenameEventHandler(decltype(nullptr)) { CppHandle = Plugin::StoreSystemComponentModelDesignComponentRenameEventHandler(this); ClassHandle = 0; @@ -16997,7 +18951,7 @@ namespace System return *this; } - ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(decltype(nullptr) other) + ComponentRenameEventHandler& ComponentRenameEventHandler::operator=(decltype(nullptr)) { if (Handle) { @@ -17180,8 +19134,10 @@ DLLEXPORT void Init( 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 (*systemIDisposableMethodDispose)(int32_t thisHandle), UnityEngine::Vector3 (*unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle)(float x, float y, float z), float (*unityEngineVector3PropertyGetMagnitude)(UnityEngine::Vector3* thiz), void (*unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle)(UnityEngine::Vector3* thiz, float newX, float newY, float newZ), @@ -17191,11 +19147,12 @@ DLLEXPORT void Init( UnityEngine::Vector3 (*unboxVector3)(int32_t valHandle), int32_t (*unityEngineObjectPropertyGetName)(int32_t thisHandle), void (*unityEngineObjectPropertySetName)(int32_t thisHandle, int32_t valueHandle), - System::Boolean (*unityEngineObjectMethodop_EqualityUnityEngineObject_UnityEngineObject)(int32_t xHandle, int32_t yHandle), - System::Boolean (*unityEngineObjectMethodop_ImplicitUnityEngineObject)(int32_t existsHandle), + int32_t (*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), @@ -17215,6 +19172,20 @@ DLLEXPORT void Init( 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), + 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), @@ -17233,7 +19204,7 @@ DLLEXPORT void Init( int32_t (*unityEngineGameObjectMethodAddComponentMyGameMonoBehavioursAnotherScript)(int32_t thisHandle), int32_t (*unityEngineGameObjectMethodCreatePrimitiveUnityEnginePrimitiveType)(UnityEngine::PrimitiveType type), void (*unityEngineDebugMethodLogSystemObject)(int32_t messageHandle), - System::Boolean (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), + int32_t (*unityEngineAssertionsAssertFieldGetRaiseExceptions)(), void (*unityEngineAssertionsAssertFieldSetRaiseExceptions)(System::Boolean value), void (*unityEngineAssertionsAssertMethodAreEqualSystemStringSystemString_SystemString)(int32_t expectedHandle, int32_t actualHandle), void (*unityEngineAssertionsAssertMethodAreEqualUnityEngineGameObjectUnityEngineGameObject_UnityEngineGameObject)(int32_t expectedHandle, int32_t actualHandle), @@ -17294,8 +19265,6 @@ DLLEXPORT void Init( int32_t (*unboxScene)(int32_t valHandle), int32_t (*boxLoadSceneMode)(UnityEngine::SceneManagement::LoadSceneMode val), UnityEngine::SceneManagement::LoadSceneMode (*unboxLoadSceneMode)(int32_t valHandle), - int32_t (*systemCollectionsIEnumeratorPropertyGetCurrent)(int32_t thisHandle), - System::Boolean (*systemCollectionsIEnumeratorMethodMoveNext)(int32_t thisHandle), int32_t (*boxPrimitiveType)(UnityEngine::PrimitiveType val), UnityEngine::PrimitiveType (*unboxPrimitiveType)(int32_t valHandle), float (*unityEngineTimePropertyGetDeltaTime)(), @@ -17326,11 +19295,11 @@ DLLEXPORT void Init( int32_t (*boxInteractionSourceNode)(UnityEngine::XR::WSA::Input::InteractionSourceNode val), UnityEngine::XR::WSA::Input::InteractionSourceNode (*unboxInteractionSourceNode)(int32_t valHandle), void (*releaseUnityEngineXRWSAInputInteractionSourcePose)(int32_t handle), - System::Boolean (*unityEngineXRWSAInputInteractionSourcePoseMethodTryGetRotationUnityEngineQuaternion_UnityEngineXRWSAInputInteractionSourceNode)(int32_t thisHandle, UnityEngine::Quaternion* rotation, UnityEngine::XR::WSA::Input::InteractionSourceNode node), + 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), - System::Boolean (*unboxBoolean)(int32_t valHandle), + int32_t (*unboxBoolean)(int32_t valHandle), int32_t (*boxSByte)(int8_t val), int8_t (*unboxSByte)(int32_t valHandle), int32_t (*boxByte)(uint8_t val), @@ -17348,7 +19317,7 @@ DLLEXPORT void Init( int32_t (*boxUInt64)(uint64_t val), uint64_t (*unboxUInt64)(int32_t valHandle), int32_t (*boxChar)(System::Char val), - System::Char (*unboxChar)(int32_t valHandle), + int16_t (*unboxChar)(int32_t valHandle), int32_t (*boxSingle)(float val), float (*unboxSingle)(int32_t valHandle), int32_t (*boxDouble)(double val), @@ -17453,7 +19422,9 @@ DLLEXPORT void Init( Plugin::ReleaseObject = releaseObject; Plugin::SetException = setException; Plugin::ArrayGetLength = arrayGetLength; + Plugin::EnumerableGetEnumerator = enumerableGetEnumerator; /*BEGIN INIT BODY*/ + Plugin::SystemIDisposableMethodDispose = systemIDisposableMethodDispose; Plugin::UnityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle = unityEngineVector3ConstructorSystemSingle_SystemSingle_SystemSingle; Plugin::UnityEngineVector3PropertyGetMagnitude = unityEngineVector3PropertyGetMagnitude; Plugin::UnityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle = unityEngineVector3MethodSetSystemSingle_SystemSingle_SystemSingle; @@ -17468,6 +19439,7 @@ DLLEXPORT void Init( Plugin::UnityEngineComponentPropertyGetTransform = unityEngineComponentPropertyGetTransform; Plugin::UnityEngineTransformPropertyGetPosition = unityEngineTransformPropertyGetPosition; Plugin::UnityEngineTransformPropertySetPosition = unityEngineTransformPropertySetPosition; + Plugin::UnityEngineTransformMethodSetParentUnityEngineTransform = unityEngineTransformMethodSetParentUnityEngineTransform; Plugin::BoxColor = boxColor; Plugin::UnboxColor = unboxColor; Plugin::BoxGradientColorKey = boxGradientColorKey; @@ -17493,6 +19465,20 @@ DLLEXPORT void Init( Plugin::UnityEngineRaycastHitPropertyGetTransform = unityEngineRaycastHitPropertyGetTransform; Plugin::BoxRaycastHit = boxRaycastHit; 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); @@ -17587,8 +19573,6 @@ DLLEXPORT void Init( Plugin::UnboxScene = unboxScene; Plugin::BoxLoadSceneMode = boxLoadSceneMode; Plugin::UnboxLoadSceneMode = unboxLoadSceneMode; - Plugin::SystemCollectionsIEnumeratorPropertyGetCurrent = systemCollectionsIEnumeratorPropertyGetCurrent; - Plugin::SystemCollectionsIEnumeratorMethodMoveNext = systemCollectionsIEnumeratorMethodMoveNext; Plugin::BoxPrimitiveType = boxPrimitiveType; Plugin::UnboxPrimitiveType = unboxPrimitiveType; Plugin::UnityEngineTimePropertyGetDeltaTime = unityEngineTimePropertyGetDeltaTime; diff --git a/Unity/CppSource/NativeScript/Bindings.h b/Unity/CppSource/NativeScript/Bindings.h index cf746c0..d2fdae9 100644 --- a/Unity/CppSource/NativeScript/Bindings.h +++ b/Unity/CppSource/NativeScript/Bindings.h @@ -77,6 +77,11 @@ namespace System { } + Boolean(int32_t value) + : Value(value) + { + } + operator bool() const { return (bool)Value; @@ -202,12 +207,22 @@ namespace System using UInt32 = uint32_t; using Int64 = int64_t; using UInt64 = uint64_t; - using Boolean = Boolean; using Single = float; using Double = double; } /*BEGIN TEMPLATE DECLARATIONS*/ +namespace System +{ + namespace Collections + { + namespace Generic + { + template struct IEnumerator; + } + } +} + namespace System { namespace Collections @@ -431,6 +446,14 @@ namespace UnityEngine struct RaycastHit; } +namespace System +{ + namespace Collections + { + struct IEnumerator; + } +} + namespace System { namespace Runtime @@ -680,14 +703,6 @@ namespace UnityEngine } } -namespace System -{ - namespace Collections - { - struct IEnumerator; - } -} - namespace System { struct EventArgs; @@ -1030,6 +1045,72 @@ namespace System /*END TYPE DECLARATIONS*/ /*BEGIN TEMPLATE SPECIALIZATION DECLARATIONS*/ +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 @@ -1511,10 +1592,10 @@ namespace System int32_t Handle; Object(); Object(Plugin::InternalUse iu, int32_t handle); - Object(decltype(nullptr) n); + Object(decltype(nullptr)); virtual ~Object() = default; - bool operator==(decltype(nullptr) other) const; - bool operator!=(decltype(nullptr) other) const; + bool operator==(decltype(nullptr)) const; + bool operator!=(decltype(nullptr)) const; virtual void ThrowReferenceToThis(); /*BEGIN BOXING METHOD DECLARATIONS*/ @@ -1588,18 +1669,18 @@ namespace System struct ValueType : virtual Object { ValueType(Plugin::InternalUse iu, int32_t handle); - ValueType(decltype(nullptr) n); + ValueType(decltype(nullptr)); }; struct String : virtual Object { String(Plugin::InternalUse iu, int32_t handle); - String(decltype(nullptr) n); + String(decltype(nullptr)); String(const String& other); String(String&& other); virtual ~String(); String& operator=(const String& other); - String& operator=(decltype(nullptr) other); + String& operator=(decltype(nullptr)); String& operator=(String&& other); String(const char* chars); }; @@ -1607,7 +1688,7 @@ namespace System struct ICloneable : virtual Object { ICloneable(Plugin::InternalUse iu, int32_t handle); - ICloneable(decltype(nullptr) n); + ICloneable(decltype(nullptr)); }; namespace Collections @@ -1615,26 +1696,27 @@ namespace System struct IEnumerable : virtual Object { IEnumerable(Plugin::InternalUse iu, int32_t handle); - IEnumerable(decltype(nullptr) n); + IEnumerable(decltype(nullptr)); + IEnumerator GetEnumerator(); }; struct ICollection : virtual IEnumerable { ICollection(Plugin::InternalUse iu, int32_t handle); - ICollection(decltype(nullptr) n); + ICollection(decltype(nullptr)); }; struct IList : virtual ICollection, virtual IEnumerable { IList(Plugin::InternalUse iu, int32_t handle); - IList(decltype(nullptr) n); + IList(decltype(nullptr)); }; } struct Array : virtual ICloneable, virtual Collections::IList { Array(Plugin::InternalUse iu, int32_t handle); - Array(decltype(nullptr) n); + Array(decltype(nullptr)); int32_t GetLength(); int32_t GetRank(); }; @@ -1654,16 +1736,17 @@ namespace System { struct IDisposable : virtual System::Object { - IDisposable(decltype(nullptr) n); + IDisposable(decltype(nullptr)); IDisposable(Plugin::InternalUse iu, int32_t handle); IDisposable(const IDisposable& other); IDisposable(IDisposable&& other); virtual ~IDisposable(); IDisposable& operator=(const IDisposable& other); - IDisposable& operator=(decltype(nullptr) other); + IDisposable& operator=(decltype(nullptr)); IDisposable& operator=(IDisposable&& other); bool operator==(const IDisposable& other) const; bool operator!=(const IDisposable& other) const; + void Dispose(); }; } @@ -1687,13 +1770,13 @@ namespace UnityEngine { struct Object : virtual System::Object { - Object(decltype(nullptr) n); + Object(decltype(nullptr)); Object(Plugin::InternalUse iu, int32_t handle); Object(const Object& other); Object(Object&& other); virtual ~Object(); Object& operator=(const Object& other); - Object& operator=(decltype(nullptr) other); + Object& operator=(decltype(nullptr)); Object& operator=(Object&& other); bool operator==(const Object& other) const; bool operator!=(const Object& other) const; @@ -1708,13 +1791,13 @@ namespace UnityEngine { struct Component : virtual UnityEngine::Object { - Component(decltype(nullptr) n); + Component(decltype(nullptr)); Component(Plugin::InternalUse iu, int32_t handle); Component(const Component& other); Component(Component&& other); virtual ~Component(); Component& operator=(const Component& other); - Component& operator=(decltype(nullptr) other); + Component& operator=(decltype(nullptr)); Component& operator=(Component&& other); bool operator==(const Component& other) const; bool operator!=(const Component& other) const; @@ -1726,18 +1809,19 @@ namespace UnityEngine { struct Transform : virtual UnityEngine::Component, virtual System::Collections::IEnumerable { - Transform(decltype(nullptr) n); + Transform(decltype(nullptr)); Transform(Plugin::InternalUse iu, int32_t handle); Transform(const Transform& other); Transform(Transform&& other); virtual ~Transform(); Transform& operator=(const Transform& other); - Transform& operator=(decltype(nullptr) 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); }; } @@ -1767,13 +1851,13 @@ namespace UnityEngine { struct Resolution : virtual System::ValueType { - Resolution(decltype(nullptr) n); + Resolution(decltype(nullptr)); Resolution(Plugin::InternalUse iu, int32_t handle); Resolution(const Resolution& other); Resolution(Resolution&& other); virtual ~Resolution(); Resolution& operator=(const Resolution& other); - Resolution& operator=(decltype(nullptr) other); + Resolution& operator=(decltype(nullptr)); Resolution& operator=(Resolution&& other); bool operator==(const Resolution& other) const; bool operator!=(const Resolution& other) const; @@ -1790,13 +1874,13 @@ namespace UnityEngine { struct RaycastHit : virtual System::ValueType { - RaycastHit(decltype(nullptr) n); + RaycastHit(decltype(nullptr)); RaycastHit(Plugin::InternalUse iu, int32_t handle); RaycastHit(const RaycastHit& other); RaycastHit(RaycastHit&& other); virtual ~RaycastHit(); RaycastHit& operator=(const RaycastHit& other); - RaycastHit& operator=(decltype(nullptr) other); + RaycastHit& operator=(decltype(nullptr)); RaycastHit& operator=(RaycastHit&& other); bool operator==(const RaycastHit& other) const; bool operator!=(const RaycastHit& other) const; @@ -1806,6 +1890,172 @@ namespace UnityEngine }; } +namespace System +{ + namespace Collections + { + struct IEnumerator : 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::Object GetCurrent(); + System::Boolean MoveNext(); + }; + } +} + +namespace System +{ + namespace Collections + { + 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; + 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 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(); + }; + } + } +} + +namespace System +{ + namespace Collections + { + 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(); + }; + } + } +} + +namespace System +{ + namespace Collections + { + 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; + 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 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(); + }; + } + } +} + +namespace System +{ + namespace Collections + { + 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; + UnityEngine::Resolution GetCurrent(); + }; + } + } +} + namespace System { namespace Collections @@ -1814,16 +2064,17 @@ namespace System { template<> struct IEnumerable : virtual System::Collections::IEnumerable { - IEnumerable(decltype(nullptr) n); + 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) 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(); }; } } @@ -1837,16 +2088,17 @@ namespace System { template<> struct IEnumerable : virtual System::Collections::IEnumerable { - IEnumerable(decltype(nullptr) n); + 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) 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(); }; } } @@ -1860,16 +2112,17 @@ namespace System { template<> struct IEnumerable : virtual System::Collections::IEnumerable { - IEnumerable(decltype(nullptr) n); + 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) 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(); }; } } @@ -1883,16 +2136,17 @@ namespace System { template<> struct IEnumerable : virtual System::Collections::IEnumerable { - IEnumerable(decltype(nullptr) n); + 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) 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(); }; } } @@ -1906,16 +2160,17 @@ namespace System { template<> struct IEnumerable : virtual System::Collections::IEnumerable { - IEnumerable(decltype(nullptr) n); + 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) 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(); }; } } @@ -1929,16 +2184,17 @@ namespace System { template<> struct IEnumerable : virtual System::Collections::IEnumerable { - IEnumerable(decltype(nullptr) n); + 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) 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(); }; } } @@ -1952,13 +2208,13 @@ namespace System { template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(decltype(nullptr)); ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; @@ -1967,6 +2223,33 @@ namespace System } } +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 @@ -1975,13 +2258,13 @@ namespace System { template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(decltype(nullptr)); ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; @@ -1990,6 +2273,33 @@ namespace System } } +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 Collections + { + namespace Generic + { + Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator begin(System::Collections::Generic::ICollection& enumerable); + Plugin::SystemCollectionsGenericICollectionSystemInt32Iterator end(System::Collections::Generic::ICollection& enumerable); + } + } +} + namespace System { namespace Collections @@ -1998,13 +2308,13 @@ namespace System { template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(decltype(nullptr)); ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; @@ -2013,6 +2323,33 @@ namespace System } } +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); + float 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 @@ -2021,13 +2358,13 @@ namespace System { template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(decltype(nullptr)); ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; @@ -2036,6 +2373,33 @@ namespace System } } +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 @@ -2044,13 +2408,13 @@ namespace System { template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(decltype(nullptr)); ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; @@ -2059,6 +2423,33 @@ namespace System } } +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 @@ -2067,13 +2458,13 @@ namespace System { template<> struct ICollection : virtual System::Collections::Generic::IEnumerable { - ICollection(decltype(nullptr) n); + 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) other); + ICollection& operator=(decltype(nullptr)); ICollection& operator=(ICollection&& other); bool operator==(const ICollection& other) const; bool operator!=(const ICollection& other) const; @@ -2082,6 +2473,33 @@ namespace System } } +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 @@ -2090,13 +2508,13 @@ namespace System { template<> struct IList : virtual System::Collections::Generic::ICollection { - IList(decltype(nullptr) n); + 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) other); + IList& operator=(decltype(nullptr)); IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; @@ -2105,6 +2523,33 @@ namespace System } } +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 @@ -2113,13 +2558,13 @@ namespace System { template<> struct IList : virtual System::Collections::Generic::ICollection { - IList(decltype(nullptr) n); + 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) other); + IList& operator=(decltype(nullptr)); IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; @@ -2128,6 +2573,33 @@ namespace System } } +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); + int32_t 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 @@ -2136,13 +2608,13 @@ namespace System { template<> struct IList : virtual System::Collections::Generic::ICollection { - IList(decltype(nullptr) n); + 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) other); + IList& operator=(decltype(nullptr)); IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; @@ -2151,6 +2623,33 @@ namespace System } } +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); + float 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 @@ -2159,13 +2658,13 @@ namespace System { template<> struct IList : virtual System::Collections::Generic::ICollection { - IList(decltype(nullptr) n); + 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) other); + IList& operator=(decltype(nullptr)); IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; @@ -2174,6 +2673,33 @@ namespace System } } +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 @@ -2182,13 +2708,13 @@ namespace System { template<> struct IList : virtual System::Collections::Generic::ICollection { - IList(decltype(nullptr) n); + 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) other); + IList& operator=(decltype(nullptr)); IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; @@ -2197,6 +2723,33 @@ namespace System } } +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 @@ -2205,13 +2758,13 @@ namespace System { template<> struct IList : virtual System::Collections::Generic::ICollection { - IList(decltype(nullptr) n); + 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) other); + IList& operator=(decltype(nullptr)); IList& operator=(IList&& other); bool operator==(const IList& other) const; bool operator!=(const IList& other) const; @@ -2220,6 +2773,33 @@ namespace System } } +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 Runtime @@ -2228,13 +2808,13 @@ namespace System { struct ISerializable : virtual System::Object { - ISerializable(decltype(nullptr) n); + 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) other); + ISerializable& operator=(decltype(nullptr)); ISerializable& operator=(ISerializable&& other); bool operator==(const ISerializable& other) const; bool operator!=(const ISerializable& other) const; @@ -2251,13 +2831,13 @@ namespace System { struct _Exception : virtual System::Object { - _Exception(decltype(nullptr) n); + _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) other); + _Exception& operator=(decltype(nullptr)); _Exception& operator=(_Exception&& other); bool operator==(const _Exception& other) const; bool operator!=(const _Exception& other) const; @@ -2270,13 +2850,13 @@ namespace System { struct IAppDomainSetup : virtual System::Object { - IAppDomainSetup(decltype(nullptr) n); + 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) other); + IAppDomainSetup& operator=(decltype(nullptr)); IAppDomainSetup& operator=(IAppDomainSetup&& other); bool operator==(const IAppDomainSetup& other) const; bool operator!=(const IAppDomainSetup& other) const; @@ -2289,13 +2869,13 @@ namespace System { struct IComparer : virtual System::Object { - IComparer(decltype(nullptr) n); + 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) other); + IComparer& operator=(decltype(nullptr)); IComparer& operator=(IComparer&& other); bool operator==(const IComparer& other) const; bool operator!=(const IComparer& other) const; @@ -2309,13 +2889,13 @@ namespace System { struct IEqualityComparer : virtual System::Object { - IEqualityComparer(decltype(nullptr) n); + 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) other); + IEqualityComparer& operator=(decltype(nullptr)); IEqualityComparer& operator=(IEqualityComparer&& other); bool operator==(const IEqualityComparer& other) const; bool operator!=(const IEqualityComparer& other) const; @@ -2331,13 +2911,13 @@ namespace System { template<> struct IEqualityComparer : virtual System::Object { - IEqualityComparer(decltype(nullptr) n); + 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) other); + IEqualityComparer& operator=(decltype(nullptr)); IEqualityComparer& operator=(IEqualityComparer&& other); bool operator==(const IEqualityComparer& other) const; bool operator!=(const IEqualityComparer& other) const; @@ -2354,13 +2934,13 @@ namespace System { template<> struct IEqualityComparer : virtual System::Object { - IEqualityComparer(decltype(nullptr) n); + 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) other); + IEqualityComparer& operator=(decltype(nullptr)); IEqualityComparer& operator=(IEqualityComparer&& other); bool operator==(const IEqualityComparer& other) const; bool operator!=(const IEqualityComparer& other) const; @@ -2375,13 +2955,13 @@ namespace UnityEngine { struct PlayableGraph : virtual System::ValueType { - PlayableGraph(decltype(nullptr) n); + 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) other); + PlayableGraph& operator=(decltype(nullptr)); PlayableGraph& operator=(PlayableGraph&& other); bool operator==(const PlayableGraph& other) const; bool operator!=(const PlayableGraph& other) const; @@ -2395,13 +2975,13 @@ namespace UnityEngine { struct IPlayable : virtual System::Object { - IPlayable(decltype(nullptr) n); + 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) other); + IPlayable& operator=(decltype(nullptr)); IPlayable& operator=(IPlayable&& other); bool operator==(const IPlayable& other) const; bool operator!=(const IPlayable& other) const; @@ -2413,13 +2993,13 @@ namespace System { template<> struct IEquatable : virtual System::Object { - IEquatable(decltype(nullptr) n); + 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) other); + IEquatable& operator=(decltype(nullptr)); IEquatable& operator=(IEquatable&& other); bool operator==(const IEquatable& other) const; bool operator!=(const IEquatable& other) const; @@ -2432,13 +3012,13 @@ namespace UnityEngine { struct AnimationMixerPlayable : virtual System::ValueType, virtual System::IEquatable, virtual UnityEngine::Playables::IPlayable { - AnimationMixerPlayable(decltype(nullptr) n); + 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) other); + AnimationMixerPlayable& operator=(decltype(nullptr)); AnimationMixerPlayable& operator=(AnimationMixerPlayable&& other); bool operator==(const AnimationMixerPlayable& other) const; bool operator!=(const AnimationMixerPlayable& other) const; @@ -2455,13 +3035,13 @@ namespace System { struct IStrongBox : virtual System::Object { - IStrongBox(decltype(nullptr) n); + 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) other); + IStrongBox& operator=(decltype(nullptr)); IStrongBox& operator=(IStrongBox&& other); bool operator==(const IStrongBox& other) const; bool operator!=(const IStrongBox& other) const; @@ -2478,13 +3058,13 @@ namespace UnityEngine { struct IEventHandler : virtual System::Object { - IEventHandler(decltype(nullptr) n); + 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) other); + IEventHandler& operator=(decltype(nullptr)); IEventHandler& operator=(IEventHandler&& other); bool operator==(const IEventHandler& other) const; bool operator!=(const IEventHandler& other) const; @@ -2501,13 +3081,13 @@ namespace UnityEngine { struct IStyle : virtual System::Object { - IStyle(decltype(nullptr) n); + 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) other); + IStyle& operator=(decltype(nullptr)); IStyle& operator=(IStyle&& other); bool operator==(const IStyle& other) const; bool operator!=(const IStyle& other) const; @@ -2522,13 +3102,13 @@ namespace System { struct Stopwatch : virtual System::Object { - Stopwatch(decltype(nullptr) n); + 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) other); + Stopwatch& operator=(decltype(nullptr)); Stopwatch& operator=(Stopwatch&& other); bool operator==(const Stopwatch& other) const; bool operator!=(const Stopwatch& other) const; @@ -2544,13 +3124,13 @@ namespace UnityEngine { struct GameObject : virtual UnityEngine::Object { - GameObject(decltype(nullptr) n); + 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) other); + GameObject& operator=(decltype(nullptr)); GameObject& operator=(GameObject&& other); bool operator==(const GameObject& other) const; bool operator!=(const GameObject& other) const; @@ -2566,13 +3146,13 @@ namespace UnityEngine { struct Debug : virtual System::Object { - Debug(decltype(nullptr) n); + 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) other); + Debug& operator=(decltype(nullptr)); Debug& operator=(Debug&& other); bool operator==(const Debug& other) const; bool operator!=(const Debug& other) const; @@ -2597,13 +3177,13 @@ namespace UnityEngine { struct Collision : virtual System::Object { - Collision(decltype(nullptr) n); + 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) other); + Collision& operator=(decltype(nullptr)); Collision& operator=(Collision&& other); bool operator==(const Collision& other) const; bool operator!=(const Collision& other) const; @@ -2614,13 +3194,13 @@ namespace UnityEngine { struct Behaviour : virtual UnityEngine::Component { - Behaviour(decltype(nullptr) n); + 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) other); + Behaviour& operator=(decltype(nullptr)); Behaviour& operator=(Behaviour&& other); bool operator==(const Behaviour& other) const; bool operator!=(const Behaviour& other) const; @@ -2631,13 +3211,13 @@ namespace UnityEngine { struct MonoBehaviour : virtual UnityEngine::Behaviour { - MonoBehaviour(decltype(nullptr) n); + 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) other); + MonoBehaviour& operator=(decltype(nullptr)); MonoBehaviour& operator=(MonoBehaviour&& other); bool operator==(const MonoBehaviour& other) const; bool operator!=(const MonoBehaviour& other) const; @@ -2649,13 +3229,13 @@ namespace UnityEngine { struct AudioSettings : virtual System::Object { - AudioSettings(decltype(nullptr) n); + 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) other); + AudioSettings& operator=(decltype(nullptr)); AudioSettings& operator=(AudioSettings&& other); bool operator==(const AudioSettings& other) const; bool operator!=(const AudioSettings& other) const; @@ -2669,13 +3249,13 @@ namespace UnityEngine { struct NetworkTransport : virtual System::Object { - NetworkTransport(decltype(nullptr) n); + 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) other); + NetworkTransport& operator=(decltype(nullptr)); NetworkTransport& operator=(NetworkTransport&& other); bool operator==(const NetworkTransport& other) const; bool operator!=(const NetworkTransport& other) const; @@ -2731,13 +3311,13 @@ namespace System { template<> struct KeyValuePair : virtual System::ValueType { - KeyValuePair(decltype(nullptr) n); + 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) other); + KeyValuePair& operator=(decltype(nullptr)); KeyValuePair& operator=(KeyValuePair&& other); bool operator==(const KeyValuePair& other) const; bool operator!=(const KeyValuePair& other) const; @@ -2757,13 +3337,13 @@ namespace System { template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList { - List(decltype(nullptr) n); + 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) other); + List& operator=(decltype(nullptr)); List& operator=(List&& other); bool operator==(const List& other) const; bool operator!=(const List& other) const; @@ -2777,6 +3357,33 @@ namespace System } } +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 @@ -2785,13 +3392,13 @@ namespace System { template<> struct List : virtual System::Collections::IList, virtual System::Collections::Generic::IList { - List(decltype(nullptr) n); + 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) other); + List& operator=(decltype(nullptr)); List& operator=(List&& other); bool operator==(const List& other) const; bool operator!=(const List& other) const; @@ -2805,6 +3412,33 @@ namespace System } } +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); + int32_t operator*(); + }; +} + +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 @@ -2813,13 +3447,13 @@ namespace System { template<> struct LinkedListNode : virtual System::Object { - LinkedListNode(decltype(nullptr) n); + 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) other); + LinkedListNode& operator=(decltype(nullptr)); LinkedListNode& operator=(LinkedListNode&& other); bool operator==(const LinkedListNode& other) const; bool operator!=(const LinkedListNode& other) const; @@ -2839,13 +3473,13 @@ namespace System { template<> struct StrongBox : virtual System::Runtime::CompilerServices::IStrongBox { - StrongBox(decltype(nullptr) n); + 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) other); + StrongBox& operator=(decltype(nullptr)); StrongBox& operator=(StrongBox&& other); bool operator==(const StrongBox& other) const; bool operator!=(const StrongBox& other) const; @@ -2865,13 +3499,13 @@ namespace System { template<> struct Collection : virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Collection(decltype(nullptr) n); + 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) other); + Collection& operator=(decltype(nullptr)); Collection& operator=(Collection&& other); bool operator==(const Collection& other) const; bool operator!=(const Collection& other) const; @@ -2880,6 +3514,33 @@ namespace System } } +namespace Plugin +{ + struct SystemCollectionsObjectModelCollectionSystemInt32Iterator + { + 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 System +{ + namespace Collections + { + namespace ObjectModel + { + Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator begin(System::Collections::ObjectModel::Collection& enumerable); + Plugin::SystemCollectionsObjectModelCollectionSystemInt32Iterator end(System::Collections::ObjectModel::Collection& enumerable); + } + } +} + namespace System { namespace Collections @@ -2888,13 +3549,13 @@ namespace System { template<> struct KeyedCollection : virtual System::Collections::ObjectModel::Collection, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - KeyedCollection(decltype(nullptr) n); + 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) other); + KeyedCollection& operator=(decltype(nullptr)); KeyedCollection& operator=(KeyedCollection&& other); bool operator==(const KeyedCollection& other) const; bool operator!=(const KeyedCollection& other) const; @@ -2903,17 +3564,44 @@ namespace System } } +namespace Plugin +{ + struct SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator + { + 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 System +{ + namespace Collections + { + namespace ObjectModel + { + Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator begin(System::Collections::ObjectModel::KeyedCollection& enumerable); + Plugin::SystemCollectionsObjectModelKeyedCollectionSystemString_SystemInt32Iterator end(System::Collections::ObjectModel::KeyedCollection& enumerable); + } + } +} + namespace System { struct Exception : virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - Exception(decltype(nullptr) n); + 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) other); + Exception& operator=(decltype(nullptr)); Exception& operator=(Exception&& other); bool operator==(const Exception& other) const; bool operator!=(const Exception& other) const; @@ -2925,13 +3613,13 @@ namespace System { struct SystemException : virtual System::Exception, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - SystemException(decltype(nullptr) n); + 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) other); + SystemException& operator=(decltype(nullptr)); SystemException& operator=(SystemException&& other); bool operator==(const SystemException& other) const; bool operator!=(const SystemException& other) const; @@ -2942,13 +3630,13 @@ namespace System { struct NullReferenceException : virtual System::SystemException, virtual System::Runtime::InteropServices::_Exception, virtual System::Runtime::Serialization::ISerializable { - NullReferenceException(decltype(nullptr) n); + 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) other); + NullReferenceException& operator=(decltype(nullptr)); NullReferenceException& operator=(NullReferenceException&& other); bool operator==(const NullReferenceException& other) const; bool operator!=(const NullReferenceException& other) const; @@ -2959,13 +3647,13 @@ namespace UnityEngine { struct Screen : virtual System::Object { - Screen(decltype(nullptr) n); + 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) other); + Screen& operator=(decltype(nullptr)); Screen& operator=(Screen&& other); bool operator==(const Screen& other) const; bool operator!=(const Screen& other) const; @@ -2977,13 +3665,13 @@ namespace UnityEngine { struct Ray : virtual System::ValueType { - Ray(decltype(nullptr) n); + 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) other); + Ray& operator=(decltype(nullptr)); Ray& operator=(Ray&& other); bool operator==(const Ray& other) const; bool operator!=(const Ray& other) const; @@ -2995,13 +3683,13 @@ namespace UnityEngine { struct Physics : virtual System::Object { - Physics(decltype(nullptr) n); + 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) other); + Physics& operator=(decltype(nullptr)); Physics& operator=(Physics&& other); bool operator==(const Physics& other) const; bool operator!=(const Physics& other) const; @@ -3014,13 +3702,13 @@ namespace UnityEngine { struct Gradient : virtual System::Object { - Gradient(decltype(nullptr) n); + 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) other); + Gradient& operator=(decltype(nullptr)); Gradient& operator=(Gradient&& other); bool operator==(const Gradient& other) const; bool operator!=(const Gradient& other) const; @@ -3034,13 +3722,13 @@ namespace System { struct AppDomainSetup : virtual System::IAppDomainSetup { - AppDomainSetup(decltype(nullptr) n); + 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) other); + AppDomainSetup& operator=(decltype(nullptr)); AppDomainSetup& operator=(AppDomainSetup&& other); bool operator==(const AppDomainSetup& other) const; bool operator!=(const AppDomainSetup& other) const; @@ -3054,13 +3742,13 @@ namespace UnityEngine { struct Application : virtual System::Object { - Application(decltype(nullptr) n); + 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) other); + Application& operator=(decltype(nullptr)); Application& operator=(Application&& other); bool operator==(const Application& other) const; bool operator!=(const Application& other) const; @@ -3075,13 +3763,13 @@ namespace UnityEngine { struct SceneManager : virtual System::Object { - SceneManager(decltype(nullptr) n); + 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) other); + SceneManager& operator=(decltype(nullptr)); SceneManager& operator=(SceneManager&& other); bool operator==(const SceneManager& other) const; bool operator!=(const SceneManager& other) const; @@ -3097,13 +3785,13 @@ namespace UnityEngine { struct Scene : virtual System::ValueType { - Scene(decltype(nullptr) n); + 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) other); + Scene& operator=(decltype(nullptr)); Scene& operator=(Scene&& other); bool operator==(const Scene& other) const; bool operator!=(const Scene& other) const; @@ -3111,39 +3799,17 @@ namespace UnityEngine } } -namespace System -{ - namespace Collections - { - struct IEnumerator : virtual System::Object - { - IEnumerator(decltype(nullptr) n); - 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) other); - IEnumerator& operator=(IEnumerator&& other); - bool operator==(const IEnumerator& other) const; - bool operator!=(const IEnumerator& other) const; - System::Object GetCurrent(); - System::Boolean MoveNext(); - }; - } -} - namespace System { struct EventArgs : virtual System::Object { - EventArgs(decltype(nullptr) n); + 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) other); + EventArgs& operator=(decltype(nullptr)); EventArgs& operator=(EventArgs&& other); bool operator==(const EventArgs& other) const; bool operator!=(const EventArgs& other) const; @@ -3158,13 +3824,13 @@ namespace System { struct ComponentEventArgs : virtual System::EventArgs { - ComponentEventArgs(decltype(nullptr) n); + 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) other); + ComponentEventArgs& operator=(decltype(nullptr)); ComponentEventArgs& operator=(ComponentEventArgs&& other); bool operator==(const ComponentEventArgs& other) const; bool operator!=(const ComponentEventArgs& other) const; @@ -3181,13 +3847,13 @@ namespace System { struct ComponentChangingEventArgs : virtual System::EventArgs { - ComponentChangingEventArgs(decltype(nullptr) n); + 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) other); + ComponentChangingEventArgs& operator=(decltype(nullptr)); ComponentChangingEventArgs& operator=(ComponentChangingEventArgs&& other); bool operator==(const ComponentChangingEventArgs& other) const; bool operator!=(const ComponentChangingEventArgs& other) const; @@ -3204,13 +3870,13 @@ namespace System { struct ComponentChangedEventArgs : virtual System::EventArgs { - ComponentChangedEventArgs(decltype(nullptr) n); + 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) other); + ComponentChangedEventArgs& operator=(decltype(nullptr)); ComponentChangedEventArgs& operator=(ComponentChangedEventArgs&& other); bool operator==(const ComponentChangedEventArgs& other) const; bool operator!=(const ComponentChangedEventArgs& other) const; @@ -3227,13 +3893,13 @@ namespace System { struct ComponentRenameEventArgs : virtual System::EventArgs { - ComponentRenameEventArgs(decltype(nullptr) n); + 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) other); + ComponentRenameEventArgs& operator=(decltype(nullptr)); ComponentRenameEventArgs& operator=(ComponentRenameEventArgs&& other); bool operator==(const ComponentRenameEventArgs& other) const; bool operator!=(const ComponentRenameEventArgs& other) const; @@ -3248,13 +3914,13 @@ namespace System { struct MemberDescriptor : virtual System::Object { - MemberDescriptor(decltype(nullptr) n); + 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) other); + MemberDescriptor& operator=(decltype(nullptr)); MemberDescriptor& operator=(MemberDescriptor&& other); bool operator==(const MemberDescriptor& other) const; bool operator!=(const MemberDescriptor& other) const; @@ -3266,13 +3932,13 @@ namespace UnityEngine { struct Time : virtual System::Object { - Time(decltype(nullptr) n); + 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) other); + Time& operator=(decltype(nullptr)); Time& operator=(Time&& other); bool operator==(const Time& other) const; bool operator!=(const Time& other) const; @@ -3284,13 +3950,13 @@ namespace System { struct MarshalByRefObject : virtual System::Object { - MarshalByRefObject(decltype(nullptr) n); + 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) other); + MarshalByRefObject& operator=(decltype(nullptr)); MarshalByRefObject& operator=(MarshalByRefObject&& other); bool operator==(const MarshalByRefObject& other) const; bool operator!=(const MarshalByRefObject& other) const; @@ -3303,13 +3969,13 @@ namespace System { struct Stream : virtual System::MarshalByRefObject, virtual System::IDisposable { - Stream(decltype(nullptr) n); + 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) other); + Stream& operator=(decltype(nullptr)); Stream& operator=(Stream&& other); bool operator==(const Stream& other) const; bool operator!=(const Stream& other) const; @@ -3325,13 +3991,13 @@ namespace System { template<> struct IComparer : virtual System::Object { - IComparer(decltype(nullptr) n); + 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) other); + IComparer& operator=(decltype(nullptr)); IComparer& operator=(IComparer&& other); bool operator==(const IComparer& other) const; bool operator!=(const IComparer& other) const; @@ -3348,13 +4014,13 @@ namespace System { template<> struct IComparer : virtual System::Object { - IComparer(decltype(nullptr) n); + 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) other); + IComparer& operator=(decltype(nullptr)); IComparer& operator=(IComparer&& other); bool operator==(const IComparer& other) const; bool operator!=(const IComparer& other) const; @@ -3371,13 +4037,13 @@ namespace System { template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer { - BaseIComparer(decltype(nullptr) n); + 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) other); + BaseIComparer& operator=(decltype(nullptr)); BaseIComparer& operator=(BaseIComparer&& other); bool operator==(const BaseIComparer& other) const; bool operator!=(const BaseIComparer& other) const; @@ -3397,13 +4063,13 @@ namespace System { template<> struct BaseIComparer : virtual System::Collections::Generic::IComparer { - BaseIComparer(decltype(nullptr) n); + 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) other); + BaseIComparer& operator=(decltype(nullptr)); BaseIComparer& operator=(BaseIComparer&& other); bool operator==(const BaseIComparer& other) const; bool operator!=(const BaseIComparer& other) const; @@ -3419,13 +4085,13 @@ 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) n); + 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) other); + StringComparer& operator=(decltype(nullptr)); StringComparer& operator=(StringComparer&& other); bool operator==(const StringComparer& other) const; bool operator!=(const StringComparer& other) const; @@ -3436,13 +4102,13 @@ namespace System { struct BaseStringComparer : virtual System::StringComparer { - BaseStringComparer(decltype(nullptr) n); + 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) other); + BaseStringComparer& operator=(decltype(nullptr)); BaseStringComparer& operator=(BaseStringComparer&& other); bool operator==(const BaseStringComparer& other) const; bool operator!=(const BaseStringComparer& other) const; @@ -3460,13 +4126,13 @@ namespace System { struct Queue : virtual System::ICloneable, virtual System::Collections::ICollection { - Queue(decltype(nullptr) n); + 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) other); + Queue& operator=(decltype(nullptr)); Queue& operator=(Queue&& other); bool operator==(const Queue& other) const; bool operator!=(const Queue& other) const; @@ -3481,13 +4147,13 @@ namespace System { struct BaseQueue : virtual System::Collections::Queue { - BaseQueue(decltype(nullptr) n); + 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) other); + BaseQueue& operator=(decltype(nullptr)); BaseQueue& operator=(BaseQueue&& other); bool operator==(const BaseQueue& other) const; bool operator!=(const BaseQueue& other) const; @@ -3506,13 +4172,13 @@ namespace System { struct IComponentChangeService : virtual System::Object { - IComponentChangeService(decltype(nullptr) n); + 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) other); + IComponentChangeService& operator=(decltype(nullptr)); IComponentChangeService& operator=(IComponentChangeService&& other); bool operator==(const IComponentChangeService& other) const; bool operator!=(const IComponentChangeService& other) const; @@ -3529,13 +4195,13 @@ namespace System { struct BaseIComponentChangeService : virtual System::ComponentModel::Design::IComponentChangeService { - BaseIComponentChangeService(decltype(nullptr) n); + 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) other); + BaseIComponentChangeService& operator=(decltype(nullptr)); BaseIComponentChangeService& operator=(BaseIComponentChangeService&& other); bool operator==(const BaseIComponentChangeService& other) const; bool operator!=(const BaseIComponentChangeService& other) const; @@ -3568,13 +4234,13 @@ namespace System { struct FileStream : virtual System::IO::Stream, virtual System::IDisposable { - FileStream(decltype(nullptr) n); + 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) other); + FileStream& operator=(decltype(nullptr)); FileStream& operator=(FileStream&& other); bool operator==(const FileStream& other) const; bool operator!=(const FileStream& other) const; @@ -3590,13 +4256,13 @@ namespace System { struct BaseFileStream : virtual System::IO::FileStream { - BaseFileStream(decltype(nullptr) n); + 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) other); + BaseFileStream& operator=(decltype(nullptr)); BaseFileStream& operator=(BaseFileStream&& other); bool operator==(const BaseFileStream& other) const; bool operator!=(const BaseFileStream& other) const; @@ -3613,13 +4279,13 @@ namespace UnityEngine { struct PlayableHandle : virtual System::ValueType { - PlayableHandle(decltype(nullptr) n); + 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) other); + PlayableHandle& operator=(decltype(nullptr)); PlayableHandle& operator=(PlayableHandle&& other); bool operator==(const PlayableHandle& other) const; bool operator!=(const PlayableHandle& other) const; @@ -3635,13 +4301,13 @@ namespace UnityEngine { struct CallbackEventHandler : virtual UnityEngine::Experimental::UIElements::IEventHandler { - CallbackEventHandler(decltype(nullptr) n); + 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) other); + CallbackEventHandler& operator=(decltype(nullptr)); CallbackEventHandler& operator=(CallbackEventHandler&& other); bool operator==(const CallbackEventHandler& other) const; bool operator!=(const CallbackEventHandler& other) const; @@ -3658,13 +4324,13 @@ namespace UnityEngine { struct VisualElement : virtual UnityEngine::Experimental::UIElements::CallbackEventHandler, virtual UnityEngine::Experimental::UIElements::IEventHandler, virtual UnityEngine::Experimental::UIElements::IStyle { - VisualElement(decltype(nullptr) n); + 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) other); + VisualElement& operator=(decltype(nullptr)); VisualElement& operator=(VisualElement&& other); bool operator==(const VisualElement& other) const; bool operator!=(const VisualElement& other) const; @@ -3698,13 +4364,13 @@ namespace UnityEngine { struct InteractionSourcePose : virtual System::ValueType { - InteractionSourcePose(decltype(nullptr) n); + 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) other); + InteractionSourcePose& operator=(decltype(nullptr)); InteractionSourcePose& operator=(InteractionSourcePose&& other); bool operator==(const InteractionSourcePose& other) const; bool operator!=(const InteractionSourcePose& other) const; @@ -3721,13 +4387,13 @@ namespace MyGame { struct TestScript : virtual UnityEngine::MonoBehaviour { - TestScript(decltype(nullptr) n); + TestScript(decltype(nullptr)); TestScript(Plugin::InternalUse iu, int32_t handle); TestScript(const TestScript& other); TestScript(TestScript&& other); virtual ~TestScript(); TestScript& operator=(const TestScript& other); - TestScript& operator=(decltype(nullptr) other); + TestScript& operator=(decltype(nullptr)); TestScript& operator=(TestScript&& other); bool operator==(const TestScript& other) const; bool operator!=(const TestScript& other) const; @@ -3745,13 +4411,13 @@ namespace MyGame { struct AnotherScript : virtual UnityEngine::MonoBehaviour { - AnotherScript(decltype(nullptr) n); + AnotherScript(decltype(nullptr)); AnotherScript(Plugin::InternalUse iu, int32_t handle); AnotherScript(const AnotherScript& other); AnotherScript(AnotherScript&& other); virtual ~AnotherScript(); AnotherScript& operator=(const AnotherScript& other); - AnotherScript& operator=(decltype(nullptr) other); + AnotherScript& operator=(decltype(nullptr)); AnotherScript& operator=(AnotherScript&& other); bool operator==(const AnotherScript& other) const; bool operator!=(const AnotherScript& other) const; @@ -3777,13 +4443,13 @@ namespace System { template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr) n); + 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) other); + Array1& operator=(decltype(nullptr)); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -3795,6 +4461,25 @@ namespace System }; } +namespace Plugin +{ + struct SystemInt32Array1Iterator + { + System::Array1& array; + int index; + SystemInt32Array1Iterator(System::Array1& array, int32_t index); + SystemInt32Array1Iterator& operator++(); + bool operator!=(const SystemInt32Array1Iterator& other); + int32_t operator*(); + }; +} + +namespace System +{ + Plugin::SystemInt32Array1Iterator begin(System::Array1& array); + Plugin::SystemInt32Array1Iterator end(System::Array1& array); +} + namespace Plugin { template<> struct ArrayElementProxy1_1 @@ -3872,13 +4557,13 @@ namespace System { template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr) n); + 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) other); + Array1& operator=(decltype(nullptr)); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -3890,17 +4575,36 @@ namespace System }; } +namespace Plugin +{ + struct SystemSingleArray1Iterator + { + System::Array1& array; + int index; + SystemSingleArray1Iterator(System::Array1& array, int32_t index); + SystemSingleArray1Iterator& operator++(); + bool operator!=(const SystemSingleArray1Iterator& other); + float 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) n); + 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) other); + Array2& operator=(decltype(nullptr)); Array2& operator=(Array2&& other); bool operator==(const Array2& other) const; bool operator!=(const Array2& other) const; @@ -3918,13 +4622,13 @@ namespace System { template<> struct Array3 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList { - Array3(decltype(nullptr) n); + 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) other); + Array3& operator=(decltype(nullptr)); Array3& operator=(Array3&& other); bool operator==(const Array3& other) const; bool operator!=(const Array3& other) const; @@ -3954,13 +4658,13 @@ namespace System { template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr) n); + 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) other); + Array1& operator=(decltype(nullptr)); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -3972,6 +4676,25 @@ namespace System }; } +namespace Plugin +{ + struct SystemStringArray1Iterator + { + System::Array1& array; + int index; + SystemStringArray1Iterator(System::Array1& array, int32_t index); + SystemStringArray1Iterator& operator++(); + bool operator!=(const SystemStringArray1Iterator& other); + System::String operator*(); + }; +} + +namespace System +{ + Plugin::SystemStringArray1Iterator begin(System::Array1& array); + Plugin::SystemStringArray1Iterator end(System::Array1& array); +} + namespace Plugin { template<> struct ArrayElementProxy1_1 @@ -3988,13 +4711,13 @@ namespace System { template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr) n); + 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) other); + Array1& operator=(decltype(nullptr)); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -4006,6 +4729,25 @@ namespace System }; } +namespace Plugin +{ + struct UnityEngineResolutionArray1Iterator + { + System::Array1& array; + int index; + UnityEngineResolutionArray1Iterator(System::Array1& array, int32_t index); + UnityEngineResolutionArray1Iterator& operator++(); + bool operator!=(const UnityEngineResolutionArray1Iterator& other); + UnityEngine::Resolution operator*(); + }; +} + +namespace System +{ + Plugin::UnityEngineResolutionArray1Iterator begin(System::Array1& array); + Plugin::UnityEngineResolutionArray1Iterator end(System::Array1& array); +} + namespace Plugin { template<> struct ArrayElementProxy1_1 @@ -4022,13 +4764,13 @@ namespace System { template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr) n); + 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) other); + Array1& operator=(decltype(nullptr)); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -4040,6 +4782,25 @@ namespace System }; } +namespace Plugin +{ + struct UnityEngineRaycastHitArray1Iterator + { + System::Array1& array; + int index; + UnityEngineRaycastHitArray1Iterator(System::Array1& array, int32_t index); + UnityEngineRaycastHitArray1Iterator& operator++(); + bool operator!=(const UnityEngineRaycastHitArray1Iterator& other); + UnityEngine::RaycastHit operator*(); + }; +} + +namespace System +{ + Plugin::UnityEngineRaycastHitArray1Iterator begin(System::Array1& array); + Plugin::UnityEngineRaycastHitArray1Iterator end(System::Array1& array); +} + namespace Plugin { template<> struct ArrayElementProxy1_1 @@ -4056,13 +4817,13 @@ namespace System { template<> struct Array1 : virtual System::Array, virtual System::ICloneable, virtual System::Collections::IList, virtual System::Collections::Generic::IList { - Array1(decltype(nullptr) n); + 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) other); + Array1& operator=(decltype(nullptr)); Array1& operator=(Array1&& other); bool operator==(const Array1& other) const; bool operator!=(const Array1& other) const; @@ -4074,17 +4835,36 @@ namespace System }; } +namespace Plugin +{ + struct UnityEngineGradientColorKeyArray1Iterator + { + System::Array1& array; + int index; + UnityEngineGradientColorKeyArray1Iterator(System::Array1& array, int32_t index); + UnityEngineGradientColorKeyArray1Iterator& operator++(); + bool operator!=(const UnityEngineGradientColorKeyArray1Iterator& other); + UnityEngine::GradientColorKey operator*(); + }; +} + +namespace System +{ + Plugin::UnityEngineGradientColorKeyArray1Iterator begin(System::Array1& array); + Plugin::UnityEngineGradientColorKeyArray1Iterator end(System::Array1& array); +} + namespace System { struct Action : virtual System::Object { - Action(decltype(nullptr) n); + Action(decltype(nullptr)); Action(Plugin::InternalUse iu, int32_t handle); Action(const Action& other); Action(Action&& other); virtual ~Action(); Action& operator=(const Action& other); - Action& operator=(decltype(nullptr) other); + Action& operator=(decltype(nullptr)); Action& operator=(Action&& other); bool operator==(const Action& other) const; bool operator!=(const Action& other) const; @@ -4102,13 +4882,13 @@ namespace System { template<> struct Action1 : virtual System::Object { - Action1(decltype(nullptr) n); + 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) other); + Action1& operator=(decltype(nullptr)); Action1& operator=(Action1&& other); bool operator==(const Action1& other) const; bool operator!=(const Action1& other) const; @@ -4126,13 +4906,13 @@ namespace System { template<> struct Action2 : virtual System::Object { - Action2(decltype(nullptr) n); + 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) other); + Action2& operator=(decltype(nullptr)); Action2& operator=(Action2&& other); bool operator==(const Action2& other) const; bool operator!=(const Action2& other) const; @@ -4150,13 +4930,13 @@ namespace System { template<> struct Func3 : virtual System::Object { - Func3(decltype(nullptr) n); + 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) other); + Func3& operator=(decltype(nullptr)); Func3& operator=(Func3&& other); bool operator==(const Func3& other) const; bool operator!=(const Func3& other) const; @@ -4174,13 +4954,13 @@ namespace System { template<> struct Func3 : virtual System::Object { - Func3(decltype(nullptr) n); + 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) other); + Func3& operator=(decltype(nullptr)); Func3& operator=(Func3&& other); bool operator==(const Func3& other) const; bool operator!=(const Func3& other) const; @@ -4198,13 +4978,13 @@ namespace System { struct AppDomainInitializer : virtual System::Object { - AppDomainInitializer(decltype(nullptr) n); + AppDomainInitializer(decltype(nullptr)); AppDomainInitializer(Plugin::InternalUse iu, int32_t handle); AppDomainInitializer(const AppDomainInitializer& other); AppDomainInitializer(AppDomainInitializer&& other); virtual ~AppDomainInitializer(); AppDomainInitializer& operator=(const AppDomainInitializer& other); - AppDomainInitializer& operator=(decltype(nullptr) other); + AppDomainInitializer& operator=(decltype(nullptr)); AppDomainInitializer& operator=(AppDomainInitializer&& other); bool operator==(const AppDomainInitializer& other) const; bool operator!=(const AppDomainInitializer& other) const; @@ -4224,13 +5004,13 @@ namespace UnityEngine { struct UnityAction : virtual System::Object { - UnityAction(decltype(nullptr) n); + UnityAction(decltype(nullptr)); UnityAction(Plugin::InternalUse iu, int32_t handle); UnityAction(const UnityAction& other); UnityAction(UnityAction&& other); virtual ~UnityAction(); UnityAction& operator=(const UnityAction& other); - UnityAction& operator=(decltype(nullptr) other); + UnityAction& operator=(decltype(nullptr)); UnityAction& operator=(UnityAction&& other); bool operator==(const UnityAction& other) const; bool operator!=(const UnityAction& other) const; @@ -4251,13 +5031,13 @@ namespace UnityEngine { template<> struct UnityAction2 : virtual System::Object { - UnityAction2(decltype(nullptr) n); + UnityAction2(decltype(nullptr)); UnityAction2(Plugin::InternalUse iu, int32_t handle); UnityAction2(const UnityAction2& other); UnityAction2(UnityAction2&& other); virtual ~UnityAction2(); UnityAction2& operator=(const UnityAction2& other); - UnityAction2& operator=(decltype(nullptr) other); + UnityAction2& operator=(decltype(nullptr)); UnityAction2& operator=(UnityAction2&& other); bool operator==(const UnityAction2& other) const; bool operator!=(const UnityAction2& other) const; @@ -4280,13 +5060,13 @@ namespace System { struct ComponentEventHandler : virtual System::Object { - ComponentEventHandler(decltype(nullptr) n); + ComponentEventHandler(decltype(nullptr)); ComponentEventHandler(Plugin::InternalUse iu, int32_t handle); ComponentEventHandler(const ComponentEventHandler& other); ComponentEventHandler(ComponentEventHandler&& other); virtual ~ComponentEventHandler(); ComponentEventHandler& operator=(const ComponentEventHandler& other); - ComponentEventHandler& operator=(decltype(nullptr) other); + ComponentEventHandler& operator=(decltype(nullptr)); ComponentEventHandler& operator=(ComponentEventHandler&& other); bool operator==(const ComponentEventHandler& other) const; bool operator!=(const ComponentEventHandler& other) const; @@ -4310,13 +5090,13 @@ namespace System { struct ComponentChangingEventHandler : virtual System::Object { - ComponentChangingEventHandler(decltype(nullptr) n); + ComponentChangingEventHandler(decltype(nullptr)); ComponentChangingEventHandler(Plugin::InternalUse iu, int32_t handle); ComponentChangingEventHandler(const ComponentChangingEventHandler& other); ComponentChangingEventHandler(ComponentChangingEventHandler&& other); virtual ~ComponentChangingEventHandler(); ComponentChangingEventHandler& operator=(const ComponentChangingEventHandler& other); - ComponentChangingEventHandler& operator=(decltype(nullptr) other); + ComponentChangingEventHandler& operator=(decltype(nullptr)); ComponentChangingEventHandler& operator=(ComponentChangingEventHandler&& other); bool operator==(const ComponentChangingEventHandler& other) const; bool operator!=(const ComponentChangingEventHandler& other) const; @@ -4340,13 +5120,13 @@ namespace System { struct ComponentChangedEventHandler : virtual System::Object { - ComponentChangedEventHandler(decltype(nullptr) n); + ComponentChangedEventHandler(decltype(nullptr)); ComponentChangedEventHandler(Plugin::InternalUse iu, int32_t handle); ComponentChangedEventHandler(const ComponentChangedEventHandler& other); ComponentChangedEventHandler(ComponentChangedEventHandler&& other); virtual ~ComponentChangedEventHandler(); ComponentChangedEventHandler& operator=(const ComponentChangedEventHandler& other); - ComponentChangedEventHandler& operator=(decltype(nullptr) other); + ComponentChangedEventHandler& operator=(decltype(nullptr)); ComponentChangedEventHandler& operator=(ComponentChangedEventHandler&& other); bool operator==(const ComponentChangedEventHandler& other) const; bool operator!=(const ComponentChangedEventHandler& other) const; @@ -4370,13 +5150,13 @@ namespace System { struct ComponentRenameEventHandler : virtual System::Object { - ComponentRenameEventHandler(decltype(nullptr) n); + ComponentRenameEventHandler(decltype(nullptr)); ComponentRenameEventHandler(Plugin::InternalUse iu, int32_t handle); ComponentRenameEventHandler(const ComponentRenameEventHandler& other); ComponentRenameEventHandler(ComponentRenameEventHandler&& other); virtual ~ComponentRenameEventHandler(); ComponentRenameEventHandler& operator=(const ComponentRenameEventHandler& other); - ComponentRenameEventHandler& operator=(decltype(nullptr) other); + ComponentRenameEventHandler& operator=(decltype(nullptr)); ComponentRenameEventHandler& operator=(ComponentRenameEventHandler&& other); bool operator==(const ComponentRenameEventHandler& other) const; bool operator!=(const ComponentRenameEventHandler& other) const; @@ -4392,3 +5172,30 @@ namespace System } } /*END TYPE DEFINITIONS*/ + +//////////////////////////////////////////////////////////////// +// Support for using IEnumerable with range for loops +//////////////////////////////////////////////////////////////// + +namespace Plugin +{ + struct EnumerableIterator + { + System::Collections::IEnumerator enumerator; + bool hasMore; + EnumerableIterator(decltype(nullptr)); + EnumerableIterator(System::Collections::IEnumerable& enumerable); + EnumerableIterator& operator++(); + bool operator!=(const EnumerableIterator& other); + System::Object operator*(); + }; +} + +namespace System +{ + namespace Collections + { + Plugin::EnumerableIterator begin(IEnumerable& enumerable); + Plugin::EnumerableIterator end(IEnumerable& enumerable); + } +} From a04c1904b5eeffe46f993678e6b9ba88f697729d Mon Sep 17 00:00:00 2001 From: Jackson Dunstan Date: Sat, 3 Feb 2018 09:56:29 -0800 Subject: [PATCH 25/65] 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 26/65] 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 27/65] 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 28/65] 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 29/65] 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 30/65] 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 31/65] 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 32/65] 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 33/65] 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 34/65] 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 35/65] 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 36/65] 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 37/65] 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 38/65] 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 39/65] 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 40/65] 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 41/65] 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 42/65] - 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 43/65] 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 44/65] 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 45/65] 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 46/65] 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 47/65] 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 48/65] [#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 49/65] [#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 50/65] [#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 51/65] [#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 52/65] [#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 53/65] [#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 54/65] [#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 55/65] 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 56/65] 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 57/65] 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 58/65] 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 59/65] 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 60/65] 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 61/65] 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 62/65] 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 63/65] 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 64/65] 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 65/65] 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,