docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryConvert

    TryConvert(int, ConversionParams, IntPtr, int)

    Method to be implemented by the provider to convert the image with handle nativeHandle using the provided conversionParams.

    Declaration
    public virtual bool TryConvert(int nativeHandle, XRCpuImage.ConversionParams conversionParams, IntPtr destinationBuffer, int bufferLength)
    Parameters
    Type Name Description
    int nativeHandle

    A unique identifier for the camera image to convert.

    XRCpuImage.ConversionParams conversionParams

    The parameters to use during the conversion.

    IntPtr destinationBuffer

    A buffer to write the converted image to.

    int bufferLength

    The number of bytes available in the buffer.

    Returns
    Type Description
    bool

    true if the image was converted and stored in destinationBuffer.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown if the implementation does not support camera image.

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, September 22, 2023