Docsv3.31.0
Back to API Reference
Class

LocalizedCommandTitle

sealed
Inherits:ICommandTitle

Command title from an entry of a Unity Localization string table, in the selected language; a menu showing it follows a language switch.

Remarks

While a field observes its commands — in Play Mode — the entry loads asynchronously and the command shows its default title until the translation arrives. Read when nothing observes it, from an Editor tool, the entry loads synchronously, which WebGL does not support.
public LocalizedString Entry{ get; set }

String table entry holding the title.

public string Text{ get }

The title in the current language; null or empty shows the command's default title.

public Action Changed

Raised on the main thread when Text changes — after an edit, or on a language switch — so a menu showing the title presents it again. An implementation raises it for every such change.