docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OpenXRRuntime

    OpenXR Runtime access

    Inheritance
    object
    OpenXRRuntime
    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
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public static class OpenXRRuntime

    Properties

    apiVersion

    Version of the current runtime API.

    Declaration
    public static string apiVersion { get; }
    Property Value
    Type Description
    string

    name

    Name of the current runtime.

    Declaration
    public static string name { get; }
    Property Value
    Type Description
    string

    pluginVersion

    Version of the current runtime plug-in.

    Declaration
    public static string pluginVersion { get; }
    Property Value
    Type Description
    string

    retryInitializationOnFormFactorErrors

    This bool controls whether or not to retry initialization if the runtime reports a FORM_FACTOR_UNAVAILABLE error during initialization.

    Declaration
    public static bool retryInitializationOnFormFactorErrors { get; set; }
    Property Value
    Type Description
    bool

    version

    Version of the current runtime.

    Declaration
    public static string version { get; }
    Property Value
    Type Description
    string

    Methods

    GetAvailableExtensions()

    Returns the list of names of extensions available within the OpenXR runtime.

    Declaration
    public static string[] GetAvailableExtensions()
    Returns
    Type Description
    string[]

    Array of extension names or an empty array if no extensions are available.

    GetEnabledExtensions()

    Returns the list of names of extensions enabled within the OpenXR runtime.

    Declaration
    public static string[] GetEnabledExtensions()
    Returns
    Type Description
    string[]

    Array of extension names or an empty array if no extensions are enabled.

    GetExtensionVersion(string)

    Returns the version number of the given extension.

    Declaration
    public static uint GetExtensionVersion(string extensionName)
    Parameters
    Type Name Description
    string extensionName

    Name of the extension

    Returns
    Type Description
    uint

    Version number of given extension, or zero if the extension was not found

    IsExtensionEnabled(string)

    Describes whether the OpenXR Extension with the given name is enabled.

    Declaration
    public static bool IsExtensionEnabled(string extensionName)
    Parameters
    Type Name Description
    string extensionName

    Name of the extension

    Returns
    Type Description
    bool

    True if the extension matching the given name is enabled, false otherwise

    Events

    wantsToQuit

    This event is raised when OpenXR wants the application to quit.

    Note that this event is raised before Application.wantsToQuit is raised and is generally raised because the Runtime has requested the application quit.

    Return true and the quit process will continue. Return false and the quit process will cancel.

    Declaration
    public static event Func<bool> wantsToQuit
    Event Type
    Type Description
    Func<bool>

    wantsToRestart

    This event is raised when OpenXR Runtime wants to restart the XR loader by shutting down the loader and reinitializing it.

    Return true and the restart process will continue. Return false and the XR loader will be unloaded and the quit process will begin.

    Declaration
    public static event Func<bool> wantsToRestart
    Event Type
    Type Description
    Func<bool>
    In This Article
    Back to top
    Copyright © 2024 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)