The Health System makes it easy to not just set up destructible vehicles and objects of all kinds, but also create damageable parts on a bigger vehicles, such as capital ships.
The two core components of the Health System are:
The Health component
A Damageable component represents an object which can be damaged (or healed). This component has a specified Health Type you can set in the inspector, and has a health value which can range from zero to a specified maximum value.
When a weapon such as a projectile or a beam hits a damageable object, it searches for a Damage Receiver component on the same game object as the collider. This enables it to efficiently pass damage (or healing) information to the Damageable that the collider represents.
The Damage Receiver is basically a channel for passing damage (or healing) information through the collider to the Damageable.
Health Modifiers are added to bullets, missiles, explosions or anything else that is capable of damaging something.
See the Setting Up Weapons Damage section for more information.
The Health component may be added to the root transform of an object which has one or more Damageables. It has several key functions:
Storing information about all the Damageables on the object, for easy access by other scripts.
Enables easy switching on/off of whether all the Damageables on the object are damageable or healable.
Enables collisions to cause damage.