Use this guide first when you need to replace a unit (swap prefabs per team via pools). It also explains how marching units spawn, move, fight, return to pools, and how to change unit types in code.

High-Level Flow

Core Types (code)

Where UnitsModule Lives in the Editor

Path and Spawn Rules

Passive Unit Count on Buildings (not the same as marching units)

Movement and Arrival (UnitMoveState)

Unit vs Unit Combat

Death and Pooling

Weapons vs Units