Class OpenXRFeatureSetManager
API for finding and managing feature sets for OpenXR.
Inherited Members
Namespace: UnityEditor.XR.OpenXR.Features
Assembly: Unity.XR.OpenXR.Editor.dll
Syntax
public static class OpenXRFeatureSetManagerFields
activeBuildTarget
The current active build target. Used to handle callbacks from enabled into CanFeatureBeDisabled(string) to determine if a feature can currently be disabled.
Declaration
public static BuildTargetGroup activeBuildTargetField Value
| Type | Description | 
|---|---|
| BuildTargetGroup | 
Methods
CanFeatureBeDisabled(string, BuildTargetGroup)
Tell the user if the feature with passed in feature id can be disabled based on the build target group.
Declaration
public static bool CanFeatureBeDisabled(string featureId, BuildTargetGroup buildTargetGroup)Parameters
| Type | Name | Description | 
|---|---|---|
| string | featureId | The feature id of the feature to check. | 
| BuildTargetGroup | buildTargetGroup | The build target group whose feature sets you are checking against. | 
Returns
| Type | Description | 
|---|---|
| bool | True if currently required by some feature set, false otherwise. | 
FeatureSetsForBuildTarget(BuildTargetGroup)
Returns the list of all OpenXRFeatureSetManager.FeatureSet for the given build target group.
Declaration
public static List<OpenXRFeatureSetManager.FeatureSet> FeatureSetsForBuildTarget(BuildTargetGroup buildTargetGroup)Parameters
| Type | Name | Description | 
|---|---|---|
| BuildTargetGroup | buildTargetGroup | The build target group to find the feature sets for. | 
Returns
| Type | Description | 
|---|---|
| List<OpenXRFeatureSetManager.FeatureSet> | List of OpenXRFeatureSetManager.FeatureSet or null if there is nothing that matches the given input. | 
GetFeatureSetWithId(BuildTargetGroup, string)
Returns a specific OpenXRFeatureSetManager.FeatureSet instance that matches the input.
Declaration
public static OpenXRFeatureSetManager.FeatureSet GetFeatureSetWithId(BuildTargetGroup buildTargetGroup, string featureSetId)Parameters
| Type | Name | Description | 
|---|---|---|
| BuildTargetGroup | buildTargetGroup | The build target group this feature set supports. | 
| string | featureSetId | The feature set id for the specific feature set being requested. | 
Returns
| Type | Description | 
|---|---|
| OpenXRFeatureSetManager.FeatureSet | The matching OpenXRFeatureSetManager.FeatureSet or null. | 
InitializeFeatureSets()
Initializes all currently known feature sets. This will do two initialization passes:
- Starts with all built in/known feature sets.
- Queries the system for anything with an OpenXRFeatureSetAttribute defined on it and uses that to add/update the store of known feature sets.
Declaration
public static void InitializeFeatureSets()SetFeaturesFromEnabledFeatureSets(BuildTargetGroup)
Given the current enabled state of the feature sets that match for a build target group, enable and disable the features associated with each feature set. Features that overlap sets of varying enabled states will maintain their enabled setting.
Declaration
public static void SetFeaturesFromEnabledFeatureSets(BuildTargetGroup buildTargetGroup)Parameters
| Type | Name | Description | 
|---|---|---|
| BuildTargetGroup | buildTargetGroup | The build target group to process features sets for. |