Class CapabilityProfileSelection
Class that stores the user selected Capability
Inherited Members
Namespace: Unity.XR.CoreUtils .Capabilities.Editor
Assembly: Unity.XR.CoreUtils.Editor.dll
Syntax
public static class CapabilityProfileSelection
Properties
Selected
Contains the currently selected capability profiles.
Declaration
public static IReadOnlyList<CapabilityProfile> Selected { get; }
Property Value
Type | Description |
---|---|
IRead |
Methods
Add(CapabilityProfile)
Adds a capability profile to the selected capability profiles.
Declaration
public static void Add(CapabilityProfile profile)
Parameters
Type | Name | Description |
---|---|---|
Capability |
profile | The profile to add to the active set. |
Clear()
Clears the selected capability profiles
Declaration
public static void Clear()
IsCapabilityAvailableInSelectedProfiles(string)
Checks if a given capability key is currently available in the current selected profiles
Declaration
public static bool IsCapabilityAvailableInSelectedProfiles(string capabilityKey)
Parameters
Type | Name | Description |
---|---|---|
string | capabilityKey | The capability key to check |
Returns
Type | Description |
---|---|
bool | Returns true if the capability key is available and enabled. |
IsSelected(CapabilityProfile)
Checks if a given profile is currently one of the selected profiles
Declaration
public static bool IsSelected(CapabilityProfile profile)
Parameters
Type | Name | Description |
---|---|---|
Capability |
profile | The profile to check |
Returns
Type | Description |
---|---|
bool | True if this profile is in the active selection, false otherwise. |
Remove(CapabilityProfile)
Removes the capability profile from the selected capability profiles.
Declaration
public static bool Remove(CapabilityProfile profile)
Parameters
Type | Name | Description |
---|---|---|
Capability |
profile | The profile to attempt to remove from selected profiles. |
Returns
Type | Description |
---|---|
bool | Returns true if successful |
Save()
Saves the selected capability profiles to the user settings.
Declaration
public static void Save()
Events
SelectionSaved
Action for when the selection is saved.
Declaration
public static event Action SelectionSaved
Event Type
Type | Description |
---|---|
Action |