/// <summary> /// Returns a Boolean value indicating whether the device supports picking media using the specified source type. /// </summary> /// <param name="sourceType">The source to use to pick an image or movie.</param> /// <returns><c>true</c> if the device supports the specified source type, <c>false</c> if the specified source type is not available.</returns> public static bool IsSourceTypeAvailable(IosImagePickerSourceType sourceType) { #if IOS_IMAGE_PICKER_NATIVE_IMPLEMENTATION_AVAILABLE return(PInvoke.UnityIosImagePickerController_IsSourceTypeAvailable(sourceType)); #else return(false); #endif }
/// <summary> /// Returns an array of the available media types for the specified source type. /// </summary> /// <param name="sourceType">The source to use to pick an image.</param> /// <returns>An array whose elements identify the available media types for the specified source type.</returns> public static string[] AvailableMediaTypesForSourceType(IosImagePickerSourceType sourceType) { #if IOS_IMAGE_PICKER_NATIVE_IMPLEMENTATION_AVAILABLE var serializedMediaTypes = PInvoke.UnityIosImagePickerController_AvailableMediaTypesForSourceType(sourceType); return(serializedMediaTypes != null?serializedMediaTypes.Split(SerializationSeparator) : new string[0]); #else return(new string[0]); #endif }
public static extern void UnityIosImagePickerController_Present( uint requestId, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerSourceType sourceType, string serializedMediaTypes, bool allowsEditing, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerVideoQualityType videoQuality, double videoMaximumDurationInSeconds, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerCameraDevice cameraDevice, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerCameraCaptureMode cameraCaptureMode, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerCameraFlashMode cameraFlashMode, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysUInt)] IosImagePickerPopoverArrowDirection ipadPopoverPermittedArrowDirections, float ipadNormalizedPopoverSourceRectX, float ipadNormalizedPopoverSourceRectY, float ipadNormalizedPopoverSourceRectWidth, float ipadNormalizedPopoverSourceRectHeight, bool ipadPopoverCanOverlapSourceRect);
public static extern string UnityIosImagePickerController_AvailableMediaTypesForSourceType( [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerSourceType sourceType);
public static extern bool UnityIosImagePickerController_IsSourceTypeAvailable( [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.SysInt)] IosImagePickerSourceType sourceType);