MenuItem属性
【MenuItem属性】
The MenuItem attribute allows you to add menu items to the main menu. The MenuItem attribute turns any static function into a menu command. Only static functions can use the MenuItem attribute.
  To create a hotkey you can use the following special characters: % (ctrl on Windows, cmd on OS X), # (shift),& (alt), <b>_</b> (no key modifiers). For example to create a menu with hotkey shift-alt-g use "MyMenu/Do Something #&g". To create a menu with hotkey g and no key modifiers pressed use "MyMenu/Do Something _g".
Some special keyboard keys are supported as hotkeys, for example "#LEFT" would map to shift-left. The keys supported like this are: LEFT, RIGHT, UP, DOWN, F1 .. F12, HOME, END, PGUP, PGDN.
  
通过Selection类,可以获取当前编辑器选中对象的一些信息:
  
EditorApplication.ExecuteMenuItem,提供执行编辑器的菜单的能力。
  
EditorApplication类用于获取编辑器本身的信息,以及控制控制编辑器本身的行为。
参考:
1、file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/ScriptReference/MenuItem.html
2、file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/ScriptReference/Selection.html
MenuItem属性的更多相关文章
- HTML5 学习总结(二)——HTML5新增属性与表单元素
		
一.HTML5新增属性 1.1.contextmenu contextmenu的作用是指定右键菜单. <!DOCTYPE html> <html> <head> & ...
 - HTML5 学习笔记(二)——HTML5新增属性与表单元素
		
目录 一.HTML5新增属性 1.1.contextmenu 1.2.contentEditable 1.3.hidden 1.4.draggable 1.5.data-* 1.6.placehold ...
 - HTML5新增标签与属性
		
目录 一.HTML5新增属性 1.1.contextmenu 1.2.contentEditable 1.3.hidden 1.4.draggable 1.5.data-* 1.6.placehold ...
 - EditorWindow 和MenuItem
		
using UnityEngine; using System.Collections; using UnityEditor; public class ClipEventEditor : Edito ...
 - HTML5入门以及新标签
		
HTML5 学习总结(一)--HTML5入门与新增标签 目录 一.HTML5概要 1.1.为什么需要HTML5 1.2.什么是HTML5 1.3.HTML5现状及浏览器支持 1.4.HTML5特性 ...
 - 【译】仿Taasky的3D翻转菜单动画实现
		
最终效果 最终效果 开始 首先下载并打开一个事先搭好架子的Demo,然后来分析一下.这个Demo包含一个主页和详情页,其中MenuViewController继承自UITableViewControl ...
 - Unity3D引擎扩展中的编辑器定制方法
		
http://gamerboom.com/archives/36432 作者:Richard Fine Unity3D的方便之处在于,它很容易地扩展编辑器套件.每款游戏都对加工有着不同的需求,可以快速 ...
 - Editor Scripting学习笔记之Menu Item
		
主要用到: MenuItem属性 MenuCommand参数 可能用到: EditorApplication类 Selection类 GameObjectUtility类 FileUtil类 Undo ...
 - Unity3D脚本中文系列教程(十七)
		
http://dong2008hong.blog.163.com/blog/static/469688272014032332976/ ◆ Static function PrefixLabel(to ...
 
随机推荐
- PHP获取客户端的IP、地理信息、浏览器、本地真实IP
			
<?php header("Content-type:text/html;charset=utf-8"); // 作用获取客户端的ip.地理信息.浏览器.本地真实IP cla ...
 - 【转】理解 pkg-config 工具
			
原文网址:http://www.chenjunlu.com/2011/03/understanding-pkg-config-tool/ 你在 Unix 或 Linux 下开发过软件吗?写完一个程序, ...
 - 选择排序算法-python实现
			
#-*- coding: UTF-8 -*- import numpy as np def SelectSort(a): for i in xrange(0,a.size): min = a[i] p ...
 - Vue.js实现数据的双向数据流
			
众所周知,Vue.js一直使用的是单向数据流的,和angularJs的双向数据流相比,单向数据流更加容易控制.Vue.js允许父组件通过props属性传递数据到子组件.但是有些情况下我们需要在子组件里 ...
 - centos开机提示CPU无法识别的问题
			
centos版本和对应cpu兼容性,官方网址: https://access.redhat.com/support/policy/intel Red Hat Enterprise Linux Vers ...
 - Java 中的instanceof 运算符
			
Java 中的instanceof 运算符是用来在运行时指出对象是否是特定类的一个实例.instanceof通过返回一个布尔值来指出,这个对象是否是这个特定类或者是它的子类的一个实例. 用法:resu ...
 - 【学习笔记】Manacher
			
扔板子跑路 代码 POJ3974 #include <cstdio> #include <cstring> #include <algorithm> using n ...
 - java后台读取配置文件中key与value -----demo2
			
/** * * @Title: getValue * @Description: TODO * @param key * @return import java.util.Properties; * ...
 - ubuntu 固定静态IP
			
http://jingyan.baidu.com/article/e5c39bf5bbe0e739d7603396.html 路由器每重启一次,IP都会改变,那么实验室的路由器一天要断电好几次,那么每 ...
 - django之中间件设置
			
中间件 是一个轻量级.底层的插件系统,可以介入Django的请求和响应处理过程,修改Django的输入或输出 激活:添加到Django配置文件中的MIDDLEWARE_CLASSES元组中 每个中间件 ...