Deep Dive

UI Implementation

Two approaches to showing score, health, and timer on screen. Start with Option A — enable showUI on each manager and it works immediately, no extra setup. Option B (GameUIManager) is for when you want all your HUD elements to share one consistent look and font.


Option A — Start here
Option A Enable showUI on each manager

Each manager (GameHealthManager, GameCollectionManager, GameTimerManager, GameInventoryManager) has a built-in Show UI toggle. Enable it and the manager creates its own Canvas at runtime — text, bar, font size, color, position — all independently configurable per manager. No separate GameObject or wiring required.

1
Select your manager GameObject (GameHealthManager, GameCollectionManager, etc.)
2
Check Show UI in the Inspector
3
Adjust Text Position, Font Size, and Label Prefix to position the text. Hit Play to see it.
Show UI
Creates the Canvas automatically at runtime
Label Prefix
Text before the number ("Health: ", "Score: ")
Text Position
Screen anchor position (top-left origin)
Show Bar
Adds a fill bar. Requires Max Value set.

Option B — Advanced: unified HUD
Option B Wire managers to GameUIManager

Add GameUIManager to any GameObject. It creates a single HUD Canvas with all elements sharing the same font, color, and style. Good when you want a unified look without configuring each manager separately. Less per-element control than Option A — wire each manager's value-changed event to the matching update method.

1
Add GameUIManager to a manager GameObject. Toggle which slots you need (score, health, timer, inventory).
2
Enable Editor Preview in the Inspector to see the HUD layout before pressing Play. Adjust positions with the offset controls.
3
Wire each manager to GameUIManager using the event table below. Leave showUI disabled on each manager — only one system should run.
⚠️
Don't enable showUI on a manager that's wired to GameUIManager
Both will run at the same time and produce overlapping displays. Pick one approach per manager.

Ad-hoc UI — no manager needed

Show a message or image at any moment

These aren't tied to a manager. Wire any event → Show() and they appear.

ActionDisplayText
Shows a text string with optional typewriter effect
Set your message, position, and font size in the Inspector. Wire any event → Show(). Wire another event → Hide() to dismiss it. Good for hints, subtitles, and NPC messages when ActionDialogueSequence is overkill.
ActionDisplayImage
Shows a sprite with fade or scale animation
Assign a sprite, pick an animation (Fade In, Scale In, or Both), set auto-hide duration. Wire any event → Show(). Good for tutorial images, objective icons, and pop-up indicators.

Which should I use?

Decision guide

Match the approach to what you're trying to accomplish.