![]() |
ezEngine Release 26.9
|
#include <AssetCheckRule.h>
Public Member Functions | |
| ezDocument * | GetDocument () const |
| ezObjectAccessorBase * | GetObjectAccessor () 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 |
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.
| 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.