Created
July 24, 2020 17:27
-
-
Save ababilinski/853f381c16a7d8e591f898549e8df03f to your computer and use it in GitHub Desktop.
A script for drawing horizontal lines inside of the Unity Editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEngine; | |
public static class EditorGuiUtility | |
{ | |
public static void DrawUILine(Color color, int thickness = 2, int padding = 10) | |
{ | |
Rect r = EditorGUILayout.GetControlRect(GUILayout.Height(padding+thickness)); | |
r.height = thickness; | |
r.y+=padding/2; | |
r.x-=2; | |
r.width +=6; | |
EditorGUI.DrawRect(r, color); | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment