ParagonSettingAttribute

Abstract base attribute for marking static properties as Paragon settings. Has two concrete subclasses: EditorPreferenceAttribute (user-scoped, appears in Preferences) and ProjectSettingAttribute (project-scoped, appears in Project Settings). Properties decorated with either attribute are auto-discovered by ParagonSettings on domain reload.

Definition

Namespace: Paragon Assembly: Paragon.dll

[AttributeUsage(AttributeTargets.Property), MeansImplicitUse]
public abstract class ParagonSettingAttribute : Attribute

Inheritance: Attribute → ParagonSettingAttribute

circle-info

Note the namespace is Paragon (not Paragon.Editor) — these attributes are defined in the runtime assembly so they can be applied to properties in any assembly, not just editor code.

Fields

Field
Type
Description

Label

string

Display label in the settings UI. If empty, defaults to the property name

Key

string

Persistence key for Settings.Get/Set. If empty, defaults to "{DeclaringType.FullName}.{PropertyName}"

Constructors

protected ParagonSettingAttribute(string label = "", string key = "")
Parameter
Type
Default
Description

label

string

""

Display label. Empty = use property name

key

string

""

Persistence key. Empty = auto-generated from type + property name

Concrete Subclasses

EditorPreferenceAttribute

Marks a static property as a user-scoped editor preference. Appears under Preferences → Paragon in Unity's settings.

Settings scope: SettingsScope.User

ProjectSettingAttribute

Marks a static property as a project-scoped setting. Appears under Project Settings → {ProductName} in Unity's settings.

Settings scope: SettingsScope.Project

Common Pitfalls

circle-exclamation
circle-exclamation
circle-info

[MeansImplicitUse] suppresses IDE warnings. The attribute includes JetBrains' [MeansImplicitUse], so ReSharper/Rider won't flag decorated properties as unused — they are used via reflection.

Examples

Basic Usage

See Also

Last updated