using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; public class Focus : MonoBehaviour { public TMP_InputField[] focus; int index = 0; // Start is called before the first frame update void Start() { index = 0; focus[index].ActivateInputField(); } // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Tab)) { if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)) { index--; if (index < 0) index = focus.Length - 1; } else { index++; if (index >= focus.Length) index = 0; } focus[index].ActivateInputField(); } // if (Input.GetMouseButtonUp(0)) { for (int i=0; i