> ## Content Index
> Fetch the complete content index at: https://blog.febucci.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Custom Hierarchy for Unity: Icons, Colors & Toggles
- URL: https://blog.febucci.com/2020/10/custom-hierarchy-for-unity/
- Published: 2020-10-18T13:00:00.000Z
- Updated: 2026-04-06T07:25:31.000Z
- Description: Add custom icons, colors, and toggles to Unity's Hierarchy window using editor scripting and the hierarchyWindowItemOnGUI callback.
- Author: Federico Bellucci
- Tags: Tutorials, Unity

Unity's default Hierarchy gets messy fast once you have dozens of GameObjects in a scene. This free, open source plugin adds custom icons, colors, tree view lines, and separators to the Hierarchy window using editor scripting, all without adding a single component to your GameObjects. Here's what it does and how to get it.

## How do I customize the Hierarchy window in Unity?

##   
Introduction

Hi, I'm Febucci and I've created this package to help having a clearer Hierarchy in Unity, organizing everything in a "tree view" and including extra informations like Components Icons and groups/divisors. It comes with **4 main features**: tree view, component icons, separators and alternating lines.  
  
I have a lot of gameObjects in each scene of my current game and I started getting lost in the default Unity Hierarchy. That's why I've spent *a lot of time* making this little plugin and now I'm super happy to share it with you, **for free**!

---

## Features

Here's what the plugin can achieve.

### Non-intrusive

First of all, the package is **non-intrusive**. This means that once you install it, you don't need to add any Component to your gameObjects (as opposed to some similar plugins in the Asset Store). That's **0 extra components** on any of your objects.

Everything is automatic and applied to all scenes, and once you unistall it your project is left unaltered. The underlying technique uses [EditorApplication.hierarchyWindowItemOnGUI](https://docs.unity3d.com/ScriptReference/EditorApplication-hierarchyWindowItemOnGUI.html?ref=blog.febucci.com), which is the standard Unity callback for drawing custom content in the Hierarchy window.

### Tree View

The "tree view" helps understanding the nesting level of parents and children (*this phrase makes no sense outside this context*).

You can specify how many "branches" there are and all their colors (once an array ends, its colors are looped back).

![](https://storage.ghost.io/c/38/36/383676a1-e894-4116-9a98-bb5a9336da39/content/images/2024/09/febucci-custom-hierarchy-for-unity-tree-view.png)

### Icons

You can visualize gameObject's Components icons directly in the hierarchy, without having to modify their scripts "gizmos" (*which caused a reload and took me a lot of time*).  

It works by assigning a texture to a scripts (via a ScriptableObject), and **it also works for its inherited classes**. You can also visualize the GameObject's Scene icon. If you need to find which scripts use a specific variable, check out my post about [searching variables in all scripts](https://blog.febucci.com/2022/06/search-variables-in-all-scripts/).

![](https://storage.ghost.io/c/38/36/383676a1-e894-4116-9a98-bb5a9336da39/content/images/2024/09/febucci-custom-hierarchy-for-unity-icons.png)
  
  
This was the main reason I created this plugin. I have a lot of different components on *a lot* of different gameObjects, and I reeeally got lost in the hierarchy most of the time. *Example: with this plugin now, I can set up an icon for all the classes that inherit from my abstract "SceneTrigger" class, and instantly visualize all the other game triggers in the hierarchy.*

⚠️

P.S. Interfaces don't work.

### Separator

I use "EditorOnly" gameObjects to separate the hierarchy of my scenes, since they are removed from the build ([my unitytip here](https://x.com/febucci/status/1120634009543958533?ref=blog.febucci.com)). For this reason, this feature colors a GameObject if it has an 'EditorOnly' tag and starts with '>'.

![](https://storage.ghost.io/c/38/36/383676a1-e894-4116-9a98-bb5a9336da39/content/images/2024/09/febucci-custom-hierarchy-for-unity-separator.png)
  
  
You can set a different color and a different intensity.

### Alternating Lines

  
This feature helps distinguishing one line from the next one. As always, you can modify color and intensity on this one as well.

![](https://storage.ghost.io/c/38/36/383676a1-e894-4116-9a98-bb5a9336da39/content/images/2024/09/febucci-custom-hierarchy-for-unity-alternating-lines.png)

---

Combine all the above features together and here you have 'Custom Hierachy for Unity'.

![](https://storage.ghost.io/c/38/36/383676a1-e894-4116-9a98-bb5a9336da39/content/images/2024/09/febucci-custom-hierarchy-for-unity-preview.gif)

Stay Updated 

Email sent! Check your inbox to complete your signup. 

PS. Oh hey just a heads up that if you're liking this post and would like to support us (for free!), read new ones as soon as they're ready and also unlock extra materials... please consider becoming a free member! It'll make us super happy that you're here for us, and also less anxious about algorithm changes, AI and whatever is coming next. We're a small team so it really means a lot; thank you so much! 🥹

---

## Limitations

Here's what the plugin cannot achieve.

### Support

I've created this package based on **my specific needs**.  
I won't actively update it (and/or reply to support requests), so if you need any other feature you have to modify the source code (*or get another asset from the Asset Store*).  

This is also why this plugin is free and it is available on GitHub! We can all improve it together, for everyone <3

### Overlay

The background colors are actually **overlays**. This means that if you set a color alpha too high, it will hide the below label. It shouldn't be a problem (it definitely isn't for me), but just be aware about it.

In case you want to fix it: I haven't found anywhere how to draw colors *behind* the hierarchy labels, so the 'fix' would be drawing the color and then drawing on top the label another time. Please let me know if you are able to solve it!

---

## Download

**If you find this project useful, please let me know!!!**  
I've spent a lot of time working on it and I'd be super happy to see you taking part in it and sharing it around.

You can find the project on its [GitHub repository](https://github.com/febucci/unitypackage-custom-hierarchy?ref=blog.febucci.com). And if you're working on the visual side of your project, you might also want to check out [custom post processing in URP](https://blog.febucci.com/2022/05/custom-post-processing-in-urp/) or my [intro to writing shaders](https://blog.febucci.com/2019/11/how-to-write-shaders-in-unity/).

## Frequently asked questions

### Does the plugin work with Unity 2022 / 2023?

The plugin is open source on GitHub, so you can check open issues and pull requests for version compatibility. The core approach using `EditorApplication.hierarchyWindowItemOnGUI` has been stable across many Unity versions.

### Does this work with Prefab Mode?

The overlay rendering applies to the Hierarchy window in the scene view. Prefab Mode has its own isolated hierarchy, so results may vary depending on the Unity version.

### Can I add icons for interfaces?

Not directly. As noted in the plugin, interfaces don't work with the current implementation. You can add icons for abstract classes and their inherited children instead.

### Is the plugin free?

Yes, it's completely free and open source on GitHub. Fork it, modify it, improve it for everyone.

As always, **you can subscribe to my game-dev newsletter below, and never miss a post like this.**

Have a lovely day and hear you soon, cheers!