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.
- Generators: One resource generator can generate multiple types of resources, for each resource type that can be produced add an element to this array field and then define its settings:
- Resource Type: Drag and drop the Resource Type Info asset of the resource type that is generated.
- Task Icon: The icon to display in the task panel when the player selects the resource generator and attempts to collect the gathered resources. In case the resource can not be automatically collected.
- Auto Collect: When enabled, the resources collected here will be automatically added to the faction’s resources. However, when disabled, the player will have to collect this resource manually when it reaches a certain threshold (Max Amount) by selecting the resource generator and clicking on a task in the task panel.
- Collect One Unit Time: Time required to collect one unit from this resource.
- Max Amount: Only valid if Auto Collect is disabled. When the generator generates this amount of the specified resource type, the resource generation will stop and will only continue when the player collects the resource.
- Task Panel Category: Only valid for generators that have Auto Collect disabled. When using categories in the task panel (UI Manager), this is the ID of the task panel that this generators’ resource collection tasks belong to when it appears while selecting the resource generator. Task Panel categories allow to organize tasks based on a criteria that you can choose.
- Collection Audio: When the generated resource amount reaches the maximum amount, this audio clip will be played.