private static int Draw_INTERNAL(int id, System.Action<int> onResult, ClipType clipType, UnityEngine.UI.Windows.Audio.Data data, GUIContent label, Rect rect, bool layout) { if (data != null) { var states = data.GetStates(clipType); var keys = new int[states.Count + 1]; var options = new GUIContent[states.Count + 1]; var selected = string.Empty; var k = 0; for (int i = -1; i < states.Count; ++i) { var category = string.Empty; var name = string.Empty; if (i == -1) { name = "None"; } else { category = states[i].category; keys[k] = states[i].key; var clip = states[i].clip; name = clip == null ? "Null" : clip.ToString(); } if (string.IsNullOrEmpty(category) == false) { category = category.Trim('/').Trim() + "/"; } options[k] = new GUIContent((i >= 0) ? string.Format(category + "[{0}] {1}", keys[k], name) : name); if (id == keys[k]) { selected = options[k].text; } ++k; } if (layout == true) { Popup.DrawInt(label, selected, onResult, options, keys); } else { Popup.DrawInt(rect, selected, label, onResult, options, keys); } } return id; }