Sample Laboratory Walkthrough
Hands-on walkthrough of the bundled update laboratory: Room v1, Valid v2, and Broken v2.
Table of Contents
- Laboratory Overview
- Step 1: Generating Lab Releases
- Step 2: Compiling the Test Binary
- Step 3: Running the Valid Candidate Rehearsal
- Step 4: Running the Broken Candidate Rehearsal
Laboratory Overview
The Sample Update Laboratory (Tools > PatchProof > Local Update Lab) demonstrates how PatchProof catches subtle update regressions before they hit players.
The lab defines three release snapshots:
- v1.0.0 (Baseline): Ships
SampleRoom_v1with basic wooden textures and aSampleRoomEntitycomponent tracking room lighting and volume. - v2.0.0 (Valid Candidate): Updates
SampleRoomwith neon cyber textures, high-resolution models, and additional sound effects while preserving all C# component bindings. - v2.0.0 (Broken Candidate): Deliberately seeds common real-world shipping errors:
- Key
"Prefabs/SampleRoom"has been altered to point to a deleted script. - Key
"Audio/AmbientLoop"was deleted without being declared inpermittedRemovals. - Shader variant stripping removed a required variant on the floor material.
- Key
Step 1: Generating Lab Releases
- In Unity, open
Tools > PatchProof > Local Update Lab. - Click the primary button: “Generate Sample Content & Releases”.
- PatchProof automatically:
- Configures Addressables group settings for the sample assets.
- Compiles the Addressables bundles for
v1.0.0. - Copies and modifies the assets to build
v2.0.0. - Registers both manifests into the Release Registry.
- Creates the
SampleLab_ContractContent Contract.
Step 2: Compiling the Test Binary
- In the Local Update Lab window, navigate to the Binary Builder tab.
- Ensure Target Platform is set to Windows Standalone (x86_64).
- Click “Build Instrumented Windows Binary”.
- Unity builds the executable to
Builds/PatchProof_SampleClient.exe. The build automatically embedsPatchProofProbein the initial scene.
Step 3: Running the Valid Candidate Rehearsal
- Open
Tools > PatchProof > Rehearsal Room. - Select Baseline Release:
SampleLab_v1.0.0. - Select Candidate Release:
SampleLab_v2.0.0_Valid. - Select Contract:
SampleLab_Contract. - Click “Run Rehearsal Matrix”.
- Result: All 7 tiles complete with status PASSED (Green).
Step 4: Running the Broken Candidate Rehearsal
Now, observe what happens when a release contains breaking bugs:
- In the Rehearsal Room, change Candidate Release to
SampleLab_v2.0.0_Broken. - Click “Run Rehearsal Matrix”.
- Result:
- Tile 1 (Fresh Cache): FAILED (
ContractViolation). Diagnostic reason: “Required key ‘Audio/AmbientLoop’ was not found in candidate catalog.” - Tile 2 (Warm Old Cache): FAILED (
MissingScriptComponent). Diagnostic reason: “Prefab ‘SampleRoom_v2_Broken’ has a missing MonoBehaviour component on child ‘LightRig’.”
- Tile 1 (Fresh Cache): FAILED (
Investigating with Repro-Pack
- Select the failed Tile 2.
- Click “Export Repro-Pack”.
- Unzip the resulting archive and open
client_log.txtto see the exact Unity stack trace caught by the probe!
Pro Tip: Clean Reset
Want to reset the laboratory to its pristine initial state? Click “Purge Lab Content & Temp Builds” in the Local Lab window. PatchProof deletes only sample-related assets, leaving your project untouched.