static public int SetVertices(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 2) { UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l); System.Collections.Generic.List <UnityEngine.UIVertex> a1; checkType(l, 2, out a1); self.SetVertices(a1); pushValue(l, true); return(1); } else if (argc == 3) { UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l); UnityEngine.UIVertex[] a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); self.SetVertices(a1, a2); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public void UpdateMesh() { gameObject.SetActive(true); if (buffer.vertices == null || buffer.vertices.Length / 4 != rectangleCount) { buffer.Alloc(rectangleCount); } else { buffer.index = 0; } for (int i = 0; i < rendererCount; ++i) { renderers[i].UpdateMesh(buffer); } buffer.initialized = false; if (buffer.modified) { buffer.modified = false; canvasRenderer.SetVertices(buffer.vertices, rectangleCount * 4); } if (property != null) { property.AddColor(additionalColorId, additionalColor); //meshRenderer.SetPropertyBlock(property); } }
static public int SetVertices(IntPtr l) { try{ if (matchType(l, 2, typeof(UnityEngine.UIVertex[]), typeof(int))) { UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l); UnityEngine.UIVertex[] a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); self.SetVertices(a1, a2); return(0); } LuaDLL.luaL_error(l, "No matched override function to call"); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }