Skip to content

Commit

Permalink
Update MA_TextureAtlasserProInspectorView.cs
Browse files Browse the repository at this point in the history
Dirty fix for 2020.2+ versions with reordable list.
  • Loading branch information
maxartz15 committed Apr 2, 2021
1 parent 650600f commit 5d112a2
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ public override void UpdateView(Event e, Rect editorViewRect)
}

SerializedProperty meshesSP = modelGroupsSP.GetArrayElementAtIndex(i).FindPropertyRelative("meshes");
EditorGUILayout.PropertyField(meshesSP, false, GUILayout.ExpandWidth(false), GUILayout.MaxWidth(editorViewRect.width * 0.5f));

if (meshesSP.isExpanded)
#if UNITY_2020_2
#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++)
{
Expand All @@ -131,8 +133,8 @@ public override void UpdateView(Event e, Rect editorViewRect)
{
curWindow.textureAtlas.selectedTextureQuad.modelGroups[i].meshes.Add(null);
}
}
}
}
}

if (GUILayout.Button("+", EditorStyles.miniButton, GUILayout.ExpandWidth(true)))
{
Expand Down

0 comments on commit 5d112a2

Please sign in to comment.