Quick answer: Set up Unity Accelerator for a team CacheServer. Use .gitattributes to lock line endings. Audit AssetPostprocessor scripts — if they modify imports, every change invalidates cache.

CI run takes 25 minutes from cold; should be 5 with cache. Asset Pipeline keeps re-importing because something invalidates the hash.

The Symptom

Editor reports “Importing N assets” on every CI run, every developer pull. Library/ size grows; cache hit rate near 0.

The Fix

Step 1: Unity Accelerator. Install on a LAN server or cloud VM. Configure Editor → Preferences → Cache Server to point at it. Team members and CI fetch from there.

Step 2: .gitattributes for line endings.

# .gitattributes
*.cs    text eol=lf
*.shader text eol=lf
*.uxml   text eol=lf
*.json   text eol=lf
*.png    binary
*.fbx    binary

Cross-platform line ending swaps invalidate text-asset hashes. Lock LF for source files.

Step 3: Audit AssetPostprocessor. Any postprocessor that writes to assets during import causes a re-hash. Check Editor scripts; remove or guard with shouldImport checks.

CI Cache Library/ Carefully

Cache Library/ArtifactDB and Library/Bee. Don’t cache Library/PackageCache or transient subfolders. Restore on fresh CI worker; Unity reuses the imported artifacts.

Verifying

Run CI twice. Second run should be much faster. Editor logs show “cache hit” rather than “importing.”

“Accelerator. Locked line endings. Lean postprocessors. Cache hits.”

Related Issues

For asset bundles incremental, see incremental bundles. For Burst cache, see Burst cache.

Cache shared. Hashes stable. Builds fast.