Search Unity

Impress your friends with these #unitytips from the community

April 28, 2021 in Technology | 7 min. read
Image of rocky landscape by the water created in Unity.
Image of rocky landscape by the water created in Unity.
Share

We’re back with another edition of the #unitytips roundup. When we released our first roundup earlier this year, you told us that it took your projects to the next level, so we’re back with even more best practices.

Visuals

Whether you’re an artist, designer, technical artist, or graphics programmer, you’ll want to unpack this collection of tips to refine your game’s graphics and visuals. 

Editor workflow

These tips are all about improving your quality of life and workflow while working in the Unity Editor. 

  • First, find out how to create your own Terrain tools.
  • Calling all level designers: You can hide objects in Scene view, and even enter Isolation mode, which is very helpful when working on specific parts of a scene.
  • Another one for the level designers: See how Unity’s Scene view supports vertex snapping.
  • Here’s a great workflow tip for controlling multiple Particle Systems at once.
  • If you’ve never used the RequireComponent attribute before, this tip can help you get started.
  • You can import Blender files directly without exporting them to FBX first. Unity will silently run Blender in the background and import these files for you – but you’ll want to make sure that everybody on your team has the same version of Blender installed before opening the project.
  • While we’re on the subject of Blender, here’s a top-notch tutorial on exporting to FBX via Blender with the correct axes. It’s not officially part of #unitytips, but it might as well be.
  • Conveniently create AnimationCurves in the Inspector and use them in your scripts like this.
  • Here’s a quick one to undock the preview window.
  • If you work with OpenXR, you’ll appreciate this workflow improvement.
  • Unity has an easy-to-use screen recording tool to make gifs or gameplay videos. It’s called Unity Recorder and it’s available in the Package Manager.
  • Harness this shortcut to automatically create material with your assigned shader in Shader Graph.

Gameplay

Here are a handful of tips all about creating gameplay in Unity – from programming and workflow to visuals and beyond.

  • Get to know the fundamentals of building a character controller with diverse movement thanks to this video breakdown. Then follow it up with a video dedicated to the built-in character controller.
  • While we’re on the topic of character controllers, you can explore how to build a first person rig.
  • Discover this team’s newly released free decal system for the built-in renderer right here.
  • Here’s another free library for Unity – and this time, it’s all about destruction.
  • Peruse this handy tutorial on leveraging UI Toolkit and UI Builder.

Programming

Finally, we have next-level tips for the programmers out there. If you write or work on code in any shape or form, you won’t want to miss out on these:

  • This cool trick enables you to use custom shaders in your Editor UI.
  • You can even harness the Jobs system in the Editor to run heavy calculations in the background, like in this fur tool.
  • If you’re still using the old input system but looking to make the switch, follow this approach to get the job done.
  • Did you know that you can color your debug logs? Find out how.
  • This tip shows how to lerp between materials with a single function call.
  • Check out this thread if you want to master linear interpolation (who doesn’t?)
  • Take on this trick to test your game under every frame rate.
  • Developing editor tools is extremely valuable. Follow this Twitter thread to see how it’s done.
  • Here’s how to nest coroutines, which starts one coroutine when another ends.
  • Another coroutine tip: You can automatically turn Start, OnTriggerEnter and OnCollisionEnter into coroutines.
  • If you’ve ever wanted to serialize a dictionary, use this code to make it happen.
  • This Twitter thread provides a helpful breakdown of the order of execution in Unity.
  • Here’s a solid improvement for Visual Studio users: Code completion for compilation symbols.
  • This handy tutorial explains how to make custom GUI scripts that play nicely with the Event System.
  • Here’s a clean Unity pattern to define optional parameters, which is more performant than checking for null, and even comes with a pretty PropertyDrawer.
  • Ever wonder what assets go into your Unity builds? This tip summarizes how to check the log, which is great for managing build sizes.
  • This neat trick can help you gain access to Internal UnityEditor APIs without relying on reflection.
  • Looking to hook Debug.Log messages into your in-game console? This technique serves to pipe Debug.Log messages wherever you want.

If you appreciate these tips and can’t wait to try them out, please let us know in the comments. For more, you can search through the #UnityTips hashtag on Twitter, or get involved by sharing your own tips and best practices every Tuesday. Follow @Unity3d for a weekly #UnityTips Tuesday reminder.

Header image credit: Leonard Saalfrank; @omeletteandyog1

April 28, 2021 in Technology | 7 min. read
Related Posts