3.5 KiB
3.5 KiB
Tower Quickslot Setup Guide
🎯 ULTRA-SIMPLE 1-CLICK SETUP (For Non-Programmers!)
Just ONE Step!
Edit your GameData/Tower.csv file with tower data, then in Unity:
Tools > Data > Import All CSV
THAT'S IT! This automatically does everything:
- ✅ Creates TowerData from CSV (TowerData now extends BuildingData!)
- ✅ Creates Tower prefabs with TowerDataComponent
- ✅ Auto-configures BuildingManager with all TowerData!
Testing
Press B in-game → All towers appear in quickslot! 🎉
📝 Adding New Towers
- Add row to
GameData/Tower.csv - Run
Tools > Data > Import All CSV - Done! 🚀
Everything is automatic!
🔧 Troubleshooting
Error: "BuildingManager not found in scene"
Cause: Your scene doesn't have a GameObject with BuildingManager component.
Fix:
- Create a new GameObject (e.g., "BuildingManager")
- Add BuildingManager component to it
- Run
Tools > Data > Import All CSVagain - Done!
Error: "MissingReferenceException: prefab doesn't exist"
Cause: TowerData doesn't have prefab reference.
Fix:
- Run
Northbound > Diagnose Tower System - Check which TowerData shows
✗ MISSING PREFAB - Run
Tools > Data > Import All CSVto fix - Done!
No towers appear in quickslot
Cause: BuildingManager wasn't found or configured.
Fix:
- Run
Northbound > Diagnose Tower System - Check if BuildingManager is found and has TowerData in list
- If not, add BuildingManager to your scene
- Run
Tools > Data > Import All CSV
🎮 Menu Commands
| Command | What it does | When to use |
|---|---|---|
Tools > Data > Import All CSV |
ONE-CLICK SETUP - Import all CSV files, create prefabs, auto-configure BuildingManager with TowerData | After editing Tower.csv or anytime you want to update towers |
Northbound > Diagnose Tower System |
Check tower system health and find issues | When something doesn't work |
✅ Why This is Awesome
- ✅ ONE CLICK - Edit CSV, run importer, done!
- ✅ One folder for towers -
Assets/Prefabs/Tower/only - ✅ No duplicates - No manual copying anywhere
- ✅ Fully automatic - BuildingManager configured automatically
- ✅ Non-programmer friendly - Just edit CSV and click one button!
- ✅ Works in builds - Everything is pre-populated
- ✅ Instant testing - Press B and see all towers!
- ✅ Unified data structure - TowerData extends BuildingData, no redundant data!
🎉 Complete Workflow for New Teammates
- Open Unity project
- Add BuildingManager GameObject to scene (once)
- Edit
GameData/Tower.csvwith tower data - Run
Tools > Data > Import All CSV - Play game, press B, build towers! 🏗️
That's literally it! No manual configuration needed!
🏗️ Technical Details
Unified Data Structure
Before: Two separate data systems
- TowerData (CSV, tower-specific stats)
- BuildingData (auto-generated, building stats)
Now: Single unified system
- TowerData extends BuildingData
- TowerData has all tower-specific fields (atkRange, atkDamage, etc.)
- TowerData automatically maps to BuildingData fields (width, length, maxHealth, etc.)
- BuildingManager uses TowerData directly (no conversion needed!)
Benefits of Unified Structure
- ✅ No duplicate data
- ✅ Single source of truth
- ✅ Cleaner code
- ✅ Easier to maintain
- ✅ Tower prefabs can be used directly without intermediate BuildingData files