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_Application_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.Application); args = new Type[] {typeof(System.Int32)}; method = type.GetMethod("Quit", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Quit_0); args = new Type[] { }; method = type.GetMethod("Quit", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Quit_1); args = new Type[] { }; method = type.GetMethod("Unload", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Unload_2); args = new Type[] { }; method = type.GetMethod("get_dataPath", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_dataPath_15); args = new Type[] { }; method = type.GetMethod("get_streamingAssetsPath", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_streamingAssetsPath_16); args = new Type[] { }; method = type.GetMethod("get_persistentDataPath", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_persistentDataPath_17); args = new Type[] { }; method = type.GetMethod("get_temporaryCachePath", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_temporaryCachePath_18); args = new Type[] { }; method = type.GetMethod("get_absoluteURL", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_absoluteURL_19); args = new Type[] {typeof(System.String)}; method = type.GetMethod("OpenURL", flag, null, args, null); app.RegisterCLRMethodRedirection(method, OpenURL_30); args = new Type[] {typeof(UnityEngine.UserAuthorization)}; method = type.GetMethod("RequestUserAuthorization", flag, null, args, null); app.RegisterCLRMethodRedirection(method, RequestUserAuthorization_40); args = new Type[] {typeof(UnityEngine.UserAuthorization)}; method = type.GetMethod("HasUserAuthorization", flag, null, args, null); app.RegisterCLRMethodRedirection(method, HasUserAuthorization_41); args = new Type[] { }; method = type.GetMethod("get_systemLanguage", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_systemLanguage_45); args = new Type[] { }; method = type.GetMethod("get_internetReachability", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_internetReachability_46); app.RegisterCLRCreateDefaultInstance(type, () => new UnityEngine.Application()); app.RegisterCLRCreateArrayInstance(type, s => new UnityEngine.Application[s]); args = new Type[] { }; method = type.GetMethod("get_isEditor", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_isEditor_0); args = new Type[] { }; method = type.GetMethod("get_isPlaying", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_isPlaying_1); args = new Type[] { }; method = type.GetMethod("get_isMobilePlatform", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_isMobilePlatform_2); args = new Type[] { }; method = type.GetMethod("get_platform", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_platform_4); args = new Type[] { }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_0); } static StackObject* get_isEditor_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 = UnityEngine.Application.isEditor; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_isPlaying_1(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 = UnityEngine.Application.isPlaying; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_isMobilePlatform_2(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 = UnityEngine.Application.isMobilePlatform; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_systemLanguage_3(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 = UnityEngine.Application.systemLanguage; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_platform_4(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 = UnityEngine.Application.platform; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Quit_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); System.Int32 @exitCode = ptr_of_this_method->Value; UnityEngine.Application.Quit(@exitCode); return __ret; } static StackObject* Quit_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); UnityEngine.Application.Quit(); return __ret; } static StackObject* Unload_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); UnityEngine.Application.Unload(); return __ret; } static StackObject* CanStreamedLevelBeLoaded_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 @levelIndex = ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Application.CanStreamedLevelBeLoaded(@levelIndex); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* CanStreamedLevelBeLoaded_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @levelName = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.Application.CanStreamedLevelBeLoaded(@levelName); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_isPlaying_5(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 = UnityEngine.Application.isPlaying; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* IsPlaying_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Object @obj = (UnityEngine.Object) typeof(UnityEngine.Object).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.Application.IsPlaying(@obj); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_isFocused_7(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 = UnityEngine.Application.isFocused; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* GetBuildTags_8(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 = UnityEngine.Application.GetBuildTags(); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* SetBuildTags_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String[] @buildTags = (System.String[]) typeof(System.String[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); UnityEngine.Application.SetBuildTags(@buildTags); return __ret; } static StackObject* get_buildGUID_10(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 = UnityEngine.Application.buildGUID; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_runInBackground_11(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 = UnityEngine.Application.runInBackground; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* set_runInBackground_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @value = ptr_of_this_method->Value == 1; UnityEngine.Application.runInBackground = value; return __ret; } static StackObject* HasProLicense_13(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 = UnityEngine.Application.HasProLicense(); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_isBatchMode_14(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 = UnityEngine.Application.isBatchMode; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_dataPath_15(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 = UnityEngine.Application.dataPath; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_streamingAssetsPath_16(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 = UnityEngine.Application.streamingAssetsPath; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_persistentDataPath_17(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 = UnityEngine.Application.persistentDataPath; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_temporaryCachePath_18(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 = UnityEngine.Application.temporaryCachePath; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_absoluteURL_19(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 = UnityEngine.Application.absoluteURL; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* OpenURL_30(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.String @url = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); UnityEngine.Application.OpenURL(@url); return __ret; } static StackObject* RequestUserAuthorization_40(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.UserAuthorization @mode = (UnityEngine.UserAuthorization) typeof(UnityEngine.UserAuthorization).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.Application.RequestUserAuthorization(@mode); object obj_result_of_this_method = result_of_this_method; if (obj_result_of_this_method is CrossBindingAdaptorType) { return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType) obj_result_of_this_method).ILInstance); } return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* HasUserAuthorization_41(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.UserAuthorization @mode = (UnityEngine.UserAuthorization) typeof(UnityEngine.UserAuthorization).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = UnityEngine.Application.HasUserAuthorization(@mode); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return __ret + 1; } static StackObject* get_systemLanguage_45(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 = UnityEngine.Application.systemLanguage; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_internetReachability_46(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 = UnityEngine.Application.internetReachability; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } 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.Application(); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }