Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. NPC Factions
  4. NPC Defense Manager

NPC Defense Manager

The NPC Defense Manager is responsible for managing the faction’s defensive behavior.

When creating a new NPC Manager object using the RTS Engine menu. The NPC Defense Manager is a component of the new NPC Manager’s ‘NPCArmyManagers’ child object.


  1. Defense Ratio Range (between 0.0 and 1.0): When the NPC faction is carrying an attack, this field defines the ratio of the units to the total army units that will stay in the faction’s territory for defensive purposes.
  2. Cancel Attack On Defense (in seconds): If the NPC faction is attacked while it is carrying an attack and this field is enabled, the NPC faction would stop the attack and retreat in order to defend its territory.
  3. Cancel Defense Reload Range: A timer that defines how often will the NPC faction check if it’s under attack or not. When the NPC faction is no longer under attack, it will leave defensive mode and will be able to carry an attack.
  4. Unit Support Enabled: When enabled, units that get attack will be able to request support from army units in range.
  5. Unit Support Range: Defines the range from which units will be called to provide support for the behavior defined in the above field.

How can we help?