Unity Shortcuts for Fast Level Design
Building out levels in Unity can be very quick and easy if you utilize as many of it’s features as possible. Whilst keyboard shortcuts exist in many applications, Unity also has special functions and file types to streamline creativeness.
Unity works with many global keyboard shortcuts such as Copy, Paste, Undo. But some of its specialized shortcuts include the following:
QWERTY keys — These allow us to quickly access the different scene editing tools left to right, respectively.
Z key — This toggles the tool handle position between Center and Pivot, allowing us to move and scale things appropriately.
X key — This toggles the tool handle rotation axis’ between Local and Global positions.
\ key — Toggles grid snapping on and off, allowing objects to be moved either freeform or in different increments.
Additionally, to change the grid size quickly, we can use Ctrl + [ or ] to decrease and increase.
Using these tools can allow us to put objects together quickly
Rather than dragging and dropping multiple objects in to the scene. We can use the common shortcut of Ctrl + D to Duplicate objects. As we increase in scope and scale, Ctrl clicking can be used to select multiple objects at once to manipulate them.
If, at any time you get a bit lost in the scene view, pressing the F key focuses the view back on the selected object(s).
Going back to the picture above, things look a bit bland and repetitive. To combat this, we can add variations. Depending on how assets are being sourced, we may be limited with options, which is where the term kitbashing can come in to play. By combining multiple objects, we can create more interesting objects.
Layering these two objects over each other, already creates a big difference when it comes to putting together a larger surface. But we don’t want to have to place and line up two objects every time, especially if we were combining more smaller pieces. This is where Unity’s Prefab file type proves useful.
To create a prefab, we can child all used objects in an empty parent object. Renaming this appropriately then dragging it in to our Assets folder, creates a file similar to the game objects in our scene hierarchy, but is identified as a prefab by the blue cube.
Building out different prefabs, allows us to still build quickly, but with a lot more detail. Below is the various different Filebase assets, as well as custom prefabs made by combining multiple assets, that I used to craft a full fledged floor for my scene.
As we introduce elements with various sizes or thicknesses, sometimes it can become hard to line them up accurately. A super useful hot tip for this is Vertex Snapping. This allows game objects to be manipulated from specific vertices, and will line up with vertices of other game objects. This can either be toggled with Shift + V or by holding V when using the tool handle.
Lastly, as our scene gets filled with objects, it becomes important to keep a clean hierarchy. Making use of empty game objects to nest different elements, allows things to be collapsed, allowing for focus elsewhere. As our scene gets built out, we can nest all objects related to the level itself in an object named Room, before branching out into further empty objects containing objects such as Floor, Walls, and Roof.
In our Assets folder, cleanliness is also important. It can be worth having a Prefab folder to house all created prefabs, as well as further nested folders for various types of prefabs as the project grows.
The above tips allow for very easy level creation, without the result looking too bland.