Click anywhere on screen, accept if on a clickable object?

I'm working with Unity making an iPhone game and I have a quick question.

What I'm trying to do is if the user clicks anywhere on the screen while the game is playing to run the fire weapon code. But if the user clicks the pause button in the top right, I don't want it to trigger the fire code and run the pause game object code.

How would I set this up?

  1. How do I register a screen click on iPhone?
  2. How would I register a game object click and bypass the screen click?



As I just suggested in another answer, use standard `OnMouseDown ()` along with OnTouchDown and set two invisible objects in front of the camera: one for the whole screen and one for the little button, which is in front of the bigger one.