📅  最后修改于: 2022-03-11 14:49:12.394000             🧑  作者: Mango
void OnValidate()
{
theValue = Mathf.Clamp(theValue, 0, float.MaxValue); // or int.MaxValue, if you need to use an int but can't use uint.
}