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 OpenXRFeatureSetManager
Fields
activeBuildTarget
The current active build target. Used to handle callbacks from enabled into
Can
Declaration
public static BuildTargetGroup activeBuildTarget
Field Value
Type | Description |
---|---|
Build |
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. |
Build |
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 Open
Declaration
public static List<OpenXRFeatureSetManager.FeatureSet> FeatureSetsForBuildTarget(BuildTargetGroup buildTargetGroup)
Parameters
Type | Name | Description |
---|---|---|
Build |
buildTargetGroup | The build target group to find the feature sets for. |
Returns
Type | Description |
---|---|
List<Open |
List of Open |
GetFeatureSetWithId(BuildTargetGroup, string)
Returns a specific Open
Declaration
public static OpenXRFeatureSetManager.FeatureSet GetFeatureSetWithId(BuildTargetGroup buildTargetGroup, string featureSetId)
Parameters
Type | Name | Description |
---|---|---|
Build |
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 |
---|---|
Open |
The matching Open |
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 Open
XRFeature defined on it and uses that to add/update the store of known feature sets.Set Attribute
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 |
---|---|---|
Build |
buildTargetGroup | The build target group to process features sets for. |