3using System.Collections;
4using System.Collections.Generic;
23 Dictionary<Component, bool> dropdowns =
new Dictionary<Component, bool>();
33 serializedObject.Update();
41 GUILayout.Label(
"Modified Values", EditorStyles.boldLabel);
43 int labelWidth = (int) Mathf.Min(Screen.width/2, 100);
47 if(!dropdowns.ContainsKey(kvp.Key))
48 dropdowns.Add(kvp.Key,
false);
50 dropdowns[kvp.Key] = EditorGUILayout.Foldout(dropdowns[kvp.Key], kvp.Key.ToString());
52 if(dropdowns[kvp.Key])
54 foreach(KeyValuePair<string, object> changes
in kvp.Value)
56 GUILayout.BeginHorizontal();
58 GUILayout.Label(changes.Key, GUILayout.MinWidth(labelWidth), GUILayout.MaxWidth(labelWidth));
60 GUILayout.Label(changes.Value.ToString().Truncate(128));
62 GUILayout.EndHorizontal();
UnityEngine.Component Component
Dictionary< Component, Dictionary< string, object > > modifiedValues