forked from Unity-Technologies/Graphics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMaxAttribute.cs
More file actions
25 lines (23 loc) · 722 Bytes
/
Copy pathMaxAttribute.cs
File metadata and controls
25 lines (23 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
}
}
}