docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BoundaryVisibilityFeature

    Use this OpenXR feature to control boundary visibility on Meta Quest devices.

    Inheritance
    object
    Object
    ScriptableObject
    OpenXRFeature
    MetaOpenXRFeature
    BoundaryVisibilityFeature
    Inherited Members
    MetaOpenXRFeature.OnEnabledChange()
    OpenXRFeature.HookGetInstanceProcAddr(IntPtr)
    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.OnInstanceDestroy(ulong)
    OpenXRFeature.OnSessionLossPending(ulong)
    OpenXRFeature.OnInstanceLossPending(ulong)
    OpenXRFeature.OnFormFactorChange(int)
    OpenXRFeature.OnViewConfigurationTypeChange(int)
    OpenXRFeature.OnEnvironmentBlendModeChange(XrEnvironmentBlendMode)
    OpenXRFeature.PathToString(ulong)
    OpenXRFeature.StringToPath(string)
    OpenXRFeature.GetCurrentInteractionProfile(ulong)
    OpenXRFeature.GetCurrentInteractionProfile(string)
    OpenXRFeature.GetCurrentAppSpace()
    OpenXRFeature.GetViewConfigurationTypeForRenderPass(int)
    OpenXRFeature.SetEnvironmentBlendMode(XrEnvironmentBlendMode)
    OpenXRFeature.GetEnvironmentBlendMode()
    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)
    OpenXRFeature.enabled
    OpenXRFeature.xrGetInstanceProcAddr
    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, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    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.Meta
    Assembly: Unity.XR.MetaOpenXR.dll
    Syntax
    [OpenXRFeature(UiName = "Meta Quest: Boundary Visibility", BuildTargetGroups = new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.Standalone }, Company = "Unity Technologies", Desc = "Enables you to suppress the visibility of the boundary so that users can move freely when passthrough is enabled", DocumentationLink = "https://docs.unity3d.com/Packages/com.unity.xr.meta-openxr@2.1/manual/features/boundary-visibility.html", OpenxrExtensionStrings = "XR_META_boundary_visibility", Category = "Feature", FeatureId = "com.unity.openxr.feature.meta-boundary-visibility", Version = "0.1.0")]
    public class BoundaryVisibilityFeature : MetaOpenXRFeature

    Fields

    XR_BOUNDARY_VISIBILITY_SUPPRESSION_NOT_ALLOWED_META

    Integer value of XrResult which indicates that the runtime did not accept the request to suppress the boundary visibility. This is expected when the app is not rendering passthrough.

    Declaration
    public const int XR_BOUNDARY_VISIBILITY_SUPPRESSION_NOT_ALLOWED_META = 1000528000
    Field Value
    Type Description
    int

    Equal to XR_BOUNDARY_VISIBILITY_SUPPRESSION_NOT_ALLOWED_META.

    Remarks

    Cast your XrResult to int and compare with this value to determine if the runtime did not accept your request to suppress the boundary visibility.

    featureId

    The feature id string. This is used to give the feature a well known id for reference.

    Declaration
    public const string featureId = "com.unity.openxr.feature.meta-boundary-visibility"
    Field Value
    Type Description
    string

    The feature id.

    Properties

    currentVisibility

    Get the current boundary visibility.

    Declaration
    public XrBoundaryVisibility currentVisibility { get; }
    Property Value
    Type Description
    XrBoundaryVisibility

    The current visibility.

    Methods

    GetValidationChecks(List<ValidationRule>, BuildTargetGroup)

    Validation Rules for Boundary Visibility feature.

    Declaration
    protected override void GetValidationChecks(List<OpenXRFeature.ValidationRule> rules, BuildTargetGroup targetGroup)
    Parameters
    Type Name Description
    List<OpenXRFeature.ValidationRule> rules
    BuildTargetGroup targetGroup
    Overrides
    OpenXRFeature.GetValidationChecks(List<OpenXRFeature.ValidationRule>, BuildTargetGroup)

    OnInstanceCreate(ulong)

    Called after xrCreateInstance. Override this method to validate that any necessary OpenXR extensions were successfully enabled (OpenXRRuntime.IsExtensionEnabled) and that any required system properties are supported. If this method returns false, the feature's enabled property is set to false.

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

    Handle of the native xrInstance.

    Returns
    Type Description
    bool

    true if this feature successfully initialized. Otherwise, false.

    Overrides
    OpenXRFeature.OnInstanceCreate(ulong)
    Remarks

    If this feature is a required feature of an enabled feature set, returning false here causes the OpenXRLoader to fail, and XR Plug-in Management will fall back to another loader if enabled.

    See Also
    Enabling OpenXR spec extension strings

    TryRequestBoundaryVisibility(XrBoundaryVisibility)

    Attempts to request a change to the current boundary visibility. If the request returns XR_SUCCESS, Meta's OpenXR runtime is expected to subsequently change the boundary visibility and invoke the boundaryVisibilityChanged event.

    Declaration
    public XrResult TryRequestBoundaryVisibility(XrBoundaryVisibility visibility)
    Parameters
    Type Name Description
    XrBoundaryVisibility visibility

    The desired boundary visibility.

    Returns
    Type Description
    XrResult

    The result that indicates whether the operation succeeded.

    Remarks

    This method can return multiple possible success codes, most notably:

    • XR_SUCCESS if the request was successfully made.
    • XR_BOUNDARY_VISIBILITY_SUPPRESSION_NOT_ALLOWED_META if the runtime did not accept the request to suppress the boundary visibility.

    Events

    boundaryVisibilityChanged

    Invoked whenever the Meta OpenXR runtime's boundary visibility has changed. Visibility may change in response to TryRequestBoundaryVisibility(XrBoundaryVisibility) or at the discretion of Meta's OpenXR runtime, such as if your app fully obscures the physical environment.

    Declaration
    public event EventHandler<XrBoundaryVisibility> boundaryVisibilityChanged
    Event Type
    Type Description
    EventHandler<XrBoundaryVisibility>

    The new boundary visibility.

    In This Article
    Back to top
    Copyright © 2025 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)