Class UnityPlayStationAchievementPlatformDefinition
Awards this project's achievements as PlayStation Network trophies. Assign it to
UnityAchievementSettings.Platforms, and give every achievement the trophy id it carries
in the authored trophy pack.
Implements
Namespace: Serenity.Achievements.Infrastructure.Platforms
Assembly: Serenity.UnityAchievements.Infrastructure.dll
Syntax
public class UnityPlayStationAchievementPlatformDefinition : UnityAchievementPlatformDefinition, IFoundationSettings
Remarks
A trophy pack is built in Sony's own tool and shipped alongside the title, so the asset names it rather than describing it: the pack id identifies the file, and the service label selects which of a title's trophy configurations a save is registered against — a title with a single set leaves it at zero, and a title that shipped a second set for an expansion does not.
The gateway this builds is a template: see PlayStationAchievementGateway for the call sequence a licensee implements, and for how to register it.
Constructors
UnityPlayStationAchievementPlatformDefinition()
Declaration
public UnityPlayStationAchievementPlatformDefinition()
Fields
ServiceLabel
Declaration
public int ServiceLabel
Field Value
| Type | Description |
|---|---|
| int |
TrophyPackId
Declaration
public string TrophyPackId
Field Value
| Type | Description |
|---|---|
| string |
Properties
Kind
Which of the storefronts an achievement can declare an identifier for this asset is.
Declaration
public override AchievementPlatformKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| AchievementPlatformKind |
Overrides
Remarks
Answered by the definition rather than by the gateway because the question is asked at
authoring time, when no gateway exists: it is what lets a project say "we ship on Steam and
PlayStation" from the assets it assigned, so
AchievementAuthoringRules can report an achievement that names no identifier for a
platform the project actually ships on. A custom definition answers with the shipped kind
whose identifier field it borrows.
Methods
CreateGateway(AchievementPlatformGatewayContext)
Builds the gateway that mirrors unlocks to this storefront.
Declaration
public override IAchievementPlatformGateway CreateGateway(AchievementPlatformGatewayContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| AchievementPlatformGatewayContext | context | What the gateway is built from. Never |
Returns
| Type | Description |
|---|---|
| IAchievementPlatformGateway | The gateway, or |
Overrides
Remarks
The context carries the achievements this project declares as well as the log service, because a storefront names achievements by its own identifier: without the declared set a gateway can push an unlock outward but can never read the account back. A subtype that needs neither may ignore it.