mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2025-04-11 19:45:41 +02:00
Compare commits
No commits in common. "master" and "1.8.1" have entirely different histories.
@ -13,7 +13,6 @@ namespace MA_TextureAtlasserPro
|
|||||||
private MA_TextureAtlasserProQuad lastSelectedQuad;
|
private MA_TextureAtlasserProQuad lastSelectedQuad;
|
||||||
private bool isEditing = false;
|
private bool isEditing = false;
|
||||||
private GUIStyle labelStyle = new GUIStyle(GUI.skin.label);
|
private GUIStyle labelStyle = new GUIStyle(GUI.skin.label);
|
||||||
private Vector2 scrollPos = Vector2.zero;
|
|
||||||
|
|
||||||
public MA_TextureAtlasserProInspectorView(MA_TextureAtlasserProWindow currentEditorWindow, string title) : base(currentEditorWindow, title)
|
public MA_TextureAtlasserProInspectorView(MA_TextureAtlasserProWindow currentEditorWindow, string title) : base(currentEditorWindow, title)
|
||||||
{
|
{
|
||||||
@ -38,10 +37,6 @@ namespace MA_TextureAtlasserPro
|
|||||||
}
|
}
|
||||||
|
|
||||||
GUILayout.BeginArea(editorViewRect, EditorStyles.helpBox);
|
GUILayout.BeginArea(editorViewRect, EditorStyles.helpBox);
|
||||||
using (var scrollViewScope = new EditorGUILayout.ScrollViewScope(scrollPos, false, false))
|
|
||||||
{
|
|
||||||
scrollPos = scrollViewScope.scrollPosition;
|
|
||||||
|
|
||||||
GUILayout.BeginVertical(GUILayout.ExpandWidth(true));
|
GUILayout.BeginVertical(GUILayout.ExpandWidth(true));
|
||||||
|
|
||||||
GUILayout.Label("Quad Name");
|
GUILayout.Label("Quad Name");
|
||||||
@ -95,7 +90,6 @@ namespace MA_TextureAtlasserPro
|
|||||||
SerializedObject serializedObject = new SerializedObject(curWindow.textureAtlas.selectedTextureQuad);
|
SerializedObject serializedObject = new SerializedObject(curWindow.textureAtlas.selectedTextureQuad);
|
||||||
serializedObject.Update();
|
serializedObject.Update();
|
||||||
|
|
||||||
|
|
||||||
if (curWindow.textureAtlas.selectedTextureQuad.modelGroups != null)
|
if (curWindow.textureAtlas.selectedTextureQuad.modelGroups != null)
|
||||||
{
|
{
|
||||||
SerializedProperty modelGroupsSP = serializedObject.FindProperty("modelGroups");
|
SerializedProperty modelGroupsSP = serializedObject.FindProperty("modelGroups");
|
||||||
@ -115,11 +109,8 @@ 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++)
|
||||||
@ -170,7 +161,7 @@ namespace MA_TextureAtlasserPro
|
|||||||
|
|
||||||
GUILayout.Label("x " + curWindow.textureAtlas.selectedTextureQuad.guiRect.x.ToString() + ", y " + curWindow.textureAtlas.selectedTextureQuad.guiRect.y.ToString());
|
GUILayout.Label("x " + curWindow.textureAtlas.selectedTextureQuad.guiRect.x.ToString() + ", y " + curWindow.textureAtlas.selectedTextureQuad.guiRect.y.ToString());
|
||||||
GUILayout.Label("w " + curWindow.textureAtlas.selectedTextureQuad.guiRect.width.ToString() + ", h " + curWindow.textureAtlas.selectedTextureQuad.guiRect.height.ToString(), labelStyle);
|
GUILayout.Label("w " + curWindow.textureAtlas.selectedTextureQuad.guiRect.width.ToString() + ", h " + curWindow.textureAtlas.selectedTextureQuad.guiRect.height.ToString(), labelStyle);
|
||||||
}
|
|
||||||
GUILayout.EndVertical();
|
GUILayout.EndVertical();
|
||||||
GUILayout.EndArea();
|
GUILayout.EndArea();
|
||||||
}
|
}
|
||||||
|
@ -84,12 +84,7 @@ 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));
|
||||||
for (int i = 0; i < 8; i++)
|
newMesh.SetUVs(0, new List<Vector2>(mesh.uv));
|
||||||
{
|
|
||||||
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…
x
Reference in New Issue
Block a user