Now that we've created a single room, let's see how easy it is to create an additional one.
In the Project tab, select Create | Folder and name the new folder
Prefabs
. Move the newly created folder to theMyGame
folder we created previously and double-click on the folder to enter it.Make sure you are in the Object/Top Level mode and then select the Simple Room object from the Hierarchy tab. Drag and drop it into our
Prefabs
folder from the Project tab. You'll notice that the object in the Hierarchy tab will turn blue to indicate that it is a prefab.Prefabs or the prefabricated objects are the objects we set aside to make copies of during runtime, such as
AdvancedPlayer
we used previously from UFPS. With this blueprint, we can create as many as we want. When you add aPrefab
folder to a scene, you will create an instance of it. All of these instances are clones of the object located in our Assets. Whenever you change something in the prefab located in...