ParagonSettings

Attribute-driven settings system that automatically discovers, loads, and renders editor preferences and project settings. Static properties decorated with [EditorPreference] or [ProjectSetting] are auto-registered on domain reload and appear in Unity's Preferences/Project Settings windows without any manual registration.

Architecture

spinner

Data Flow

spinner

Classes

Class
Description

Abstract base attribute and its two concrete subclasses (EditorPreferenceAttribute, ProjectSettingAttribute) for marking static properties as settings

Internal runtime representation of a single discovered setting — wraps a PropertyInfo with label, key, type, and scope metadata

Static manager that discovers settings on domain reload, loads persisted values, and provides Get/Set/Save API

Internal SettingsProvider that renders settings in Unity's Preferences or Project Settings window

Quick Lookup

Goal
How

Add an editor preference

Add [EditorPreference] to a static property

Add a project setting

Add [ProjectSetting] to a static property

Custom label

[EditorPreference("My Label")]

Custom key

[EditorPreference(key: "myCustomKey")]

Read a setting

Access the static property directly (auto-populated on load)

Write a setting

Set the static property, then call ParagonSettings.Set() + Save()

Supported Types

The settings provider can render these types automatically:

Type
Control

float

SearchableFloatField

int

SearchableIntField

bool

SearchableToggle

string

SearchableTextField

Color

SearchableColorField

Gradient

GradientField

Vector2 / Vector3 / Vector4

Vector fields

Enum

EnumPopup (or EnumFlagsField if [Flags])

UnityEngine.Object

ObjectField

Example

These properties will:

  1. Auto-appear in Preferences (editor prefs) or Project Settings (project settings)

  2. Load their persisted values on domain reload

  3. Save automatically when changed in the settings UI

See Also

Last updated