Navigation
API > API/Plugins > API/Plugins/DataValidation
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.
| Name | UEditorValidatorSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Editor/DataValidation/Source/DataValidation/Public/EditorValidatorSubsystem.h |
| Include Path | #include "EditorValidatorSubsystem.h" |
Syntax
UCLASS (MinimalAPI, Config=Editor)
class UEditorValidatorSubsystem : public UEditorSubsystem
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UDynamicSubsystem → UEditorSubsystem → UEditorValidatorSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UEditorValidatorSubsystem() |
EditorValidatorSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddValidator
(
UEditorValidatorBase* InValidator |
Adds a validator to the list, making sure it is a unique instance | EditorValidatorSubsystem.h |
|
virtual void Deinitialize() |
EditorValidatorSubsystem.h | ||
void ForEachEnabledValidator
(
TFunctionRef< bool(UEditorValidatorBase*Validator)> Callback |
Iterate the enabled set of validators. Return true to continue iteration, or false to stop. | EditorValidatorSubsystem.h | |
virtual void GatherAssetsToValidateFromChangelist
(
UDataValidationChangelist* InChangelist, |
From a changelist, return a list of assets to validate. | EditorValidatorSubsystem.h | |
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. | EditorValidatorSubsystem.h | |
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
EditorValidatorSubsystem.h | ||
virtual EDataValidationResult IsAssetValid
(
const FAssetData& AssetData, |
Loads the object referred to by the provided AssetData and runs registered validators on it. | EditorValidatorSubsystem.h |
|
virtual EDataValidationResult IsAssetValidWithContext
(
const FAssetData& AssetData, |
Loads the object referred to by the provided AssetData and runs registered validators on it. | EditorValidatorSubsystem.h | |
virtual EDataValidationResult IsObjectValid
(
UObject* InObject, |
Runs registered validators on the provided object. | EditorValidatorSubsystem.h |
|
virtual EDataValidationResult IsObjectValidWithContext
(
UObject* InObject, |
Runs registered validators on the provided object. | EditorValidatorSubsystem.h | |
void PopDisableValidateOnSave () |
Pop a previous request to temporarily disable "validate on save". | EditorValidatorSubsystem.h | |
void PushDisableValidateOnSave () |
Push a new request to temporarily disable "validate on save". | EditorValidatorSubsystem.h | |
void RemoveValidator
(
UEditorValidatorBase* InValidator |
Removes a validator Should be called during module shutdown if a validator was added. | EditorValidatorSubsystem.h |
|
virtual bool ShouldCreateSubsystem
(
UObject* Outer |
EditorValidatorSubsystem.h | ||
virtual bool ShouldValidateAsset
(
const FAssetData& Asset, |
Returns true if the given asset should be validated at all. | EditorValidatorSubsystem.h | |
virtual int32 ValidateAssetsWithSettings
(
const TArray< FAssetData >& AssetDataList, |
Called to validate assets from either the UI or a commandlet. | EditorValidatorSubsystem.h |
|
virtual EDataValidationResult ValidateChangelist
(
UDataValidationChangelist* InChangelist, |
Called to validate assets from either the UI or a commandlet. | EditorValidatorSubsystem.h |
|
virtual EDataValidationResult ValidateChangelists
(
const TArray< UDataValidationChangelist* > InChangelists, |
EditorValidatorSubsystem.h |
|
|
virtual void ValidateOnSave
(
TArray< FAssetData > AssetDataList, |
Called to validate from an interactive save | EditorValidatorSubsystem.h | |
virtual void ValidateSavedPackage
(
FName PackageName, |
Schedule a validation of a saved package, this will activate next frame by default so it can combine them | EditorValidatorSubsystem.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddValidator
(
const FTopLevelAssetPath& InValidatorClass |
Adds a validator to the list making sure it is a unique instance, but wait for the first use to load the class (for Blueprints). | EditorValidatorSubsystem.h | |
void CleanupValidators() |
EditorValidatorSubsystem.h | ||
virtual bool IsPathExcludedFromValidation
(
FStringView Path |
EditorValidatorSubsystem.h | ||
void LogAssetValidationSummary
(
FMessageLog& DataValidationLog, |
EditorValidatorSubsystem.h | ||
void OnAssetsAdded
(
TConstArrayView< FAssetData > InAssets |
Handle Blueprint assets being added or removed ( | EditorValidatorSubsystem.h | |
void OnAssetsAddedOrRemoved
(
TConstArrayView< FAssetData > InAssets, |
EditorValidatorSubsystem.h | ||
void OnAssetsRemoved
(
TConstArrayView< FAssetData > InAssets |
EditorValidatorSubsystem.h | ||
void OnNativeModulesChanged
(
FName InModuleName, |
Handle native modules being loaded or unloaded ( | EditorValidatorSubsystem.h | |
void RegisterBlueprintValidators() |
EditorValidatorSubsystem.h | ||
void RegisterNativeValidators() |
EditorValidatorSubsystem.h | ||
void RemoveValidator
(
const FTopLevelAssetPath& InValidatorClass |
Remove any validators (active or pending) for the given class. | EditorValidatorSubsystem.h | |
bool ShouldValidateOnSave
(
bool bProceduralSave |
EditorValidatorSubsystem.h | ||
void UpdateValidators () |
Apply any pending changes to the list of active validators ( | EditorValidatorSubsystem.h | |
void UpdateValidators () |
EditorValidatorSubsystem.h | ||
void ValidateAllSavedPackages() |
Handles validating all pending save packages | EditorValidatorSubsystem.h | |
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). | EditorValidatorSubsystem.h | |
void ValidateChangelistPreSubmit
(
FSourceControlChangelistPtr Changelist, |
Validates changelist before SCC submit operation | EditorValidatorSubsystem.h | |
EDataValidationResult ValidateChangelistsInternal
(
TConstArrayView< UDataValidationChangelist* > InChangelists, |
EditorValidatorSubsystem.h | ||
| Validates files before SCC submit operation | EditorValidatorSubsystem.h | ||
EDataValidationResult ValidateObjectInternal
(
const FAssetData& InAssetData, |
EditorValidatorSubsystem.h | ||
void WaitForAssetCompilationIfNecessary
(
EDataValidationUsecase InUsecase, |
EditorValidatorSubsystem.h |