Namespace Serenity.Shared.Attributes
Classes
RecipeIgnoredAttribute
Marks a serialized field that a project recipe never carries: recipe export does not capture it, recipe
import does not apply a node for it, and neither reports a warning about it. The asset keeps its own
value on import. Use it for a value a recipe cannot express and the author edits in an inspector or
wizard instead, such as an AnimationCurve; a field that is unsupported by accident, not by
decision, should keep warning.
SerenityAddressableAttribute
Opt-in marker for a project (non-Serenity) ScriptableObject type: Serenity's Addressables
auto-labeler registers assets of this type as Addressable and applies the given label(s), so they become
discoverable at runtime via UnityAssetUtils.LoadAllFromAnyBlocking<T>(label) — no manual
Inspector reference. Serenity's own types are labeled automatically and don't need this.
SerenityGameplayModuleAttribute
Marks an Install*() method on the composition-root installer that installs a gameplay module
owning no settings asset of its own — Character, Wave, Stage and the other modules a game assembles its
play from. Such a module is optional: the game boots and reaches its menu without it, so the boot task
that installs it degrades the boot when it fails instead of halting it.
This is the settings-less counterpart of SerenityInstallableSystemAttribute, which only describes a system a "create a new game" flow configures through a settings asset and a Hub tool. A module declared here has nothing to configure, so that flow offers it in a section of its own and wires only its boot task; the boot-task criticality rule reads both declarations, and a method carries one or the other, never both.
SerenityIdFromFileNameAttribute
Marks a settings type whose Id is its file name when an asset of it is made with no identity at all — the right-click Assets ▸ Create menu, which has no field to type an Id into. The asset lands with the Id its own wizard would have written for a file of that name, instead of a blank Id nothing can find it by. An Id already written, by an author or a wizard, is never replaced.
SerenityInstallableSystemAttribute
Marks an Install*() method on the composition-root installer as one of the systems a
"create a new game" flow can offer for selective installation. Declares the module label its
installed system carries, the settings type a wizard resolves to configure it, the Hub tool
id that authors that settings asset — by name only, never by Type, because the
installer's assembly does not (and must not) reference every module's settings type — the
tier that orders this system in the wizard's checklist, and the other attributed systems (by
Install*() method name) this one depends on.
SerenitySingletonSettingsAttribute
Marks a settings type the runtime resolves to exactly ONE asset per project, through
UnitySingletonSettingsLoader / WiredOrDiscoveredSettings.Resolve. A second asset of the
type is never a second configuration — it is an asset the game silently never reads.
This is the single place that fact is stated. The creation guard that warns when a second asset is about to appear, the wizard cardinality that decides what an ambiguous target offers, and the project validator that reports which asset the runtime picks all read this attribute rather than keeping a list of their own, so a type can never be a singleton to one of them and a collection to another.
Not for a type that legitimately has one asset per configured item (a game setting, an audio clip, a
HUD, a persistence backend): those are collections, resolved by
UnityCollectionSettingsLoader, and carry no attribute.
Enums
SerenityInstallableSystemSettingsCardinality
How many settings assets a SerenityInstallableSystemAttribute-decorated system's SettingsTypeName is meant to have in a project at once. Most systems are a project-wide singleton; a handful declare one row per configured item on purpose (a game setting, an audio player, a structured log sink, a HUD, a persistence backend) — for those, finding more than one asset of the settings type is the expected shape, not an ambiguity.
SerenityInstallableSystemTier
The adoption order a "create a new game" flow offers SerenityInstallableSystemAttribute-decorated systems in: earlier tiers are systems most games need first, later tiers build on them.