Creating your own MenuOptions
Introduction
Creating your own MenuOptions
public class OptionsExample : MenuOption
{
private Button button;
private void Awake()
{
button = GetComponent<Button>();
if (_button != null) button.onClick.AddListener(OnButtonClick);
}
void OnButtonClick()
{
//Handle OnClick
}
public override string GetLabel()
{
//This is where you return the label
string value = "Insert value here";
return $"{optionLabelName}{value}";
}
public override void LoadOption()
{
//Assign the correct value to your interactable
}
}Methods
Properties
Last updated