Beispiel #1
0
 public override void Apply(MeshCombiner.GenerateUV2Delegate uv2GenerationMethod)
 {
     for (int i = 0; i < meshCombiners.Count; i++)
     {
         if (meshCombiners[i].isDirty)
         {
             meshCombiners[i].combinedMesh.Apply(uv2GenerationMethod);
             meshCombiners[i].isDirty = false;
         }
     }
 }
Beispiel #2
0
 public override void Apply(bool triangles, bool vertices, bool normals, bool tangents,
                            bool uvs, bool uv2, bool uv3, bool uv4,
                            bool colors, bool bones = false, bool blendShapesFlag = false,
                            MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
 {
     for (int i = 0; i < meshCombiners.Count; i++)
     {
         if (meshCombiners[i].isDirty)
         {
             meshCombiners[i].combinedMesh.Apply(triangles, vertices, normals, tangents, uvs, uv2, uv3, uv4, colors, bones, blendShapesFlag, uv2GenerationMethod);
             meshCombiners[i].isDirty = false;
         }
     }
 }
Beispiel #3
0
 /// <summary>
 /// Applys the changes to flagged properties of the mesh. This method is slow, and should only be called once per frame. The speed is directly proportional to the number of flags that are true. Only apply necessary properties.
 /// </summary>
 public virtual void Apply(bool triangles,
                           bool vertices,
                           bool normals,
                           bool tangents,
                           bool uvs,
                           bool uv2,
                           bool uv3,
                           bool uv4,
                           bool colors,
                           bool bones           = false,
                           bool blendShapesFlag = false,
                           MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
 {
     meshCombiner.name = name + "-mesh";
     meshCombiner.Apply(triangles, vertices, normals, tangents, uvs, uv2, uv3, uv4, colors, bones, blendShapesFlag, uv2GenerationMethod);
 }
Beispiel #4
0
 /// <summary>
 /// Apply changes to the mesh. All channels set in this instance will be set in the combined mesh.
 /// </summary>
 public virtual void Apply(MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
 {
     meshCombiner.name = name + "-mesh";
     meshCombiner.Apply(uv2GenerationMethod);
 }