Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Units
  4. Unit Health Component

Unit Health Component

The unit’s parent object must have the Unit Health component attached to it. This is the component that handles the unit’s health settings.


  1. Maximum Health: Maximum health points for this unit.
  2. Hover Health Bar Y/Height: When moving the mouse over a unit’s object, a health bar would appear. This is the health bar’s position on the y axis.
  3. Can Be Attacked: If disabled, then enemy factions will not be able to target this unit to be attacked.
  4. Take Damage: if disabled, then enemy factions will be able to target this unit to attack it but the unit will not receive any damage from the attacks.
  5. Destroy Object: When disabled, the unit’s object won’t be destroyed when the unit has zero health
  6. Destroy Object Time: After how much time (in seconds) should the unit’s object be destroyed after it hits zero health (if the above option is enabled).
  7. Destroy Award: This array allows the faction that destroyed this unit to get resources as a reward. The resource types and their respective amounts can be assigned inside this array.
  8. Destruction Audio: Audio clip played when this unit is destroyed.
  9. Destruction Effect: When the unit is destroyed, this effect object will be shown on the unit’s position.
  10. Stop Moving On Damage: When enabled, then whenever the unit receives damage, it will briefly stop moving (if it was already moving) for the duration at which the damage animation is played.
  11. Enable Damage Animation: When disabled, then the damage animation will not be played when the unit receives damage.
  12. Damage Animation Duration: Input the duration of the animation that is played when a unit receives damage in this field.

How can we help?