How can I get a counter that counts the collisions in my 2D game? I use this code to register the collisions:
void OnCollisionEnter2D(Collision2D collision)
{
↧