Build Safety Processor
The Build Safety module ensures that you never ship a broken build. It hooks directly into the Unity Build Pipeline.
How It Works
The tool implements IPreprocessBuildWithReport.
- Trigger: When you press Build or Build & Run.
- Scan: It performs a focused scan on the scenes enabled in
EditorBuildSettings. - Validation: It checks specifically for Severity.Critical issues (Missing Scripts).
- Intervention: If critical errors are found, a dialog appears:
“Found 5 critical missing references… Do you want to abort?”
Configuration
You can disable this feature in the Settings menu if you need to force a debug build quickly.
// Logic (Pseudocode)
if (!EditorPrefs.GetBool("MRK_EnableBuildScan", true)) return;
// ... scan logic ...
throw new BuildFailedException("Aborted by User");