logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementSyncWizardSession

    Everything the Achievement Platform Sync wizard carries across its steps: which connector was chosen, the scope an author narrowed the sync to, the fetched snapshot, the computed plan, and the accept/reject state a review builds up before an apply.

    Inheritance
    object
    AchievementSyncWizardSession
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Achievements.Infrastructure.Editor.Sync
    Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
    Syntax
    public sealed class AchievementSyncWizardSession
    Remarks

    Deliberately a plain object rather than a set of [SerializeField] window fields — a connector, a snapshot and a plan all carry references (or byte payloads) a domain reload cannot usefully restore anyway, so this session is rebuilt fresh every window open, the same trade-off AchievementsStudioCatalog already makes for its own read state. AchievementSyncWizardSteps is the pure step-availability model built on top of this session; this type owns no IMGUI and no step-index arithmetic itself.

    Only the connection identity survives a domain reload (Serenity.Achievements.Infrastructure.Editor.Sync.AchievementSyncSessionLifecycle). Everything that belongs to one run — the plan, the accepted rows, the choice to replace the text entries already hold, the languages added during the pull — comes back at its default, so a reload never leaves a run half remembered.

    Constructors

    AchievementSyncWizardSession(ISteamPartnerSession)

    Creates a session around the Steam sign-in the window owns.

    Declaration
    public AchievementSyncWizardSession(ISteamPartnerSession steamSession)
    Parameters
    Type Name Description
    ISteamPartnerSession steamSession

    This window's paste-in Steam partner-site cookies, already bound to the editor session state they survive a reload in.

    Properties

    AcceptedChangeCount

    How many of Plan's field changes are currently accepted in Selection.

    Declaration
    public int AcceptedChangeCount { get; }
    Property Value
    Type Description
    int

    ApplyReport

    The real apply's report, or null before one runs.

    Declaration
    public AchievementSyncApplyReport ApplyReport { get; set; }
    Property Value
    Type Description
    AchievementSyncApplyReport

    AuthoringLocaleCode

    The locale a non-translating achievement's literal Name/Description text is filed under.

    Declaration
    public string AuthoringLocaleCode { get; set; }
    Property Value
    Type Description
    string

    BackupBeforeApply

    Whether an apply first exports the project's current manifest to a backup file.

    Declaration
    public bool BackupBeforeApply { get; set; }
    Property Value
    Type Description
    bool

    BackupFilePath

    Where the pre-apply backup manifest is written, when BackupBeforeApply is set.

    Declaration
    public string BackupFilePath { get; set; }
    Property Value
    Type Description
    string

    ConnectionCheck

    The most recent connection check the Platform step ran, or null before one runs.

    Declaration
    public AchievementSyncConnectionCheck ConnectionCheck { get; set; }
    Property Value
    Type Description
    AchievementSyncConnectionCheck

    CopilotAchievementIndex

    Which achievement of CopilotScripts the Copilot step's stepper is currently showing.

    Declaration
    public int CopilotAchievementIndex { get; set; }
    Property Value
    Type Description
    int

    CopilotFallbackOffered

    Whether the Apply step should offer switching to Copilot mode — set when a real push fails for a reason other than an expired sign-in session (see AuthenticationExpired).

    Declaration
    public bool CopilotFallbackOffered { get; set; }
    Property Value
    Type Description
    bool

    CopilotProgress

    Which of CopilotScripts's field and icon instructions the author has marked done.

    Declaration
    public CopilotWalkthroughProgress CopilotProgress { get; }
    Property Value
    Type Description
    CopilotWalkthroughProgress

    CopilotScripts

    The Copilot walkthrough scripts the Apply step renders when TransportMode is Copilot, one per achievement with an accepted change.

    Declaration
    public IReadOnlyList<CopilotAchievementScript> CopilotScripts { get; set; }
    Property Value
    Type Description
    IReadOnlyList<CopilotAchievementScript>

    CreatedLocaleDescriptions

    One line for each language the author added from the Review step during this pull, for the apply report to list.

    Declaration
    public List<string> CreatedLocaleDescriptions { get; }
    Property Value
    Type Description
    List<string>

    Direction

    The direction this session syncs in. The Scope step's direction cards flip this when the chosen connector's capabilities allow a push.

    Declaration
    public AchievementSyncDirection Direction { get; set; }
    Property Value
    Type Description
    AchievementSyncDirection

    HasNoSnapshotToDiffAgainst

    Whether Plan was built with nothing to diff against — no pull ever succeeded (a deliberate skip in Copilot mode, or simply not reached yet). Every achievement then shows as new, which is only safe to trust once an author has been told the diff itself is blind: the Review, Apply, and Copilot steps all render a notice from this flag rather than silently offering a "New on the platform" label an author could mistake for an actual platform check.

    Declaration
    public bool HasNoSnapshotToDiffAgainst { get; }
    Property Value
    Type Description
    bool

    IdProposalsByApiName

    Author-editable local id proposals for a PlatformOnly row, keyed by api name.

    Declaration
    public Dictionary<string, string> IdProposalsByApiName { get; }
    Property Value
    Type Description
    Dictionary<string, string>

    IncludeIcons

    Whether a Push-direction run encodes and sends icon payloads at all.

    Declaration
    public bool IncludeIcons { get; set; }
    Property Value
    Type Description
    bool

    LocaleCodes

    The locales DisplayName and Description are diffed for.

    Declaration
    public IReadOnlyList<string> LocaleCodes { get; set; }
    Property Value
    Type Description
    IReadOnlyList<string>

    LocalesCreatedWithoutTable

    One line for each language the author added whose string table could not be added, so it now exists in the project without a table; the apply report warns about each.

    Declaration
    public List<string> LocalesCreatedWithoutTable { get; }
    Property Value
    Type Description
    List<string>

    OverwriteExistingEntries

    Whether the author confirmed, on the Apply step, replacing the text string table entries already hold when the pull files different text under the same key.

    Declaration
    public bool OverwriteExistingEntries { get; set; }
    Property Value
    Type Description
    bool

    Plan

    The diff between the project's authored achievements and Snapshot.

    Declaration
    public AchievementSyncPlan Plan { get; set; }
    Property Value
    Type Description
    AchievementSyncPlan

    Platform

    The storefront the chosen connector represents.

    Declaration
    public AchievementPlatformKind Platform { get; set; }
    Property Value
    Type Description
    AchievementPlatformKind

    PreviewReport

    The preview run of the accepted changes, or null before one runs.

    Declaration
    public AchievementSyncApplyReport PreviewReport { get; set; }
    Property Value
    Type Description
    AchievementSyncApplyReport

    ProjectAchievements

    Every achievement the project held when Plan was built: its id, and the keys its text uses when it translates.

    Declaration
    public IReadOnlyList<AchievementSyncExistingAchievement> ProjectAchievements { get; set; }
    Property Value
    Type Description
    IReadOnlyList<AchievementSyncExistingAchievement>

    PushOutcome

    The most recent push's result, or null before one runs.

    Declaration
    public AchievementPushOutcome PushOutcome { get; set; }
    Property Value
    Type Description
    AchievementPushOutcome

    PushProgress

    The most recent push's progress, for the Apply step's progress bar. Null before one runs.

    Declaration
    public AchievementSyncProgress PushProgress { get; set; }
    Property Value
    Type Description
    AchievementSyncProgress

    PushSourceRecords

    The authored records a Push-direction plan was built from, already carrying whatever platform identity extras (for example Steam's stat/bit id) a matched item's platform side supplied — the source BuildWorkItems(AchievementSyncPlan, AchievementSyncReviewSelection, IReadOnlyList<AchievementSyncRecord>) builds this run's work items from.

    Declaration
    public IReadOnlyList<AchievementSyncRecord> PushSourceRecords { get; set; }
    Property Value
    Type Description
    IReadOnlyList<AchievementSyncRecord>

    PushWorkItems

    The ordered work a Push-direction Apply step previews and, once confirmed, sends.

    Declaration
    public IReadOnlyList<AchievementPushWorkItem> PushWorkItems { get; set; }
    Property Value
    Type Description
    IReadOnlyList<AchievementPushWorkItem>

    SelectedConnector

    The connector this run pulls from, or null before one is chosen.

    Declaration
    public IAchievementDefinitionSyncConnector SelectedConnector { get; set; }
    Property Value
    Type Description
    IAchievementDefinitionSyncConnector

    Selection

    Which of the plan's field changes an author has accepted.

    Declaration
    public AchievementSyncReviewSelection Selection { get; }
    Property Value
    Type Description
    AchievementSyncReviewSelection

    Snapshot

    The most recent pull from the chosen connector, or null before one succeeds.

    Declaration
    public AchievementStorefrontSnapshot Snapshot { get; set; }
    Property Value
    Type Description
    AchievementStorefrontSnapshot

    SnapshotFilePath

    The path to the snapshot file, for the file connector card's file picker.

    Declaration
    public string SnapshotFilePath { get; set; }
    Property Value
    Type Description
    string

    SteamAppId

    The Steam app id the Connect step signs in against, for the Steam connector.

    Declaration
    public string SteamAppId { get; set; }
    Property Value
    Type Description
    string

    SteamSession

    This window's paste-in Steam partner-site cookies, scoped to the current editor session.

    Declaration
    public ISteamPartnerSession SteamSession { get; }
    Property Value
    Type Description
    ISteamPartnerSession

    StoredIconDescription

    How the chosen storefront keeps an icon it was sent, in words a notice can follow "the storefront keeps" with.

    Declaration
    public string StoredIconDescription { get; }
    Property Value
    Type Description
    string

    StringTableCollectionName

    The Unity Localization string table collection a translating achievement's localized field changes are written to.

    Declaration
    public string StringTableCollectionName { get; set; }
    Property Value
    Type Description
    string

    TargetFolder

    The folder a freshly created PlatformOnly achievement lands in.

    Declaration
    public string TargetFolder { get; set; }
    Property Value
    Type Description
    string

    TransportMode

    How a Push-direction run delivers its accepted changes — straight over HTTP, or by hand through a Copilot walkthrough. Chosen on the Connect step.

    Declaration
    public AchievementSyncTransportMode TransportMode { get; set; }
    Property Value
    Type Description
    AchievementSyncTransportMode

    Methods

    CountAccepted(AchievementSyncPlan, AchievementSyncReviewSelection)

    How many field changes in plan selection has accepted.

    Declaration
    public static int CountAccepted(AchievementSyncPlan plan, AchievementSyncReviewSelection selection)
    Parameters
    Type Name Description
    AchievementSyncPlan plan

    The plan to count against. May be null.

    AchievementSyncReviewSelection selection

    The selection to read. May be null.

    Returns
    Type Description
    int

    The count, zero when either argument is null.

    KeyCollisions()

    The achievements the pull would create or move into the string table that would share a localization key with another achievement, under the ids proposed for the new ones.

    Declaration
    public AchievementSyncKeyCollisions KeyCollisions()
    Returns
    Type Description
    AchievementSyncKeyCollisions

    StartNewRun()

    Puts what belongs to one run back to where a new run starts: the transport goes back to the storefront's own API, the Copilot walkthrough and its marks are forgotten, and the last push's and apply's results are dropped. A run that ended in Copilot mode would otherwise carry that mode — and its locked direction — into the next. Nothing the author accepted in the run that ended stays accepted: a new run starts by accepting nothing, replaces no text entries and has added no language yet.

    Declaration
    public void StartNewRun()

    SwitchToCopilotMode()

    Switches this session to Copilot mode, carrying Plan and Selection forward as the same instances — the Copilot fallback offered when a real push fails unexpectedly (see CopilotFallbackOffered) never recomputes the plan an author already reviewed, it only re-derives the walkthrough script from it.

    Declaration
    public void SwitchToCopilotMode()
    In this article
    © 2026 Serenity. All Rights Reserved