private void Summary()
{
GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]);
int bytes = 0;
int num = 0;
Dictionary <Vector2, int> dictionary1 = new Dictionary <Vector2, int>();
bool flag1 = false;
foreach (LightmapData lightmap in LightmapSettings.lightmaps)
{
if (!((UnityEngine.Object)lightmap.lightmapFar == (UnityEngine.Object)null))
{
++num;
Vector2 key = new Vector2((float)lightmap.lightmapFar.width, (float)lightmap.lightmapFar.height);
if (dictionary1.ContainsKey(key))
{
Dictionary <Vector2, int> dictionary2;
Vector2 index;
(dictionary2 = dictionary1)[index = key] = dictionary2[index] + 1;
}
else
{
dictionary1.Add(key, 1);
}
bytes += TextureUtil.GetStorageMemorySize((Texture)lightmap.lightmapFar);
if ((bool)((UnityEngine.Object)lightmap.lightmapNear))
{
bytes += TextureUtil.GetStorageMemorySize((Texture)lightmap.lightmapNear);
flag1 = true;
}
}
}
string str = num.ToString() + (!flag1 ? " non-directional" : " directional") + " lightmap" + (num != 1 ? "s" : string.Empty);
bool flag2 = true;
using (Dictionary <Vector2, int> .Enumerator enumerator = dictionary1.GetEnumerator())
{
while (enumerator.MoveNext())
{
KeyValuePair <Vector2, int> current = enumerator.Current;
str += !flag2 ? ", " : ": ";
flag2 = false;
if (current.Value > 1)
{
str = str + (object)current.Value + "x";
}
str = str + (object)current.Key.x + "x" + (object)current.Key.y + "px";
}
}
GUILayout.BeginHorizontal();
GUILayout.BeginVertical();
GUILayout.Label(str + " ", LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
GUILayout.EndVertical();
GUILayout.BeginVertical();
GUILayout.Label(EditorUtility.FormatBytes(bytes), LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
GUILayout.Label(num != 0 ? string.Empty : "No Lightmaps", LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
GUILayout.EndVertical();
GUILayout.EndHorizontal();
GUILayout.EndVertical();
}