using System; using System.Collections.Generic; using System.Linq; 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_Mesh_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.Mesh); args = new Type[] { }; method = type.GetMethod("get_triangles", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_triangles_0); args = new Type[] { }; method = type.GetMethod("get_vertices", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_vertices_1); args = new Type[] { }; method = type.GetMethod("get_normals", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_normals_2); args = new Type[] { }; method = type.GetMethod("get_uv", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_uv_3); args = new Type[] {typeof(UnityEngine.Vector3[])}; method = type.GetMethod("set_vertices", flag, null, args, null); app.RegisterCLRMethodRedirection(method, set_vertices_4); args = new Type[] {typeof(System.Int32[])}; method = type.GetMethod("set_triangles", flag, null, args, null); app.RegisterCLRMethodRedirection(method, set_triangles_5); args = new Type[] {typeof(UnityEngine.Vector2[])}; method = type.GetMethod("set_uv", flag, null, args, null); app.RegisterCLRMethodRedirection(method, set_uv_6); args = new Type[] {typeof(UnityEngine.Color[])}; method = type.GetMethod("set_colors", flag, null, args, null); app.RegisterCLRMethodRedirection(method, set_colors_7); args = new Type[] { }; method = type.GetMethod("RecalculateNormals", flag, null, args, null); app.RegisterCLRMethodRedirection(method, RecalculateNormals_8); args = new Type[] { }; method = type.GetMethod("RecalculateBounds", flag, null, args, null); app.RegisterCLRMethodRedirection(method, RecalculateBounds_9); args = new Type[] { }; method = type.GetMethod("Optimize", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Optimize_10); args = new Type[] { }; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_0); } static StackObject* get_triangles_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.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.triangles; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_vertices_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.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.vertices; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_normals_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.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.normals; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_uv_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); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.uv; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* set_vertices_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, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Vector3[] @value = (UnityEngine.Vector3[]) typeof(UnityEngine.Vector3[]).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.vertices = value; return __ret; } static StackObject* set_triangles_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.Int32[] @value = (System.Int32[]) typeof(System.Int32[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.triangles = value; return __ret; } static StackObject* set_uv_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); UnityEngine.Vector2[] @value = (UnityEngine.Vector2[]) typeof(UnityEngine.Vector2[]).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.uv = value; return __ret; } static StackObject* set_colors_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); UnityEngine.Color[] @value = (UnityEngine.Color[]) typeof(UnityEngine.Color[]).CheckCLRTypes( StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.colors = value; return __ret; } static StackObject* RecalculateNormals_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.RecalculateNormals(); return __ret; } static StackObject* RecalculateBounds_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); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.RecalculateBounds(); return __ret; } static StackObject* Optimize_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Mesh instance_of_this_method = (UnityEngine.Mesh) typeof(UnityEngine.Mesh).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.Optimize(); 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.Mesh(); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }