Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. NPC Factions
  4. NPC Manager

NPC Manager

The NPC Manager is prefab which includes child objects that hold nothing but NPC components. It acts as the parent of these NPC components as it is responsible for initializing, connecting and providing the required references for them. A NPC Manager prefab can be attached to a NPC Type Info asset file allowing to define with which NPC type and faction types it will be used.

To create a new NPC faction type, click on the ‘RTS Engine’ menu and then click on ‘New NPC Manager’. This will spawn a new object in the scene which only has the NPC Manager as a component and other NPC components attached to its child objects. Drag and drop this object into the project tab to create a prefab and open it.

The NPC Manager component doesn’t have any exposed fields.


Right now, you can attach the NPC Manager prefab to any of the NPC types that you’ve created. We will now leave the children NPC components of the NPC manager prefab as they are and we will now proceed to define how the NPC faction will handle unit and building creation. Afterwards, we will come back to the NPC components and go through each one of them.

How can we help?