Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Buildings
  4. The Border Component

The Border Component

The Border component allows the faction to increase its territory in the map.

The faction’s territory represent the area where the faction can place buildings and exploit resources that belong to this area. If you want a building to increase its faction’s territory then add the Border component to the parent building object. A capital building (the building that each faction starts the game with) must have the Border component.

Border Object:

  1. Spawn Object: When enabled, this will spawn a border object which will be visible in the minimap and which defines the territory marked by this component.
  2. Object: This is the object that will be spawned around the building that has the border component. This object will only be shown in the mini map only therefore it must have the “Border” layer. Take a look at the example provided in the demo scene to see what a border object should look like.
  3. Height: This field presents the position of the border object on the y axis.
  4. Color Transparency: The border object will be colored with the faction’s color. This is the transparency of the border’s color, in case you’re using minimap icons, you might want to have a semi transparent color for the border in order to show the minimap icons clearly over the border.
  5. Size: The border’s size (how much will it cover from the map).
  6. Size Multiplayer: If this is set to 1. The border object’s scale will be set to the size of the border. However, if the object does not represent the size realistically, you might want to change this value in order to get it exactly.

Border Buildings:

If you want to limit the amount of a certain building type inside the territory that this component covers then you can add a new element to the Building In Border array, add the building prefab in the new element’s Prefab field, then set the Maximum Amount field to the amount allowed of that building type. If the building can be used by all factions or this limitation in the amount of that building applies to all faction types, leave the Faction Type field unassigned. If this limitation applies to a certain faction type then assign its Faction Type Info asset in the Faction Type field.

How can we help?