Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Bachelor in Web Media

WM8004 Advanced Interactive Applications


Introduction to Unity 3D

1. In this tutorial, we’re going to create a simple game with a tank vehicle in Unity
2. Unity is a free game engine that enables anyone to make games and interactive apps
3. After you make a game in Unity you can output it to multiple formats such as Xbox,
Playstation, iPhone, Android, WebGL, SmartTV, Facebook games and more.
4. For now, we’re going to look at Unity’s interface and do some basic modeling
5. Make sure you have downloaded and installed Unity from the Unity website and once you
open it you will see the default grey interface, with a number of windows open
6. First let’s switch the Layout view from default to 2 by 3 by clicking the dropdown menu
7. The large window you see is the ‘scene editor’ and this is where you will add new models,
lights and environments and be able to preview what is going on in your game
8. The controls for Unity are fairly intuitive but might take a little practice to get used to
9. To rotate the view in the scene editor, you right-click the mouse and drag around to see
10. To zoom in and out, you use the roller wheel or scroll ball on your mouse forwards & back
11. To pan left and right, up and down, hold down the middle mouse button (usually the roller
wheel) and drag the mouse in whichever direction you would like to pan
12. So the basic navigation controls in the scene window are rotate, zoom and pan.
13. Now we’re going to create a brand new project. Click File – New Project. Choose a location
for your files and create a new folder for your project. Rename it and save your file.
14. Beneath the scene editor window, you have the Game window, which lets you test the
game and preview what it will look like when you output, by pressing the ‘Play’ button
15. To get out of play mode, you can click stop or press escape on the keyboard.
16. The Hierarchy window shows you all of the objects that are currently in your scene, such as
cameras, lights, individual objects and groups of objects.
17. The Projects window shows all of the objects that are available to you to use in your scene.
These are stored in your assets folder, but they only become visible in the scene after you
drag something from the project window to the hierarchy window or into the scene itself.
18. The Inspector window is where you can make changes to the objects in your scene. For
example you could change the scale, position or rotation of an object or any other
properties that it might have, as well as adding and modifying components to it.
19. Usually when making a game, you would create the 3D assets using 3D modeling software
such as Blender, 3DS max or Maya, but for now we’re going to do the modeling in Unity
20. We’re going to make a really simple tank object, using only a few basic primitive shapes.
21. First of all, add a cube to the scene by clicking ‘GameObject’ at the top and then selecting
‘3D Object’ and choose ‘Cube’. You should see a cube in the scene and game windows.
22. Also notice that a cube has been added to the hierarchy window. Click on this or on the
cube itself and its properties will appear in the Inspector window on the right.
23. Once you have an object in your scene, there are three basic ways to interact with it. You
can move the object, you can rotate it and you can scale it. At the top of the scene window
there are icons for pan, move, rotate, scale and transform. If you click each of these, notice
that the gizmo on the cube changes (arrows for move, circles for rotate, cubes for scale).
24. You can change the objects properties by interacting with the gizmo, e.g. by dragging one
of the arrows in move mode on the x, y or z axis. Notice when you do this, the properties in
the inspector panel change accordingly. You can also type values directly into the inspector
panel for position, rotation and scale under the ‘Transform’ component of the cube.
25. The keyboard shortcuts for the transform tools are Q for pan, W for move, E for Rotate and
R for Scale. Try adjusting each one to get used to changing the basic properties of the cube
26. For the body of the tank, we’re going to use the scale tool to flatten and stretch the cube,
so press R and then flatten the cube and make it a bit wider. Reposition it at 0, 0, 0 by
typing the values into the ‘Position’ boxes for X, Y and Z in the Inspector window.
27. You can view your object from different angles quickly by clicking on the axes icon in the
top right of the scene window. E.g. if you want to see the x axis, click the ‘x’ and it flips.
28. Next, add a cylinder to the scene by choosing ‘GameObject’ – ‘3D Object’ – ‘Cylinder’
29. Rotate, reposition and scale the cylinder so that it looks like the wheels or tracks on both
sides of the tank (it should be a little wider than the cube body of the tank).
30. Use the navigation rotation and panning to check the tank from different angles
31. Next we’re going to make the top of the tank, again using another cylinder. Add one from
the GameObject – 3D Object menu and resize and reposition it on top of the tank
32. The final part we’re going to make is the tank’s cannon, which we will make from a cylinder
33. Add another cylinder from the GameObject menu and drag it out into a long thin cannon
34. If you have any issues with the positioning of these objects, just type 0, 0, 0 into the
position properties of the Inspector window and they will snap to the centre of the scene
35. You should also continually check the tank from different angles by click top & side view
36. Now let’s organize the hierarchy window a bit. First, rename each object to what it actually
is, so cube should become ‘tank_body’, and the cylinders should become ‘tank_tracks’,
‘tank_top’ and ‘tank_cannon’ respectively. Now we will group them all together.
37. Click ‘GameObject – Create Empty’ and rename it in the hierarchy window to ‘Tank’
38. Now select all of the other tank elements & drop them onto the ‘Tank’ object. You should
see that the individual elements become children of the ‘Tank’ parent. You can show or
hide the contents of grouped objects by clicking the dropdown arrow beside its name.
39. If you select the ‘Tank’ parent in the hierarchy window, all of the children are also selected,
but you can still select and modify the individual elements separately if you want to as well
40. Download camouflage and track textures from google and apply them to the tank. Once
you import it to the assets folder, all you need to do is drag it onto an object to UV Map.
41. In this tutorial, we’ve looked at the Unity interface, how to add and modify objects in the
scene and created our first game asset, a very simple tank vehicle. Thanks for watching.

You might also like