How to work with touch

I have a few questions about working with touch, for touch screens. This is a beginner assignment just for fun, and I want to make it so when I touch an object, it is destroyed. These are things I’ve looked into.

  • OnMouseUpAsButton This worked, but it only allowed for one touch. I want multiple touches to be able to run at a time
  • OnTouchDown I wanted to find a function that was just like OnMouseUpAsButton, but instead with touch. Also, it would allow multiple touches.
  • OnTouchDown This was a second idea, that involved using a function that would make it so when the user touched the screen, a ray would shoot out for a short amount of time (like 0.01 seconds short). Anything this ray touches will trigger Destroy.gameObject

Any ideas, please post sample code. I have never worked with Rays, or anything like it.

That makes sense, and a manager is basically a game controller?