HUD & Monitoring¶
The HUD lets you watch the ecosystem with a multi-camera grid and per-camera overlays (energy, age, role, reproduction timers). It’s designed for quick validation and balancing.

In this article¶
- What you get
- Quick start
- Camera grid
- Target selection
- Overlay info
- Hotkeys
- Advanced setup
- Performance
- Troubleshooting
- See also
What you get¶
- Grid of cameras (e.g., 3×3) that auto-attach to random flora/fauna.
- Overlays with role, age, energy bars, birth timers.
- Toggle on/off with a single hotkey.
- Retargeting (optional) to cycle through interesting agents.
- Non-destructive: no dependency on your gameplay UI.
Tip
Use HUD during balancing sessions, then disable it for production builds.
Quick start¶
- Drag the HUD prefab (or
EcosystemHUDGameObject) into your scene. - Set Rows/Columns (e.g., 3×3), Build On Play = On.
- Choose a Target Mode (e.g., “Random Any”).
- Press Play. Toggle with H.
Recommended first run - Rows × Cols: 3 × 3 - Target Mode: Random Any - Retarget Interval: 20–40 s - Show Overlay: On
Camera grid¶
| Setting | What it does | Notes |
|---|---|---|
| Rows / Columns | Grid layout | 2×2 (light), 3×3 (rich), 4×4 (heavy) |
| Build On Play | Auto-create cameras on Play | Turn off if you build the grid manually |
| Screen Padding | Margin around grid | Avoids UI overlap |
| FOV | Per-camera field of view | 50–65 works well for wildlife |
| Follow Mode | Static / Soft Follow / Hard Follow | Soft adds gentle smoothing |
| Layer Mask | What cameras render | Exclude heavy debug layers |
Avoid duplicates
If you already placed a custom grid, disable Build On Play to prevent a new set of cameras being created each time you press Play.
Target selection¶
HUD can pick what to watch in different ways:
| Mode | Description | Use when |
|---|---|---|
| Random Any | Random among GrowthAgent and AnimalAgent | General overview |
| Random Flora | Only plants | Watching propagation/pollination |
| Random Fauna | Only animals | Predator–prey loops |
| Weighted | Bias by role (e.g., more pollinators) | Focus on specific loops |
Retargeting - Each camera can retarget (e.g., every 30 s) to keep the view fresh. - Retarget locks are respected during linger (so predators can catch grounded pollinators).
Consistency - HUD keeps a stable mapping (camera i ↔ overlay i) so labels always match the view.
Overlay info¶
Each camera shows an overlay card:
- Title: species/asset name + role icon
- Vitals: Energy bar, Age (days), Maturity
- Behavior: Hungry/Foraging, Linger time, Reproduction timer
- For plants: Size %, Mature/Immature, Seeding rate (incl. pollination boost)
| Element | Source |
|---|---|
| Energy / Linger | AnimalAgent runtime fields |
| Role / Locomotion | AnimalAgent inspector values |
| Seed chance / Size | GrowthAgent |
| Labels | Prefab/GameObject names (sanitized) |
Note
Overlays update even if the camera is not retargeting. If a tracked agent despawns, the slot marks as lost and retargets on the next interval.
Hotkeys¶
| Key | Action |
|---|---|
| H | Toggle HUD (grid + overlays) |
| R | Rebuild / rescan targets now |
| ← / → | Cycle highlight across cameras (focus mode) |
| 1…9 | Quick focus on that camera cell (if enabled) |
Hotkeys can be remapped in the HUD’s inspector.
Advanced setup¶
Persistent monitors¶
- Place the HUD in your bootstrap scene and set Build On Play = Off after the first build if you want to lock the layout.
- Or keep it On during iteration; just remember it’ll rebuild each Play.
Manual slots¶
- You can assign a specific target to a given slot (e.g., the busiest flower patch).
- Set Target Mode = Manual for that slot and drag a reference to the target.
Cinemachine (optional)¶
- Replace the internal cameras with CinemachineVirtualCamera references for fancier movement; the HUD just needs a Camera per slot that follows a transform.
Performance¶
- Cameras are expensive. Prefer 2×2 or 3×3 during gameplay; 4×4 is for debugging on beefy machines.
- Reduce Retarget Interval frequency; no need to scan every second.
- Lower overlay refresh rate (e.g., 5–10 Hz) for very large scenes.
- Limit Sense Radius on agents; it’s often the real CPU hog.
Tip
During heavy profiling, use 1×2 (two tall views) to deep-dive into predator–prey windows without tanking FPS.
Troubleshooting¶
“Cameras keep multiplying every time I press Play.”
- You left Build On Play = On while also keeping previous cameras in the scene. Disable it or delete the old grid.
“Overlay shows wrong info for the camera.”
- Ensure index order is preserved: the HUD pairs camera slot i ↔ overlay slot i.
- If you modified the layout at runtime, press R (Rebuild).
“HUD is empty.”
- No registered agents found yet. Spawn flora/fauna first, or press R after seeding completes.
- Check Layer Mask; cameras might be rendering nothing.
“All cameras are black.”
- Scene lighting/culling/layers may be misconfigured. Temporarily set a default layer on the cameras and retest.
“Pollinator windows are hard to see.”
- Increase post-interact linger (birds ~30 s), and ensure flowers have small trigger colliders so visits register.
See also¶
- Seeding (Editor) — ratios, underwater filters, reproducible layouts
- Flora —
GrowthAgentand pollination boost - Fauna — roles, linger, reproduction