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