Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DrawCurveSwatch

Draw a curve swatch.
Read time 2 minutesLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color)

Draw a curve swatch.
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor)

Parameters

position

The rectangle to draw the color swatch within.

The curve to draw.

The curve to draw as a SerializedProperty.

color

The color to draw the curve with.

bgColor

The color to draw the background with.

Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Color, Color)

Draw a curve swatch.
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Color topFillColor, Color bottomFillColor)

Parameters

position

The rectangle to draw the color swatch within.

The curve to draw.

The curve to draw as a SerializedProperty.

color

The color to draw the curve with.

bgColor

The color to draw the background with.

topFillColor


bottomFillColor

Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Color, Color, Rect)

Draw a curve swatch.
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Color topFillColor, Color bottomFillColor, Rect curveRanges)

Parameters

position

The rectangle to draw the color swatch within.

The curve to draw.

The curve to draw as a SerializedProperty.

color

The color to draw the curve with.

bgColor

The color to draw the background with.

topFillColor


bottomFillColor


curveRanges

Optional parameter to specify the range of the curve which should be included in swatch.

Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.

DrawCurveSwatch(Rect, AnimationCurve, SerializedProperty, Color, Color, Rect)

Draw a curve swatch.
public static void DrawCurveSwatch(Rect position, AnimationCurve curve, SerializedProperty property, Color color, Color bgColor, Rect curveRanges)

Parameters

position

The rectangle to draw the color swatch within.

The curve to draw.

The curve to draw as a SerializedProperty.

color

The color to draw the curve with.

bgColor

The color to draw the background with.

curveRanges

Optional parameter to specify the range of the curve which should be included in swatch.

Remarks

Pass in the curve to draw either with the curve parameter or with the property parameter.