Class ARBoundingBoxFeature
Enables AR Foundation bounding box support via OpenXR for Meta Quest devices.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Meta
Assembly: Unity.XR.MetaOpenXR.dll
Syntax
[OpenXRFeature(UiName = "Meta Quest: Bounding Boxes", BuildTargetGroups = new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.Standalone }, Company = "Unity Technologies", Desc = "AR Foundation bounding box support on Meta Quest devices", DocumentationLink = "https://docs.unity3d.com/Packages/com.unity.xr.meta-openxr@2.1/manual/features/bounding-boxes.html", OpenxrExtensionStrings = "XR_FB_scene XR_FB_spatial_entity XR_META_spatial_entity_discovery", Category = "Feature", FeatureId = "com.unity.openxr.feature.arfoundation-meta-bounding-boxes", Version = "0.1.0")]
public class ARBoundingBoxFeature : MetaOpenXRFeature
Fields
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.arfoundation-meta-bounding-boxes"
Field Value
Type | Description |
---|---|
string |
Methods
GetValidationChecks(List<ValidationRule>, BuildTargetGroup)
Validation Rules for ARBoundingBoxFeature.
Declaration
protected override void GetValidationChecks(List<OpenXRFeature.ValidationRule> rules, BuildTargetGroup targetGroup)
Parameters
Type | Name | Description |
---|---|---|
List<OpenXRFeature.ValidationRule> | rules | |
BuildTargetGroup | targetGroup |
Overrides
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 |
Returns
Type | Description |
---|---|
bool | true if this feature successfully initialized. Otherwise, false. |
Overrides
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
OnSubsystemCreate()
Creates the MetaOpenXRBoundingBoxSubsystem, but does not start it. (Start/Stop is typically handled by AR Foundation managers.)
Declaration
protected override void OnSubsystemCreate()
Overrides
OnSubsystemDestroy()
Destroys the bounding box subsystem.
Declaration
protected override void OnSubsystemDestroy()