Wiki > AutoComplete TextField > AutoCompleteAttribute

AutoCompleteAttribute.AutoCompleteAttribute(string[])


Initialize the array of strings that is going to be used by the DropDown.

Namespace: RotaryHeart.Lib.AutoComplete.AutoCompleteAttribute
Package: AutoComplete TextField

Syntax


public AutoCompleteAttribute(string[] entries)

Parameters

path
Type: System.string[]
Array of strings to be used by the drop down.

Example


[AutoComplete(new string[] { "Entry 1", "Entry 2", "entry 3" })]
public string textField;

With this code the inspector will use an AutoComplete TextField to draw the string value. The system will use the array passed to the attribute constructor as the elements for the drop down. Note that this array cannot be dynamic, for any dynamic array implementation you will need to use either a Custom Editor or a Property Drawer.