ValidatorAttribute Class

Summary

[Pro-Only] Base class for attributes that apply some sort of validation to a field.
ValidatorAttribute
PropertyAttribute

Syntax

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

Attributes

Type Description
ConditionalAttribute

Methods

Name Value Summary
TryValidate(double) bool
Validates a 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.