Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using UnityEngine.UI;
- public class UIButtonRemote : MonoBehaviour
- {
- public void OnClick()
- {
- EventSystem.current.SetSelectedGameObject(gameObject); // select me
- gameObject.GetComponent<Button>().onClick.Invoke(); // and click me
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment