docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MarkerConfigOptions

    Configuration options for marker detection using OpenXR spatial marker tracking.

    Inheritance
    object
    MarkerConfigOptions
    AprilTagConfigOptions
    ArucoMarkerConfigOptions
    MicroQRCodeConfigOptions
    QRCodeConfigOptions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.OpenXR.Features.SpatialEntities
    Assembly: Unity.XR.SpatialEntities.dll
    Syntax
    [Serializable]
    public class MarkerConfigOptions
    Remarks

    These options configure how markers are detected, sized, and treated by the runtime when using the OpenXR XR_EXT_spatial_marker_tracking extension.

    Constructors

    MarkerConfigOptions()

    Construct an instance with default parameters.

    Declaration
    protected MarkerConfigOptions()

    MarkerConfigOptions(bool)

    Construct an instance with default parameters and the desired enable setting.

    Declaration
    protected MarkerConfigOptions(bool enableCapability)
    Parameters
    Type Name Description
    bool enableCapability

    true if the capability should be enabled. Otherwise, false.

    MarkerConfigOptions(bool, string)

    Construct an instance with default parameters and the desired enable setting and marker type name.

    Declaration
    protected MarkerConfigOptions(bool enableCapability, string markersName)
    Parameters
    Type Name Description
    bool enableCapability

    true if the capability should be enabled. Otherwise, false.

    string markersName

    The plural name of your marker type. For example, "QR codes".

    MarkerConfigOptions(string)

    Construct an instance with default parameters and the given plural name of its marker type.

    Declaration
    protected MarkerConfigOptions(string markersName)
    Parameters
    Type Name Description
    string markersName

    The plural name of your marker type. For example, "QR codes".

    Fields

    m_MarkersName

    Set this string to the plural name of your marker type. ie, "QR Codes".

    Declaration
    [SerializeField]
    [HideInInspector]
    protected string m_MarkersName
    Field Value
    Type Description
    string
    Remarks

    This string is used by the Editor to render the Inspector for this type via a custom property drawer.

    Properties

    enableCapability

    Enables or disables detection of this marker type by the spatial marker tracking runtime.

    Declaration
    public bool enableCapability { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    When enabled and supported by the runtime, this marker type present in the environment may be detected and tracked. This option cannot be changed when the Spatial Marker Feature is not enabled or is actively running.

    enableFixedSizeMarker

    Enables or disables the assumption of a fixed physical size for detected markers.

    Declaration
    public bool enableFixedSizeMarker { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    When enabled and supported by the runtime, a fixed physical size is used to improve pose and size tracking accuracy. If disabled or unsupported, fixedSizeMarkerSideLength is ignored. This option cannot be changed when the Spatial Marker Feature is not enabled or is actively running.

    enableStaticMarker

    Enables or disables the assumption that markers are static in the environment.

    Declaration
    public bool enableStaticMarker { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    When enabled and supported by the runtime, treating this marker type as static can improve pose and size tracking stability. This option cannot be changed when the Spatial Marker Feature is not enabled or is actively running.

    fixedSizeMarkerSideLength

    The length, in meters, of each side of a fixed-size marker.

    Declaration
    public float fixedSizeMarkerSideLength { get; set; }
    Property Value
    Type Description
    float
    Remarks

    This value is used only when enableFixedSizeMarker is enabled and the runtime supports fixed-size markers. This option cannot be changed when the Spatial Marker Feature is not enabled or is actively running.

    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)