Hidden Shortcuts To Make Level Design Easier
--
So if you have any prior experience in Unity, you may have spent a lot of time dragging game objects around and individually changing materials on every single asset. You may have built an entire level without knowing any of these shortcuts. It took WAY longer than it should have, and hopefully this article enlightens and provides you with some tools to add to your tool belt when dealing with building levels in Unity :)
I’ll start making the Sci-Fi control room in this article. I’ve downloaded some assets from Filebase and have them saved in my project’s asset folder.
First of all, I want to make a floor. Its going to take ages for me to make a floor without covering some important shortcuts. When you add a game object to the hierarchy, you’ll see it in your scene view.
Once you drag it into the scene view, it may be far away. If you want to see it up close or focus on it, you can hit the F key while your mouse is in the scene view. I’m able to rotate around the object by holding the Alt key and left clicking and dragging the mouse to pan the camera around it.
I want to create the floor, so obviously I’m going to need more of these tiles. I can click it in the hierarchy and press Ctrl + D. This will duplicate the object. But it duplicates it at the exact same transform.
Pressing W while the object is selected in the hierarchy will give you the arrows on the object in the scene view to drag it around. If you’ve ever tried to drag the objects and line them up perfectly without his shortcut you probably wasted a ton of time.
Hold Ctrl while dragging the object. You can see that instead of it moving smoothly across the screen, its snapping. Inspect the transform of the object. You’ll see the value changing in specific increments (probably 0.25). You can also adjust the increments the object snaps by enabling the snap to grid option location at the top of the scene view.
Lets assume the objects aren’t lining up properly for some reason. Vertex snapping is another super useful tool. Holding the V key and hovering over the game object in the scene view will allow you to select a specific vertex. Cant see the vertex? Check out the gizmos button in the top right. Select the “show wireframe” option. Now when you have a gameobject selected you can see the wireframe of it in the scene view.
Holding V and hovering the mouse over the object will snap the mouse selection to the closest vertex. Now, while still holding V drag the object to the game object you want it to snap to. This will snap them together and its very satisfying to do.
With this knowledge I can build the floors and the walls with ease! Holding Ctrl while dragging the objects also applies to an object’s rotation. So if I want to duplicate the walls on one side of the room, and rotate them easily, all I have to do is hold the control key and rotate them.
While creating the floors I realized I missed a handy shortcut. Rotating objects based on their individual pivot points and the center of several game objects.
On the floor I want to have some tiles on the side that mirror each other basically. Right now they are facing the same way.
I could highlight them all and rotate them on their center point like so:
Or I could rotate them all on their respective center points at the same time like so:
Either way works in this scenario, but there are certain situations where it makes sense to use one or the other.
This is achieved with this little button in the top left of the scene view.
Another handy shortcut, especially for the walls in this scene will be the technique of dragging assets into the hierarchy as children of other assets.
Lets say I want to make a wall panel. When I import the first tile and rotate it accordingly then import the second, I have to do all the rotation editing I did with the first tile and for all tiles after that. UNLESS!!! I drag the second tile into the hierarchy as a child of the first tile. This will match it’s transform information.
This makes quick work of editing assets that will be similar in a scene. Be sure to move that object outside of the parent object to make it it’s own object after that.
Be sure to make use of prefabs also! Combining all the assets used to make 1 wall panel into a parent object will make duplicating the wall panels much easier. You can also make batch changes to prefabs, so taking time to specifically edit each and every one is no longer an issue!
With all this in mind I created a simple hallway that opens up into a room.
In the next article I’ll showcase the baseline room I created using assets from Filebase. There will be sci-fi stuff like Test Tubes, terminals, columns, a cool doorway, etc. Using all the shortcuts available in Unity I was able to create it in about 10 minutes total. Looking forward to seein ya there!