Introduction
Progression Tree Builder includes optional UI widgets that provide real-time feedback to players. These components are completely optional but highly recommended for better user experience.
✨ Zero Configuration Required
Widgets auto-initialize and work immediately. No code required!
Available Widgets
Progression Notification System
Toast-style notifications for progression events. Shows skill unlocks, upgrades, and point awards with automatic queueing and fade animations.
Features
- Automatic event subscription to ProgressionTreeManager
- Queue system for multiple simultaneous events
- Smooth fade in/out animations
- Customizable icons per notification type
Inspector Settings
| displayDuration | How long each notification stays visible (default: 3s) |
| fadeInDuration | Fade in animation duration (default: 0.3s) |
| fadeOutDuration | Fade out animation duration (default: 0.3s) |
| maxQueueSize | Maximum notifications in queue (default: 10) |
Skill Points HUD Widget
Displays available skill points with optional click-to-open functionality. Supports both ProgressionTree and ProgressionTreeGraphAsset references.
Features
- Real-time point tracking with pulse effect on point gain
- Auto-selects first unlocked tree if no tree assigned
- Click to open Progression Tree UI (optional)
- Accepts both ProgressionTree and GraphAsset references
Inspector Settings
| trackedTreeRef | Tree to track (ProgressionTree or GraphAsset). Leave empty to auto-select first unlocked tree. |
| clickToOpenTree | Enable clicking widget to open tree UI (default: true) |
| pulseOnPointsGained | Play pulse animation when points are awarded (default: true) |
| pointsFormat | String format for display (default: "{0}") |
Skill Unlock Animation Overlay
Fullscreen celebration overlay when skills are unlocked. Only displays when Tree UI is closed to avoid visual conflicts.
Features
- Auto-detects when Tree UI is open (prevents overlap)
- Smooth fade animations without flash (CanvasGroup-based)
- Shows skill icon, name, description, and rank
- Configurable auto-dismiss or require input
Inspector Settings
| overlayPanel | Main overlay container GameObject |
| autoDismiss | Auto-close after duration (default: true) |
| displayDuration | How long overlay stays visible (default: 3s) |
| fadeInDuration | Fade in animation duration (default: 0.5s) |
| fadeOutDuration | Fade out animation duration (default: 0.3s) |
| showOnUpgrade | Show for upgrades, not just first unlock (default: false) |
Creating Prefabs
Use the built-in menu to create widget prefabs with proper component setup:
Unity Menu:
Tools → Progression Tree Builder → Create Widget Prefabs → All Widgets
This creates all widget prefabs in:
Assets/ProgressionTreeBuilder/Prefabs/UI/Widgets/1. Add to Canvas
Drag the prefabs into your UI Canvas and position them as desired.
2. Initialize (Optional)
Widgets auto-initialize when ProgressionTreeManager exists. For manual control:
void Start()
{
var manager = ProgressionTreeManager.Instance;
notificationSystem.Initialize(manager);
pointsWidget.Initialize(manager);
unlockAnimation.Initialize(manager);
}Custom Implementations
Create custom widgets by implementing the base interfaces:
IProgressionUIWidget Interface
Base interface implemented by all widgets. Use for custom widget development.
public interface IProgressionUIWidget
{
void Initialize(ProgressionTreeManager manager);
void Refresh();
void Show();
void Hide();
void Cleanup();
}ISkillUnlockAnimation Interface
Specialized interface for unlock animation components.
public interface ISkillUnlockAnimation
{
void PlayAnimation(ProgressionSkill skill, int newRank);
void SetAutoDismiss(bool autoDismiss);
void Dismiss();
}NotificationUI Fields
Individual notification item component. Attach to notification prefabs.
| iconImage | Image component for notification icon |
| messageText | TextMeshProUGUI for notification message |
| backgroundImage | Background image (color changes per type) |
| skillUnlockedIcon | Icon sprite for skill unlock notifications |
| skillUpgradedIcon | Icon sprite for skill upgrade notifications |
| pointsAwardedIcon | Icon sprite for points awarded notifications |
| treeUnlockedIcon | Icon sprite for tree unlock notifications |
Integration
Advanced Customization
// Optional: Manually control widgets
public class MyGameUI : MonoBehaviour
{
public SkillPointsHUDWidget pointsWidget;
public SkillUnlockAnimationOverlay unlockAnim;
void Start()
{
// Widgets already auto-initialized, but you can:
// Change tracked tree
pointsWidget.SetTrackedTree(differentTree);
// Configure animation
unlockAnim.SetAutoDismiss(false); // Require key press
// Manual control
pointsWidget.Show();
pointsWidget.Hide();
}
}Event Hook Example
For advanced use cases, you can subscribe to Manager events directly:
public class CustomProgressionFeedback : MonoBehaviour
{
void Start()
{
var manager = ProgressionTreeManager.Instance;
// Listen to same events as widgets
manager.OnSkillUnlocked += (skill, tree) => {
PlayCustomSound();
ShowCustomEffect();
};
manager.OnPointsAwarded += (tree, amount) => {
UpdateCustomUI(amount);
};
}
}Troubleshooting
Widget not responding to events
Checklist:
- ProgressionTreeManager is in scene and active
- Widget GameObject and Component are both active
- Check Console for initialization logs (enable debugMode in widget)
- Use Context Menu → "Debug: Print Widget Status" to verify setup
Points HUD not updating when points awarded
Common causes:
- Tree Mismatch: Widget tracking different tree than the one receiving points
- Instructions bypassing Manager: Use InstructionAwardSkillPoints which calls Manager.AwardPoints()
- Not initialized: Widget shows "-" until Manager.Instance is available
Solution:
Ensure tree references match and points are awarded via Manager.AwardPoints() not direct RuntimeData access.
Unlock animation not appearing
Common causes:
- Tree UI is open (50%): Animation blocked by design when Tree UI visible
- Overlay Panel not assigned (30%): Inspector field empty
- GameObject disabled (10%): Component or GameObject inactive
Debug steps:
- Enable debugMode in Inspector
- Unlock skill and check Console for event logs
- Use Context Menu → "Test Animation" to verify setup
Animation flashing on first show
Solution:
Fixed in v1.1.0: SkillUnlockAnimationOverlay now uses CanvasGroup for flash-free fade animations.
Fix:
- Re-create prefab via Widget Creator
- Verify OverlayPanel has CanvasGroup component with alpha=0
- Check backgroundDim GameObject starts inactive
"Prefab has missing script" warning on NotificationItem
Cause: Old prefab created before NotificationUI was moved to separate file.
Fix:
- Delete old NotificationItem.prefab and ProgressionNotificationSystem.prefab
- Ensure NotificationUI.cs exists in Runtime/UI/Widgets/
- Re-create prefabs via Menu → Create Widget Prefabs → Notification System