// 根据3d的主角坐标,获得主角血条的坐标 (通过视窗坐标转换)
Vector3 pos = cam.WorldToViewportPoint(Boy.position); // 将主角的3d坐标转换成对象屏幕的视窗坐标
UI.transform.position = UIcam.ViewportToWorldPoint(pos); // 根据视窗坐标获得UI血条在3d的位置
// 根据3d的主角坐标,获得主角血条的坐标 (通过屏幕坐标转换)
screenpos = _cameraScene.WorldToScreenPoint (target);
viewpos = _cameraUI.ScreenToWorldPoint (new Vector3 (screenpos.x,screenpos.y,_cameraUI