Line Attribute
Attribute to draw a line in the inspector
- Parameters:
floatred: Red amountfloatgreen: Green amountfloatblue: Blue amountstringhexColor: The color in hexadecimaloptional,
GUIColorcolor: The color of the lineoptional,
floatalpha: Alpha amountoptional,
floatlineThickness: The thickness of the line in pixels
Example:
using UnityEngine;
using EditorAttributes;
public class AttributesExample : MonoBehaviour
{
[SerializeField] private int field01;
[Line]
[SerializeField] private int field02;
[Line(GUIColor.Green)]
[SerializeField] private int field03;
[Line(GUIColor.Cyan, 0.3f, 10f)]
[SerializeField] private int field04;
[Line(250f, 129f, 120f)]
[SerializeField] private int field05;
[Line("#a86c2f")]
[SerializeField] private int field06;
}