UnityEditor.ColorPickerHDRConfig.Temp C# (CSharp) Method

Temp() static private method

static private Temp ( float minBrightness, float maxBrightness, float minExposure, float maxExposure ) : ColorPickerHDRConfig
minBrightness float
maxBrightness float
minExposure float
maxExposure float
return ColorPickerHDRConfig
        internal static ColorPickerHDRConfig Temp(float minBrightness, float maxBrightness, float minExposure, float maxExposure)
        {
            s_Temp.minBrightness = minBrightness;
            s_Temp.maxBrightness = maxBrightness;
            s_Temp.minExposureValue = minExposure;
            s_Temp.maxExposureValue = maxExposure;
            return s_Temp;
        }
    }

Usage Example

示例#1
0
        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;
            }
        }
ColorPickerHDRConfig