From cec37ddb003304a224b804a78479ae46dae58fed Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 16 Sep 2021 20:51:19 +0800 Subject: + motion blur --- .../Tools/ActionTool/Editor/ActionPreviewEditor.cs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs') diff --git a/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs index 03858393..3699762c 100644 --- a/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs +++ b/Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs @@ -1001,17 +1001,15 @@ namespace ActionTool { GUIContent item = null; string shortName = name.Replace("Event", ""); - int underscore = shortName.IndexOf('_'); - if(underscore != -1) - { - string category = shortName.Substring(0, underscore); - shortName = shortName.Substring(underscore + 1, shortName.Length - underscore - 1); - item = new GUIContent("New Event/" + category + "/" + shortName); - } - else - { - item = new GUIContent("New Event/" + shortName); - } + string path = "New Event/"; + while(shortName.IndexOf('_') != -1) + { + int underscore = shortName.IndexOf('_'); + string category = shortName.Substring(0, underscore); + path += category + "/"; + shortName = shortName.Substring(underscore + 1, shortName.Length - underscore - 1); + } + item = new GUIContent(path + shortName); EventParam param = new EventParam(); param.eventName = name; param.frame = frame; -- cgit v1.1-26-g67d0