Skip to content

AnimCurveAttribute

Namespace: SideXP.Core | Inherits from: PropertyAttribute

public class AnimCurveAttribute : PropertyAttribute

Draws an animation curve field with custom settings (using custom property drawer).

Constructors

AnimCurveAttribute(FColor)

public AnimCurveAttribute(FColor color = Green)

Clamps the animation curve between 0 and 1 on both axes.

Parameters

  • color: The color of the curve in the inspector.

AnimCurveAttribute(float, float, FColor)

public AnimCurveAttribute(float maxTime, float maxValue, FColor color = Green)

Clamps the animation curve between 0 and the given maximums for both time and value.

Parameters

  • maxTime: The maximum value along the X axis.
  • maxValue: The maximum value along the Y axis.
  • color: The color of the curve in the inspector.

AnimCurveAttribute(float, float, float, float, FColor)

public AnimCurveAttribute(float minTime, float maxTime, float minValue, float maxValue, FColor color = Green)

Clamps the animation curve between the given values, for both time and value.

Parameters

  • minTime: The minimum value along the X axis.
  • maxTime: The maximum value along the X axis.
  • minValue: The minimum value along the Y axis.
  • maxValue: The maximum value along the Y axis.
  • color: The color of the curve in the inspector.

Properties

MinTime

public float MinTime

The minimum time value (along the X axis).

MaxTime

public float MaxTime

The maximum time value (along the X axis).

MinValue

public float MinValue

The minimum curve value (along the Y axis).

MaxValue

public float MaxValue

The maximum curve value (along the Y axis).

CurveColor

public Color CurveColor

The color of the curve in the inspector.

Ranges

public Rect Ranges

Creates a Rect representing the curve's ranges: - x is min time - y is min value - width is (abs(min time) + abs(max time) - height is (abs(min value) + abs(max value)