/// <summary> /// Apply changes to the mesh. All channels set in this instance will be set in the combined mesh. /// </summary> public virtual void Apply(MB3_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod=null) { meshCombiner.name = name + "-mesh"; meshCombiner.Apply(uv2GenerationMethod); }
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, MB3_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,uv2GenerationMethod); meshCombiners[i].isDirty = false; } } }
/// <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 colors, bool uv1, bool uv2, bool bones=false, MB3_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod=null) { meshCombiner.name = name + "-mesh"; meshCombiner.Apply(triangles,vertices,normals,tangents,uvs,colors,uv1,uv2,bones,uv2GenerationMethod); }
public override void Apply(MB3_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod){ for (int i = 0; i < meshCombiners.Count; i++){ if (meshCombiners[i].isDirty){ meshCombiners[i].combinedMesh.Apply(uv2GenerationMethod); meshCombiners[i].isDirty = false; } } }