appendix A
Scene navigation and keyboard shortcuts

Operating Unity is done through mouse and keyboard, but it isn’t obvious to a newcomer how the mouse and keyboard are used in Unity. In particular, the most basic sort of mouse and keyboard input is navigating around the scene and looking around the 3D objects. Unity also has a number of keyboard commands for commonly used operations.

I’ll explain the input controls here, but there are also a couple of web pages you could refer to (these are the relevant pages in Unity’s online manual): http://docs.unity3d.com/Documentation/Manual/SceneViewNavigation.html and http://docs.unity3d.com/Documentation/Manual/UnityHotkeys.html.

A.1 Scene navigation using the mouse

Scene navigation is primarily done with three main navigation maneuvers: Move, Orbit, and Zoom. The three movements involve clicking and dragging while holding down a combination of Alt (or Option on the Mac) and Control. The exact controls vary for one-, two-, and three-button mice; table A.1 lists all the controls.

Table A.1 Scene navigation controls for various kinds of mice
Navigation actionThree-button mouseTwo-button mouseOne-button mouse
MoveMiddle button click/dragAlt+Command+left-click/dragAlt+Command+click/drag
OrbitHold Alt+left-click/dragAlt+left-click/dragAlt+click/drag
ZoomHold Alt+right-click/dragAlt+right-click/dragAlt+Ctrl+click/drag

Besides the navigation maneuvers done using the mouse, there are also some view controls based on the keyboard. If you hold down the right button on the mouse, the WASD keys on the keyboard can be used to walk around in the manner common to most first-person games. Hold Shift during any other control to move faster. But most important, if you press F while an object is selected, the view will pan and zoom to focus on that object. If you get lost while navigating your scene, a common “escape hatch” is to select an object listed in the Hierarchy and then press F.

A.2 Commonly used keyboard shortcuts

Unity has a number of keyboard commands to quickly access important functions. The most important keyboard shortcuts are W, E, R, and T: those buttons activate the transform tools Translate, Rotate, and Scale (refer to chapter 1 if you don’t recall what the transform tools do), as well as the 2D Rect tool. Because those keys are right next to each other, it’s common to leave your left hand on those keys while your right hand operates the mouse.

In addition to the transform tools, there are a number of keyboard shortcuts; table A.2 lists many useful keyboard shortcuts in Unity.

Table A.2 Useful keyboard shortcuts
KeystrokeFunction
W
E
R
T
F
V
Ctrl/Command+Shift+N
Ctrl/Command+P
Ctrl/Command+R
Ctrl/ Command+1
Ctrl/Command+2
Ctrl/Command+3
Ctrl/Command+4
Ctrl/Command+5
Ctrl/Command+6
Translate (move the selected object)
Rotate (rotate the selected object)
Scale (resize the selected object)
Rect tool (manipulate 2D objects)
Focus view on the selected object
Snap to vertices
New GameObject
Play game
Refresh project
Set current window to Scene view
Set to Game view
Set to Inspector view
Set to Hierarchy view
Set to Project view
Set to Animation view

Unity responds to a number of other keyboard shortcuts as well, but they get increasingly obscure the further down the list we get.