Sprite/gameObject touch or click event
I'm fairly new to unity so bare over with me for not knowing too much about this.
Simple question, how to I detect click (and hold) as well as touch on a Sprite/GameObject to be able to either interact or drag the item around?
Essentially I am creating a little 2D demo game, I have a runtime generated map, a few buildings and some units and I am aiming to run this on an android device. For testing and learning purposes I am interested in both the mouse click and touch functionality.
My problem: I have the map, which does not have a box collider, for obvious reasons I presume, and therefor will not raise the OnMouse____() events, as far as I understand, but I want to be able to click/touch and drag the map whenever the user touches the map and nothing else, however if the user touches a building, the building should detect the click (and hold) instead of the map and therefor the map should not react to this.