The feature for collecting resources manually requires some changes and new configurations regarding the project, Prefabs, scenes, cameras, and scripts. This is because we are adding a new interactable object to the map that the player will be able to send the units to so that they can collect resources and manually generate them while the units are at the resource location.
Adding the new Resource layer
The first thing we are going to add is a new layer. This will be used by the
Resource object on the map so that it can collide with the unit, as well as a few other validations that we are going to do when we develop the next script. Open the Project Settings window by going to Edit | Project Settings…, select the Tags and Layers menu from the left panel, and add Resource as the value for User Layer 11. This should look as follows:
Figure 13.4 – The new Resource layer
We have one new layer now, but we also need to...