Unit modules description
RTS Starter Kit is uses module system to customize game units and buildings, and there a list of primary modules:
Module |
Description |
---|---|
Unit |
Core module of any unit. Contains primary unit info and links other modules together. |
Damageable |
Makes an object possible to take damage. This component contains unit health info etc. |
Movable |
This module represents a unit moving system. If you want to allow unit to move, add this module. |
Attackable |
Attack module. Unit, which has this module, gets the ability to attack other units. |
Tower |
This module is needed for vehicles like tanks to rotate its tower to the targets. |
Production |
Allows this object to build units or buildings. |
Harvester |
Allows unit to gather resources. |
EffectsModule |
Allows to play built-in supported units effects. |
AnimationsModule |
Allows to play built-in supported units animations. |
ElectricityModule |
Handles work of the Electricity mechanic, if it is used in your game. |
FogOfWarModule |
Handles work of the Fog of War mechanic. |
Infantry |
Handles some infantry logic. |
Also there can be more undocumented modules.
Unit module is a simple component, which can be drag n dropped to Prefab as any other Unity component or script. With automatic prefab generation (described in next partitions) all needed for unit modules will be added to prefab automatically (by its UnitData settings, read about it below).
You can create your own modules and connect it to existing, if you need. This is described in the Programming partition.