Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

Not destroying clone after interacting with other gameobject

$
0
0
Hello folks! I am creating a top-down shooter and I just set up shooting but when my bullets hit the enemy it doesn't destroy it or the enemy. public class bullet : MonoBehaviour { public GameObject enemy; private void OnCollisionEnter2D(Collision2D collision) { Destroy(gameObject); Destroy(enemy); } }

Viewing all articles
Browse latest Browse all 508

Trending Articles



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