Naming Conventions Validation
Maintaining clean, uniform nomenclature across your Unity scene prevents confusion in version control history and ensures dynamic asset lookups (e.g. GameObject.Find) operate reliably. The NamingConventionRule scans for messy naming structures and flags them for rapid fixing.
What the Rule Checks
1. Clone & Copy Suffixes
When duplicating assets in the editor, Unity appends trailing descriptors.
- Messy Suffixes Flagged:
(Copy),(1),(3) (Copy) (1),(Clone) - Why it matters: These suffixes clutter the hierarchy, making it hard to search for base assets or reference them programmatically.
2. Trailing and Leading Spaces
- Examples Flagged:
"Props_Rock "(trailing space) or" Camera"(leading space) - Why it matters: Whitespaces are virtually invisible in the hierarchy UI but cause string matching failures in code (e.g.,
GameObject.Find("Props_Rock")returns null).
3. Inconsistent Casing
In the Project Settings panel, you can choose your project’s naming convention:
PascalCase(e.g.,MainCamera)camelCase(e.g.,mainCamera)snake_case(e.g.,main_camera)kebab-case(e.g.,main-camera)
The rule scans all root folders or specific items to flag names that break your selected casing style.
Configuring Casing Standards
You can configure casing standards in:
Edit ➔ Project Settings... ➔ AI Scene Organizer ➔ Naming Standards
- Select your target Case Standard from the dropdown menu.
- In Ignore Patterns, add regex terms (such as
vfx_*orTMP_*) to exclude specific toolsets or third-party assets from being flagged. - Save settings. Future scans will validate the scene hierarchy against these criteria.