1. Home
  2. Unity RTS Engine
  3. Buildings
  4. Resource Generator

Resource Generator

The Resource Generator component allows buildings to collect resources over time and then add them to the faction. Attach this component to a building to turn it into a resource generator.


 

  1. Resources: One resource generator can generate multiple types of resources, for each resource type add an element to this array and then define it:
    1. Name: Name of the resource to generate.
    2. Collect One Unit Time: Time required to collect one unit from this resource.
    3. Max Amount: The maximum amount that can be collected from this resource and then added to the faction before collecting furthermore.
    4. Collection Audio Clip: When the generated resource amount reaches the maximum amount, this audio clip will be played.
    5. Task Icon: The icon to display in the task panel when the player selects the resource generator and attempts to collect the gathered resources.
  2. Auto Collect: When this is true, then the player does not to collect resources manually by selecting the building and launching the task to collect it, it will be added automatically for the faction to use.

How can we help?