Navigation
API > API/Plugins > API/Plugins/DataValidation
Inheritance Hierarchy
- UObject
- UEditorValidatorBase
- UAssetValidator_CustomizableObjects
- UAssetValidator_ReferencedCustomizableObjects
- UDirtyFilesChangelistValidator
- UEditorValidator_Localization
- UEditorValidator_Material
References
| Module | DataValidation |
| Header | /Engine/Plugins/Editor/DataValidation/Source/DataValidation/Public/EditorValidatorBase.h |
| Include | #include "EditorValidatorBase.h" |
Syntax
UCLASS (Abstract, Blueprintable, Meta=(ShowWorldContextPin), Config=Editor)
class UEditorValidatorBase : public UObject
Remarks
The EditorValidatorBase is a class which verifies that an asset meets a specific ruleset. It should be used when checking engine-level classes, as UObject::IsDataValid requires overriding the base class. You can create project-specific version of the validator base, with custom logging and enabled logic.
C++ and Blueprint validators will be gathered on editor start, while python validators need to register themselves
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bIsConfigDisabled | Allows disabling validators from config without checking in assets/modifying code. | |
| bool | bIsEnabled | ||
| bool | bOnlyPrintCustomMessage | Whether we should also print out the source validator when printing validation errors. | |
| const FText & | InMessage | ||
| const FText TArray< FText > & | InOutErrors | ||
| TArray< FText > & | ValidationErrors |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddLegacyValidationErrors
(
TArray< FText > InErrors |
||
| void | AssetFails
(
const UObject* InAsset, |
Marks the validation as failed and adds an error message. | |
| TSharedRef< FTokenizedMessage > | AssetMessage
(
const FAssetData& InAssetData, |
Add a tokenized message to the validation results. | |
| TSharedRef< FTokenizedMessage > | AssetMessage
(
EMessageSeverity::Type InSeverity, |
||
| void | AssetPasses
(
const UObject* InAsset |
Marks the validation as successful. | |
| void | AssetWarning
(
const UObject* InAsset, |
Adds a message to this validation but doesn't mark it as failed. | |
| bool | CanValidateAsset_Implementation
(
const FAssetData& InAssetData, |
Override this to determine whether or not you can use this validator given this context. | |
| EDataValidationResult | ExtractValidationState
(
FDataValidationContext& InOutContext |
||
| const TArray< FText > & | |||
| TArray< FAssetData > | GetAssetsToValidateFromChangelist
(
UDataValidationChangelist* InChangelist, |
Override this to return additional assets that need validation because of other changes in a changelist. | |
| EDataValidationResult | |||
| bool | IsEnabled () |
||
| bool | |||
| bool | K2_CanValidate
(
const EDataValidationUsecase InUsecase |
Override this to determine whether or not you can use this validator given this usecase | |
| bool | K2_CanValidateAsset
(
UObject* InAsset |
Override this to determine whether or not you can validate a given asset with this validator | |
| EDataValidationResult | K2_ValidateLoadedAsset
(
UObject* InAsset |
Override this in blueprint to validate assets | |
| EDataValidationResult | K2_ValidateLoadedAsset_Implementation
(
UObject* InAsset |
Declaration for above BlueprintNativeEvent. | |
| void | |||
| EDataValidationResult | ValidateLoadedAsset
(
const FAssetData& InAssetData, |
Validation entry point - will dispatch to native and/or BP validation as appropriate and return results. | |
| EDataValidationResult | ValidateLoadedAsset_Implementation
(
const FAssetData& InAssetData, |
Override this to validate in C++ with access to FDataValidationContext |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
UE_DEPRECATED
(
"5.4", |
|||
UE_DEPRECATED
(
"5.4", |
|||
UE_DEPRECATED
(
"5.4", |
|||
UE_DEPRECATED
(
"5.4", |