O'Reilly logo

Unity 3.x Game Development Essentials by Will Goldstone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scattering power cells

Now that we have our power cell object stored as a prefab, when we duplicate the object in the scene, we are creating further instances of the prefab. Ensure that you still have the powerCell selected in the Hierarchy and then duplicate the object three times so that you have four in total; this can be done either by going to Edit | Duplicate, by using the keyboard shortcut Command + D (on Mac) or Ctrl + D (on PC), or by right-clicking the object in the Hierarchy and choosing Duplicate from the drop-down list.

Note

When objects in the scene are duplicated, the duplicates are created at the same position—don't let this confuse you. Unity simply does this to standardize where new objects in the scene end up, and this is because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required