logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementPlatformGatewayFactory

    Builds the single IAchievementPlatformGateway the achievement service talks to, out of whatever the project configured: a registered factory first, then every assigned UnityAchievementPlatformDefinition asset, folded into one CompositeAchievementPlatformGateway.

    Inheritance
    object
    AchievementPlatformGatewayFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Achievements.Infrastructure.Platforms
    Assembly: Serenity.UnityAchievements.Infrastructure.dll
    Syntax
    public static class AchievementPlatformGatewayFactory
    Remarks

    Never throws. A definition that fails to build its gateway is reported and left out, and a project that configured nothing gets NullAchievementPlatformGateway — a PC build with no storefront must boot exactly like one with four.

    Methods

    Create(IReadOnlyList<UnityAchievementPlatformDefinition>, AchievementPlatformGatewayContext)

    Creates the gateway the achievement service mirrors unlocks through.

    Declaration
    public static IAchievementPlatformGateway Create(IReadOnlyList<UnityAchievementPlatformDefinition> platformDefinitions, AchievementPlatformGatewayContext context)
    Parameters
    Type Name Description
    IReadOnlyList<UnityAchievementPlatformDefinition> platformDefinitions

    The configured platform assets, or null when none are.

    AchievementPlatformGatewayContext context

    What each gateway is built from: the declared achievements and the log service. May be null.

    Returns
    Type Description
    IAchievementPlatformGateway

    The composed gateway; never null.

    Remarks

    The context is built by the caller and passed to every gateway unchanged, which is what obliges the composition root to have the achievement registry in hand BEFORE it builds the gateway: a storefront names achievements by its own identifier, so a gateway handed no declared set can push an unlock but never read the account back.

    In this article
    © 2026 Serenity. All Rights Reserved