using System; using System.Collections.Generic; using System.Reflection; using System.Runtime.InteropServices; using UnityFusion.CLR.TypeSystem; using UnityFusion.CLR.Method; using UnityFusion.Runtime.Enviorment; using UnityFusion.Runtime.Intepreter; using UnityFusion.Runtime.Stack; using UnityFusion.Reflection; using UnityFusion.CLR.Utils; #if DEBUG && !DISABLE_UNITYFUSION_DEBUG using AutoList = System.Collections.Generic.List; #else using AutoList = UnityFusion.Other.UncheckedList; #endif namespace UnityFusion.Runtime.Generated { unsafe class UnityEngine_MonoBehaviour_Binding { public static void Register(UnityFusion.Runtime.Enviorment.AppDomain app) { BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; MethodBase method; Type[] args; Type type = typeof(UnityEngine.MonoBehaviour); args = new Type[] { }; method = type.GetMethod("get_destroyCancellationToken", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_destroyCancellationToken_0); args = new Type[] { }; method = type.GetMethod("IsInvoking", flag, null, args, null); app.RegisterCLRMethodRedirection(method, IsInvoking_1); args = new Type[] { }; method = type.GetMethod("CancelInvoke", flag, null, args, null); app.RegisterCLRMethodRedirection(method, CancelInvoke_2); args = new Type[] {typeof(System.String), typeof(System.Single)}; method = type.GetMethod("Invoke", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Invoke_3); args = new Type[] {typeof(System.String), typeof(System.Single), typeof(System.Single)}; method = type.GetMethod("InvokeRepeating", flag, null, args, null); app.RegisterCLRMethodRedirection(method, InvokeRepeating_4); args = new Type[] {typeof(System.String)}; method = type.GetMethod("CancelInvoke", flag, null, args, null); app.RegisterCLRMethodRedirection(method, CancelInvoke_5); args = new Type[] {typeof(System.String)}; method = type.GetMethod("IsInvoking", flag, null, args, null); app.RegisterCLRMethodRedirection(method, IsInvoking_6); args = new Type[] {typeof(System.String)}; method = type.GetMethod("StartCoroutine", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StartCoroutine_7); args = new Type[] {typeof(System.String), typeof(System.Object)}; method = type.GetMethod("StartCoroutine", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StartCoroutine_8); args = new Type[] {typeof(System.Collections.IEnumerator)}; method = type.GetMethod("StartCoroutine", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StartCoroutine_9); args = new Type[] {typeof(System.Collections.IEnumerator)}; method = type.GetMethod("StopCoroutine", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StopCoroutine_10); args = new Type[] {typeof(UnityEngine.Coroutine)}; method = type.GetMethod("StopCoroutine", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StopCoroutine_11); args = new Type[] {typeof(System.String)}; method = type.GetMethod("StopCoroutine", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StopCoroutine_12); args = new Type[] { }; method = type.GetMethod("StopAllCoroutines", flag, null, args, null); app.RegisterCLRMethodRedirection(method, StopAllCoroutines_13); args = new Type[] { }; method = type.GetMethod("get_useGUILayout", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_useGUILayout_14); args = new Type[] {typeof(System.Boolean)}; method = type.GetMethod("set_useGUILayout", flag, null, args, null); app.RegisterCLRMethodRedirection(method, set_useGUILayout_15); args = new Type[] {typeof(System.Object)}; method = type.GetMethod("print", flag, null, args, null); app.RegisterCLRMethodRedirection(method, print_18); app.RegisterCLRCreateDefaultInstance(type, () => new UnityEngine.MonoBehaviour()); app.RegisterCLRCreateArrayInstance(type, s => new UnityEngine.MonoBehaviour[s]); args = new Type[] { }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_0); } static StackObject* get_destroyCancellationToken_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.destroyCancellationToken; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* IsInvoking_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.IsInvoking(); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* CancelInvoke_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.CancelInvoke(); return __ret; } static StackObject* Invoke_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @time = *(float*) &ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.Invoke(@methodName, @time); return __ret; } static StackObject* InvokeRepeating_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @repeatRate = *(float*) &ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single @time = *(float*) &ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 4); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.InvokeRepeating(@methodName, @time, @repeatRate); return __ret; } static StackObject* CancelInvoke_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.CancelInvoke(@methodName); return __ret; } static StackObject* IsInvoking_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.IsInvoking(@methodName); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* StartCoroutine_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.StartCoroutine(@methodName); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* StartCoroutine_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @value = (System.Object) typeof(System.Object).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.StartCoroutine(@methodName, @value); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* StartCoroutine_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Collections.IEnumerator @routine = (System.Collections.IEnumerator) typeof(System.Collections.IEnumerator).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.StartCoroutine(@routine); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* StopCoroutine_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Collections.IEnumerator @routine = (System.Collections.IEnumerator) typeof(System.Collections.IEnumerator).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.StopCoroutine(@routine); return __ret; } static StackObject* StopCoroutine_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Coroutine @routine = (UnityEngine.Coroutine) typeof(UnityEngine.Coroutine).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.StopCoroutine(@routine); return __ret; } static StackObject* StopCoroutine_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @methodName = (System.String) typeof(System.String).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.StopCoroutine(@methodName); return __ret; } static StackObject* StopAllCoroutines_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.StopAllCoroutines(); return __ret; } static StackObject* get_useGUILayout_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.useGUILayout; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* set_useGUILayout_15(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @value = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.MonoBehaviour instance_of_this_method = (UnityEngine.MonoBehaviour) typeof(UnityEngine.MonoBehaviour).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.useGUILayout = value; return __ret; } static StackObject* print_18(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @message = (System.Object) typeof(System.Object).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var tmp_Stacktrace = __domain.DebugService.GetStackTrace(__intp); UnityEngine.MonoBehaviour.print($"{message}\r\nUnityFusion StackTrace\n{tmp_Stacktrace}"); return __ret; } static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = new UnityEngine.MonoBehaviour(); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }