Game Development Reference
In-Depth Information
Figure 9.19
Adding the material
to your scene
You've successfully created your own Unity material. This will be useful in the next
chapter as you begin importing your own models into the engine. However, before
moving on to the next chapter there is some housecleaning to be done in the project's
Hierarchy view.
Organizing Assets with Unity Empties
If you take a look at all the cubes and lights that you've added to your scene in Hierarchy
view, things begin to look a little messy. This is a common problem in Unity, where plac-
ing lots of similar objects and prefabs is normal within a level. Luckily, Unity has an
amazing object known as an Empty that can help.
In both Blender and Unity, Empties are just about the most versatile object there is. They
are unrenderable objects that still possess a transform position in 3D space. In Blender,
they can be used as placeholders or proxy objects. In Unity, they can be anything the
developer wishes when they attach physics colliders and scripts to them. Common uses
for Empties in Unity include using them as invisible walls for levels, as triggers for events,
as launchers for weapons, as spawners for enemies, and many other uses. We will get to
some of those uses in Chapter 10, “Implementing Your Zombie in a Unity Game.” But
right now, Empties are going to help you clean up your Hierarchy view by acting as con-
tainers for your whiteblock geometry.
1. If it is not already open, open your Unity scene file, ZombieTown.unity , by choosing
File b Open Scene.
2. In the GameObject menu in Unity's menu toolbar, select the Create Empty option.
This adds an Empty object to your scene (Figure 9.20).
Search WWH ::




Custom Search