zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    禁止网页后退
    C# 数组排序
    SQL求往年的工资和
    手机的隐秘功能
    C#中的String类
    C#修饰符
    Application,Session,Cookie,ViewState和Cache区别
    css margin和padding的区别
    php常见的js正则表达式
    js 正则表达式基础篇
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3829148.html
Copyright © 2011-2022 走看看