Unity Tips Collection

By 09/11/2018 November 26th, 2019 General

Each Tuesday users post their tips about Unity to share shortcuts to all devs, improve the workflow and make things easier for everyone.
Here’s my Unity Tips collection; each week I make on tip and add it here.
You can follow me on twitter and you can join the list below to stay updated about all my posts and never miss anything.

Here’s a quick map of this post:

  1. Script Changes while Playing
  2. Auto Statements in Visual Studio
  3. Shaders Introduction
  4. OnDrawGizmosSelected
  5. Second Parameter in Debug.Log
  6. String Interpolation
  7. Debug Break
  8. Tips about just starting learning
  9. Multi-line editing in Visual Studio
  10. Layer Locking
  11. TextArea
  12. Header, Tooltip and Space
  13. Extention Methods
  14. Platform Custom #defines
  15. Multiply Inspector’s editing speed
  16. Built-in shaders
  17. MinMax Attribute
  18. Animation Curves
  19. Un-dock the Preview window
  20. Hierarchy Organization
  21. Particle System Playback time
  22. EditorOnly tag
  23. Assign a shader to a material upon creation
  24. Insert array element in the Inspector
  25. Show the content of multiple folders
  26. Customize Unity’s C# template
  27. Console Window Log Entries
  28. OnValidate
  29. Set Editor Presets as Default
  30. Change the Editor color when it’s in Play Mode
  31. Drag/select scenes in the build settings
  32. Fold the entire Hierarchy
  33. Rich text in Unity’s console
  34. Asset Store search in project window
  35. DisallowMultipleComponent & RequireComponent
  36. Graphy
  37. Drag multiple items in the inspector
  38. Unity Visual Search
  39. NaughtyAttributes
  40. Foldout
  41. Scene Icons
  42. ContextMenu
  43. Inspector Math Expressions
  44. SerializeField & HideInInspector
  45. FormerlySerializedAs
  46. AddComponentMenu
  47. MenuItem

Script Changes while Playing

You can set when to recompile your script changes (while playing) by going to Preferences->General.

Auto Statements in Visual Studio

You can auto complete statements in Visual Studio by pressing Tab twice.

Shaders Introduction

You can now choose where to learn about Shaders in Unity!
My video and article are both available now.


You can use OnDrawGizmosSelected() to see only your selected GameObjects’ debug.

Second Parameter in Debug.Log

You can use the second parameter in Debug.Log() to select your object from the console’s message.

String Interpolation

You can use String Interpolation to faster write strings with variables.

Debug Break

You can use Debug.Break() to pause the Editor via script.

Tips about just starting learning

I’ve noticed that a lot of people I’ve talked to want to learn about game dev and Unity but don’t know where to start, which stops them completely. Here’s a thread with some of my (humble) learning game dev advices!

You can read it here on Twitter.

Multi-line Editing (Visual Studio)

You can edit multiple lines in Visual Studio instead of copying and pasting each time.
It also works in VSCode and others, but the key shortcuts might be different.

Layer Locking

You can lock layers in the Editor to manage which objects to pick.


You can use the “TextArea” attribute to edit a string in a flexible text area.

Header, Tooltip and Space

You can use the “Header”, “Tooltip” and “Space” attributes to better organize fields in the Inspector.

Extention Methods

You can use extension methods to add functionalities to already existing classes, types, structs and more!

Platform Custom #defines

You can set your own “Platform Custom #defines” to quickly add or remove features from your game’s build.
Read more here.

Multiply Inspector’s editing speed

You can multiply the Inspector’s editing speed by pressing SHIFT (faster) or ALT (slower).

Built-in shaders

You can download all Unity’s built-in shaders (including all CGinc files) by visiting the archive download page.

MinMax Attribute

You can use the ‘MinMax’ attribute I wrote to better edit “random Vector2s” in the Inspector.



Animation Curves

You can use Animation Curves to create cool effects for your objects via code.
Read my tutorial about “Lerp/Easing” here.

Un-dock the Preview window

You can un-dock the Preview window from the inspector and place it anywhere you want. (Right-Click on its top bar)

Hierarchy Organization

You can organize your Hierarchy by adding empty GameObjects as divisors.
I also suggest to set their tag to “EditorOnly”, so they’re not saved in the build.

