You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class DropdownSample: MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private TextMeshProUGUI text = null;
|
|
|
|
[SerializeField]
|
|
private TMP_Dropdown dropdownWithoutPlaceholder = null;
|
|
|
|
[SerializeField]
|
|
private TMP_Dropdown dropdownWithPlaceholder = null;
|
|
|
|
public void OnButtonClick()
|
|
{
|
|
text.text = dropdownWithPlaceholder.value > -1 ? "Selected values:\n" + dropdownWithoutPlaceholder.value + " - " + dropdownWithPlaceholder.value : "Error: Please make a selection";
|
|
}
|
|
}
|