Skip to content

Instantly share code, notes, and snippets.

@baba-s
Last active July 7, 2021 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baba-s/3bfec070abb4255b165ef490990208a2 to your computer and use it in GitHub Desktop.
Save baba-s/3bfec070abb4255b165ef490990208a2 to your computer and use it in GitHub Desktop.
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
internal static class Example
{
private static readonly Color COLOR = new Color32( 40, 40, 40, 255 );
static Example()
{
EditorApplication.hierarchyWindowItemOnGUI += OnGUI;
}
private static void OnGUI( int instanceID, Rect rect )
{
var xMax = rect.xMax;
rect.x = 32;
rect.xMax = xMax + 16;
rect.y += 15;
rect.height = 1;
EditorGUI.DrawRect( rect, COLOR );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment