Region & Progression Setup
In SlingshotSquad Template, maps are grouped into regions. Each MapRegion contains multiple MapData entries, and completing a map can unlock the next one or even unlock a new region.
Step 1 โ Organize Maps into Regions
In the Map Selection Scene, locate the UIMapSelection component.
Add your MapRegion prefabs to the
mapRegionPrefabsarray.Each MapRegion prefab contains an array of MapRegionData, which defines:
MapData โ The ScriptableObject with level info.
SpawnPoint โ The transform where the map entry button appears.
Step 2 โ Configure Map Unlocks
Inside each MapData you can define progression rules:
nextMap โ The map that will be unlocked when this one is completed.
unlockCharacter โ Optionally unlocks a CharacterData when this map is cleared.
rewardItems โ Rewards (currencies, boosters) given the first time the map is completed.
xpReward โ XP given when the map is cleared.
This allows you to chain levels together in a progression path.
Step 3 โ Player Progress Tracking
The PlayerSave system automatically tracks:
Which maps are unlocked.
How many stars the player earned in each map.
The last region the player visited.
When a new map is cleared:
Rewards are granted.
Stars are stored.
nextMapis unlocked if defined.
Step 4 โ Navigating Between Regions
The UIMapSelection provides Previous and Next buttons.
Regions can only be navigated if they are unlocked.
A fade transition is applied when moving between regions for smooth UX.
โ
Example Setup
Region 1 โ Forest
Map 1 (unlocked by default).
Map 2 (unlocked by completing Map 1).
Map 3 (boss map, unlocks Region 2 when cleared).
Region 2 โ Desert
Map 4 (unlocked after boss in Region 1).
Map 5 โ Map 6 (progression continues).
Typical Flow
First Map Unlocked โ Automatically ensured by
UIMapSelection.EnsureFirstMapUnlocked().Play a Map โ Stars, rewards, and unlocks are saved in PlayerSave.
Complete Boss Map โ Unlocks the next region (new set of maps).
Navigate Regions โ Player uses UI arrows to switch between available regions.
With this setup, you can easily create linear or branching campaigns by connecting MapData with nextMap references and grouping them into MapRegions.
Last updated