From 34d01108e9f0c5488e8824f768c43801dd8ed4cc Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 4 Sep 2021 14:02:24 +0800 Subject: *misc --- Assets/ActionTool/Editor/ActionPreviewEditor.cs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs') diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs index 56e5b486..7e9ffc08 100644 --- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs @@ -864,12 +864,27 @@ namespace ActionTool if (GUI.Button(rect, "", styles.boxToggle)) { AnimationData animData = ActionManager.animationData; - ActionInfoEditor.ShowContent("Event Info", - "Events: " + (animData.animationEvents == null ? 0 : animData.animationEvents.Count) - ); - } + Dictionary events = new Dictionary(); + for (int i = 0; i < animData.animationEvents.Count; ++i) + { + var e = animData.animationEvents[i]; + if(!events.ContainsKey(e.type.ToString())) + events.Add(e.type.ToString(), 0); + events[e.type.ToString()]++; + } + string str = ""; + foreach(var e in events) + { + str += "\n" + e.Key.ToString() + ": " + e.Value; + } + + ActionInfoEditor.ShowContent("Event Info", + "Events: " + (animData.animationEvents == null ? 0 : animData.animationEvents.Count) + + str + ); + } Rect lb = rect; - lb.y += 3; + //lb.y += 3; lb.x += 2; GUI.Label(lb, "EV", styles.textBoldSmallMid); DrawAllEvents(); -- cgit v1.1-26-g67d0