A Unity Editor tool that automatically validates imported 3D assets and textures against configurable project standards, logging issues to a dedicated editor window.
Maintaining pipeline quality means catching problems early. This tool hooks into Unity's import pipeline via AssetPostprocessor to validate every model and texture the moment it lands in the project, flagging naming violations, excessive poly counts, missing LODs, and texture issues without any manual intervention.
- Automatic Model Validation (on import):
- Poly Count Check: Flags meshes exceeding the configurable triangle limit (default: 65,000 tris).
- Naming Convention: Enforces PascalCase / snake_case with no spaces or special characters.
- LOD Warning: Warns when a high-poly mesh (> 5,000 tris) has no
LODGroupcomponent.
- Automatic Texture Validation (pre-import):
- Naming Convention: Same pattern check applied to texture file names.
- Max Texture Size: Caps oversized textures and logs the change.
- Normal Map Detection: Auto-sets import type to
NormalMapbased on file name suffixes (_n,_nrm,normal).
- Validator Log Window (
Tools > Validator Log):- Filterable log with Info / Warning / Error levels.
- Auto-opens on warnings or errors so issues are never missed.
- Clickable entries to ping the asset in the Project window.
- Unity (2021.3 LTS or newer recommended).
- Place
Scripts/AssetValidator.csinside anEditor/folder in your Unity project.
- Drop
Scripts/AssetValidator.csinto anyEditor/folder in your Unity project (e.g.,Assets/Editor/). - Import any 3D model or texture — validation runs automatically.
- Open Tools > Validator Log to review all flagged issues.
Edit the static fields at the top of AssetValidator.cs to adjust thresholds:
| Field | Default | Description |
|---|---|---|
MaxPolyCount |
65000 |
Maximum triangle count before a warning |
MaxTextureSize |
4096 |
Maximum import texture size |
MinTextureSize |
32 |
Minimum texture size (reference) |
EnforceNaming |
true |
Toggle naming convention checks |
CheckLODs |
true |
Toggle LOD group warnings |
OnPostprocessModel(): Runs after model import. Checks triangle count, naming, and LOD groups.OnPreprocessTexture(): Runs before texture import. Checks naming, max texture size, and auto-detects normal maps.ValidatorLogWindow: CustomEditorWindowthat collects and displays timestamped log entries with filtering by type.
This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2025 ARGUS
