Answer by fafase
All is there http://unity3d.com/support/documentation/ScriptReference/index.Coroutines_26_Yield.html Hope that helps
View ArticleAnswer by BiG
It's easy: Define a function like this: var delay = 2.0; //This implies a delay of 2 seconds. function WaitAndDestroy(){ yield WaitForSeconds(delay); Destroy (gameObject); } Call this function when you...
View ArticleAnswer by MP2fps
var destroyTime = 5; function Update () { Destroy(gameObject, destroyTime); }
View ArticleAnswer by Wiebren-de-Haan
var Seconds = 10; function Update(){ Destroy(); } function Destroy(){ yield WaitForSeconds(Seconds); Destroy(gameObject); } Add this to a javascript, set the time in Seconds (Use the var). And the...
View ArticleAnswer by wrobel221
You can just set time delay in Destroy method Object.Destroy(gameObject, 2.0f); Here's the [method description][1] static void Destroy(Object obj, float t = 0.0F); [1]:...
View Article