Hide
CurveRange

A curve drawer for AnimationCurve which allow to set bounds and color

Override 1:

  • Vector2 min = Vector2.zero bottom left for bounds
  • Vector2 max = Vector2.one top right for bounds
  • EColor color = EColor.Green curve line color

Override 2:

  • float minX = 0f bottom left x for bounds
  • float minY = 0f bottom left y for bounds
  • float maxX = 1f top right x for bounds
  • float maxY = 1f top right y for bounds
  • EColor color = EColor.Green curve line color
using SaintsField; [CurveRange(-1, -1, 1, 1)] public AnimationCurve curve; [CurveRange(EColor.Orange)] public AnimationCurve curve1; [CurveRange(0, 0, 5, 5, EColor.Red)] public AnimationCurve curve2;

curverange

It works with ShowInInspector:

[ShowInInspector, CurveRange(EColor.Orange)] public AnimationCurve ShowCurve1 { get => curve1; set => curve1 = value; }

It works with ShowInInspector/Button parameters and return value

[ShowInInspector] [CurveRange(EColor.Aquamarine)] private AnimationCurve ShowCurveRange([CurveRange(EColor.YellowNice)] AnimationCurve animCurve) => animCurve; [Button] [CurveRange(EColor.Aquamarine)] private AnimationCurve ShowCurveRange([CurveRange(EColor.YellowNice)] AnimationCurve animCurve) => animCurve;