🧩 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
TryGetComponentlogic 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
0when: -
no GameObject is provided
- no
TeamProviderexists
Behaviour:
int teamId = TeamUtility.ResolveTeamId(go);
- Safe null handling
- No side effects
- Designed to avoid allocations
⚠️ Important Notes¶
Boundaries¶
Do not:
- Use
TeamUtilityas a gameplay API - Build team or faction systems on top of it
- Assume
0has meaning beyond unknown or neutral - Replace
TeamProviderwith this helper
If team data is needed, use:
TeamProviderITeamProvider
🧠 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.
🔗 Related Documentation¶
- Team Provider
- Rules (TeamRule)
- Health System