Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save zuedev/565ef2b94d7e69e7debe1b37a7a425b0 to your computer and use it in GitHub Desktop.

Select an option

Save zuedev/565ef2b94d7e69e7debe1b37a7a425b0 to your computer and use it in GitHub Desktop.
Setting up a Unity Accelerator (the modern Cache Server) is recommended for VRChat developers to drastically reduce asset re-import and platform switching times by caching processed assets locally on a server.
services:
app:
image: unity/accelerator:v1.5.97-g7d240fef # or :latest works too!
restart: always
environment:
USER: "someuser"
PASSWORD: "CHANGEME"
volumes:
- ./agent:/agent
ports:
- 7444:80
- 7445:10080

Speeding Up VRChat Development: Unity Accelerator Guide

Baking lightmaps and switching platforms between PC and Android (Quest) are the two biggest time-sinks in VRChat creation. Setting up a Unity Accelerator (the modern version of the Cache Server) allows you to offload asset processing and store multiple versions of the same asset simultaneously.

1. Why use a Cache Server for VRChat?

  • Instant Platform Swapping: Stop waiting 20 minutes to switch from PC to Quest. The server stores the compressed textures for both.
  • Faster Re-imports: If you delete your Library folder to fix a bug, the Accelerator re-populates it in seconds over your local network.
  • Multi-PC Sync: If you work with a team or use a desktop and a laptop, you only "process" an asset once; every other machine just downloads the result.

2. Installation (The "Server" Side)

You can run the Accelerator on your main PC, an old laptop, or a dedicated home server (NAS).

  1. Download: Get the latest version from the Unity Accelerator Page.
  2. Storage: Choose a drive with at least 100GB to 500GB of free space. Unity assets are small, but thousands of versions add up.
  3. Setup Wizard:
    • Follow the prompts.
    • When asked for a Port, the default is usually 10080.
    • Note the IP Address provided (e.g., 192.168.1.50).

Tip: If running on the same machine you use for Unity, you can just use localhost later.

3. Configuration (The Unity Side)

Once the Accelerator is running, you must link your VRChat project to it.

  1. Open your VRChat project in Unity.
  2. Navigate to Edit > Project Settings.
  3. Select Editor in the left-hand sidebar.
  4. Scroll down to the Unity Accelerator (or Cache Server) section.
  5. Settings:
    • Mode: Change to Enabled.
    • Server Address: Enter your IP (e.g., 192.168.1.50:10080). Use localhost:10080 if it's on the same PC.
  6. Click Check Connection.
    • Success: A green message appears.
    • Failure: Check your Windows Firewall to ensure the port isn't being blocked.

4. Initial "Seeding" (Important!)

The server is currently empty. You need to "feed" it your current project assets.

  1. In the Unity top menu, go to Assets > Cache Server > Upload All Assets.
  2. Unity will process and upload your current PC library to the server.
  3. The Quest Step: Switch your Build Target to Android (File > Build Settings > Android > Switch Platform).
  4. Let it compress all textures for Quest. Once finished, these are now stored on your Accelerator forever.

5. Maintenance & Pro-Tips

Cleaning the Cache

The Accelerator manages itself by default. If it runs out of space, it deletes the "Least Recently Used" (LRU) assets. You don't need to manually delete files unless you want to wipe everything.

Version Control Integration

If you use GitHub or Unity Version Control (PlasticSCM), the Cache Server is a lifesaver. When a teammate pushes a new asset, your Unity will ask the Accelerator for the processed version before trying to compile it locally.

Bakery & Lightmaps

While the Accelerator won't speed up the actual GPU render time of a lightmap bake, it will speed up the moment you save those bakes. It also ensures that if you accidentally delete a bake, it can be recovered instantly from the cache if it hasn't been overwritten.

Common Issues

  • "Connection Failed": Ensure the Unity Accelerator service is running in your Windows "Services" app or the System Tray.
  • Slow Speeds: Use a wired Ethernet connection. WiFi is often slower than just re-importing the asset locally.

Summary Checklist

  • Install Unity Accelerator.
  • Note IP and Port.
  • Enable in Project Settings > Editor.
  • "Upload All Assets" to seed the cache.
  • Switch platforms once to cache Android/Quest versions.
/**
* ============================================================================
* VRCHAT ACCELERATOR CACHE SEEDER
* ============================================================================
* Purpose:
* Forces a re-import of your project assets. In modern Unity (Asset Pipeline V2),
* "Reimporting" is the ONLY way to force data to be sent to the Unity Accelerator.
* * Usage:
* 1. Go to VRChat > Accelerator > Force Seed Cache (Reimport All)
* 2. Click "Yes" on the warning.
* 3. Wait for the process to finish.
* ============================================================================
*/
using UnityEditor;
using UnityEngine;
public class VRChat_AcceleratorTools : EditorWindow
{
[MenuItem("VRChat/Accelerator/Force Seed Cache (Reimport All)")]
public static void ForceSeedCache()
{
bool confirm = EditorUtility.DisplayDialog(
"Force Seed Accelerator Cache?",
"This will force Unity to re-import ALL assets in your project.\n\n" +
"This is necessary to 'Seed' (upload) your assets to the Accelerator if the cache is empty.\n\n" +
"WARNING: This takes time! (Minutes to Hours depending on project size).",
"Yes, Seed Cache",
"Cancel"
);
if (confirm)
{
Debug.Log("[Accelerator] Starting Cache Seed... do not close Unity.");
// This standard method forces Unity to re-process every asset.
// As they are processed, they are automatically uploaded to your Accelerator.
AssetDatabase.ImportAsset("Assets", ImportAssetOptions.ImportRecursive | ImportAssetOptions.ForceUpdate);
Debug.Log("[Accelerator] Cache Seed command sent. Unity is now processing.");
}
}
[MenuItem("VRChat/Accelerator/Open Cache Settings", false, 50)]
public static void OpenCacheSettings()
{
SettingsService.OpenProjectSettings("Project/Editor");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment