UnityEditor.ColorUsageDrawer.OnGUI C# (CSharp) Method

OnGUI() public method

public OnGUI ( Rect position, UnityEditor.SerializedProperty property, GUIContent label ) : void
position UnityEngine.Rect
property UnityEditor.SerializedProperty
label UnityEngine.GUIContent
return void
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            ColorUsageAttribute attribute = (ColorUsageAttribute) base.attribute;
            ColorPickerHDRConfig hdrConfig = ColorPickerHDRConfig.Temp(attribute.minBrightness, attribute.maxBrightness, attribute.minExposureValue, attribute.maxExposureValue);
            EditorGUI.BeginChangeCheck();
            Color color = EditorGUI.ColorField(position, label, property.colorValue, true, attribute.showAlpha, attribute.hdr, hdrConfig);
            if (EditorGUI.EndChangeCheck())
            {
                property.colorValue = color;
            }
        }
    }
ColorUsageDrawer