public void GenerateMesh(Pair2D pair) { List <Mesh2DTriangle> trianglesList = new List <Mesh2DTriangle>(); trianglesList.Add(Max2DMesh.CreateLineNew(pair, lineWidth, transform.position.z + lineOffset)); mesh = Max2DMesh.ExportMesh2(trianglesList); }
public void Draw(Pair2D pair) { List <Mesh2DTriangle> trianglesList = new List <Mesh2DTriangle>(); trianglesList.Add(Max2DMesh.CreateLineNew(pair, lineWidth, transform.position.z + lineOffset)); Mesh mesh = Max2DMesh.ExportMesh(trianglesList); if (customColor) { material.SetColor("_Emission", color); Max2DMesh.Draw(mesh, material); } else { Max2DMesh.Draw(mesh, Max2D.lineMaterial); } }