A lightweight toolkit that allows Unity code folders to be combined
Unity Editor → Window ▸ Package Manager
➕ Add package from Git URL
https://github.com/Braneloc/CodeCombinerUnity.git
Unity downloads the package and recompiles scripts automatically.
- Combines all code files in a folder into one -main.cs file
(Recommended for upload) - Seperates Editor, Code and Test files
- Creates a .json file index
- Creates a .json list of classes
- Optionally recurse through any subfolders
- Zips the large created file ready for upload
(Only upload if the -main.cs is very large)
- Instead of uploading large amounts of small code files to a LLM for review, you can upload a combined code file instead reducing file requirements on certain LLMs.
- It is easier to upload a whole folder as a combined code file.
- From the tools menu
- Tools ▸ Code ▸ Combine C# Files
- Drag and drop a Unity code folder from the Project window.
- Click Combine and save
- The files are stored in the root of your project folder, under combined-code next to the Assets folder.
Project Root
Assets
FolderWithScripts
script1.cs
script2.cs
combined-code
FolderWithScripts-main.cs
FolderWithScripts-main.json
FolderWithScripts-types.json
FolderWithScripts-Upload.zip
- Disclaimer: Parts of this project were co-created by an AI LLM.