mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2024-12-22 07:08:28 +01:00
Update MeshUtils, set colors after setting verticies.
Update MeshUtils, set colors after setting vertices, Unity will throw an error when there are more colors than vertices.
This commit is contained in:
parent
279edb1e0e
commit
947eb6f18e
@ -43,7 +43,6 @@ namespace MA_Mesh
|
||||
{
|
||||
name = mesh.name,
|
||||
bounds = mesh.bounds,
|
||||
colors = mesh.colors,
|
||||
subMeshCount = mesh.subMeshCount
|
||||
};
|
||||
|
||||
@ -55,6 +54,7 @@ namespace MA_Mesh
|
||||
newMesh.SetNormals(new List<Vector3>(mesh.normals));
|
||||
newMesh.SetUVs(0, new List<Vector2>(mesh.uv));
|
||||
newMesh.SetTangents(new List<Vector4>(mesh.tangents));
|
||||
newMesh.SetColors(new List<Color>(mesh.colors));
|
||||
|
||||
return newMesh;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user