Summary
[Pro-Only]
Base class for attributes that apply some sort of validation to a field.
- Assembly
- Kybernetik
.InspectorGadgets .dll - Namespace
- InspectorGadgets
.Attributes - Base Types
-
- PropertyAttribute
- Derived Types
graph BT
Type-->Base0["PropertyAttribute"]
Type["ValidatorAttribute"]
class Type type-node
Derived0["MinValueAttribute"]-->Type
click Derived0 "/inspector-gadgets/api/InspectorGadgets.Attributes/MinValueAttribute"
Derived1["ClampValueAttribute"]-->Type
click Derived1 "/inspector-gadgets/api/InspectorGadgets.Attributes/ClampValueAttribute"
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 |
bool |
Validates a
double value or returns false to revert to the previous value. |
TryValidate |
bool |
Validates a
long value or returns false to revert to the previous value. |
TryValidate |
bool |
Validates an
UnityEngine.Object value or returns false to revert to the previous value. |