Class UnityAchievementSettings
ScriptableObject configuration for the Unity Achievements service: where unlocks persist, which storefronts they are mirrored to, how a player is identified, and what an unlock does besides being recorded.
Namespace: Serenity.Achievements.Infrastructure.Settings
Assembly: Serenity.UnityAchievements.Infrastructure.dll
Syntax
public class UnityAchievementSettings : ScriptableObject, IAchievementSettings, IFoundationSettings
Remarks
The achievements themselves are NOT listed here: a project ships hundreds of them, so each one is its own asset discovered by Addressables label, the way waves and cutscenes are. This asset configures the module, not its content.
Constructors
UnityAchievementSettings()
Declaration
public UnityAchievementSettings()
Fields
Backend
Declaration
public UnityStructuredBackendDefinition Backend
Field Value
| Type | Description |
|---|---|
| UnityStructuredBackendDefinition | Backend selection: a shared, consumer-agnostic UnityStructuredBackendDefinition
asset whose concrete type picks the store (create one under
|
CaptureScreenshotOnUnlock
Declaration
public bool CaptureScreenshotOnUnlock
Field Value
| Type | Description |
|---|---|
| bool | Whether an unlock captures a screenshot in the background. |
ClearPlatformOnReset
Declaration
public bool ClearPlatformOnReset
Field Value
| Type | Description |
|---|---|
| bool | Whether resetting achievements also wipes the player's platform account. Off by default: on most storefronts the call is irreversible. |
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string | GUID for this settings asset. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | Unique identifier for this settings asset. |
IdentitySource
Declaration
public PlayerIdentitySource IdentitySource
Field Value
| Type | Description |
|---|---|
| PlayerIdentitySource | Where a player's identity for achievement purposes comes from. |
PlatformCallTimeoutSeconds
Declaration
public double PlatformCallTimeoutSeconds
Field Value
| Type | Description |
|---|---|
| double | How long a single platform gateway call may take before it is abandoned, in seconds. Zero or less disables the timeout. |
PlatformProgressPushStepPercent
Declaration
public int PlatformProgressPushStepPercent
Field Value
| Type | Description |
|---|---|
| int | How much normalized progress must accumulate before the next platform progress push, as a percentage. |
PlatformSyncRetrySeconds
Declaration
public double PlatformSyncRetrySeconds
Field Value
| Type | Description |
|---|---|
| double | Seconds between platform-sync retries while the storefront is unreachable. The runner doubles this on every failed attempt, up to eight times, and snaps back on success. Zero or less switches the retry off. |
Platforms
Declaration
public UnityAchievementPlatformDefinition[] Platforms
Field Value
| Type | Description |
|---|---|
| UnityAchievementPlatformDefinition[] | The storefronts unlocks are mirrored to. Empty means local-only, which is a complete configuration. |
PointsScoreKey
Declaration
public string PointsScoreKey
Field Value
| Type | Description |
|---|---|
| string | The Score metric that mirrors the total achievement points. Blank disables the mirror; unlock records stay the source of truth either way. |
ProgressTableName
Declaration
public string ProgressTableName
Field Value
| Type | Description |
|---|---|
| string | Table or collection name storing progress rows. Blank falls back to the default. |
ScreenshotMaxWidth
Declaration
public int ScreenshotMaxWidth
Field Value
| Type | Description |
|---|---|
| int | The width the captured screenshot is downscaled to before it is encoded, in pixels. |
ShowToastOnUnlock
Declaration
public bool ShowToastOnUnlock
Field Value
| Type | Description |
|---|---|
| bool | Whether an unlock raises a toast notification. |
SignalOnReconciledUnlock
Declaration
public bool SignalOnReconciledUnlock
Field Value
| Type | Description |
|---|---|
| bool | Whether an unlock mirrored in from a platform account raises the same signal a fresh unlock does. Off by default, so reinstalling a game does not replay every toast. |
UnlocksTableName
Declaration
public string UnlocksTableName
Field Value
| Type | Description |
|---|---|
| string | Table or collection name storing unlock records. Blank falls back to the default. |