logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementAuthoringPaths

    Where each asset an achievements creation run authors ends up, derived from one AchievementSettingsCreator.Input.

    Inheritance
    object
    AchievementAuthoringPaths
    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.Editor.Builder
    Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
    Syntax
    public static class AchievementAuthoringPaths
    Remarks

    Shared by the validator and the creator on purpose: the rule that refuses an occupied path and the step that writes to it MUST agree on what that path is, and the only way to guarantee that is to ask the same method. Every name goes through FileNameSafe(string, string), so an Id a designer typed with a slash in it cannot escape the target folder.

    Methods

    BackendAsset(Input)

    The path a newly created backend asset is written to.

    Declaration
    public static string BackendAsset(AchievementSettingsCreator.Input input)
    Parameters
    Type Name Description
    AchievementSettingsCreator.Input input
    Returns
    Type Description
    string

    DefinitionAsset(string, string)

    The path one authored achievement lands at.

    Declaration
    public static string DefinitionAsset(string targetFolder, string achievementId)
    Parameters
    Type Name Description
    string targetFolder

    The folder the achievement lands in.

    string achievementId

    The achievement's Id, which is also the stem of its file name.

    Returns
    Type Description
    string
    Remarks

    Takes a folder and an Id rather than an AchievementSettingsCreator.Input, because the two callers that MUST agree on this path — AchievementDefinitionCreator.Validate refusing an occupied one and AchievementDefinitionCreator.Create writing to it — are joined by that pair alone. It lives here anyway so every achievements authoring path is still answered by one type, and so the file name goes through the same FileNameSafe(string, string) guard as the rest.

    DistinctEnabledPlatforms(Input)

    The enabled storefronts with repeats removed, so a caller that lists the same kind twice authors one asset rather than two. Lives here rather than on the creator because the validator has to walk exactly the same set the creator will write.

    Declaration
    public static IEnumerable<AchievementPlatformKind> DistinctEnabledPlatforms(AchievementSettingsCreator.Input input)
    Parameters
    Type Name Description
    AchievementSettingsCreator.Input input
    Returns
    Type Description
    IEnumerable<AchievementPlatformKind>

    SettingsAsset(Input)

    The settings asset's path.

    Declaration
    public static string SettingsAsset(AchievementSettingsCreator.Input input)
    Parameters
    Type Name Description
    AchievementSettingsCreator.Input input
    Returns
    Type Description
    string

    TargetFolder(Input)

    The folder the settings, backend and platform assets land in.

    Declaration
    public static string TargetFolder(AchievementSettingsCreator.Input input)
    Parameters
    Type Name Description
    AchievementSettingsCreator.Input input
    Returns
    Type Description
    string
    Remarks

    An explicit SettingsAssetPath wins: pointing a run at a specific asset also decides which folder its siblings belong in.

    ViewAsset(Input)

    The path the view definition is written to.

    Declaration
    public static string ViewAsset(AchievementSettingsCreator.Input input)
    Parameters
    Type Name Description
    AchievementSettingsCreator.Input input
    Returns
    Type Description
    string

    ViewFolder(Input)

    The folder the view definition lands in — its own when set, otherwise TargetFolder(Input).

    Declaration
    public static string ViewFolder(AchievementSettingsCreator.Input input)
    Parameters
    Type Name Description
    AchievementSettingsCreator.Input input
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved