TMP für GUI hinzugefügt

This commit is contained in:
2024-04-04 12:20:19 +02:00
parent 5a86b8b4f5
commit 708c32568e
325 changed files with 59081 additions and 0 deletions

View File

@ -0,0 +1,19 @@
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";
}
}