Chapter 11 ■ Physics and Special Effects
Note that the icon is currently a white cube.
7. Drag the Cannonball object from the Hierarchy view onto the empty Prefab.
The icon turns light blue to indicate it is no longer empty.
Now that you have created the prefab, you can delete it from the scene. It is part of the project and, unlike an
object that only exists in a single level, the prefab can be instantiated anytime, anywhere. If you ever have to edit it,
you can easily drag the prefab back into the scene.
8. Delete the Cannonball from the Hierarchy view.
Now that you’ve got a prefab, you can assign it to the projectile parameter in the Projectile component.
1. Select the Proxy Weapon.
2. Drag the Cannonball prefab onto its Projectile parameter from the Project view.
Now you are ready to test the instantiation.
3. Save the scene and save the project.
4. Focus in on the First Person Controller in the Scene view.
5. Click Play and press either the left Ctrl key or the left mouse button a few times (Figure 11-10).