Struct XRAsyncCameraImageConversion | AR Subsystems | 3.1.10
docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRAsyncCameraImageConversion

    Holds information related to an asynchronous camera image conversion request. Returned by ConvertAsync(XRCameraImageConversionParams).

    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public struct XRAsyncCameraImageConversion : IDisposable, IEquatable<XRAsyncCameraImageConversion>

    Properties

    conversionParams

    The XRCameraImageConversionParams used during the conversion.

    Declaration
    public XRCameraImageConversionParams conversionParams { get; }
    Property Value
    Type Description
    XRCameraImageConversionParams

    The parameters used during the conversion.

    status

    The status of the request.

    Declaration
    public AsyncCameraImageConversionStatus status { get; }
    Property Value
    Type Description
    AsyncCameraImageConversionStatus

    The status of the request.

    Methods

    Dispose()

    Dispose native resources associated with this request, including the raw image data. The NativeArray returned by GetData<T>() is invalidated immediately after calling Dispose.

    Declaration
    public void Dispose()

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(XRAsyncCameraImageConversion)

    Declaration
    public bool Equals(XRAsyncCameraImageConversion other)
    Parameters
    Type Name Description
    XRAsyncCameraImageConversion other
    Returns
    Type Description
    Boolean

    GetData<T>()

    Get the raw image data. The returned NativeArray is a direct "view" into the native memory. The memory is only valid until this XRAsyncCameraImageConversion is disposed.

    Declaration
    public NativeArray<T> GetData<T>()
        where T : struct
    Returns
    Type Description
    NativeArray<T>

    A new NativeArray representing the raw image data. This method may fail; use NativeArray.IsCreated to determine the validity of the data.

    Type Parameters
    Name Description
    T

    The type of data to return. No conversion is performed based on the type; this is merely for access convenience.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the asynchronous conversion status is not Ready or if the conversion is invalid.

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    Operators

    Equality(XRAsyncCameraImageConversion, XRAsyncCameraImageConversion)

    Declaration
    public static bool operator ==(XRAsyncCameraImageConversion lhs, XRAsyncCameraImageConversion rhs)
    Parameters
    Type Name Description
    XRAsyncCameraImageConversion lhs
    XRAsyncCameraImageConversion rhs
    Returns
    Type Description
    Boolean

    Inequality(XRAsyncCameraImageConversion, XRAsyncCameraImageConversion)

    Declaration
    public static bool operator !=(XRAsyncCameraImageConversion lhs, XRAsyncCameraImageConversion rhs)
    Parameters
    Type Name Description
    XRAsyncCameraImageConversion lhs
    XRAsyncCameraImageConversion rhs
    Returns
    Type Description
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023