docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OpenXRFeatureSetManager

    API for finding and managing feature sets for OpenXR.

    Inheritance
    object
    OpenXRFeatureSetManager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 CanFeatureBeDisabled(string) to determine if a feature can currently be disabled.

    Declaration
    public static BuildTargetGroup activeBuildTarget
    Field 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:

    1. Starts with all built in/known feature sets.
    2. 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.

    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)