Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by Digital Phantom

You basically said it yourself in the comment. make an int variable (collisionCount) then in your collision code just add void OnCollisionEnter(Collision2D collision) { //Do whatever else you need to do here collisionCount += 1; } You could also add a debug or print function if you actually want to see the number of collisions as they occur. :)

Viewing all articles
Browse latest Browse all 4

Trending Articles