Firstborn/Library/PackageCache/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Attributes/MaxAttribute.cs
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

26 lines
722 B
C#

using System;
namespace UnityEngine.Rendering.PostProcessing
{
/// <summary>
/// Use this attribute to clamp floating point values to a maximum value in the inspector.
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public sealed class MaxAttribute : Attribute
{
/// <summary>
/// The maximum value the field will be clamped to.
/// </summary>
public readonly float max;
/// <summary>
/// Creates a new attribute.
/// </summary>
/// <param name="max">The maximum value the field will be clamped to</param>
public MaxAttribute(float max)
{
this.max = max;
}
}
}