logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RecipeAchievementDto

    Recipe description of a single authored achievement. Maps to a UnityAchievementDefinition asset, optionally with the companion no-code unlock trigger.

    Inheritance
    object
    RecipeAchievementDto
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.ProjectRecipe.Infrastructure.Editor.Model
    Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
    Syntax
    public class RecipeAchievementDto
    Remarks

    Mirrors the asset's authored fields one for one, so an agent writing a recipe and a designer filling in the Achievements Studio are describing the same thing in the same vocabulary. The unlock rule is the one field that is not flat: it is a [SerializeReference] tree, carried here as the managed-reference node RecipeSerializedPropertyCodec captures and applies.

    Constructors

    RecipeAchievementDto()

    Declaration
    public RecipeAchievementDto()

    Fields

    condition

    Declaration
    public RecipeNode condition
    Field Value
    Type Description
    RecipeNode

    What unlocks the achievement, as the managed-reference node RecipeSerializedPropertyCodec captures from the asset's Condition field: "kind": "managed", "text" the concrete type, and "children" for its serialized fields (a composite's children nest under its conditions array). Omitted — or given without a kind — leaves any existing tree untouched; a managed node with an empty text clears it.

    descriptionKey

    Declaration
    public string descriptionKey
    Field Value
    Type Description
    string

    The description, or the localization key standing for it when isTranslating is on.

    displayOrder

    Declaration
    public int displayOrder
    Field Value
    Type Description
    int

    Ordering hint used when listing achievements. Lower values are listed first.

    epicAchievementId

    Declaration
    public string epicAchievementId
    Field Value
    Type Description
    string

    The Epic Online Services achievement identifier. Blank means it is not mirrored to Epic.

    folder

    Declaration
    public string folder
    Field Value
    Type Description
    string

    Folder relative to outputRoot the achievement lands in, for the common case where the file is simply named after the id. Ignored when output is set.

    generateTrigger

    Declaration
    public bool generateTrigger
    Field Value
    Type Description
    bool

    When true, a companion UnityEventDispatcherSignalDefinition pre-wired to dispatch UnlockAchievementSignal(id) is created beside the achievement with a Trigger suffix (e.g. FirstBlood.asset → FirstBloodTrigger.asset), so a SignalEmitterComponent can award the achievement with no generated code.

    icon

    Declaration
    public string icon
    Field Value
    Type Description
    string

    Project path to an existing Sprite asset drawn as the icon (e.g. Assets/Game/Art/first_blood.png). Empty leaves it unassigned.

    id

    Declaration
    public string id
    Field Value
    Type Description
    string

    Stable logical identifier (becomes the asset's Id, and the key every unlock row is stored under). Required.

    isHidden

    Declaration
    public bool isHidden
    Field Value
    Type Description
    bool

    Whether the achievement stays concealed in the listing until it is unlocked.

    isTranslating

    Declaration
    public bool isTranslating
    Field Value
    Type Description
    bool

    Whether nameKey and descriptionKey are localization keys rather than literal text.

    nameKey

    Declaration
    public string nameKey
    Field Value
    Type Description
    string

    The display name, or the localization key standing for it when isTranslating is on.

    output

    Declaration
    public string output
    Field Value
    Type Description
    string

    Output path relative to outputRoot, ending in .asset. Optional when folder is given; see ResolvedOutput.

    points

    Declaration
    public int points
    Field Value
    Type Description
    int

    The Serenity points the unlock awards. Never negative. Defaults to 10.

    progressTarget

    Declaration
    public long progressTarget
    Field Value
    Type Description
    long

    The progress numerator that unlocks the achievement. Zero makes it single-step (boolean).

    psnTrophyId

    Declaration
    public string psnTrophyId
    Field Value
    Type Description
    string

    The PlayStation Network trophy identifier. Blank means it is not mirrored to PlayStation.

    steamApiName

    Declaration
    public string steamApiName
    Field Value
    Type Description
    string

    The Steamworks "API Name" this achievement is mirrored under. Blank means it is not mirrored to Steam.

    trophyGrade

    Declaration
    public string trophyGrade
    Field Value
    Type Description
    string

    The trophy tier tiered platforms award, as a TrophyGrade name. Empty leaves the default.

    xboxAchievementId

    Declaration
    public string xboxAchievementId
    Field Value
    Type Description
    string

    The Xbox achievement identifier. Blank means it is not mirrored to Xbox.

    Properties

    ResolvedOutput

    The relative output path this entry writes to: output when given, otherwise folder with the id as the file name.

    Declaration
    public string ResolvedOutput { get; }
    Property Value
    Type Description
    string
    Remarks

    One answer for the rule that validates the path and the step that writes to it, for the reason AchievementAuthoringPaths gives: the two must not be able to disagree about which path it is.

    In this article
    © 2026 Serenity. All Rights Reserved