display color field

This commit is contained in:
in0finite 2021-04-18 00:18:49 +02:00
parent 0a3d2a53dc
commit b27bcac9a3

View file

@ -30,6 +30,14 @@ namespace SanAndreasUnity.Editor
else
EditorGUILayout.EnumPopup(labelText, value as System.Enum);
}
else if (type == typeof(Color))
{
EditorGUILayout.ColorField(labelText, (Color) value);
}
else if (type == typeof(Color32))
{
EditorGUILayout.ColorField(labelText, (Color32) value);
}
else
{
EditorGUILayout.LabelField($"{labelText} {value}");