O'Reilly logo

Learning Unity iOS Game Development by Kyle Langley

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

The prefab creation

In order to create a prefab, you must first have a collection of GameObjects that you want to keep together as one prefab.

Perform the following steps:

  1. Navigate to the Assets folder. Right-click on it and select Create and then Folder. Name this Prefabs.
  2. Select the Axe GameObject in Hierarchy. This is the one we created in the last chapter. Click on it and drag it onto the Prefabs folder.

This will create an Axe prefab that we can use in the future that holds everything the current Axe GameObject does.

The prefab creation

Anytime in the future, when we want to create an axe, we will have a complete file that holds everything we know as axe.

This is essentially ...

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