docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DebugUtilsFeature

    Provides support for the XR_EXT_debug_utils OpenXR extension for debugging and development. This feature enables debug message callbacks from the OpenXR runtime with configurable severity and type filtering.

    Inheritance
    object
    Object
    ScriptableObject
    OpenXRFeature
    DebugUtilsFeature
    Inherited Members
    OpenXRFeature.enabled
    OpenXRFeature.xrGetInstanceProcAddr
    OpenXRFeature.OnSubsystemCreate()
    OpenXRFeature.OnSubsystemStart()
    OpenXRFeature.OnSubsystemStop()
    OpenXRFeature.OnSubsystemDestroy()
    OpenXRFeature.OnSystemChange(ulong)
    OpenXRFeature.OnSessionCreate(ulong)
    OpenXRFeature.OnAppSpaceChange(ulong)
    OpenXRFeature.OnSessionStateChange(int, int)
    OpenXRFeature.OnSessionBegin(ulong)
    OpenXRFeature.OnSessionEnd(ulong)
    OpenXRFeature.OnSessionExiting(ulong)
    OpenXRFeature.OnSessionDestroy(ulong)
    OpenXRFeature.OnSessionLossPending(ulong)
    OpenXRFeature.OnInstanceLossPending(ulong)
    OpenXRFeature.OnFormFactorChange(int)
    OpenXRFeature.OnViewConfigurationTypeChange(int)
    OpenXRFeature.OnEnvironmentBlendModeChange(XrEnvironmentBlendMode)
    OpenXRFeature.OnEnabledChange()
    OpenXRFeature.PathToString(ulong)
    OpenXRFeature.StringToPath(string)
    OpenXRFeature.GetCurrentInteractionProfile(ulong)
    OpenXRFeature.GetCurrentInteractionProfile(string)
    OpenXRFeature.GetCurrentAppSpace()
    OpenXRFeature.GetViewConfigurationTypeForRenderPass(int)
    OpenXRFeature.SetEnvironmentBlendMode(XrEnvironmentBlendMode)
    OpenXRFeature.GetEnvironmentBlendMode()
    OpenXRFeature.GetValidationChecks(List<OpenXRFeature.ValidationRule>, BuildTargetGroup)
    OpenXRFeature.CreateSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string)
    OpenXRFeature.StartSubsystem<T>()
    OpenXRFeature.StopSubsystem<T>()
    OpenXRFeature.DestroySubsystem<T>()
    OpenXRFeature.OnEnable()
    OpenXRFeature.OnDisable()
    OpenXRFeature.Awake()
    OpenXRFeature.GetAction(InputAction)
    OpenXRFeature.GetAction(InputDevice, InputFeatureUsage)
    OpenXRFeature.GetAction(InputDevice, string)
    OpenXRFeature.RegisterStatsDescriptor(string, OpenXRFeature.StatFlags)
    OpenXRFeature.SetStatAsFloat(ulong, float)
    OpenXRFeature.SetStatAsUInt(ulong, uint)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, InstantiateParameters)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.Features
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public class DebugUtilsFeature : OpenXRFeature
    Remarks

    Enable this feature to receive debug messages from the OpenXR runtime. Use the messageSeverity and messageType properties to filter which messages you want to receive. Messages are logged to the Unity console with the [Debug Utils] prefix. This feature is particularly useful during development to identify validation errors, performance warnings, and conformance issues in your OpenXR application.

    Examples

    This example shows how to configure the Debug Utils feature to receive only error and warning messages: OpenXRSettings settings = OpenXRSettings.GetSettingsForBuildTargetGroup(BuildTargetGroup.Standalone); DebugUtilsFeature debugUtilsFeature = settings.GetFeature<DebugUtilsFeature>(); if (debugUtilsFeature != null) { debugUtilsFeature.messageSeverity = DebugUtilsFeature.MessageSeverity.Error | DebugUtilsFeature.MessageSeverity.Warning; debugUtilsFeature.messageType = DebugUtilsFeature.MessageType.Validation | DebugUtilsFeature.MessageType.Performance; }

    Fields

    featureId

    A unique identifier for this feature.

    Declaration
    public const string featureId = "com.unity.openxr.feature.debugutils"
    Field Value
    Type Description
    string
    See Also
    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType

    Properties

    messageSeverity

    The severity level the debug utils extension should use to filter messages.

    Declaration
    public DebugUtilsFeature.MessageSeverity messageSeverity { get; set; }
    Property Value
    Type Description
    DebugUtilsFeature.MessageSeverity
    See Also
    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType

    messageType

    The message type that the debug utils extension should use to filter messages.

    Declaration
    public DebugUtilsFeature.MessageType messageType { get; set; }
    Property Value
    Type Description
    DebugUtilsFeature.MessageType
    See Also
    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType

    Methods

    HookGetInstanceProcAddr(IntPtr)

    Hooks into the OpenXR instance creation process to configure the XR Debug Utils extension. This override initializes the native debug callback with the configured message filters.

    Declaration
    protected override IntPtr HookGetInstanceProcAddr(IntPtr hookGetInstanceProcAddr)
    Parameters
    Type Name Description
    IntPtr hookGetInstanceProcAddr

    The original GetInstanceProcAddr function pointer.

    Returns
    Type Description
    IntPtr

    The original GetInstanceProcAddr function pointer passed to the method.

    Overrides
    OpenXRFeature.HookGetInstanceProcAddr(IntPtr)
    Remarks

    This method is called before the OpenXR instance is created. It registers a managed callback that will receive debug messages from the OpenXR runtime based on the configured messageSeverity and messageType filters. The callback remains active until the OpenXR instance is destroyed.

    Examples

    This method is called automatically by the OpenXR loader. You typically don't need to call it directly. However, you can override it in a derived class to add custom initialization: public class CustomDebugUtils : DebugUtilsFeature { protected internal override IntPtr HookGetInstanceProcAddr(IntPtr hookGetInstanceProcAddr) { Debug.Log("Initializing custom debug utilities"); return base.HookGetInstanceProcAddr(hookGetInstanceProcAddr); } }

    See Also
    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType

    OnInstanceCreate(ulong)

    This method triggers when the OpenXR instance is successfully created.

    Declaration
    protected override bool OnInstanceCreate(ulong xrInstance)
    Parameters
    Type Name Description
    ulong xrInstance

    The handle to the created OpenXR instance.

    Returns
    Type Description
    bool

    true if initialization was successful, false otherwise.

    Overrides
    OpenXRFeature.OnInstanceCreate(ulong)
    See Also
    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType

    OnInstanceDestroy(ulong)

    This method triggers the teardown process for all support classes.

    Declaration
    protected override void OnInstanceDestroy(ulong xrInstance)
    Parameters
    Type Name Description
    ulong xrInstance

    The handle of the OpenXR instance being destroyed.

    Overrides
    OpenXRFeature.OnInstanceDestroy(ulong)
    See Also
    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType

    See Also

    ApiLayersFeature
    DebugUtilsFeature.MessageSeverity
    DebugUtilsFeature.MessageType
    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)