ドキュメント

Unity Engine

Unity Engine

AddItem

Adds an item to this menu.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

AddItem(string, bool, Action)

Adds an item to this menu.
public abstract void AddItem(string itemName, bool isChecked, Action action)

Parameters

itemName

The text to display to the user.

isChecked

Indicates whether a checkmark next to the item is displayed.

action

The callback to invoke when the item is selected by the user.

AddItem(string, bool, Action<Object>, Object)

Adds an item to this menu.
public abstract void AddItem(string itemName, bool isChecked, Action<object> action, object data)

Parameters

itemName

The text to display to the user.

isChecked

Indicates whether a checkmark next to the item is displayed.

The callback to invoke when the item is selected by the user.

data

The object to pass to the callback as a parameter.