logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementDefinitionAuthoringReview

    Answers what is wrong with one authored achievement, judged against every other achievement in the project — which is the only way the question "is this id already taken" can be asked at all.

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

    The rules themselves live in engine-free Application code, so the same answers can be given by the project validator and the headless run a later slice adds. What is here is the editor's half: finding the other assets, and reducing the project-wide report to the findings this inspector is allowed to show.

    Separate from the inspector that draws it so the reduction is directly testable without an Editor instance, and so a wizard or a validator can ask the same question later.

    Fields

    UnknownFailure

    What a failure with no message of its own is reported as.

    Declaration
    public const string UnknownFailure = "The authoring rules threw without saying why."
    Field Value
    Type Description
    string

    Methods

    Check(UnityAchievementDefinition)

    Checks one achievement against every achievement asset in the project.

    Declaration
    public static IReadOnlyList<AuthoringIssue> Check(UnityAchievementDefinition definition)
    Parameters
    Type Name Description
    UnityAchievementDefinition definition

    The achievement to check. May be null.

    Returns
    Type Description
    IReadOnlyList<AuthoringIssue>

    The findings about that achievement, in report order.

    Remarks

    The storefronts the project ships on are read here rather than asked for, because the platform rule is silent without them: an achievement that names no Steam identifier is only a finding once the settings asset says this project ships on Steam.

    CheckAgainst(UnityAchievementDefinition, IReadOnlyList<UnityAchievementDefinition>, IReadOnlyCollection<AchievementPlatformKind>)

    Checks one achievement against a known set of authored achievements.

    Declaration
    public static IReadOnlyList<AuthoringIssue> CheckAgainst(UnityAchievementDefinition definition, IReadOnlyList<UnityAchievementDefinition> everyAuthoredAchievement, IReadOnlyCollection<AchievementPlatformKind> enabledPlatforms = null)
    Parameters
    Type Name Description
    UnityAchievementDefinition definition

    The achievement to check. May be null.

    IReadOnlyList<UnityAchievementDefinition> everyAuthoredAchievement

    Every achievement the project declares, including the one being checked. May be null.

    IReadOnlyCollection<AchievementPlatformKind> enabledPlatforms

    The storefronts the project ships on. null means none, which silences the platform rule.

    Returns
    Type Description
    IReadOnlyList<AuthoringIssue>

    The findings about that achievement, in report order.

    DescribeFailure(Exception)

    Describes a failure the way a list row, an inspector notice and a log line all want to read it.

    Declaration
    public static string DescribeFailure(Exception failure)
    Parameters
    Type Name Description
    Exception failure

    The exception that ended the check. May be null.

    Returns
    Type Description
    string

    Its type and message.

    Remarks

    Here rather than beside any one of its callers because all three answer the same question — "why is there no answer about this achievement?" — and three wordings of it would let a reader think they were looking at three different problems.

    In this article
    © 2026 Serenity. All Rights Reserved