Skip to content

xavierarpa/UsingSort

Repository files navigation

Using Sort

Unity Editor tool for scanning, ordering, and applying consistent using directives across C# files.

Unity MIT License

Features

  • Folder scan — recursively finds all .cs files and extracts unique using directives
  • Config asset — stores order and preferences in a JSON file you can keep in your project
  • Manual ordering — drag and reorder the using list 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 using entries
  • Batch apply — rewrites all scripts in the target folder using your configured order

Installation

Unity Package Manager (git URL)

  1. Open Window > Package Manager
  2. Click + > Add package from git URL...
  3. Paste:
https://github.com/xavierarpa/UsingSort.git

Manual

Copy this folder into your project's Assets/ or Packages/ directory.

Usage

  1. Open Tools > Using Sort
  2. In Config File, drag an existing .json file or click New
  3. Set Target Folder
  4. Click Scan to build the current using inventory
  5. Reorder entries (and optional macro prefixes)
  6. Click Apply to update all scripts in that folder recursively

Config Format

The JSON config stores this data:

{
  "folderGuid": "",
  "useMacroSort": false,
  "macroOrder": [],
  "order": []
}

Requirements

  • Unity 2020.3 or later
  • Editor-only (the assembly is limited to Editor platform)

License

MIT

Contributing

See CONTRIBUTING.md.

About

Unity Editor tool for scanning, ordering, and applying consistent C# using directives across folders, with optional macro-prefix sorting.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages