22 lines
449 B
C#
22 lines
449 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class AutoActivate : MonoBehaviour
|
|
{
|
|
private Button thisbtn;
|
|
void Awake()
|
|
{
|
|
thisbtn = GetComponent<Button>();
|
|
thisbtn.interactable = false;
|
|
StartCoroutine(AfterAwake());
|
|
}
|
|
|
|
IEnumerator AfterAwake()
|
|
{
|
|
yield return new WaitForSeconds(1);
|
|
thisbtn.interactable = true;
|
|
}
|
|
}
|