The NPC Unit Spawner component allows the NPC faction to create units that can not be created using the other 3 main components (healers and converters for example).
This component is optional and it’s not required for a NPC faction.
- Faction ID: The faction ID that this component belongs to.
- Units (array): This array allows you to define units that this component will spawn for the NPC faction. Each element of the array represents a unit and its spawn options:
- Prefab: The unit prefab to spawn.
- Population Ratio: Defines the amount of this unit in relation to the maximum population amount (between 0 and 1).
- Start Creating After: Time (in seconds) that the faction needs to wait before starting to create this unit. This allows you to set the priority of creating this particular unit.
- Spawn Reload: Time required between each time the NPC faction looks into spawning this unit.