Skip to content

🧩 Health — Internal / Teams

📦 Folder Overview

This folder contains internal helpers for team resolution used by the Health system.

These types support team-aware rules and utilities, but are not part of the public API surface.


🎯 Purpose

Internal team helpers exist to:

  • Resolve team identity from Unity components
  • Keep team lookup logic consistent across the system
  • Avoid duplicating TryGetComponent logic in multiple places

🧩 What Lives Here

This folder contains:

  • Internal utility code
  • Lightweight lookup helpers

It does not contain:

  • A team system
  • A faction or relationship model
  • Supported extension seams

🧩 Components

TeamUtility

Internal helper for resolving team IDs.

Responsibilities:

  • Retrieves team identity from TeamProvider
  • Returns 0 when:

  • no GameObject is provided

  • no TeamProvider exists

Behaviour:

int teamId = TeamUtility.ResolveTeamId(go);
  • Safe null handling
  • No side effects
  • Designed to avoid allocations

⚠️ Important Notes

Boundaries

Do not:

  • Use TeamUtility as a gameplay API
  • Build team or faction systems on top of it
  • Assume 0 has meaning beyond unknown or neutral
  • Replace TeamProvider with this helper

If team data is needed, use:

  • TeamProvider
  • ITeamProvider

🧠 Usage Guidance

  • Treat this folder as implementation detail
  • Use public components for gameplay logic
  • Keep team meaning defined in rules or higher-level systems

🚫 Not for Production Use

This folder is not intended as a gameplay integration surface.


  • Team Provider
  • Rules (TeamRule)
  • Health System