ParagonSetting

Internal runtime representation of a single discovered editor setting. Wraps a PropertyInfo with resolved metadata — display label, persistence key, value type, and settings scope. Created by ParagonSettings during domain reload for each property decorated with [EditorPreference] or [ProjectSetting].

Definition

Namespace: Paragon.Editor Assembly: Paragon.Editor.dll

internal class ParagonSetting

Fields

Field
Type
Access
Description

Label

string

public readonly

Display label for the settings UI. Falls back to property name if attribute label is empty

Key

string

public readonly

Persistence key for Settings.Get/Set. Falls back to "{DeclaringType.FullName}.{PropertyName}" if attribute key is empty

Type

Type

public readonly

The property's value type (used for generic Settings.Get<T> reflection)

Scope

SettingsScope

public readonly

SettingsScope.Project for [ProjectSetting], SettingsScope.User for [EditorPreference]

propertyInfo

PropertyInfo

private readonly

The reflected property used for GetValue/SetValue

Constructors

public ParagonSetting(PropertyInfo propertyInfo)

Reads the [ParagonSettingAttribute] from the property, resolves defaults for label and key, determines the scope from the concrete attribute type (ProjectSettingAttributeSettingsScope.Project, otherwise SettingsScope.User).

Methods

GetValue

Returns the current value of the static property via reflection.

SetValue

Sets the static property's value via reflection.

Parameter
Type
Description

value

object

The new value to assign to the property

Key Resolution

Attribute

label param

Resolved Label

[EditorPreference("My Label")]

"My Label"

"My Label"

[EditorPreference]

""

Property name (e.g., "AutoSave")

Attribute

key param

Resolved Key

[EditorPreference(key: "custom.key")]

"custom.key"

"custom.key"

[EditorPreference]

""

"Namespace.ClassName.PropertyName"

See Also

Last updated