UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Gameplay Systems / Achievement System Completed

Gameplay Systems — UGTK

Achievement System

Summary

Tracks counter and boolean achievements at runtime, persists them through the UGTK SaveSystem, and exposes view-models used to populate dashboard rows.


Content


Modules Dependencies

Carried inside the prefabs. These modules are not referenced by the assembly definition - the components are simply already attached to the prefabs this module ships. Remove one of them from the project and the prefab keeps its layout and loses that behaviour, with nothing in the console to say so.

Module Component, and the prefab carrying it
UIModule/TextUpdaterSystem Mn_TextUpdater (in BooleanButton), Mn_TextUpdater (in CounterButton)

Only in the demo scene. The Debug scene of this module also uses GameplaySystems/AudioSystem, UIModule/LayoutAutoResize, UtilitySystems/PoolingSystem. Nothing in the runtime code needs them: import this module on its own and it works, but the demo scene opens with missing scripts where those components were.


Setup

Place a single Mn_AchievementManager in the scene and assign the counter and boolean achievement databases plus the save file name/directory in the Inspector. Add dashboard and button components where you want to display or trigger achievements.


How To Use


Testing Scene

Open AchievementScene in the module's Debug/ folder.

What to do, in order:

  1. Unlock a boolean achievement, then try to unlock it a second time.
  2. Call AddProgress() on a counter one step at a time until it completes.
  3. Call DecreaseProgress() below zero.
  4. Stop play, start again, and check what survived.

Step 4 is the real test: progress is saved per achievement id, so renaming an id after release orphans everything stored under the old one. Step 1 checks the unlock is idempotent — an achievement that fires its reward twice is a bug players find before you do.

AchievementScene: four achievements unlocked one at a time — the faded ones are locked, the solid ones unlocked — and then Reset all achievements, which puts every one of them back. The buttons carry the achievement keys; the names and descriptions shown to a player live in the two databases.


Technical Info


© 2026 Marcello De Bonis. All rights reserved

Real dependenciesOpen in the map →

Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 15 modules in total.