Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Units
  4. Resource Collector Component

Resource Collector Component

Add the Resource Collector component to the main unit’s object so that the unit can collect resources.


  1. Collection Settings: An array that has the size that is equal to the amount of resource types that can be collected by the collector. A resource type can be collected by the unit only if it has been added to this array. For each element of the array:
    1. Resource Type: The Resource Type Info asset for which the next two fields are defined.
    2. Object: The collection object (child object of the unit object) that is activated when the unit is actively collecting a resource of the above type.
    3. Animator Override Controller: This animator override controller will be activated when the unit is actively collecting a resource of the above type.
    4. Drop Off Object: Child object of the unit’s main object that is activated when the unit is dropping off resources of the above type. Only valid if auto collecting resources is disabled.
    5. Drop Off Override Controller: This animator override controller will be activated when the unit is dropping off resources of the above type at a building. Use it if you want to have dedicated animations for the drop off state.
  2. Max Capacity: The maximum capacity that this unit is allowed to gather from each resource type before having to drop it off at a drop off location. Only valid if auto collecting resources is disabled.
  3. Auto Collect: When this option is enabled, the collector will be able to automatically search for resources to collect. The Search Reload field defines the time period at which the unit looks for resources to collect and the Search Range field is how far the unit searches for these resources.
  4. Source Effect: An effect object that is spawned on the resource collector when it is actively collecting a resource.
  5. Target Effect: An effect object that is spawned on the target resource when the collector is actively collecting it.
  6. Collection Order Audio: An audio clip that is played when the player orders the collector to gather resources.
  7. Task UI: Allows to display a dedicated task for the resource collector in the task panel when it’s selected.
    1. Enabled: Only when this field is checked will the task be displayed.
    2. Icon: The task’s icon that will be displayed.
    3. Panel Category: In which task panel UI category will the task appear. For more information about UI task panel categories, check out the UI Manager.

How can we help?