docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrSpatialReferenceImageEXT

    Describes a single input reference image for image tracking. Provided by XR_EXT_spatial_image_tracking.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.NativeTypes
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public readonly struct XrSpatialReferenceImageEXT
    Remarks
    Warning

    Don't initialize this struct with the default parameterless constructor. Use a constructor with parameters to ensure that type is correctly initialized to SpatialReferenceImageEXT.

    Constructors

    XrSpatialReferenceImageEXT(uint, uint, XrSpatialReferenceImageFormatEXT, uint, XrSpatialReferenceImagePlaneEXT*)

    Construct an instance with a null next pointer.

    Declaration
    public XrSpatialReferenceImageEXT(uint width, uint height, XrSpatialReferenceImageFormatEXT format, uint planeCount, XrSpatialReferenceImagePlaneEXT* planes)
    Parameters
    Type Name Description
    uint width

    The pixel width of the reference image.

    uint height

    The pixel height of the reference image.

    XrSpatialReferenceImageFormatEXT format

    The format of the image.

    uint planeCount

    The number of elements in planes.

    XrSpatialReferenceImagePlaneEXT* planes

    Pointer to an array of XrSpatialReferenceImagePlaneEXT structures representing the planes of the image data. Must be non-null.

    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    XrSpatialReferenceImageEXT(uint, uint, XrSpatialReferenceImageFormatEXT, NativeArray<XrSpatialReferenceImagePlaneEXT>)

    Construct an instance with a null next pointer from a native array of planes.

    Declaration
    public XrSpatialReferenceImageEXT(uint width, uint height, XrSpatialReferenceImageFormatEXT format, NativeArray<XrSpatialReferenceImagePlaneEXT> planes)
    Parameters
    Type Name Description
    uint width

    The pixel width of the reference image.

    uint height

    The pixel height of the reference image.

    XrSpatialReferenceImageFormatEXT format

    The format of the image.

    NativeArray<XrSpatialReferenceImagePlaneEXT> planes

    The planes of the image data.

    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    XrSpatialReferenceImageEXT(uint, uint, XrSpatialReferenceImageFormatEXT, ReadOnly)

    Construct an instance with a null next pointer from a read-only native array of planes.

    Declaration
    public XrSpatialReferenceImageEXT(uint width, uint height, XrSpatialReferenceImageFormatEXT format, NativeArray<XrSpatialReferenceImagePlaneEXT>.ReadOnly planes)
    Parameters
    Type Name Description
    uint width

    The pixel width of the reference image.

    uint height

    The pixel height of the reference image.

    XrSpatialReferenceImageFormatEXT format

    The format of the image.

    NativeArray<XrSpatialReferenceImagePlaneEXT>.ReadOnly planes

    The planes of the image data.

    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    XrSpatialReferenceImageEXT(void*, uint, uint, XrSpatialReferenceImageFormatEXT, uint, XrSpatialReferenceImagePlaneEXT*)

    Construct an instance.

    Declaration
    public XrSpatialReferenceImageEXT(void* next, uint width, uint height, XrSpatialReferenceImageFormatEXT format, uint planeCount, XrSpatialReferenceImagePlaneEXT* planes)
    Parameters
    Type Name Description
    void* next

    null or a pointer to the next structure in a structure chain.

    uint width

    The pixel width of the reference image.

    uint height

    The pixel height of the reference image.

    XrSpatialReferenceImageFormatEXT format

    The format of the image.

    uint planeCount

    The number of elements in planes. Must provide one plane per color channel of format (4 for RGBA_8888, 3 for RGB_888/YUV_420_888).

    XrSpatialReferenceImagePlaneEXT* planes

    Pointer to an array of XrSpatialReferenceImagePlaneEXT structures representing the planes of the image data. Must be non-null.

    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    XrSpatialReferenceImageEXT(void*, uint, uint, XrSpatialReferenceImageFormatEXT, NativeArray<XrSpatialReferenceImagePlaneEXT>)

    Construct an instance from a native array of planes.

    Declaration
    public XrSpatialReferenceImageEXT(void* next, uint width, uint height, XrSpatialReferenceImageFormatEXT format, NativeArray<XrSpatialReferenceImagePlaneEXT> planes)
    Parameters
    Type Name Description
    void* next

    null or a pointer to the next structure in a structure chain.

    uint width

    The pixel width of the reference image.

    uint height

    The pixel height of the reference image.

    XrSpatialReferenceImageFormatEXT format

    The format of the image.

    NativeArray<XrSpatialReferenceImagePlaneEXT> planes

    The planes of the image data.

    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    XrSpatialReferenceImageEXT(void*, uint, uint, XrSpatialReferenceImageFormatEXT, ReadOnly)

    Construct an instance from a read-only native array of planes.

    Declaration
    public XrSpatialReferenceImageEXT(void* next, uint width, uint height, XrSpatialReferenceImageFormatEXT format, NativeArray<XrSpatialReferenceImagePlaneEXT>.ReadOnly planes)
    Parameters
    Type Name Description
    void* next

    null or a pointer to the next structure in a structure chain.

    uint width

    The pixel width of the reference image.

    uint height

    The pixel height of the reference image.

    XrSpatialReferenceImageFormatEXT format

    The format of the image.

    NativeArray<XrSpatialReferenceImagePlaneEXT>.ReadOnly planes

    The planes of the image data.

    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    Properties

    format

    The format of the image.

    Declaration
    public XrSpatialReferenceImageFormatEXT format { get; }
    Property Value
    Type Description
    XrSpatialReferenceImageFormatEXT
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    height

    The pixel height of the reference image.

    Declaration
    public uint height { get; }
    Property Value
    Type Description
    uint
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    next

    null or a pointer to the next structure in a structure chain.

    Declaration
    public void* next { get; }
    Property Value
    Type Description
    void*
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    planeCount

    The number of elements in planes. The application must provide one plane per color channel of format: 4 for RGBA_8888, 3 for RGB_888, and 3 for YUV_420_888.

    Declaration
    public uint planeCount { get; }
    Property Value
    Type Description
    uint
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    planes

    Pointer to an array of XrSpatialReferenceImagePlaneEXT structures representing the planes of the image data. Must be non-null.

    Declaration
    public XrSpatialReferenceImagePlaneEXT* planes { get; }
    Property Value
    Type Description
    XrSpatialReferenceImagePlaneEXT*
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    type

    The XrStructureType of this struct: SpatialReferenceImageEXT.

    Declaration
    public XrStructureType type { get; }
    Property Value
    Type Description
    XrStructureType
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    width

    The pixel width of the reference image.

    Declaration
    public uint width { get; }
    Property Value
    Type Description
    uint
    See Also
    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT

    See Also

    XrSpatialImageSizeEXT
    XrSpatialImageStaticOptimizationEXT
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)