private static AVProLiveCameraDeviceMode GetClosestMode(AVProLiveCameraDevice device, List <Vector2> resolutions, bool maintainApectRatio)
    {
        AVProLiveCameraDeviceMode result = null;

        for (int i = 0; i < resolutions.Count; i++)
        {
            result = device.GetClosestMode(Mathf.FloorToInt(resolutions[i].x), Mathf.FloorToInt(resolutions[i].y), maintainApectRatio);
            if (result != null)
            {
                break;
            }
        }
        return(result);
    }
 private static AVProLiveCameraDeviceMode GetClosestMode(AVProLiveCameraDevice device, List<Vector2> resolutions, bool maintainApectRatio)
 {
     AVProLiveCameraDeviceMode result = null;
     for (int i = 0; i < resolutions.Count; i++)
     {
         result = device.GetClosestMode(Mathf.FloorToInt(resolutions[i].x), Mathf.FloorToInt(resolutions[i].y), maintainApectRatio);
         if (result != null)
             break;
     }
     return result;
 }