dwgx@blog:~$dwgx
> cd ../posts

Upload a whole folder of VRChat avatars with one command

// created

VRC-Auto-Uploader is a VRChat avatar batch uploader that pushes every model in a directory with a single command. The traditional flow for uploading even one avatar means opening Unity, creating a project, installing the SDK, importing packages, locating the Prefab, clearing the Blueprint ID, and clicking through a pile of dialogs, roughly ten-plus minutes each, so a few dozen eats an entire afternoon. This tool automates that whole grind away.

The architecture is a Python controller plus a chunk of C# injected into Unity. I first tried running headless with -batchmode -nographics, but hit a wall: VRChat uploading relies on VRCSdkControlPanel.TryGetBuilder(), which depends on the Unity Editor GUI being initialized, and in headless mode the Builder simply never registers. So it has to launch in GUI mode, but the whole run is automated with nobody touching the mouse. Python scans the directory, extracts archives, builds a clean temporary project, installs the SDK and lilToon, then spins up Unity while reading its logs live; on the Unity side an [InitializeOnLoad] hook takes over on startup, opens the SDK panel, imports the unitypackage, finds the Prefab, clears the Blueprint ID, and finally calls BuildAndUpload(). The two sides communicate through a single JSON result file.

The hard part isn’t the upload, it’s the edge cases. Models handed over by other people carry the original author’s Blueprint ID, and uploading directly throws a “cannot overwrite someone else’s Avatar” error, so each one has to be cleared first. Nine out of ten community models use lilToon, and without the shader they go all pink, so the temporary project auto-installs lilToon and Modular Avatar as well. The SDK also spams copyright notices and update prompts, harmless to click through by hand but an instant deadlock for automation, so I wrote a dedicated PopupSuppressor to close them automatically. Every run gets its own isolated temporary project, discarded once the upload is done, to avoid cross-contamination. Extraction supports .zip/.rar/.7z while it’s at it, pulls out the unitypackage inside, and filters out shader-only packages.

To use it, first run python main.py setup, which auto-detects where Unity is installed and downloads vrc-get. The first upload requires logging into your VRChat SDK account by hand once; the SDK gives you no way to stuff account credentials into code, so once you’re logged in the session persists and you don’t have to deal with it afterward.

# Extract only, no upload -- see what's in the directory first
python main.py extract --dir "D:\Model"

# Once it looks good, batch upload the whole directory
python main.py batch --dir "D:\Model" -y

Results land in upload_results.json, with each model’s blueprintId and success/failure status. The environment is pinned to Unity 2022.3.22f1, the version VRChat officially specifies; other versions tend to make the SDK act up. This tool is for managing my own licensed models, use it at your own risk, and don’t upload anything that isn’t yours. The approach took cues from VRCMultiUploader. Code is at github.com/dwgx/VRC-Auto-Uploader.