unity tips febucci organize hierarchy divisors organization unitytips tricks

Particle System Playback time

You can control the Particle’s playback time in the Editor to better edit effects.

EditorOnly tag

You can use the “EditorOnly” tag to exclude a GameObject from the final build.

Assign a shader to a material upon creation

You can create a material after clicking on the desired shader to assign it automatically.

unitytips febucci shader assign automatically to a material upon creation

Insert array element in the Inspector

You can insert an array element in the Inspector by pressing the key shortcut “CTRL/CMD + D” (which stands for: “Duplicate”), without having to adjust the next elements manually.

insert array element unity inspector unitytips #unitytips febucci duplicate shortcut key

Show the content of multiple folders

You can see the content of multiple folders by selecting them in the Project Window.

unity febucci tips unitytips show content inside multiple folders project window

Customize Unity’s C# template 

You can customize Unity’s C# template by changing the “81-C#” file found in the path: “%EDITOR_PATH%\Data\Resources\ScriptTemplates”.
Remember to store a copy before modifying it!

You can find more info here.
P.S. when saving a copy of the original file, I recommend moving it into another folder or not naming it starting with “81-C#”.

change csharp c# template default unitytips febucci tutorial unity tips

Console Window Log Entries

You can adjust the number of lines shown for each Log in the Console Window, to read more (or less) text per entry.

febucci console window log entries unitytips post #unitytips unity tips


You can make sure you entered the right value in the Inspector by helping you with the OnValidate function.
Read more here.

unitytips post

Set Editor Presets as Default

You can set Editor Presets as default and then apply them by pressing “Reset”

unity presets default #unitytips reset

Editor color in Play Mode

You can remind yourself that the Editor is in Play Mode by changing its “Playmode tint”.

Drag/select scenes in the build settings

You can drag multiple scenes in the build settings and enable/disable them at the same time (instead of one by one).

Fold the entire Hierarchy

You can fold the entire Hierarchy using the following code.
This way you’ll collapse all the GameObjects in the window with a simple click (mostly useful if you also add a keyboard shortcut).

Read more about the Hierarchy window and Unity Hotkeys.
Sources: Unity forum, Unity answers.

febucci unitytips unity fold entire hierarchy gameobjects

Rich text in the console

You can use rich text in Unity’s console.
Read more about Rich Text.

Asset store search in project window

You can search through the Asset Store directly from your project window.

DisallowMultipleComponent & RequireComponent

You can use the attributes DisallowMultipleComponent and RequireComponent to avoid setup errors in your gameObjects.

Read more about DisallowMultipleComponent and RequireComponent


You can monitor the performance of your games directly from your builds using this great tool made by @tayx94.

GitHub repository here.

Drag multiple items in the inspector

You can drag multiple items in an array by locking the Inspector.

Unity Visual Search

You can easily find 3D models for your game using Unity Visual Search and preview them in the Editor.
For example, it comes super handy if you’re building a prototype.

Asset Store page (it’s free).


You can use 20+ handy attributes made by dbrizov on GitHub, like a ReorderableList, a Slider or a ResizableTextArea.

GitHub repository here.


You can group variables in the Inspector using the Foldout attribute, made by dimmpixeye on GitHub.
GitHub repository here.

Scene Icons

You can assign icons for GameObjects and Scripts.
Read more here.


Call methods from the Inspector by using the ContextMenu attribute.
Read more here.

Inspector Math Expressions

You can enter math expressions in the Inspector.

SerializeField & HideInInspector

Choose which variable to show and serialize by using the attributes SerializeField and HideInInspector.
Read more here: SerializeField and HideInInspector.


Useful if you need to rename a variable without losing its serialized value.
Read more here.


Organize your scripts in the “AddComponent” Menu in the Inspector by using the AddComponentMenu attribute.
Read more here.


Call methods from the Main Menu and Inspector Context Menus. Be aware that it only works in the Editor, so you need to cut it if you want to release that code. (Add #if UNITY_EDITOR and you’re good to go).
Read more here.

That’s it for now, remember that I update this post each week, so stay tuned!

You can unsubscribe from the newsletter at any time, give it a try!

Support my current and future work ^^ As a thank, you will receive exclusive rewards!

Become a Patron!