<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Overview

Core Clicker Loop

Chests & Loot

Item Collection

Effectors

Upgrades

Skilltree & Prestige

Frenzy Mode

Debug/Helper component

💰 Monetization (Ads & IAP)

<aside> 🔧 The Upgrades module is a player upgrade/perk system: stat-boosting upgrades with multiple purchasable stages, priced in Coins or Prestige, persisted per type in save, and surfaced through the Upgrades panel and the Skilltree.

</aside>

Base module (Assets/Project Files/Modules/Upgrades):

Game layer (Assets/Project Files/Game/Scripts/Upgrades):

Setup

How to add a new upgrade type

How to add a tiered continuation (e.g. Chests Per Spawn → Chests Per Spawn II)

Scene setup

Everyday interaction

How to read an upgrade's state from code

How to hook into an upgrade's events

How to purchase/upgrade an upgrade programmatically

How to tune upgrade stages and prices

Concrete upgrades reference

All classes below live in Assets/Project Files/Game/Scripts/Upgrades/Concrete/ and follow the same shape: an Upgrade<T> subclass with an empty Init(), a nested Stage class with one stat field, and a GetStatValueText override for the panel's before/after display.

Tiered Upgrades-panel rows

Single-tier Upgrades-panel rows (continued in the Skilltree on the same asset)

Other Upgrades-panel rows

Skilltree-only nodes

API reference

BaseUpgrade / Upgrade<T> members

UpgradeLevel

0-based purchased level, backed by the upgrade's UpgradeSavableObject. Setting it does not fire OnUpgraded - use UpgradeStage() to advance it through code.

CurrentStage / NextStage / GetCurrentStage() / GetNextStage()

CurrentStage/NextStage (declared on BaseUpgrade) return BaseUpgradeStage; NextStage is null at max level. GetCurrentStage()/GetNextStage() (declared on Upgrade<T>) return the typed T stage instead - prefer these on a concrete upgrade so the stat field is directly accessible without a cast.

IsMaxedOut / UpgradesCount / GetUpgradeCost(level)

IsMaxedOut is true once UpgradeLevel + 1 >= UpgradesCount. GetUpgradeCost(level) returns -1 past the last stage.

OnUpgraded

SimpleCallback event fired by UpgradeStage() and ResetUpgrade(). See How to hook into an upgrade's events above.

ResetForRebirth()

Resets UpgradeLevel to 0, unless any purchased stage was priced in CurrencyType.Prestige (Skilltree progress is kept across Rebirth by design).

UpgradesController

GetUpgrade<T>(UpgradeType type)

Static lookup by type. Returns null and logs an error if the type isn't registered - always null-check the result.

GetActiveTier<T>(params UpgradeType[] tiersHighToLow)

Resolves a tiered chain (see How to add a tiered continuation above) to whichever tier the player has actually leveled, listing tiers from highest to lowest and falling back to the lowest tier.

IsInitialized

True once Init() has run. Check before calling GetUpgrade<T>/GetActiveTier<T> from code that might run before GameController boots.

GetTotalPurchasedLevels()

Sum of every registered upgrade's level, across both the Upgrades panel and the Skilltree. Not the same as UpgradesPanelController's own panel-only total used for reveal gating.

UpgradesPanelController

IsRevealed(UpgradesDatabaseEntry entry) / GetVisibleEntries()

IsRevealed checks revealThreshold against the panel-only purchased total, plus parentUpgrade.IsMaxedOut when the entry has one. GetVisibleEntries() returns every currently-revealed, non-dismissed row - what UIUpgradesPanel renders.

CanAfford(BaseUpgrade upgrade) / HasAffordableUpgrade()

CanAfford checks the next stage's price against CurrencyController.HasAmount. HasAffordableUpgrade() is true if any visible row is affordable - drives UpgradesButton's notification dot.

TryPurchase(BaseUpgrade upgrade)

Advances the upgrade one stage and spends currency if affordable; returns false and does nothing otherwise. Marks the save dirty on success.

UpgradesDatabase

Database

Static singleton set by Init(). UpgradesPanelController reads this directly rather than going through UpgradesController, since reveal thresholds are panel-specific data the Skilltree doesn't share.

UpgradesDatabaseEntry.Upgrade / RevealThreshold / ParentUpgrade

One entry per row shown in the Upgrades panel. ParentUpgrade is only set for a tiered continuation's second (or later) entry.