Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

GenericMenu.AddItem

Switch to Manual
public function AddItem(content: GUIContent, on: bool, func: GenericMenu.MenuFunction): void;

Parameters

Description

Add an item to the menu.


public function AddItem(content: GUIContent, on: bool, func: GenericMenu.MenuFunction2, userData: object): void;

Parameters

Description

Add an item to the menu.