Class AchievementEnabledPlatformScan
Answers which storefronts this project actually ships on, by reading the platform assets its achievement settings assign.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public static class AchievementEnabledPlatformScan
Remarks
The authoring rules can only report "this achievement names no Steam identifier" once somebody says the project ships on Steam, and the only honest source for that is the settings asset: a project that assigned a Steam platform definition has said so, and one that assigned none has said the opposite. Deriving it from the identifiers an achievement happens to carry would invert the rule — the achievements that forgot theirs are exactly the ones that would then be exempt.
Every settings asset in the project is unioned rather than one being picked, because "the" settings asset is a convention, not a constraint: a project mid-migration has two, and silently reading whichever the search returned first would make the same achievement report different findings on different machines.
Methods
EnabledPlatformsIn(IReadOnlyList<UnityAchievementSettings>)
The storefronts a known set of achievement settings assets puts together.
Declaration
public static IReadOnlyCollection<AchievementPlatformKind> EnabledPlatformsIn(IReadOnlyList<UnityAchievementSettings> settingsAssets)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<UnityAchievementSettings> | settingsAssets | The settings assets to read. May be |
Returns
| Type | Description |
|---|---|
| IReadOnlyCollection<AchievementPlatformKind> | The enabled storefronts, empty when nothing assigns one. |
EnabledPlatformsInProject()
The storefronts every achievement settings asset in the project puts together.
Declaration
public static IReadOnlyCollection<AchievementPlatformKind> EnabledPlatformsInProject()
Returns
| Type | Description |
|---|---|
| IReadOnlyCollection<AchievementPlatformKind> | The enabled storefronts, empty for a local-only project. |