Skip to content

Instantly share code, notes, and snippets.

@namrog84
Created September 18, 2019 03:50
Show Gist options
  • Save namrog84/ece87992b8724a8307be84f9052ab7e4 to your computer and use it in GitHub Desktop.
Save namrog84/ece87992b8724a8307be84f9052ab7e4 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class TabToNextController : MonoBehaviour, IUpdateSelectedHandler
{
public Selectable nextField;
public void OnUpdateSelected(BaseEventData data)
{
if (Input.GetKeyDown(KeyCode.Tab))
nextField.Select();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment