Game Development Reference
In-Depth Information
10. With the Prefabs folder selected in the
Project
panel, click again on the
Create
button and now make a new empty prefab. Assuming you selected
the model for the first type of alien, name this prefab
Alien1
. To complete
the
Alien1
prefab, drag the model in the Unity Hierarchy panel into the
newly created prefab. Now the empty prefab is filled with the 3D model for
our first alien asset.
11. You can now delete the alien model from the scene and then drag the alien
prefab into the scene instead.
12. Finally, we can show you the power of Prefabs. Create multiple instances of
the
Alien1
prefab by pressing
Ctrl
+
D
to get something like this, where we
have created four instances of Alien 1:
13. Now create a new folder for our materials in the
Project
panel and name it
Materials
. With the
Materials
folder selected, create a new asset, a ma-
terial this time. Name it
red
(or whatever the color you like) and then, with
the material selected, click on the white rectangle in the upper-right corner of
the
Inspector
panel in Unity. Refer to the following screenshot for clues: