ezEngine Release 26.9
Loading...
Searching...
No Matches
ezAssetCheckContext Class Reference

#include <AssetCheckRule.h>

Public Member Functions

ezDocumentGetDocument () const
 
ezObjectAccessorBaseGetObjectAccessor () const
 
bool IsAutoFixAllowed () const
 Whether the rule is allowed to modify the document to fix issues.
 
void ReportIssue (ezAssetCheckSeverity::Enum severity, ezStringView sMessage, const ezDocumentObject *pObject=nullptr, bool bFixed=false)
 

Static Public Member Functions

static ezString GetObjectDisplayName (const ezDocumentObject *pObject)
 Returns the object's "Name" property (if present and non-empty), otherwise its type name.
 

Friends

class ezAssetChecker
 

Detailed Description

Passed to ezAssetCheckRule::CheckDocument to inspect the document and report issues.

The rule reports issues via ReportIssue. If IsAutoFixAllowed returns true, the rule may also modify the document through GetObjectAccessor and report the fixed issues with bFixed = true. The runner (ezAssetChecker) owns the undo transaction; rules must not start or finish one.

Member Function Documentation

◆ ReportIssue()

void ezAssetCheckContext::ReportIssue ( ezAssetCheckSeverity::Enum  severity,
ezStringView  sMessage,
const ezDocumentObject pObject = nullptr,
bool  bFixed = false 
)

Records an issue. When bFixed is true, m_uiFixCount is incremented so the runner knows the document was modified and needs to be saved.


The documentation for this class was generated from the following files: