Class UserSettingsProvider
A SettingsProvider implementation that creates an interface from settings reflected from a collection of assemblies.
Inherited Members
Namespace: UnityEditor.SettingsManagement
Assembly: Unity.Settings.Editor.dll
Syntax
public sealed class UserSettingsProvider : SettingsProvider
Constructors
UserSettingsProvider(string, Settings, Assembly[], SettingsScope)
Initializes and returns a new UserSettingsProvider instance.
Declaration
public UserSettingsProvider(string path, Settings settings, Assembly[] assemblies, SettingsScope scopes = SettingsScope.User)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The settings menu path. |
| Settings | settings | The Settings instance that this provider is inspecting. |
| Assembly[] | assemblies | A collection of assemblies to scan for UserSettingAttribute and UserSettingBlockAttribute attributes. |
| SettingsScope | scopes | Which scopes this provider is valid for. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if settings or assemblies is null. |
Fields
developerModeCategory
Category string constant to check whether Unity is running in developer (internal) mode.
Declaration
public const string developerModeCategory = "Developer Mode"
Field Value
| Type | Description |
|---|---|
| string |
Methods
OnActivate(string, VisualElement)
Invoked by the SettingsProvider when activated in the Editor.
Declaration
public override void OnActivate(string searchContext, VisualElement rootElement)
Parameters
| Type | Name | Description |
|---|---|---|
| string | searchContext | Search context in the search box on the Settings window. |
| VisualElement | rootElement | Root of the UIElements tree. If you add to this root, the SettingsProvider uses UIElements instead of calling OnGUI(string) to build the UI. See OnActivate(string, VisualElement) for details. |
Overrides
OnGUI(string)
Called when the Settings window opens in the Editor.
Declaration
public override void OnGUI(string searchContext)
Parameters
| Type | Name | Description |
|---|---|---|
| string | searchContext | Search context in the search box on the Settings window. |
Overrides
See Also
OnTitleBarGUI()
Invoked by the SettingsProvider container when drawing the UI header.
Declaration
public override void OnTitleBarGUI()