unreal.EditorValidatorBase

class unreal.EditorValidatorBase(outer=None, name='None')

Bases: unreal.Object

  • 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

C++ Source:

  • Plugin: DataValidation
  • Module: DataValidation
  • File: EditorValidatorBase.h

Editor Properties: (see get_editor_property/set_editor_property)

  • is_enabled (bool): [Read-Write] Is Enabled
asset_fails(asset, message, validation_errors) -> Array(Text)

Asset Fails

Parameters:
Returns:

validation_errors (Array(Text)):

Return type:

Array(Text)

asset_passes(asset) → None

Asset Passes

Parameters:asset (Object) –
can_validate_asset(asset) → bool

Override this to determine whether or not you can validate a given asset with this validator

Parameters:asset (Object) –
Returns:
Return type:bool
get_validation_result() → DataValidationResult

Get Validation Result

Returns:
Return type:DataValidationResult
validate_loaded_asset(asset, validation_errors) -> (DataValidationResult, validation_errors=Array(Text))

Validate Loaded Asset

Parameters:
Returns:

validation_errors (Array(Text)):

Return type:

Array(Text)