The Resource Manager component defines the map’s resource types and keeps track of all factions resources.
When you’re creating a new map using the RTS Engine menu editor, this component is attached to an object called “ResourceManager”.
- Resource Parent: All resources in the map must be children of one empty object that you drag and drop in this field.
- Resource Info: A list that holds the available types of resources in this map. The amount of resource types you want to have in the map is the size of this list. Each resource type has a series of settings:
- Name: name of the resource
- Starting Amount: The amount of this resource type that each faction starts with.
- Icon: The icon of this resource that will be displayed when this resource is selected.
- Minimap Icon Color: The color of the minimap icon for this resource type.
- Show UI: Show the local player the amount he has from this resource type in the UI? When disabled, the following two fields can be skipped.
- UI Image: The UI object with an “Image” component that shows the resource’s icon.
- UI Text: The UI object with a “Text” component that shows the resource’s current amount.
- Selection Audio: Audio clip played when a resource of this type is selected.
- Send To Collect Audio: Audio clip played when unit(s) are sent to collect from a resource of this type.
- Collection Audio: A list containing audio clips played when the unit is collecting from a resource of this type, one of the audio will be randomly chosen each time.
- Auto Collect: When disabled, the resource collectors will have to carry collected resources to a drop off building before they can be added to the and used by the faction. When enabled, the resources will be automatically added to the faction once collected.
- Resource Selection Color: This is the color of the selection texture of each resource that is shown when a resource is selected.
- Generate Resources List (button): This generates all resources that are children of the Resource Parent object and puts them in a list. Always generate the resources list when you add/remove new resources to the scene.