GUIColor Attribute
Attribute to color the GUI
- Parameters:
floatred: Red amountfloatgreen: Green amountfloatblue: Blue amountstringhexColor: The color in hexadecimalGUIColorcolor: The color of the GUI
Example:
using UnityEngine;
using EditorAttributes;
public class AttributesExample : MonoBehaviour
{
[GUIColor(GUIColor.Lime)]
[SerializeField] private int field01;
[SerializeField] private int field02;
[SerializeField] private int field03;
[GUIColor(144f, 151f, 222f)]
[SerializeField] private int field04;
[SerializeField] private int field05;
[SerializeField] private int field06;
[GUIColor("#8c508b")]
[SerializeField] private int field07;
[SerializeField] private int field08;
[SerializeField] private int field09;
}
Note
The GUIColor Attribute may not work well with nested arrays and objects