Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Unity Freezing On Successful Detonator Explosion

$
0
0
For some reason, when this script works as intended (Makes "Detonator" explode from the explosion framework plugin on contact with another object), Unity freezes. This is the script I used: function OnTriggerEnter (other : Collider) { gameObject.GetComponent("Detonator").Explode(); yield WaitForSeconds(2); Destroy(this.gameObject); } The object that I have this script attached to does not have a detonator on it at all, but it still makes the explosion beforeit freezes. Removing the "gameObject.GetComponent("Detonator").Explode();" from the script fixes it, but I need the explosion to happen.

Viewing all articles
Browse latest Browse all 2383

Trending Articles



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