using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using UnityEngine; 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_Texture2D_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.Texture2D); args = new Type[] {typeof(System.Byte[])}; method = type.GetMethod("LoadRawTextureData", flag, null, args, null); app.RegisterCLRMethodRedirection(method, LoadRawTextureData_0); args = new Type[] { }; method = type.GetMethod("Apply", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Apply_1); args = new Type[] {typeof(System.Int32), typeof(System.Int32)}; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_0); args = new Type[] {typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.TextureFormat), typeof(System.Boolean)}; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_1); args = new Type[] { typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.Experimental.Rendering.DefaultFormat), typeof(UnityEngine.Experimental.Rendering.TextureCreationFlags) }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_2); args = new Type[] { typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.Experimental.Rendering.GraphicsFormat), typeof(UnityEngine.Experimental.Rendering.TextureCreationFlags) }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_3); args = new Type[] { typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.TextureFormat), typeof(System.Boolean), typeof(System.Boolean) }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_4); args = new Type[] { typeof(System.Int32), typeof(System.Int32), typeof(UnityEngine.Experimental.Rendering.DefaultFormat), typeof(System.Int32), typeof(System.String), typeof(UnityEngine.Experimental.Rendering.TextureCreationFlags) }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_5); } static StackObject* LoadRawTextureData_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, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Byte[] @data = (System.Byte[]) typeof(System.Byte[]).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.Texture2D instance_of_this_method = (UnityEngine.Texture2D) typeof(UnityEngine.Texture2D).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.LoadRawTextureData(@data); return __ret; } static StackObject* Apply_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.Texture2D instance_of_this_method = (UnityEngine.Texture2D) typeof(UnityEngine.Texture2D).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.Apply(); return __ret; } static StackObject* Ctor_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, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 @height = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Int32 @width = ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Texture2D(@width, @height); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Ctor_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, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @mipChain = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.TextureFormat @textureFormat = (UnityEngine.TextureFormat) typeof(UnityEngine.TextureFormat).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32 @height = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @width = ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Texture2D(@width, @height, @textureFormat, @mipChain); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Ctor_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, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Experimental.Rendering.TextureCreationFlags @flags = (UnityEngine.Experimental.Rendering.TextureCreationFlags) typeof(UnityEngine.Experimental.Rendering.TextureCreationFlags).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Experimental.Rendering.DefaultFormat @format = (UnityEngine.Experimental.Rendering.DefaultFormat) typeof(UnityEngine.Experimental.Rendering.DefaultFormat).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32 @height = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @width = ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Texture2D(@width, @height, @format, @flags); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Ctor_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, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Experimental.Rendering.TextureCreationFlags @flags = (UnityEngine.Experimental.Rendering.TextureCreationFlags) typeof(UnityEngine.Experimental.Rendering.TextureCreationFlags).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Experimental.Rendering.GraphicsFormat @format = (UnityEngine.Experimental.Rendering.GraphicsFormat) typeof(UnityEngine.Experimental.Rendering.GraphicsFormat).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32 @height = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @width = ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Texture2D(@width, @height, @format, @flags); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Ctor_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, 5); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @linear = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Boolean @mipChain = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.TextureFormat @textureFormat = (UnityEngine.TextureFormat) typeof(UnityEngine.TextureFormat).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32 @height = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.Int32 @width = ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Texture2D(@width, @height, @textureFormat, @mipChain, @linear); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Ctor_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, 6); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Experimental.Rendering.TextureCreationFlags @flags = (UnityEngine.Experimental.Rendering.TextureCreationFlags) typeof(UnityEngine.Experimental.Rendering.TextureCreationFlags).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @mipmapLimitGroupName = (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); System.Int32 @mipCount = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); UnityEngine.Experimental.Rendering.DefaultFormat @format = (UnityEngine.Experimental.Rendering.DefaultFormat) typeof(UnityEngine.Experimental.Rendering.DefaultFormat).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.Int32 @height = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 6); System.Int32 @width = ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Texture2D(@width, @height, @format, @mipCount, @mipmapLimitGroupName, @flags); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }