Guide · Unity

How to set up version control for Unity

End-to-end setup: prepare your Unity project, configure exclusions, handle meta files correctly, first commit, and team onboarding.

9 min read

Why Unity projects need purpose-built version control

Unity projects live in two worlds. C# code, .unity scene files, and .asset settings are mostly text. Textures, FBX, audio, and lightmaps are binary — often large.

Git alone doesn't handle the binary side. Git LFS can, but it needs per-file attribute configuration and has its own quirks (pointer files, quota management). USourceControl treats both kinds of files the same way, and handles Unity's .meta file requirements automatically.

Step 1: Prepare your Unity project

Before first commit:

  1. Close the Unity Editor fully.
  2. Delete these folders — Unity regenerates them:
YourProject/
├── Library/        # delete (imported asset cache)
├── Temp/           # delete (runtime temp files)
├── Logs/           # delete
├── obj/            # delete (C# build artifacts)
├── Build/          # delete (standalone builds)
└── UserSettings/   # usually delete (personal layouts)

What stays: Assets/, Packages/, ProjectSettings/, and the .meta files alongside every asset.

In Unity, go to Edit → Project Settings → Editor. Set Asset Serialization Mode to Force Text. This makes scene and prefab files text-based and much better behaved under version control.

Step 2: Understand .meta files

Unity creates a .meta file alongside every asset and folder. These contain GUIDs and import settings. Losing them breaks every reference in your project.

USourceControl versions .meta files automatically. Don't exclude them, don't ignore them, don't let teammates' tools strip them. The desktop app treats them as required companions to their primary files.

If you see a warning that a .meta file is missing its primary asset (or vice versa), commit both files together to resolve.

Step 3: Create a USourceControl project

  1. Sign up and create an organization.
  2. Click New project, give it a name, copy the project key.
  3. Download and install the desktop app.
  4. Paste the project key and point the app at your Unity project folder (the one containing Assets/ and ProjectSettings/).

The app detects Unity layout and pre-configures sensible exclusions.

Step 4: First commit

Review the detected file list. Every .meta file should be paired with its primary asset. Scenes and prefabs appear as text (if Force Text was set). Large binaries (FBX, textures, audio) are listed with their sizes.

Write a commit message and commit. The first commit uploads everything, which takes a while for larger projects. Subsequent commits only transfer changed files.

Step 5: Locking scenes and prefabs

Unity scenes and prefabs technically merge (they're text with Force Text enabled), but merges on complex scenes frequently corrupt references. The safer pattern for team workflows is locking.

In the desktop app:

  1. Find the .unity scene you're about to edit.
  2. Click Lock, optionally explain why ("adding UI flow for boss fight").
  3. Edit in Unity. Save.
  4. Commit in the app — the lock releases automatically.

Prefabs follow the same pattern. For small prefabs edited by one person, locking is optional; for large scenes with multiple editors, it's essential.

Step 6: Onboard teammates

From the dashboard, invite teammates by email. After signup, they:

  1. Install the desktop app.
  2. Accept the project invitation.
  3. Choose a local folder for their copy of the project.
  4. First sync downloads the full project. They open the .unity-containing folder as a Unity project and Unity rebuilds the Library/ cache automatically.
Set expectations: the first sync is a full download. Subsequent syncs are incremental and fast.

Troubleshooting

Missing references after sync.Usually a missing .meta file. Check the desktop app for warnings; make sure meta files are included in both your own commits and teammates'.

Scene merge conflicts.If you're not using locking, occasional merge conflicts happen. Switch to a locking workflow for scene files to prevent them.

Library/ folder got committed.If you committed before cleaning up, delete Library/ locally, sync, and add it to the project's exclusion list. On commit it will be removed from the repository.

Teammates' Unity version differs. Unity upgrades the project format on open. Pick a shared Unity version for the team and commit ProjectSettings/ProjectVersion.txt. Use Unity Hub to enforce the version per teammate.

Frequently asked

Does USourceControl work with Unity 6?

Yes. It works with every Unity version — it operates on files, not editor internals.

Should I commit the Library/ folder?

No. Library/ is Unity's imported-asset cache, rebuilt on first open. Committing it wastes storage and causes needless conflicts.

What about the Packages/ folder?

Commit it. Packages/manifest.json defines your package dependencies; ProjectSettings/ alongside it captures Unity's state. Both are required for reproducible builds.

How do I handle Unity's render pipeline assets?

Render pipeline assets (URP/HDRP) live in Assets/ or ProjectSettings/ and version like any other asset. No special handling required.

Can I use this alongside Unity Version Control?

Technically yes, but running two source control systems on one project is risky. Pick one. See /compare/plastic-scm if you're evaluating.

Set up your Unity project

Free for solo developers. 50 GB storage, full desktop app, no credit card.

Start for free