Exemplo n.º 1
0
    public void UpdateVerts()
    {
        List <Vector3> v3 = new List <Vector3> ();

        foreach (GameObject v in verts)
        {
            v3.Add(v.transform.position);
        }
        meshPrimitive.SetVerts(v3.ToArray());
    }
Exemplo n.º 2
0
    public void SetVerts(Vector3[] v3)
    {
        verts = new List <GameObject> ();

        foreach (Vector3 v in v3)
        {
            AddVerts(v);
        }

        meshPrimitive = new MeshPrimitive();
        meshPrimitive.gameObject.transform.parent = gameObject.transform;

        meshPrimitive.SetVerts(v3);
    }