public void AddUIVertexTriangleStream(List <UIVertex> verts) { if (verts != null) { CanvasRenderer.SplitUIVertexStreams(verts, m_Positions, m_Colors, m_Uv0S, m_Uv1S, m_Normals, m_Tangents, m_Indices); } }
/// <summary> /// Add a list of triangles to the stream. /// </summary> /// <param name="verts">Vertices to add. Length should be divisible by 3.</param> public void AddUIVertexTriangleStream(List <UIVertex> verts) { if (verts == null) { return; } InitializeListIfRequired(); CanvasRenderer.SplitUIVertexStreams(verts, m_Positions, m_Colors, m_Uv0S, m_Uv1S, m_Uv2S, m_Uv3S, m_Normals, m_Tangents, m_Indices); }
public static int SplitUIVertexStreams_s(IntPtr l) { int result; try { int num = LuaDLL.lua_gettop(l); if (num == 8) { List <UIVertex> verts; LuaObject.checkType <List <UIVertex> >(l, 1, out verts); List <Vector3> positions; LuaObject.checkType <List <Vector3> >(l, 2, out positions); List <Color32> colors; LuaObject.checkType <List <Color32> >(l, 3, out colors); List <Vector2> uv0S; LuaObject.checkType <List <Vector2> >(l, 4, out uv0S); List <Vector2> uv1S; LuaObject.checkType <List <Vector2> >(l, 5, out uv1S); List <Vector3> normals; LuaObject.checkType <List <Vector3> >(l, 6, out normals); List <Vector4> tangents; LuaObject.checkType <List <Vector4> >(l, 7, out tangents); List <int> indices; LuaObject.checkType <List <int> >(l, 8, out indices); CanvasRenderer.SplitUIVertexStreams(verts, positions, colors, uv0S, uv1S, normals, tangents, indices); LuaObject.pushValue(l, true); result = 1; } else if (num == 10) { List <UIVertex> verts2; LuaObject.checkType <List <UIVertex> >(l, 1, out verts2); List <Vector3> positions2; LuaObject.checkType <List <Vector3> >(l, 2, out positions2); List <Color32> colors2; LuaObject.checkType <List <Color32> >(l, 3, out colors2); List <Vector2> uv0S2; LuaObject.checkType <List <Vector2> >(l, 4, out uv0S2); List <Vector2> uv1S2; LuaObject.checkType <List <Vector2> >(l, 5, out uv1S2); List <Vector2> uv2S; LuaObject.checkType <List <Vector2> >(l, 6, out uv2S); List <Vector2> uv3S; LuaObject.checkType <List <Vector2> >(l, 7, out uv3S); List <Vector3> normals2; LuaObject.checkType <List <Vector3> >(l, 8, out normals2); List <Vector4> tangents2; LuaObject.checkType <List <Vector4> >(l, 9, out tangents2); List <int> indices2; LuaObject.checkType <List <int> >(l, 10, out indices2); CanvasRenderer.SplitUIVertexStreams(verts2, positions2, colors2, uv0S2, uv1S2, uv2S, uv3S, normals2, tangents2, indices2); LuaObject.pushValue(l, true); result = 1; } else { LuaObject.pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function SplitUIVertexStreams to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }