logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnitySteamAchievementPlatformDefinition

    Mirrors this project's achievements to Steam. Assign it to UnityAchievementSettings.Platforms, and give every achievement the API name it is published under.

    Inheritance
    object
    UnityAchievementPlatformDefinition
    UnitySteamAchievementPlatformDefinition
    Implements
    IFoundationSettings
    Inherited Members
    UnityAchievementPlatformDefinition.Id
    UnityAchievementPlatformDefinition.Guid
    Namespace: Serenity.Achievements.Infrastructure.Platforms
    Assembly: Serenity.UnityAchievements.Infrastructure.dll
    Syntax
    public class UnitySteamAchievementPlatformDefinition : UnityAchievementPlatformDefinition, IFoundationSettings
    Remarks

    The application id is the only thing Steam needs from an asset: everything else — the achievement list, its icons, its display names — is authored on the Steamworks partner site and read from the running client. The id is kept anyway so the gateway can say when the running client is serving a different application than the one this build was configured for, which is the failure that otherwise looks like "achievements silently do nothing".

    Constructors

    UnitySteamAchievementPlatformDefinition()

    Declaration
    public UnitySteamAchievementPlatformDefinition()

    Fields

    AppId

    Declaration
    public uint AppId
    Field Value
    Type Description
    uint

    RestartThroughSteamWhenLaunchedOutsideSteam

    Declaration
    public bool RestartThroughSteamWhenLaunchedOutsideSteam
    Field Value
    Type Description
    bool

    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
    UnityAchievementPlatformDefinition.Kind
    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 null.

    Returns
    Type Description
    IAchievementPlatformGateway

    The gateway, or null when this platform cannot be reached in this build.

    Overrides
    UnityAchievementPlatformDefinition.CreateGateway(AchievementPlatformGatewayContext)
    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.

    Implements

    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved