I want to show my GUI on spesific amount of time. I dont know why but it doesnt work. Is it because of NGUI? i also tried them as a gameobject, still doesnt work.
I spent 2 hours to find a similar question, i hope i didnt miss.
using UnityEngine;
using System.Collections;
[AddComponentMenu("NGUI/Interaction/Button Activate")]
public class showgui : MonoBehaviour
{
public GameObject target;
public bool show = false;
void Start()
{ if (target != null) NGUITools.SetActive(target, show); }
void update()
{
StartCoroutine ("showmenu");
}
IEnumerator showmenu(){
yield return new WaitForSeconds(3);
NGUITools.SetActive(target, show);
}
}