MenuItem.MenuItem 构造菜单项
static function MenuItem (itemName : string, isValidateFunction : bool, priority : int) : MenuItem
Description描述
Creates a menu item and invokes the static function following it, when the menu item is selected.
创建一个菜单项,当菜单项被选择并随后调用静态函数。
The itemName is the menu item represented like a pathname. Eg. "GameObject/Do Something" If isValidateFunction is true, this is a validation function and will be called before invoking the menu function with the same name. Priority defines the order by which menu items are displayed in the menu bar.
itemName是表示菜单项,就像路径名。例如,GameObject/Do Something,如果isValidateFunction为真,这是一个验证函数并且通用的名字在菜单函数调用之前调用。优先级定义了其中的菜单项在菜单栏显示的顺序。
• static function MenuItem (itemName : string, isValidateFunction : bool) : MenuItem
Description描述
Creates a menu item and invokes the static function following it, when the menu item is selected.
创建一个菜单项,当菜单项被选择并随后调用静态函数。
The itemName is the menu item represented like a pathname. Eg. "GameObject/Do Something" If isValidateFunction is true, this is a validation function and will be called before invoking the menu function with the same name.
itemName是表示菜单项,就像路径名。例如,GameObject/Do Something,如果isValidateFunction为真,这是一个验证函数并且通用的名字在菜单函数调用之前调用。
• static function MenuItem (itemName : string) : MenuItem
Description描述
Creates a menu item and invokes the static function following it, when the menu item is selected.
创建一个菜单项,当菜单项被选择并随后调用静态函数。
The itemName is the menu item represented like a pathname. Eg. "GameObject/Do Something"
itemName是表示菜单项,就像路径名。例如,GameObject/Do Something。