Navigation
API > API/Plugins > API/Plugins/DataValidation
Inheritance Hierarchy
- UDynamicSubsystem
- UEditorSubsystem
- UEditorValidatorSubsystem
References
| Module | DataValidation |
| Header | /Engine/Plugins/Editor/DataValidation/Source/DataValidation/Public/EditorValidatorSubsystem.h |
| Include | #include "EditorValidatorSubsystem.h" |
Syntax
UCLASS (Config=Editor)
class UEditorValidatorSubsystem : public UEditorSubsystem
Remarks
UEditorValidatorSubsystem manages all the asset validation in the engine.
The first validation handled is UObject::IsDataValid and its overridden functions. Those validations require custom classes and are most suited to project-specific classes.
The next validation set is of all registered UEditorValidationBases. These validators have a function to determine if they can validate a given asset, and if they are currently enabled. They are good candidates for validating engine classes or very specific project logic.
Finally, this subsystem may be subclassed to change the overally behavior of validation in your project. If a subclass exist in your project module, it will supercede the engine validation subsystem.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAllowBlueprintValidators | Specifies whether or not to allow Blueprint validators | |
| bool | bNeedLoadingOfValidators | ||
| bool | bValidateOnSave | Whether it should validate assets on save inside the editor | |
| TArray< FDirectoryPath > | ExcludedDirectories | Directories to ignore for data validation. Useful for test assets | |
| TArray< FName > | SavedPackagesToValidate | List of saved package names to validate next frame | |
| TMap< FTopLevelAssetPath, TObjectPtr< UEditorValidatorBase > > | Validators |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddValidator
(
const FAssetData& InValidatorAssetData |
Adds a validator to the list making sure it is a unique instance, but wait for the first use to load the assets. | |
| void | AddValidator
(
UEditorValidatorBase* InValidator |
Adds a validator to the list, making sure it is a unique instance | |
| void | |||
| void | Deinitialize () |
||
| void | ForEachEnabledValidator
(
TFunctionRef< bool(UEditorValidatorBase*Validator)> Callback |
Iterate the enabled set of validators. Return true to continue iteration, or false to stop. | |
| void | GatherAssetsToValidateFromChangelist
(
UDataValidationChangelist* InChangelist, |
From a changelist, return a list of assets to validate. | |
| TArray< FAssetData > | GetAssetsResolvingRedirectors
(
FARFilter& InFilter |
Retrieve all assets matching the given filter from the asset registry and then recursively resolve redirectors to produce a single set of assets. | |
| void | Initialize
(
FSubsystemCollectionBase& Collection |
||
| EDataValidationResult | IsAssetValid
(
const FAssetData& AssetData, |
Loads the object referred to by the provided AssetData and runs registered validators on it. | |
| EDataValidationResult | IsAssetValidWithContext
(
const FAssetData& AssetData, |
Loads the object referred to by the provided AssetData and runs registered validators on it. | |
| EDataValidationResult | IsObjectValid
(
UObject* InObject, |
Runs registered validators on the provided object. Does not add anything to any FMessageLog tabs. | |
| EDataValidationResult | IsObjectValidWithContext
(
UObject* InObject, |
Runs registered validators on the provided object. Does not add anything to any FMessageLog tabs. | |
| bool | IsPathExcludedFromValidation
(
FStringView Path |
||
| void | |||
| void | |||
| void | LogAssetValidationSummary
(
FMessageLog& DataValidationLog, |
||
| void | |||
| void | RemoveValidator
(
UEditorValidatorBase* InValidator |
Removes a validator Should be called during module shutdown if a validator was added. | |
| bool | ShouldCreateSubsystem
(
UObject* Outer |
||
| bool | ShouldValidateAsset
(
const FAssetData& Asset, |
Returns true if the given asset should be validated at all. | |
| void | Handles validating all pending save packages | ||
| EDataValidationResult | ValidateAssetsInternal
(
FMessageLog& DataValidationLog, |
Validate a set of assets, adding the results to the log/output of a higher level task (e.g. changelist validation). | |
| int32 | ValidateAssetsWithSettings
(
const TArray< FAssetData >& AssetDataList, |
Called to validate assets from either the UI or a commandlet. | |
| EDataValidationResult | ValidateChangelist
(
UDataValidationChangelist* InChangelist, |
Called to validate assets from either the UI or a commandlet. | |
| void | ValidateChangelistPreSubmit
(
FSourceControlChangelistPtr Changelist, |
Validates changelist before SCC submit operation | |
| EDataValidationResult | ValidateChangelists
(
const TArray< UDataValidationChangelist* > InChangelists, |
||
| EDataValidationResult | ValidateChangelistsInternal
(
TConstArrayView< UDataValidationChangelist* > InChangelists, |
||
| EDataValidationResult | ValidateObjectInternal
(
const FAssetData& InAssetData, |
||
| void | ValidateOnSave
(
TArray< FAssetData > AssetDataList, |
Called to validate from an interactive save | |
| void | ValidateSavedPackage
(
FName PackageName, |
Schedule a validation of a saved package, this will activate next frame by default so it can combine them | |
| void | WaitForAssetCompilationIfNecessary
(
EDataValidationUsecase InUsecase, |