Saltar al contenido
Multimedia 1 para anuncio GUID Warden — Unity Meta & GUID Integrity Guard

Descripción

Every reference in a Unity project resolves through the GUID in a .meta file. Lose a .meta in a merge, copy a folder with its metas, delete the wrong sidecar — and Unity repairs the damage silently: it mints a fresh GUID, and everything that pointed at the old one goes quietly None. You find out in QA, or on a teammate's machine.

GUID Warden is the guard Unity doesn't ship.

Repairs, with receipts

  • Restore a lost .meta from git history — the original GUID, and every reference to it, survives. This is the one repair Unity itself cannot perform.

  • Delete orphaned .meta files with a byte-exact backup and one-click restore.

  • Resolve duplicate GUIDs explicitly — you pick which claimant keeps the GUID after seeing every asset that references it. The loser is re-minted with a byte-verified edit, never silently.

Guards, always on

  • A background watcher re-scans after every import, off the main thread. Zero per-frame work.

  • A dependency-free POSIX-sh pre-commit hook that refuses commits which add an asset without its .meta, delete a .meta whose asset survives, or stage two .meta files with one GUID.

  • One-click install of the .gitattributes smart-merge rules and the UnityYAMLMerge driver — scenes and prefabs merge structurally instead of clobbering.

  • CI gate: one batch-mode call fails the build on integrity issues. A scan that examined zero files never passes.

Honest by construction

Every act reads its own write back and reports what was verified. Foreign hooks and attributes files are never touched. Refusals are no-ops, stated plainly.

Editor-only (nothing enters your builds), every script in a platform-constrained .asmdef, no Resources folder, all prefs namespaced. Unity 2022.3+ (gated on Unity 6). Full readable C# source with XML docs — MetaScanner, MetaRepair, CollisionResolver, GitHygiene and the CI entry point are public API you can script against.

Proof discipline: compiled warnings-as-errors clean on Unity 6000.5.7f1; 49/49 EditMode tests green, including integration tests against real temporary git repositories. Demo scene and a sandbox seeder included.

Getting Started

Installation. In Unity choose Assets > Import Package > Custom Package..., select GuidWarden.unitypackage and click Import with every item ticked. Everything lands under Assets/CSAF/GuidWarden/. There is no Resources/ folder, so nothing is added to your build.

How to launch it. Open the main window from either menu path:

1. Tools > CSAF > GUID Warden > Open Window

2. Window > CSAF > GUID Warden

The window opens on the scan view. Press "Scan project" to run an integrity pass over every asset under Assets/. Each finding is listed with its verdict and the exact action available for it, and nothing is written until you choose an action.

Try it without risking a real project.

1. Open the demo scene Assets/CSAF/GuidWarden/Demo/GuidWardenDemo.unity and press Play to read the in-scene guide.

2. Create safe, reversible sample problems: Tools > CSAF > GUID Warden > Create Sandbox Issues

3. Open the window and press "Scan project" - the sandbox issues appear as findings.

4. Repair them from the window, then clean up: Tools > CSAF > GUID Warden > Remove Sandbox

Usage in CI (headless). Unity.exe -batchmode -quit -projectPath <project> -executeMethod CSAF.GuidWarden.CI.GuidWardenCI.Run -guidWardenReport Temp/guid-warden-report.json — exit 0 is clean, non-zero fails the build before a broken reference reaches anyone.

Technical Information

Features:

- Restores lost .meta files from git history, so GUIDs and every reference to them survive

- Resolves duplicate-GUID collisions explicitly, with a byte-verified edit and a receipt

- Deletes orphaned .meta files with byte-exact backups taken outside Assets/

- Installs the git layer: .gitattributes, the UnityYAMLMerge driver, and a pre-commit hook that refuses reference-breaking commits

- Always-on background guard plus a batch-mode CI gate that fails a build on integrity issues

- Refuses any repair it cannot make safely, and says why, rather than guessing

Code Modules: CSAF.GuidWarden.Editor (Editor) and CSAF.GuidWarden.Demo (Runtime, demo only)

Number of .cs Scripts: 14

Supported Development Platforms: Windows

Supported Target Build Platforms: All - this is editor-only tooling and ships nothing into a build

Supported Unity Pipelines: Built-in, URP, HDRP and custom SRPs - no pipeline coupling; it references only UnityEditor and never touches rendering

Dependencies: None. No Asset Store package dependencies and no third-party libraries. Git is used only if it is already on your PATH, and every git-backed feature degrades cleanly and says so when it is not.

Documentation: https://github.com/onefreeman1337/csaf-releases/blob/main/docs/guid-warden/README.md - and Assets/CSAF/GuidWarden/Readme.md inside the package.

Example Project: Yes - a demo scene at Assets/CSAF/GuidWarden/Demo/GuidWardenDemo.unity, with a sandbox generator (Tools > CSAF > GUID Warden > Create Sandbox Issues) that produces safe, reversible sample problems to scan and repair.

Versioning: 1.0.0

Support: through this product page's support channel.

Minimum Unity version: Unity 6 (built and gated on 6000.5.7f1). Full C# source, raw and readable. Editor code sits in an Editor-platform-constrained .asmdef, so it never enters a player build.

Formatos incluidos