Adding cucumbers to our terrain
Cucumbers will be used in our game to give the beetles something to search for and to eat. We will place several cucumbers in the sandbox area and, in Chapter 10, Scripting Our Points System, keep track of how many there are during gameplay. In this section, we will prepare the cucumbers for our use and populate them in our game.
You previously downloaded the necessary assets for the cucumber. As you can see in the following screenshot, Cucumber
is accessible in the Assets/Cucumber
folder. You will note that when we select Cucumber
, the bottom of the Project
panel identifies the Cucumber
file as a .fbx
file:
The .fbx
file was exported from the 3D modeling software so we can use it in our game. When that asset is selected, the inspector view shows Import Settings
. We want access to the transform, mesh renderer, and other components, so we will turn it into a prefab and make some changes. Here are some initial steps:
- Drag the
Cucumber.fbx
file fromAssets
|Cucumber...