docs.unity3d.com
    Show / Hide Table of Contents

    Class OpenXRSettings

    Build time settings for OpenXR. These are serialized and available at runtime.

    Inheritance
    Object
    OpenXRSettings
    Namespace: UnityEngine.XR.OpenXR
    Syntax
    public class OpenXRSettings : ScriptableObject

    Properties

    ActiveBuildTargetInstance

    Accessor to OpenXR build time settings.

    In the Unity Editor, this returns the settings for the active build target group.

    Declaration
    public static OpenXRSettings ActiveBuildTargetInstance { get; }
    Property Value
    Type Description
    OpenXRSettings

    depthSubmissionMode

    Enables XR_KHR_composition_layer_depth if possible and resolves or submits depth to OpenXR runtime.

    Declaration
    public OpenXRSettings.DepthSubmissionMode depthSubmissionMode { get; set; }
    Property Value
    Type Description
    OpenXRSettings.DepthSubmissionMode

    featureCount

    Number of available features.

    Declaration
    public int featureCount { get; }
    Property Value
    Type Description
    Int32

    Instance

    Accessor to OpenXR build time settings.

    In the Unity Editor, this returns the settings for the Standalone build target group.

    Declaration
    public static OpenXRSettings Instance { get; }
    Property Value
    Type Description
    OpenXRSettings

    renderMode

    Runtime Stereo rendering mode.

    Declaration
    public OpenXRSettings.RenderMode renderMode { get; set; }
    Property Value
    Type Description
    OpenXRSettings.RenderMode

    Methods

    GetFeature(Type)

    Returns the first feature that matches the given type.

    Declaration
    public OpenXRFeature GetFeature(Type featureType)
    Parameters
    Type Name Description
    Type featureType

    Type of the feature to return

    Returns
    Type Description
    OpenXRFeature

    Feature by type

    GetFeature<TFeature>()

    Returns the first feature that matches the given type.

    Declaration
    public TFeature GetFeature<TFeature>()
        where TFeature : OpenXRFeature
    Returns
    Type Description
    TFeature

    Feature by type

    Type Parameters
    Name Description
    TFeature

    Type of the feature to retrieve

    GetFeatures()

    Return all features.

    Declaration
    public OpenXRFeature[] GetFeatures()
    Returns
    Type Description
    OpenXRFeature[]

    All features

    GetFeatures(List<OpenXRFeature>)

    Return all features.

    Declaration
    public int GetFeatures(List<OpenXRFeature> featuresOut)
    Parameters
    Type Name Description
    List<OpenXRFeature> featuresOut

    Output list of features

    Returns
    Type Description
    Int32

    Number of features returned

    GetFeatures(Type)

    Returns all features of Type.

    Declaration
    public OpenXRFeature[] GetFeatures(Type featureType)
    Parameters
    Type Name Description
    Type featureType

    Type of the feature to retrieve

    Returns
    Type Description
    OpenXRFeature[]

    All components of Type

    GetFeatures(Type, List<OpenXRFeature>)

    Returns all features of a given type.

    Declaration
    public int GetFeatures(Type featureType, List<OpenXRFeature> featuresOut)
    Parameters
    Type Name Description
    Type featureType

    Type of the feature to retrieve

    List<OpenXRFeature> featuresOut

    Output list of features

    Returns
    Type Description
    Int32

    Number of features returned

    GetFeatures<TFeature>()

    Returns all features of a given type.

    Declaration
    public OpenXRFeature[] GetFeatures<TFeature>()
    Returns
    Type Description
    OpenXRFeature[]

    All components of Type

    Type Parameters
    Name Description
    TFeature

    Type of the feature to retrieve

    GetFeatures<TFeature>(List<TFeature>)

    Returns all features of a given type.

    Declaration
    public int GetFeatures<TFeature>(List<TFeature> featuresOut)
        where TFeature : OpenXRFeature
    Parameters
    Type Name Description
    List<TFeature> featuresOut

    Output list of features

    Returns
    Type Description
    Int32

    Number of features returned

    Type Parameters
    Name Description
    TFeature

    Feature type

    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