mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2025-07-08 01:06:07 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
05b4ea9f80 | |||
0933abdace | |||
5d112a2ced | |||
650600fac3 | |||
b2ccdb2273 |
@ -109,8 +109,11 @@ namespace MA_TextureAtlasserPro
|
|||||||
}
|
}
|
||||||
|
|
||||||
SerializedProperty meshesSP = modelGroupsSP.GetArrayElementAtIndex(i).FindPropertyRelative("meshes");
|
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));
|
EditorGUILayout.PropertyField(meshesSP, false, GUILayout.ExpandWidth(false), GUILayout.MaxWidth(editorViewRect.width * 0.5f));
|
||||||
|
#endif
|
||||||
if (meshesSP.isExpanded)
|
if (meshesSP.isExpanded)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < curWindow.textureAtlas.selectedTextureQuad.modelGroups[i].meshes.Count; j++)
|
for (int j = 0; j < curWindow.textureAtlas.selectedTextureQuad.modelGroups[i].meshes.Count; j++)
|
||||||
|
@ -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));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user