diff options
Diffstat (limited to 'Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs')
-rw-r--r-- | Assets/Tools/ActionTool/Editor/ActionPreviewEditor.cs | 20 |
1 files changed, 9 insertions, 11 deletions
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;
|