Skip to content

🧩 00_GettingStarted — UI Integration (Optional)

These demos are deliberately UI-free, focusing purely on the core mechanics of the Health System without visual distractions.
The only visuals are provided by the DebugUI panel (toggle: F9) and any sample FX components included for demonstration.

The Health System is fully UI-agnostic — it does not depend on any HUD, canvas, or world-space elements.
You can visualise health however you prefer, using your own pipeline or framework.


🧠 Design Principle

No mandatory UI layer.
The Health System operates entirely through clean interfaces and events.

You’re free to connect it to: - Unity UI (Image, Slider, TMP) - World-space bars or screen-space overlays - Text-only readouts or debug widgets - Or nothing at all — pure logic, no visuals


🧱 Common Interfaces

All runtime logic uses clear, decoupled contracts:

// Read health for UI updates:
IHealthReadonly read = GetComponent<IHealthReadonly>();
float pct = read.HealthPercent;  // Drive your own UI fill or text

// Apply healing:
IHealthWriter writer = GetComponent<IHealthWriter>();
writer.TryHeal(25);

// Apply damage:
IDamageable dmg = GetComponent<IDamageable>();
dmg.TryTakeDamage(10);

🎨 Optional Helper

A sample HealthBarUIConnector script is included.
It updates a UnityEngine.UI.Image.fillAmount based on an IHealthReadonly component.
This is purely optional — you’re not required to use it.

// Example snippet:
bar.fillAmount = health.HealthPercent;

⚠️ Authority Note
This scene runs with Require Authority disabled by default.
Health mutations are allowed locally for demonstration purposes.

Enabling an authority binder alone will not block mutations unless
Require Authority is enabled on the HealthSystem — this is intentional.

Why Health works this way:
https://revandrab.github.io/RevFramework/authority/#health-opt-in-authority-gameplay-state


✅ Key Takeaway

You have complete freedom in how you display or omit health UI.
The underlying system will continue to function perfectly without any built-in UI elements, letting you integrate it seamlessly into any art or gameplay style.