UAssetValidator
in Blogs / Unreal Engine on Blogs, Ue, Doc
Configuration and Usage
Follow the steps below
- Add allow validation usecase in project setting
- All usecese:
/** No usecase specified */ None = 0, /** Triggered on user's demand */ Manual, /** A commandlet invoked the validation */ Commandlet, /** Saving a package triggered the validation */ Save, /** Submit dialog triggered the validation */ PreSubmit, /** Triggered by blueprint or c++ */ Script, NoneMeans all case, it always trigger validation- Allow validation usecase empty, same as
None Manualneeds enable validate on save in Editor preferences

- Create a data asset and select
Asset Validation Relus - Select the
Asset Classwhich you want to validation - Check Configure Rules to define rules

- Create a data asset and select
- Once the rule asset is saved, it takes effect
- Find a asset to check your rule is correct or not
- You may need to test several times to ensure the rule is correct

Configure Rules
Base rule
Asset Classdecides which assets the rules apply toName FormatFormat of the asset name, whether it needs prefixes, suffixes, and contains special textCriteria EntriesDefine the properties and values that need to be validated(Click the plus sign to add)Attribute NameRight click property,Copy Intername Name(Highly recommended, but UE versions below 5.5 may not have it) orCopy Display Name
ValuesA property can have multiple values, and you can add multiple entries. As long as one value matches, the validation will passValueA specific value used to compare with the asset’s propertiesWarningIf selected, the validation will pass even if the above values are different, and it will output the following error messageError MessageError message for failed validation, optionalAdvance
Group PatternRegular expression for extracting group names from asset’s name The regular expression needs to include parentheses () to define a capturing group. The capturing group will extract the content matched within the parentheses.
Ps. Capture GroupGroup ValueWith the group name, you can define the attribute values for the group. The format is the same asValue, but with a higher priority