There’s all kinds of little tips and tricks that’ll make your life working with Unity a whole lot easier and here’s a few of ’em!

Change the Unity Editors Colour in Play Mode

Unity Editor Preferences - Colour SettingsIt’s pretty easy to forget you’re in play mode and to start fiddling around with values in the Inspector only to lose all of those changes once you come out of play mode. Unity has a nifty feature that lets you change the colour of the editor to make it more obvious that you’re in play mode so you won’t get caught out.

Open up Unitys Preferences, choose the Color option and look for the Playmode tint. Click the colour box or the eye dropper, choose your colour and you’re done! Play around until you find the perfect colour – I like something that’s not too opaque or it can be hard to see what’s going on in the Inspector when you’re in playmode.

Learn a Few Shortcut Keys

Unity Editor HotkeysLearning some of the shortcut keys can save you loads of time when you’re working in Unity. Especially when you’re trying to get all your game laid out properly. Unitys made the general tools hotkeys pretty simple so they’re nice and easy to remember.

If you want to setup your own shortcuts (or just see all of the existing ones) then go to:

Mac: Unity > Shortcuts
Windows: Edit > Shortcuts

Display Assets Full Name

Adjust Unitys Asset Display TypeBy default Unity has its assets display set to a middle ground of icon size vs title. While that’s great for some types of assets like sprites or materials when it comes to scripts or audio files you’ll often want to see the full name of the asset instead.

To shrink the icons and get those titles displaying in full drag the slider in the bottom right of the Project window to the left to give you a list view. Alternatively, if you want to see those icons in all their glory then drag the slider to the right.

Give Your Editor Variables Extra Information

HEaders and Tooltips in the Unity Editor

When you make variables in your scripts accessible in the editor it can get confusing pretty quickly. Plus if you’re working with designers or anyone else that needs to understand what those variables are doing without digging around in the code then you’ll want to give them as much information as possible.

Group related variables together using the header command in your code:

[Header("Player Health")]
public int lives = 3;
public int health = 100;

Add the header line with whatever descriptor you want between the quotes. Then put the variables that belong to that group under the header.

Another helpful option is to add tooltips to your variables:

[Tooltip("Speed in mph")] public float speed;

Add the tooltip command with whatever you want your tooltip to say between the quotes then put your variable declaration.

Locking the Inspector

How to Lock the Inspector in Unity

Sometimes you’ll need to have an object open in the Inspector and click around elsewhere to find an asset to drag into a box in the Inspector or something. The problem is, half the time when you start clicking around you’ll accidentally click on something else that opens in the Inspector and then you have to go back…it’s a pain.

The easiest way to solve the problem is to lock the Inspector. Just click the little padlock button in the top and whatever you’ve got loaded in the Inspector will stay there no matter what else you click on. Once you’ve finished don’t forget to click the padlock again to free the Inspector back up.

Share Your Tips!

If you’ve got any little tips that make a big difference when you’re working in Unity let me know in the comments and I’ll add them to the list.

(Visited 250 times, 1 visits today)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.