unity中UI坐标转3d世界坐标

方法:

 public static Vector3 UIScreenToWorldPoint(Vector3 uiPostion)
    {
        uiPostion = UICamera.mainCamera.WorldToScreenPoint(uiPostion);
        uiPostion.z = 1f;
        uiPostion = Camera.main.ScreenToWorldPoint(uiPostion);
        return uiPostion;
    }
原文地址:https://www.cnblogs.com/unityzc/p/6801520.html