You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
630 B

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);
}
}