Top 10 Unity Tricks That Will Speed Up Your Game Development
These tips will definitely save you time on your next game dev project!
Do you want to improve your productivity when making games? Are you using the Unity Game Engine, and by extension the Unity Engine and the C# programming language? Well, you’re in luck! I’m going to present you with my top 10 mind blowing Unity tricks that made my life developing game much much easier.
You may know one or two of these tricks, but I guarantee you that you don’t know them all! Let’s get right into them.
1.If you are making a 2D game and you are using Unity 2018.2 or higher, you will most likely want to use the Pixel Perfect Camera component. Add this to your camera to get crisp pixels and movement rendered on screen. Import the Pixel Perfect Package: Window > Package Manager > All > 2D Pixel Perfect Package.
Next, match the “Assets Pixels Per Unit” property to the pixels per unit for your sprites. For a retro “SNES Mode 7” feel to your sprite transforms, enable “Upscale Render Texture”

2. You can change your camera to look just like your scene view without fiddling with rotations and whatnot! Select Camera in scene view and press CTRL + SHIFT + F. This is an absolute godsend.
3.Everyone is familiar with the “Debug.Log” call if you have been using Unity and C# for a while. But you can also add a reference to a gameObject in this command, so you can find the perpetrating object in your Hierarchy! Example:
Debug.Log(“This is the gameObject calling the debug log”, gameObject);
4. Use TextMeshPro — that’s all there is to it. There’s virtually no reason to use the old Unity GUI Text as its a Legacy component now. There are tons of positives to using TextMeshPro: better control, better rendering, font flexibility, etc. You will most likely need to install the package, but with later versions of Unity you only need to create a new Canvas > TextMeshPro — Text and Unity will auto-prompt you to install the package.

5. You can make script changes while playing. Let me repeat that. Even after clicking Play, You Can Make Script Changes! Check your settings by going to Preferences> General > Script Changes While Playing, Select “Recompile and Continue Playing” — This is a game-changer for those who don’t know about it!

6.While in Play mode, your changes to components will not save, and will be reset when you turn off Play mode. Here’s the solution: right click the component in Play mode and select “Copy Component”. Next, turn off Play mode, right click the component and choose “Paste Component Values”. Viola, your values are plugged into the component!
7.Want to do some Inspector clean up? Set public class variables with a [HideInInspector] above the declaration to hide them in inspector and remove clutter. You can do the opposite as well; make a private variable appear in the inspector by giving it [SerializeField] above declaration — so you can uphold proper access modifiers while making design changes.
8. Add a delay to destroying game objects is very easy. Let’s say you want a box to be destroyed 1 second after the player hits it. You can do this without abusing Coroutines:
Destroy(gameObject, 1f);
9. You can make a one line call to pause the game at any point in the code. Note: you need to import the UnityEditor by calling using UnityEditor; at the top
using UnityEditor;void Start(){
EditorApplication.isPaused = true; // pause on start
}
10.Want things to overlap based on their Y value? Forget sorting layers! Sort sprites based on their Y value by going to Project Settings > Graphics > Camera Settings, and set Transparency Sort Mode to Custom Axis, then set the Y value to 1.

Heck, here’s one basic C# thing that I think can come in handy as well
11. String interpolation is a thing in C#. If you don’t know what that is, prepare to be amazed. How many times have you written a long and winding statement like this?
Debug.Log("My player's name is " + player.name + " with " + player.health + "/" + player.maxHealth + " health points left.");
It hurts just to type! With string interpolation you can add variables inline into your strings easily! Check out the C# documentation for more information. Here’s an example for the road.
Debug.log($"My player's name is {player.name} with {player.health}/{player.maxHealth} health points left.");
Conclusion
There you have it! Try out some of these tips in your next project, they are sure to save you time and energy.
Starting your own indie game studio, or just interested in making games? Check out some of my articles to help you on your journey.