Helpful Tips in Unity

This page is a growing collection of hints and tips I’ve picked up (usually the hard way) as I’ve been learning the ins and outs of Unity. I hope it will allow others to learn secondhand some of the lessons I’ve had to learn by ramming my head into walls.

  1. Most unit tests work in Edit Mode just as well as in Play Mode, and run a heck of a lot faster there.
  2. Swagger-generated C# code makes consuming REST services pleasantly easy, and sure beats writing all that network code yourself.
  3. If you’re using multiple monitors, don’t forget you can undock panels and throw them on other screens. Especially useful with animations, when you need Scene, Game, Animation, Inspector, and Animator open all at once.
  4. If you’re working across multiple platforms, turn on Unity Cache Server. It’ll speed up platform switches significantly.
  5. Scriptable Objects are often _great_ for improving your architecture. Caveat: if you’ve got scenes in AssetBundles, they’ll get a _copy_ of an SO instance, rather than the original SO instance. This will make you crazy.
  6. If your UI is getting eaten by the notch or corners on the iPhone X, I’ve written a handy script to help.