Game Development Reference
In-Depth Information
Chapter 2
Unity Basics
While you can create some assets directly inside Unity, the building blocks for your scene will usually
be based on imported assets. The in-game functionality, location, and final appearance, however,
will be managed and completed within the Unity Editor. For that, it is necessary that you have a
good understanding of Unity's key concepts and best practices. In this chapter, you will explore and
experiment with a good portion of the Unity features that don't require scripting to be able to enjoy.
Unity GameObjects
In Unity, assets can be anything from textures and materials to meshes, scripts, and physics-related
components. Whether they were imported or generated inside Unity, components are combined
and manipulated to bring objects to life. Unity uses the term gameObject to represent objects
because internally they belong to a (scripting) class named GameObject . When referring to a generic
gameObject, this topic will use the lowercase g . When scripting, the uppercase and lowercase g will
refer to either the particular gameObject (lowercase g ) or to the GameObject class (uppercase G )
that holds the definitions and available functionality for all gameObjects.
The most basic of GameObjects (in the formal sense of the word) consists of little more than its
transform. A transform is an object's scale, orientation, and location in space. The gameObject itself
can be used as a parent to manage multiple gameObjects, or it can be filled with components that
define all manner of visual appearance and functionality. Unity provides many prebuilt gameObjects.
Some are simple primitives ideal for quickly prototyping your game. Others are full-fledged systems
for complex and sophisticated objects and special effects.
If you have no prior experience with 3D assets, let alone game-type functionality, don't worry, you
will begin with the basics and go on from there.
Creating Primitives
In DCC (digital content creation) applications—such as 3ds Max, Maya, or Blender—a primitive
object is, by definition, an object that can be defined by a set of parameters. Some examples of
primitives are sphere, cube, capsule, and cylinder. A sphere is defined by a radius and the number
39
 
Search WWH ::




Custom Search