mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2024-11-24 22:45:52 +01:00
Copy over all UV channels.
The duplicate function now copies all 8 UV channels. So your lightmap UV's don't get lost!
This commit is contained in:
parent
df16ba6c05
commit
b2ccdb2273
54
.vscode/launch.json
vendored
Normal file
54
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Unity Editor",
|
||||||
|
"type": "unity",
|
||||||
|
"path": "/D:/PerforceMax/Projects/Unity/MA_TextureAtlasser/Library/EditorInstance.json",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Windows Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "OSX Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Linux Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "iOS Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Android Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Xbox One Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PS4 Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SwitchPlayer",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "launch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -84,7 +84,12 @@ namespace MA_Mesh
|
|||||||
newMesh.SetTriangles(mesh.GetTriangles(i), i);
|
newMesh.SetTriangles(mesh.GetTriangles(i), i);
|
||||||
}
|
}
|
||||||
newMesh.SetNormals(new List<Vector3>(mesh.normals));
|
newMesh.SetNormals(new List<Vector3>(mesh.normals));
|
||||||
newMesh.SetUVs(0, new List<Vector2>(mesh.uv));
|
for (int i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
List<Vector2> uvs = new List<Vector2>();
|
||||||
|
mesh.GetUVs(i, uvs);
|
||||||
|
newMesh.SetUVs(i, uvs);
|
||||||
|
}
|
||||||
newMesh.SetTangents(new List<Vector4>(mesh.tangents));
|
newMesh.SetTangents(new List<Vector4>(mesh.tangents));
|
||||||
newMesh.SetColors(new List<Color>(mesh.colors));
|
newMesh.SetColors(new List<Color>(mesh.colors));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user