public void OnEnable() { var settings = InspectorCurveEditor.Settings.DefaultSettings; _distanceCurveEditor = new InspectorCurveEditor(settings) { CurveType = InspectorCurveEditor.InspectorCurveType.Distance }; }
public void OnEnable() { var settings = InspectorCurveEditor.Settings.DefaultSettings; _heightCurveEditor = new InspectorCurveEditor(settings); _steepnessCurveEditor = new InspectorCurveEditor(settings) { CurveType = InspectorCurveEditor.InspectorCurveType.Steepness }; }
public override void OnEnable() { var o = new PropertyFetcher <ColorCurves>(serializedObject); m_Master = Unpack(o.Find(x => x.master)); m_Red = Unpack(o.Find(x => x.red)); m_Green = Unpack(o.Find(x => x.green)); m_Blue = Unpack(o.Find(x => x.blue)); m_HueVsHue = Unpack(o.Find(x => x.hueVsHue)); m_HueVsSat = Unpack(o.Find(x => x.hueVsSat)); m_SatVsSat = Unpack(o.Find(x => x.satVsSat)); m_LumVsSat = Unpack(o.Find(x => x.lumVsSat)); m_RawMaster = o.Find("master.m_Value.m_Curve"); m_RawRed = o.Find("red.m_Value.m_Curve"); m_RawGreen = o.Find("green.m_Value.m_Curve"); m_RawBlue = o.Find("blue.m_Value.m_Curve"); m_RawHueVsHue = o.Find("hueVsHue.m_Value.m_Curve"); m_RawHueVsSat = o.Find("hueVsSat.m_Value.m_Curve"); m_RawSatVsSat = o.Find("satVsSat.m_Value.m_Curve"); m_RawLumVsSat = o.Find("lumVsSat.m_Value.m_Curve"); m_SelectedCurve = o.Find("m_SelectedCurve"); // Prepare the curve editor m_CurveEditor = new InspectorCurveEditor(); m_CurveDict = new Dictionary <SerializedProperty, Color>(); SetupCurve(m_RawMaster, new Color(1f, 1f, 1f), 2, false); SetupCurve(m_RawRed, new Color(1f, 0f, 0f), 2, false); SetupCurve(m_RawGreen, new Color(0f, 1f, 0f), 2, false); SetupCurve(m_RawBlue, new Color(0f, 0.5f, 1f), 2, false); SetupCurve(m_RawHueVsHue, new Color(1f, 1f, 1f), 0, true); SetupCurve(m_RawHueVsSat, new Color(1f, 1f, 1f), 0, true); SetupCurve(m_RawSatVsSat, new Color(1f, 1f, 1f), 0, false); SetupCurve(m_RawLumVsSat, new Color(1f, 1f, 1f), 0, false); }