Skip to content

mmtdgn/horizontal-line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity Horizontal Line Attribute

Line drawer attribute for inspector

Example

public class HorizontalLineTest : MonoBehaviour
{
    [HorizontalLine("Float Fields", "magenta", true)]
    [SerializeField] private float m_Float_1;
    [SerializeField] private float m_Float_2;
    [SerializeField] private float m_Float3;

    [HorizontalLine("Int Fields", "yellow", true)]
    [SerializeField] private int m_Integer_1;
    [SerializeField] private int m_Integer_2;
    [SerializeField] private int m_Integer_3;

    [HorizontalLine("String Fields", "Cyan", false)]
    [SerializeField] private string m_String_1;
    [SerializeField] private string m_String_2;
    [SerializeField] private string m_String_3;

    [HorizontalLine("Vector3 Fields", "GREEN", true)]
    [SerializeField] private Vector3 m_Vector3_1;
    [SerializeField] private Vector3 m_Vector3_2;
    [SerializeField] private Vector3 m_Vector3_3;

    [HorizontalLine("Without Color")]
    [SerializeField] private GameObject m_GO_1;
    [SerializeField] private GameObject m_GO_2;
    //Single Line usage
    [HorizontalLine]
    [SerializeField] private Transform m_SingleLine;
    [SerializeField] private Transform m_SingleLine2;
    [HorizontalLine("", "red")]
    [SerializeField] private Transform m_ColorizedSingleLine;
    [SerializeField] private Transform m_ColorizedSingleLine2;
}
Output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages