Quick Start
This workflow creates one upgrade progression, one currency and one Economy Handler. It is the shortest path from a clean project to a successful runtime purchase.
1. Create the main Upgrade SO
-
01
Create Upgrade
Choose Create › Bcyly Labs › Ultimate Progression Framework › Upgrade.
-
02
Set identity
Name it WeaponPower_Upgrade and enter a unique Upgrade Name.
-
03
Choose base behavior
Set explicit Base Values or enable Consider First Upgrade As Base Value.
-
04
Generate data
Use Auto Generate Data to create the desired Big and Small Upgrade structure.
2. Create a Currency SO
-
01
Create Currency
Choose Create › Bcyly Labs › Ultimate Progression Framework › Currency.
-
02
Assign a unique ID
Use an ID not used by any other Currency asset.
-
03
Set name and type
Enter Gold and choose Int for whole-number balances.
-
04
Set default value
Use a starting balance large enough to test the first purchase.
3. Configure an Economy Handler
-
01
Create handler
Choose Create › Bcyly Labs › Ultimate Progression Framework › Upgrade Economy Handler.
-
02
Assign Upgrade Source
Drag WeaponPower_Upgrade into Upgrade Source & Sync, then fetch its data.
-
03
Add Gold costs
Create a Gold currency definition and distribute its starting and ending costs.
-
04
Build the wallet
Add the Gold Currency SO to Wallet and choose a Payment Mode.
4. Purchase at runtime
using bcylyLabs.UltimateProgressionFramework;
using UnityEngine;
public class UpgradeButton : MonoBehaviour
{
[SerializeField] private UpgradeEconomyHandler economy;
public void Purchase()
{
UpgradeEconomyHandler.PurchaseResult result =
economy.PurchaseNextUpgrade();
if (!result.success)
Debug.LogWarning(result.failReason);
}
}
5. Verify the result
- The Currency balance decreases by the selected cost
- The next Small Upgrade becomes completed
- Upgrade and Economy events are raised
- The Upgrade and Currency data are saved
- The next cost and progress queries reflect the new state