Exemplo n.º 1
0
        public static void GeneratePlane(this PreparedMesh pMesh, Vector2 size, int quadsX, int quadsY, bool centerX, bool centerY)
        {
            Vector3[] verts;
            int[]     indices;
            GeneratePlane(out verts, out indices, size, quadsX, quadsY, centerX, centerY);

            pMesh.vertices = verts;
            pMesh.indices  = indices;
            pMesh.topology = MeshTopology.Triangles;
        }
Exemplo n.º 2
0
 private void Init()
 {
     filter                = GetComponent <MeshFilter>();
     meshCol               = GetComponent <MeshCollider>();
     mesh                  = filter.mesh;
     prepMesh              = mesh.CreatePreparedMesh();
     meshRenderer          = GetComponent <MeshRenderer>();
     meshRenderer.material = new Material(generator.terrainMat);
     InitEdgeSeamsFixed();
     UpdateAdjacents();
 }
Exemplo n.º 3
0
 public static void GeneratePlane(this PreparedMesh pMesh, Vector2 size, int quadsX, int quadsY)
 {
     pMesh.GeneratePlane(size, quadsX, quadsY, false, false);
 }