Skip to main content

ServerMultiOptionCommandDefinition

A class in Root.Township, Alta.Menu.

Menu command asset with several fixed commands, one per button. The chosen one is routed to the server when run.

Constructors​

MemberWhat it is
ServerMultiOptionCommandDefinition()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private ServerMultiOptionCommandDefinition.CommandOptionInfo[] commandsThe options.
private int currentCommandIndexIndex of the selected option.
private string settingDescriptionBacking field for SettingDescription.

Properties​

MemberWhat it is
virtual string[] Labels { get; }Each option's argument text, used as button labels.
override string SettingDescription { get; }Description text set on the asset.

Methods​

MemberWhat it is
override void RunCommandOnClient()Sends the selected option's command through CommandSync.Instance.RouteCommand.
void SetCommandIndex(int index)Picks which option runs.

Used in​

Members of other types that take, return or hold a ServerMultiOptionCommandDefinition: