unity oncollisionenter

C#
    void OnCollisionEnter(Collision col)
    {
		//This method will run when your game object
      	//collides with something

      	Debug.Log("Collided");
    }
Source

Also in C#: