// Update is called once per frame void Update() { if (Input.GetMouseButton(0)) { var mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); var mousePos2d = new Vector2(mousePosition.x, mousePosition.y); inputReceiver.Fire(mousePos2d); } }