unity mouse click screen code example
Example: unity mouse click screen
var cameraloc:Camera;
var mousePos:Vector3;
var worldPos:Vector3;
cameraloc = GameObject.Find("Camera").GetComponent(Camera);
mousePos = Input.mousePosition;
worldPos = cameraloc.ScreenToWorldPoint(mousePos);