Unity Dev Blog: Hidden Shortcuts to Make Level Design Easier
Taking control with keyboard short-cuts.
Unity has a plethora of preset keyboard shortcuts right out of the box. In addition, can customize these to suit your own preferences. But covering all of these would take a longer article to cover and an even longer time to memorize. So in this article, I will just cover a few that I have found indispensable when working with assets in the game view — especially in my current project of designing a sci-fi control room.
If you have ever tried to design a large level layout in Unity that contains a lot of smaller assets, you have probably thought you needed to scroll way in and slowly adjust the position and rotation of these objects by hand. While that might work, there are easier ways.
While not technically a keyboard short-cut, the first item on the list is the perspective icon in the upper right corner of the game view window.
This little guy allows you to view your scene from the different axises so that you can easily see how things are shaping up. You’ve more than likely used this in order to make sure things align when seen from the front, back, side, top, or bottom. And while that is awesome, there are some other helpful tips I will cover.
Imagine you are designing a level with pre-made assets and you would like to repeat a certain object multiple times. In this example I’ll use a floor asset. I want to build the floor out to shape out the room. I could drag in the floor prefab repeatedly and painstakingly place each one in position over and over.
Or, I could use a keyboard short cut to duplicate the asset within the hierarchy and scene view. To do this, make sure the object you want to duplicate is selected and press CTRL-D on Windows or CMD-D on a Mac. This will duplicate the asset and position in the same spot as the original. Need to duplicate 2 or 3 or more? Just CTRL-Click (or CMD-Click) on each to select them and then you can duplicate them all at once. Great! Now that you have dozens of newly duplicated assets all over the place, you can use keyboard shorts-cuts to help place these assets exactly where they need to be.
For moving assets, you can grab the red/blue/green arrow tips and drag it in the given direction. However, this moves the asset by tiny decimal amounts and can make it tough to correctly place. If you press CTRL (or CMD) while moving the asset, Unity will move it in 0.25 increments allowing you to be more precise.
Lastly, rotating object can be tough also. You can type in the exact angle in the transform section of the inspector for the object, but holding CTRL (or CMD) should allow you to rotate objects in 15 degree increments.
Those are two simple examples, and there are many more. There always seems to be an easier way to do things in Unity with each successive update.
In the next article I will cover the process I used to design my sci-fi control room. See you there!