Class AchievementOptionsAuthoring
How the module behaves once it is installed: who a player is, what an unlock does besides being recorded, and how hard the module tries to reach a storefront.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Builder
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public sealed class AchievementOptionsAuthoring
Remarks
Every default comes from AchievementSettingsDefaults — the same constants UnityAchievementSettings' own field initializers use — so a wizard run that changes nothing writes exactly the asset a designer would get by creating one from the Assets menu. Grouped away from AchievementSettingsCreator.Input's identity and backend fields because these ten answer one question together, and because none of them is schema-destructive: a rerun may safely rewrite them all.
Constructors
AchievementOptionsAuthoring()
Declaration
public AchievementOptionsAuthoring()
Fields
CaptureScreenshotOnUnlock
Whether an unlock captures a screenshot in the background.
Declaration
public bool CaptureScreenshotOnUnlock
Field Value
| Type | Description |
|---|---|
| bool |
ClearPlatformOnReset
Whether resetting achievements also wipes the player's platform account.
Declaration
public bool ClearPlatformOnReset
Field Value
| Type | Description |
|---|---|
| bool |
IdentitySource
Where a player's identity for achievement purposes comes from.
Declaration
public PlayerIdentitySource IdentitySource
Field Value
| Type | Description |
|---|---|
| PlayerIdentitySource |
PlatformCallTimeoutSeconds
How long a single platform gateway call may take before it is abandoned, in seconds.
Declaration
public double PlatformCallTimeoutSeconds
Field Value
| Type | Description |
|---|---|
| double |
PlatformProgressPushStepPercent
How much normalized progress must accumulate before the next platform progress push, as a percentage.
Declaration
public int PlatformProgressPushStepPercent
Field Value
| Type | Description |
|---|---|
| int |
PlatformSyncRetrySeconds
Seconds between platform-sync retries while the storefront is unreachable.
Declaration
public double PlatformSyncRetrySeconds
Field Value
| Type | Description |
|---|---|
| double |
PointsScoreKey
The Score metric that mirrors the total achievement points. Blank disables the mirror.
Declaration
public string PointsScoreKey
Field Value
| Type | Description |
|---|---|
| string |
ScreenshotMaxWidth
The width a captured screenshot is downscaled to before it is encoded, in pixels.
Declaration
public int ScreenshotMaxWidth
Field Value
| Type | Description |
|---|---|
| int |
ShowToastOnUnlock
Whether an unlock raises a toast notification.
Declaration
public bool ShowToastOnUnlock
Field Value
| Type | Description |
|---|---|
| bool |
SignalOnReconciledUnlock
Whether an unlock mirrored in from a platform account raises the same signal a fresh one does.
Declaration
public bool SignalOnReconciledUnlock
Field Value
| Type | Description |
|---|---|
| bool |
Methods
ApplyTo(UnityAchievementSettings)
Writes these ten values onto settingsAsset.
Declaration
public void ApplyTo(UnityAchievementSettings settingsAsset)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityAchievementSettings | settingsAsset | The asset to write to. Never null. |
Remarks
None of them is schema-destructive — unlike a table name, changing a screenshot width or a toast flag costs nothing already written — so a rerun applies them all, to a fresh and an already-existing settings asset alike. Does not mark the asset dirty: the caller owns that. A failed run's restore no longer replays this method — Serenity.Global.Infrastructure.Editor.SerenityExistingAssetRestore puts a pre-existing settings asset back from its own captured serialized state instead.