There is a Rect from which mouse clicks are taken, limited by the coordinates of the camera anchors.
bounds = new Rect(upLeft.transform.position.x, downRight.transform.position.y, downRight.transform.position.x - upLeft.transform.position.x, upLeft.transform.position.y - downRight.transform.position.y); if (Input.GetMouseButtonDown(0) && bounds.Contains(Input.mousePosition)) { Began(Input.mousePosition); } How to add areas to it - exceptions? Suppose it is necessary that from this Rect the upper right corner, for example, the upper right corner was inactive + the lower right corner was inactive. I think it should look like this
public List <Rect> AreaException; AreaException.add(new Rect (0,0, 30,30)); AreaException.add(new Rect (50,50,30,30)); But what to do next? It seems like they need to go through foreach and somehow remove the coordinates belonging to them from the original Rect. How to do this?