NodeWorld

Dropdown

La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.

csharp
public sealed class Dropdown : Selectable

Namespace NodeWorld.Flux.

A dropdown list of a canvas of the world (uGUI or TextMeshPro).

Properties

value

csharp
public int value { get; set; }

The index of the chosen option; setting it runs onValueChanged.

optionCount

csharp
public int optionCount { get; }

The number of options.

onValueChanged

csharp
public UiEvent<int> onValueChanged { get; }

The chosen option changed, with its index.

Methods

GetOption

csharp
public string GetOption(int index)

The text of option index.

SetOption

csharp
public void SetOption(int index, string text)

Changes the text of option index.

AddOption

csharp
public void AddOption(string text)

Adds an option at the end of the list.

ClearOptions

csharp
public void ClearOptions()

Removes every option.

SetValueWithoutNotify

csharp
public void SetValueWithoutNotify(int index)

Chooses an option without running onValueChanged: to show a value that came from the network.