I made a script next to the coroutine, but rather that it does not work msm not giving error My real intention is to make the button have a delay of up to 10 seconds before making the transition to another canva
Could you give me strength?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class canvas2ecanvas3 : MonoBehaviour
{
public GameObject canvas2,canvas3;
public void start(){
StartCoroutine(cena ());
}
IEnumerator cena(){
canvas2.SetActive(false);
canvas3.SetActive(true);
yield return new WaitForSeconds (10);
}
public void voltar(){
canvas2.SetActive(true);
canvas3.SetActive(false);
}
}