Unity3D Editor在右键弹出菜单中添加 item
2015-07-07 14:28
756 查看
[MenuItem("Assets/StuffDoSomething")]
static void DoubleMass(MenuCommand command)
{
}
三种特殊的:
Assets – items will be available under the “Assets” menu, asWELL
using
right-click inside the project view.
Assets/Create – items will be listed when clicking on the “Create” button in the project view (useful when adding new types that can be added to the project)
CONTEXT/ComponentName – items will be available by right-clicking inside the inspector of the given component.
在menu item中添加快捷键
% – CTRL on Windows / CMD on OSX
# – Shift
& – Alt
LEFT/RIGHT/UP/DOWN – Arrow keys
F1…F2 – F keys
HOME, END, PGUP, PGDN
static void DoubleMass(MenuCommand command)
{
}
三种特殊的:
Assets – items will be available under the “Assets” menu, asWELL
using
right-click inside the project view.
Assets/Create – items will be listed when clicking on the “Create” button in the project view (useful when adding new types that can be added to the project)
CONTEXT/ComponentName – items will be available by right-clicking inside the inspector of the given component.
在menu item中添加快捷键
% – CTRL on Windows / CMD on OSX
# – Shift
& – Alt
LEFT/RIGHT/UP/DOWN – Arrow keys
F1…F2 – F keys
HOME, END, PGUP, PGDN
// Add a new menu item with hotkey CTRL-SHIFT-A [MenuItem("Tools/New Option %#a")] private static void NewMenuOption() { } // Add a new menu item with hotkey CTRL-G [MenuItem("Tools/Item %g")] private static void NewNestedOption() { } // Add a new menu item with hotkey G [MenuItem("Tools/Item2 _g")] private static void NewOptionWithHotkey() { }
相关文章推荐
- Unity中的mvc框架_StrangeIoC(之十)
- unity 3D游戏开场画面隐退实现
- unity3d的坐标总结
- Unity中的mvc框架_StrangeIoC(之九)
- Unity中的mvc框架_StrangeIoC(之八)
- Unity中的mvc框架_StrangeIoC(之七)
- Unity中的mvc框架_StrangeIoC(之六)
- Unity中的mvc框架_StrangeIoC(之五)
- Unity中资源动态加载的两种方式之AssetsBundle
- Unity3D expand hierachry by code
- Unity3D调用自己封装的dll
- Unity中的mvc框架_StrangeIoC(之四)
- Unity中的mvc框架_StrangeIoC(之三)
- Unity中的mvc框架_StrangeIoC(之二)
- Unity中的mvc框架_StrangeIoC(之一)
- C#开发Unity游戏教程之Scene视图与脚本的使用
- C#开发Unity游戏教程之Scene视图与脚本的使用
- Unity 3D知识体系结构
- 【Unity3D游戏开发】NGUI之渐变加载到100%的Loading场景进度条 (一)
- Unity对象池的实现