The resource’s parent object must have the Resource component attached to it. This is the main component that defines a resource.
- Resource Type: Drag and drop the Resource Type Info asset that is represented by this resource object in this field.
- Radius: The radius of the resource on the navigation mesh. The radius’ value defines the distance at which the units can interact with the resource object when collecting it.
- Infinite Amount: When enabled, the resource’s amount will be infinite.
- Amount: The amount that this resource hold. In case the Infinite Amount option is disabled.
- Destroy On Empty: In case the resource amount is not infinite and this is enabled, then the resource object will be destroyed when its amount hits zero.
- Selection Plane: This is the object that holds the selection texture and which will be activated when the resource object is selected. This is a child object of the main resource object includes a Mesh Renderer component as it will be colored in the faction’s color when activated.
- Selection: The selection collider can’t be the same as the resource object’s frontier collider. It’s a child object of the resource parent object. It includes a Collider component with “Is Trigger” set to true. This collider represents where the player has to click with the mouse in order to select the resource object. It includes the Resource Selection component attached to it. The selection object is then assigned to the Selection field in the Resource component, the Resource Selection component has the following fields
- Can Select: Can this resource be selected?
- Select Owner Only: Only valid for unit and building selection components.
- Minimap Icon Size: Represents the size of the minimap icon for this resource object.
Collection & Drop Off Settings:
- Can Collect Outside Border: When enabled, then units will be able to collect this resource even if it’s outside their faction resources.
- Collect One Unit Duration: The time that a resource collector spends gathering this resource in order to collect one unit of it
- Show Collectors: When enabled, the amount of collectors will be shown in the selection panel when the resource is selected.
- Show Amount: When enabled, the amount of the resource will be shown in the selection panel when the resource is selected.