Unity Editor tool for scanning, ordering, and applying consistent using directives across C# files.
- Folder scan — recursively finds all
.csfiles and extracts uniqueusingdirectives - Config asset — stores order and preferences in a JSON file you can keep in your project
- Manual ordering — drag and reorder the
usinglist directly in the Editor window - Macro Sort — groups directives by namespace prefixes and lets you prioritize groups
- Quick sort actions — sort A-Z or by length for both macro prefixes and
usingentries - Batch apply — rewrites all scripts in the target folder using your configured order
- Open Window > Package Manager
- Click + > Add package from git URL...
- Paste:
https://github.com/xavierarpa/UsingSort.git
Copy this folder into your project's Assets/ or Packages/ directory.
- Open Tools > Using Sort
- In Config File, drag an existing
.jsonfile or click New - Set Target Folder
- Click Scan to build the current
usinginventory - Reorder entries (and optional macro prefixes)
- Click Apply to update all scripts in that folder recursively
The JSON config stores this data:
{
"folderGuid": "",
"useMacroSort": false,
"macroOrder": [],
"order": []
}- Unity 2020.3 or later
- Editor-only (the assembly is limited to
Editorplatform)
See CONTRIBUTING.md.