5 Years Of #UnityTips

5 years ago I set up a webpage which runs several times a day and pulls out all tweets using the following hashtags:

#UnityTip
#UnityTips
#Unity3DTip
#Unity3DTips

At the time there wasn’t a standardised hashtag as #UnityTips has become now, so all of the four above were in use.

After a slow start the hashtag really exploded when Unity started #UnityTips Tuesday in May 2015 and that hashtag became the de facto standard.

#UNITYTIPS OVER TIME

#UNITYTIPS OVER TIME

To celebrate the 5 year mark I’ve gone through the database and created a list of 25 of the best #UnityTips that Unity developers have shared.

But first, let’s start with the most popular Unity Tip of all time, with over 7000 retweets!

How to fix z-fighting

And onto our 25 top tips:

Inspector Locking

See internal state with Debug Inspector

Add additional inspectors

Many fields support maths calculations

Better understand colour blindness with this image effect

Layers and tags support nesting

Profiler supports reordering groups

Export Substances into textures to permanently bake the substances in editor

Alt click to expand/collapse recursively in tree views

Use ContextMenu attribute to add inspector methods to your own components

Use [MenuItem] with CONTEXT to add inspector methods to built in components

Use [CreateAssetMenu] to add your scriptable object to the Create/ menu, avoiding boilerplate creation code

Add custom icons to a script and their instances through the inspector

Alternatively set icons for components by using the Gizmos/ folder

Restore scenes after a crash

Use Reset() to automatically hook up references or state

Hide/disable dependent fields in Inspector with Brecht Lecluyse’s attribute

Skyblade’s ScriptExecutionOrder attribute allows you to set order programatically

Set AudioSource pitch to negative to play backwards

Alt drag a scene into the hierarchy to add it an unloaded state

Use Editor.CreateEditor() to embed editors for scriptable objects or other objects

Create Colour Preset Libraries in Project to share them in source control

Use Copy/Paste Component to copy settings from play mode to edit time

Save and restore your selection with these shortcuts

Use the EditorOnly tag to strip out objects at build time

Thanks for reading these tips, I hope they were useful and remember to tweet your own tips using #UnityTips

For more Unity tips and tricks be sure to follow me on Twitter: