Back to API Reference
Class
ContextMenuItem
sealed
One item of a UniTextContextMenu: an object of the menu's layout and the command it runs. The menu shows the object while the field offers the command and runs the command when the object is clicked.
Remarks
An item without a command stands for every command the field offers that no other item presents: the menu shows a copy of its object for each and writes each command's title into the copy of its
Label.public GameObject Target{ get; set }Object of the menu's layout the item shows. Its own Button or Toggle runs the command; an object with neither runs it on a click anywhere inside it. Unassigned shows nothing.
public TextCommand Command{ get; set }Command the item runs: the field's command it matches (Matches). Unassigned makes the item show every command of the field no other item presents.
public UniTextBase Label{ get; set }Text inside Target that shows the command's title; unassigned leaves the text as laid out.
