Hi. I would like to know if that is possible. What I would like to do is when I click an image, it will change to another image and after 1 or 2 seconds, a Canvas will open. Here’s a sample code I’ve using. And no, it doesn’t work. Is something wrong with it? I’m sorry I’m not quite familiar with StartCoroutine yet. Thanks! PS: I’ve tried putting a variable “trigger” to initiate the opening of Canvas but still doesn’t work.
IEnumerator Timer(){
bool trigger = false;
yield return new WaitForSeconds (5);
trigger = true;
Debug.Log ("start");
if (trigger == true) {
Canvas MainCanvas= GameObject.Find ("MainCanvas").GetComponent<Canvas> ();
MainCanvas.enabled = false;
}
}