Creating the battery prefab
In this section, we will import a downloaded model of a battery and turn it into a Unity prefab — a data template that we can use to make multiple copies of the model with predetermined settings applied. If you've worked with Adobe Flash before, then you might compare this idea to the MovieClip concept, wherein you can create many identical copies, or modify individual copies post creation.
Download, import, and place
To begin creating the puzzle, you'll need the battery asset package which is available in the code bundle provided on packtpub.com (www.packtpub.com/files/code/8181_Code.zip). Locate the package called batteries.unitypackage
from the extracted files. Once you have done this, switch back to Unity and go to Assets | Import Package. Browse to the location you downloaded the package to, and select it as the file to import. You will be presented with a list of the assets inside this package in the Import Assets dialog window, then click on Import to...