Raycast into GUI?
http://forum.unity3d.com/threads/raycast-into-gui.263397/
int layer = << ;
Ray myray = UICamera.currentCamera.ScreenPointToRay(Input.mousePosition);
RaycastHit[] hits = Physics.RaycastAll(myray, 1000.0f, layer);
int layer = << ;//NGUI layer, TODO modify with your own
void Update()
{
if (Input.GetMouseButtonUp())
{
//UICamera
if (UICamera.currentCamera != null)
{
Ray myray = UICamera.currentCamera.ScreenPointToRay(Input.mousePosition);
RaycastHit[] hits = Physics.RaycastAll(myray, 1000.0f, layer);
if(hits != null && hits.Length > ){//hit the NGUI layer
return;
}
}
}
}