MinMaxAttribute.cs 963 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. namespace UnityEngine.Rendering.PostProcessing
  3. {
  4. /// <summary>
  5. /// Use this attribute to specify a range between a min and a max value.
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
  8. public sealed class MinMaxAttribute : Attribute
  9. {
  10. /// <summary>
  11. /// The minimum limit of the user defined range.
  12. /// </summary>
  13. public readonly float min;
  14. /// <summary>
  15. /// The maximum limit of the user defined range.
  16. /// </summary>
  17. public readonly float max;
  18. /// <summary>
  19. /// Creates a new attribute.
  20. /// </summary>
  21. /// <param name="min">The minimum limit of the user defined range</param>
  22. /// <param name="max">The maximum limit of the user defined range</param>
  23. public MinMaxAttribute(float min, float max)
  24. {
  25. this.min = min;
  26. this.max = max;
  27. }
  28. }
  29. }