5 Commits
1.8.1 ... 1.8.4

Author SHA1 Message Date
max
05b4ea9f80 Update MA_TextureAtlasserProInspectorView.cs
Fix 2020.2+ mesh input fields.
2021-04-08 23:51:05 +02:00
max
0933abdace Update MA_TextureAtlasserProInspectorView.cs 2021-04-03 17:09:27 +02:00
max
5d112a2ced Update MA_TextureAtlasserProInspectorView.cs
Dirty fix for 2020.2+ versions with reordable list.
2021-04-02 17:31:24 +02:00
max
650600fac3 Delete launch.json 2021-03-26 11:42:54 +01:00
max
b2ccdb2273 Copy over all UV channels.
The duplicate function now copies all 8 UV channels. So your lightmap UV's don't get lost!
2021-03-26 11:41:19 +01:00
2 changed files with 47 additions and 39 deletions

View File

@ -109,8 +109,11 @@ namespace MA_TextureAtlasserPro
}
SerializedProperty meshesSP = modelGroupsSP.GetArrayElementAtIndex(i).FindPropertyRelative("meshes");
#if UNITY_2020_2_OR_NEWER
meshesSP.isExpanded = EditorGUILayout.Foldout(meshesSP.isExpanded, "Meshes", true);
#else
EditorGUILayout.PropertyField(meshesSP, false, GUILayout.ExpandWidth(false), GUILayout.MaxWidth(editorViewRect.width * 0.5f));
#endif
if (meshesSP.isExpanded)
{
for (int j = 0; j < curWindow.textureAtlas.selectedTextureQuad.modelGroups[i].meshes.Count; j++)

View File

@ -84,7 +84,12 @@ namespace MA_Mesh
newMesh.SetTriangles(mesh.GetTriangles(i), i);
}
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.SetColors(new List<Color>(mesh.colors));