diff options
author | chai <chaifix@163.com> | 2021-09-04 14:02:24 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-04 14:02:24 +0800 |
commit | 34d01108e9f0c5488e8824f768c43801dd8ed4cc (patch) | |
tree | 8656926dc0fdb116590e295ce1038a192bc0eca3 /Assets/ActionTool/Editor/ActionPreviewEditor.cs | |
parent | 18a46c5eda8dad703eca557c6553f7f0ed3461af (diff) |
*misc
Diffstat (limited to 'Assets/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionPreviewEditor.cs | 25 |
1 files changed, 20 insertions, 5 deletions
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<string, int> events = new Dictionary<string, int>();
+ 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();
|