Create the Data Table (Foliage Data)
![](https://eeldev.com/wp-content/uploads/2019/03/2_datatable.gif)
Create a Blueprint Class of type FoliagePluginActor
Assign the Data Table and the Foliage Actor in the Project Settings
(FOLIAGE ACTOR HAS BEEN MOVED TO THE DATATABLE)
Change the Component Class for your Foliage to use the “FoliagePluginComponent“
Create a new Tree resource in the Foliage Data Table you previously created, see example below
Set the BP_FoliageActor class that you created earlier in the DataTable
![](https://eeldev.com/wp-content/uploads/2021/05/foliageactor-1024x598.png)
Create a new Rock resource in the Foliage Data Table you previously created, see example below
In the BP_SurvivalCharacter Blueprint, add the Foliage Plugin Interface
Example of adding the harvested resources to our inventory
Example of how to enable Melee Weapons to harvest Trees and Rocks
OPEN THE “BP_MASTERMELEEWEAPON” BLUEPRINT (/BLUEPRINTS/HOLDABLES/BP_MASTERMELEEWEAPON) AND MODIFY THE “GIVE DAMAGE ONCE” FUNCTION TO THE EXAMPLE BELOW
Example of how to enable harvesting with “E” Interact Key
Open the “BP_PlayerInventoryComponent” (/Blueprints/Components) and modify the “Is inventory actor?” macro