Files
aibis-dream/Assets/Plugins/VolFx/Tools/Runtime/CurveRangeAttribute.cs
T
2025-05-15 15:37:45 +08:00

29 lines
856 B
C#

using System;
using UnityEngine;
// VolFx © NullTale - https://x.com/NullTale
namespace VolFx.Tools
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
internal class CurveRangeAttribute : PropertyAttribute
{
public Vector2 Min { get; private set; }
public Vector2 Max { get; private set; }
// =======================================================================
public CurveRangeAttribute() : this(new Vector2(0, 0), new Vector2(1, 1))
{
}
public CurveRangeAttribute(Vector2 min, Vector2 max)
{
Min = min;
Max = max;
}
public CurveRangeAttribute(float minX, float minY, float maxX, float maxY)
: this(new Vector2(minX, minY), new Vector2(maxX, maxY))
{
}
}
}