Class FeatureHelpers
Editor OpenXR Feature helpers.
Inherited Members
Namespace: UnityEditor.XR.OpenXR.Features
Syntax
public static class FeatureHelpers
Methods
GetFeaturesWithIdsForActiveBuildTarget(String[])
Given an array of feature ids, returns an array of matching OpenXRFeature instances.
Declaration
public static OpenXRFeature[] GetFeaturesWithIdsForActiveBuildTarget(string[] featureIds)
Parameters
Type | Name | Description |
---|---|---|
String[] | featureIds | Array of feature ids to match against. |
Returns
Type | Description |
---|---|
OpenXRFeature[] | An array of all matching features. |
GetFeaturesWithIdsForBuildTarget(BuildTargetGroup, String[])
Given an array of feature ids, returns an array of matching OpenXRFeature instances that match.
Declaration
public static OpenXRFeature[] GetFeaturesWithIdsForBuildTarget(BuildTargetGroup buildTargetGroup, string[] featureIds)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | buildTargetGroup | The build target group to get the feature from. |
String[] | featureIds | Array of feature ids to match against. |
Returns
Type | Description |
---|---|
OpenXRFeature[] | An array of all matching features. |
GetFeatureWithIdForActiveBuildTarget(String)
Given a feature id, returns the first instance of OpenXRFeature associated with that id.
Declaration
public static OpenXRFeature GetFeatureWithIdForActiveBuildTarget(string featureId)
Parameters
Type | Name | Description |
---|---|---|
String | featureId | The unique id identifying the feature |
Returns
Type | Description |
---|---|
OpenXRFeature | The instance of the feature matching thd id, or null. |
GetFeatureWithIdForBuildTarget(BuildTargetGroup, String)
Given a feature id, returns the first OpenXRFeature associated with that id.
Declaration
public static OpenXRFeature GetFeatureWithIdForBuildTarget(BuildTargetGroup buildTargetGroup, string featureId)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | buildTargetGroup | The build target group to get the feature from. |
String | featureId | The unique id identifying the feature |
Returns
Type | Description |
---|---|
OpenXRFeature | The instance of the feature matching thd id, or null. |
RefreshFeatures(BuildTargetGroup)
Discovers all features in project and ensures that OpenXRSettings.Instance.features is up to date for selected build target group.
Declaration
public static void RefreshFeatures(BuildTargetGroup group)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | group | build target group to refresh |