ValidatorAttribute Class

Summary

[Pro-Only] Base class for attributes that apply some sort of validation to a field.
graph BT Type-->Base0["PropertyAttribute"] Type["ValidatorAttribute"] class Type type-node Derived0["ClampValueAttribute"]-->Type click Derived0 "/inspector-gadgets/api/InspectorGadgets.Attributes/ClampValueAttribute" Derived1["MinValueAttribute"]-->Type click Derived1 "/inspector-gadgets/api/InspectorGadgets.Attributes/MinValueAttribute" Derived2["MaxValueAttribute"]-->Type click Derived2 "/inspector-gadgets/api/InspectorGadgets.Attributes/MaxValueAttribute" Derived3["HasComponentAttribute"]-->Type click Derived3 "/inspector-gadgets/api/InspectorGadgets.Attributes/HasComponentAttribute"

Syntax

[System.Diagnostics.Conditional("UNITY_EDITOR")]
public abstract class ValidatorAttribute : PropertyAttribute

Attributes

Type Description
ConditionalAttribute

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 System.Int64 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.