using UnityEngine;
using System.Collections;
[RequireComponent
( typeof(UIInput
))] public class OverrideOnTab : MonoBehaviour
{
public UIInput selectOnTab;
private UIInput input;
private bool readyToSelect;
void Awake()
{
input = GetComponent<UIInput>();
}
void Update()
{
if (input.isSelected && Input.GetKeyUp(KeyCode.Tab))
{
StartCoroutine(SelectAfterUpdate());
}
}
IEnumerator SelectAfterUpdate()
{
yield return new WaitForEndOfFrame
(); selectOnTab.isSelected = true;
}
}