Class UserSetting<T>
A generic implementation of IUserSetting to be used with a Settings instance. This default implementation assumes the Settings instance contains two ISettingsRepository, one for Project and one for User.
Implements
Inherited Members
Namespace: UnityEditor.SettingsManagement
Assembly: solution.dll
Syntax
public class UserSetting<T> : IUserSetting
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
| Name | Description |
|---|---|
| UserSetting(Settings, string, string, T, SettingsScope) | Constructor for UserSetting{T} type. |
| UserSetting(Settings, string, T, SettingsScope) | Constructor for UserSetting{T} type. |
Properties
| Name | Description |
|---|---|
| defaultValue | |
| key | |
| scope | The scope affects which ISettingsRepository the settings instance will save it's data to. |
| settings | |
| settingsRepositoryName | The name of the ISettingsRepository that this setting should be associated with. If null, the first repository matching the scope will be used. |
| type | |
| value |
Methods
| Name | Description |
|---|---|
| ApplyModifiedProperties() | When the inspected type is a reference value, it is possible to change properties without affecting the backing setting. ApplyModifiedProperties provides a method to force serialize these changes. |
| Delete(bool) | Delete the saved setting. Does not clear the current value. |
| GetDefaultValue() | Get a copy of the default value. |
| GetValue() | Get the currently stored value. |
| Reset(bool) | Set the current value back to the default. |
| SetValue(object, bool) | Set the value for this setting. |
| SetValue(T, bool) | Set the value for this setting. |
| ToString() | Get a summary of this setting. |
Operators
| Name | Description |
|---|---|
| implicit operator T(UserSetting<T>) | Implicit cast to backing type. |