forked from Shardstone/trail-into-darkness
Popup System Samples
Contents
Prefabs
Reference prefabs for the popup system. Copy these into your project as a starting point.
| Prefab | Description |
|---|---|
PopupReferencePrefab |
Main popup container with Canvas, CanvasGroup, Background, and Content |
PopupHeader |
Header text element (TMP_Text, bold, larger font) |
PopupText |
Body text element (TMP_Text, regular) |
PopupStat |
Stat row element (HorizontalLayoutGroup with label + value TMP_Text) |
PopupIcon |
Image element for icons or artwork |
PopupSeparator |
Horizontal divider line (Image, thin) |
Settings
| Asset | Description |
|---|---|
PopupSettings |
Pre-configured PopupSettings ScriptableObject with sensible defaults |
Scripts
| Script | Description |
|---|---|
PopupSystemExample |
Basic setup with auto-scanned triggers, GetTrigger by name, and GetTriggers by category |
DynamicTriggersExample |
Setting up triggers on dynamically instantiated UI using InitializeTriggersInChildren |
CodeOnlyPopupExample |
Showing popups from code without PopupTrigger (anchored, fixed position, follow mouse) |
How to use
- Import the samples via the Unity Package Manager (select the package, expand Samples, click Import)
- Copy the prefabs into your project's Prefabs folder
- Create a PopupSettings asset or use the provided one
- Reference the example scripts for integration patterns