Vector3 direc = (transform.position - curMainCamera.transform.position).normalized;
//Ray cameraRay = curMainCamera.ScreenPointToRay (new Vector3(Screen.width/2,Screen.height/2,0));
if (Physics.Raycast (curMainCamera.transform.position, direc,out hit, 1000)) {
Debug.DrawLine (curMainCamera.transform.position,hit.collider.gameObject.transform.position,Color.red,1000f);
if (hit.collider.gameObject.layer == layerCanSelected) { //被碰撞物体是UI条件
curSelectedObj = hit.collider.gameObject;