I’m new unity user ,I know that this question is asked before but I can’t find what I need in them .
I want to detect the game object that places under the the mouse Up/Down event without using Ray-cast or using detecting the position …
ex : I have board and a stone ,i want to move the stone from one point to another if the monument is allowed ,so I need to detect the first game object that’s under the On-Mouse-Down, and the game object that’s under the On-Mouse-Up event happen (like chess set game )
The easiest way to implement this by far is to use colliders with the OnMouseDown and OnMouseUp functions. If for some reason you absolutely can’t use them then your only option is to use some fairly involved techniques. One way could be to use a separate camera with a render to texture and replace your GameObject’s material with a solid color and everything else with another color. Then you would get the cursor position, check it against the color of the texture at that position, and then check for a mouse click event.