Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. NPC Factions
  4. NPC Unit Regulator

NPC Unit Regulator

The NPC Unit Regulator is responsible for regulating the creation of a unit type.

NPC Unit Regulators are created automatically using the NPC Manager component.


  1. Prefabs: a list of Unit prefabs (that share the same unit code). This will be assigned automatically by the NPC Manager. However you are able to add/remove unit prefabs manually.
  2. Min Amount Range: Minimum amount that must be created from the unit type regulated by this component.
  3. Max Amount Range: The maximum allowed amount that can be created from the unit type regulated by this component.
  4. Max Pending Amount: The maximum allowed amount of this unit-type-creation tasks that the faction can have at the same time.
  5. Create On Demand: Allow NPC components (other than the NPC Unit Creator) to request the creation of this unit type.
  6. Start Creating After (in seconds): The creation of this unit type will start after the delay provided in this field.
  7. Spawn Reload Range (in seconds): The timer length that will be used by the NPC Unit Creator to decide whether to create this unit type or not.
  8. Ratio Range (between 0.0 and 1.0): The ratio of the amount of this unit type to the amount of the population slots which determines the target amount to create from the unit type. If the target amount determined by this ratio is below the minimum amount (above the maximum amount), the NPC Unit Creator will set the target amount to the minimum amount (to the maximum amount).
  9. Auto Create: Enable/disable the creation of this unit type by the NPC Unit Creator.

 

How can we help?