Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# destroy function...unity

Destroy(gameObject); //this will destroy.
//the game object is the object where the script is inside

Destroy(gameObject,f3); //this will destroy the object when waiting 3 sec

//destroying after the 3 seconds varible
float waitTime = f3;
Destroy(gameObject,waitTime)
 
PREVIOUS NEXT
Tagged: #destroy
ADD COMMENT
Topic
Name
9+4 =