logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IAchievementConditionSource

    Application port that answers "which of the declared achievements carry an authored unlock condition". The composition root reads it once at install time and hands the result to Services.AchievementEvaluator.

    Namespace: Serenity.Achievements.Application.Interfaces.Services
    Assembly: Serenity.Achievements.Application.dll
    Syntax
    public interface IAchievementConditionSource
    Remarks

    Kept apart from IAchievementDefinitionSource rather than folded into it because the two answer different questions and a source is entitled to answer only the first. A list generated at build time, pulled from a live-ops endpoint, or exported from a storefront's own dashboard carries names, points and platform ids and no unlock rules at all — every one of those achievements is unlocked by a code call. Folding the questions together would oblige such a source to implement a method whose only honest answer is "none". A source that does hold both — the Unity module's asset loader — implements both ports and reads its assets once.

    Methods

    GetConditions()

    The authored unlock condition of each achievement that has one, by achievement id.

    Declaration
    IReadOnlyDictionary<AchievementId, AchievementCondition> GetConditions()
    Returns
    Type Description
    IReadOnlyDictionary<AchievementId, AchievementCondition>

    The authored conditions. Never null; empty is a valid answer.

    In this article
    © 2026 Serenity. All Rights Reserved