Quantcast
Channel: Latest Questions by Himani_123
Viewing all articles
Browse latest Browse all 54

how to auto destruct the gameobject

$
0
0
Hii..i am new to unity,i am watching the videos [link text][1] [1]: http://vimeo.com/album/1512103/video/18907747 and in this there is a portion in which auto destruct checkbox is ticked to destroy the explosion that appears on the button click . As video is on Mac and i am working on windows there are lots of things that are differ,please help me how to auto destruct the explosion. i will be very thankful to you. >* i just want to destroy the explosion> that is the sparkling particle effects> on the gameobject on clicking.* var explosion : Transform; function Update () { if(numberOfClicks<=0) { if(explosion) { Instantiate(explosion, transform.position,transform.rotation); } if (isAutoDestruct) { Destory(explosion, 25); } var position= Vector3(Random.Range(-6,6),Random.Range(-4,4),0); RespawnWaitTine(); transform.position=position; numberOfClicks=2; }

Viewing all articles
Browse latest Browse all 54

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>