Game Development Reference
In-Depth Information
4. Finally, add 3 cubes and position them near the center of the scene by using the
3D gizmo, and rotate them with different angles. Set the y position for two cubes to
0.5, and the third to 1.5, which will make it sit on top of the other two. By adding
these boxes we have completed the construction of our simple scene.
Illustration 2: Transform component
You can see the final result in scene1 in the accompanying project. You might have noticed
that we did not need more than the alternation of the positions, scales, and rotations of the
basic shapes to construct our scene. You might have also noticed the existence of several
components in the inspector window that are added to the game object. One of these com-
ponents is Transform which we've just used. Each one of the components has its unique
function and plays specific role in the look or the behavior of the game object. For instance,
Mesh Renderer component is responsible for rendering the object. Try to disable this com-
ponent and see what happens.
If you still unsure about the difference between scene, game object, and component; refer to
Illustration 3, which summarizes scene construction in Unity.
Search WWH ::




Custom Search