ClampValueAttribute Class

Summary

[Pro-Only] Specifies the range of values allowed by the attributed int or float field. See also: InspectorGadgets.Attributes.MinValueAttribute and InspectorGadgets.Attributes.MaxValueAttribute.
Assembly
Kybernetik.InspectorGadgets.dll
Namespace
InspectorGadgets.Attributes
Base Types
graph BT Type-->Base0["ValidatorAttribute"] click Base0 "/inspector-gadgets/api/InspectorGadgets.Attributes/ValidatorAttribute" Base0-->Base1["PropertyAttribute"] Type["ClampValueAttribute"] class Type type-node

Syntax

[System.Diagnostics.Conditional("UNITY_EDITOR")]
public sealed class ClampValueAttribute : ValidatorAttribute

Attributes

Type Description
ConditionalAttribute

Constructors

Name Summary
ClampValueAttribute(double, double) Creates a new InspectorGadgets.Attributes.ClampValueAttribute with the specified range.
ClampValueAttribute(float, float) Creates a new InspectorGadgets.Attributes.ClampValueAttribute with the specified range.
ClampValueAttribute(int, int) Creates a new InspectorGadgets.Attributes.ClampValueAttribute with the specified range.
ClampValueAttribute(long, long) Creates a new InspectorGadgets.Attributes.ClampValueAttribute with the specified range.

Fields

Name Constant Value Summary
MaxDouble
The maximum allowed floating point value.
MaxLong
The maximum allowed integer value.
MinDouble
The minimum allowed floating point value.
MinLong
The minimum allowed integer value.

Methods

Name Value Summary
TryValidate(double) bool
Validates a System.Double value or returns false to revert to the previous value.
TryValidate(long) bool
Validates a long value or returns false to revert to the previous value.
TryValidate(Object) bool
Validates an UnityEngine.Object value or returns false to revert to the previous value.
Inherited from ValidatorAttribute