Unit modules description

RTS Kit uses a module system to customize game units and buildings, and there is a list of primary modules below:

Module

Description

Unit

Core module of any unit. Contains primary unit info and links other modules together.

AIAgent

Represents an AI of the unit. It can handle player/AI orders like move to position, attack/follow target, etc.

Damageable

Makes an object possible to take damage. This component contains unit health info etc.

IMovement

GroundMovement, FlyingMovement — these modules represent a unit’s movement system. If you want to allow a unit to move, add one of these modules.

IAttack

SimpleAttack, ShellAttack — these are attack modules. A unit which has any of these modules gets the ability to attack other units.

Turret

This module is needed for vehicles like tanks to rotate their turret towards targets.

Production

Allows this object to build units or buildings.

Harvester

Allows a unit to gather resources.

Refinery

Allows harvesters to give the gathered resources to the owner player.

EffectsModule

Allows playing built-in supported unit effects.

AnimationsModule

Allows playing built-in supported unit 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.

Selectable

Represents a unit which can be selected by the player (most game units, usually).

Carry*/CarryableModule

Handles units that can carry other units inside themselves.

There can also be more undocumented modules, depending on the asset version.

A unit module is a simple C# class which is added to the Unit component from code when the unit is spawned ingame. Most settings of these modules are located in the Unit Data asset fields.

You can create your own modules and connect them to existing ones, if needed. This is described in the Programming partition.