Ejemplo n.º 1
0
        private void OnDisable()
        {
            PropertyMetaDatabase.ClearCache();
            PropertyDrawerDatabase.ClearCache();
            PropertyGrouperDatabase.ClearCache();
            PropertyValidatorDatabase.ClearCache();
            PropertyDrawConditionDatabase.ClearCache();

            MethodDrawerDatabase.ClearCache();
        }
Ejemplo n.º 2
0
        private void ValidateField(FieldInfo field)
        {
            ValidatorAttribute[] validatorAttributes = (ValidatorAttribute[])field.GetCustomAttributes(typeof(ValidatorAttribute), true);

            foreach (var attribute in validatorAttributes)
            {
                PropertyValidator validator = PropertyValidatorDatabase.GetValidatorForAttribute(attribute.GetType());
                if (validator != null)
                {
                    validator.ValidateProperty(this.serializedPropertiesByFieldName[field.Name]);
                }
            }
        }