using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class LaterClick : MonoBehaviour { // Start is called before the first frame update public Button obj; void Start() { } // Update is called once per frame void Update() { } public void LaterButton(float time) { Invoke("buttonClick", time); } void buttonClick() { ExecuteEvents.Execute(obj.gameObject, new PointerEventData(EventSystem.current), ExecuteEvents.pointerClickHandler); } }