1
NGUI 3 Support / Re: Add Delay to UIEventTrigger
« on: June 23, 2014, 03:44:11 PM »
Thanks to you both.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I'm not sure exactly what you mean, but if you're trying to load a scene at a button press, but want the animation and sound to finish before doing so, you could try an Update loop or a coroutine WaitForSeconds(); you can look up how to do coroutines in the Unity documentation. Although that might be a little elaborate for your needs.
The simpler solution might be the update loop. It's probably not ideal, since coroutines are probably more efficient, but it's easier to implement:
Update () { if (Time.time > nextTime) { Application.LoadLevel(levelToLoad); } } Button () { nextTime = Time.time + 1.0f; //delay in seconds levelToLoad = 0; //level you want to load }
Just set your delay as long as you need to complete the tween and audio.



