get mouse position c# unity code example
Example 1: unity get mouse position
Vector3 worldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Example 2: how to find the mouse position unity
Vector2 mousePosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y);