t1k:unity:editor:reskin-catalog
| Field | Value |
|---|---|
| Module | editor |
| Version | 3.50.7 |
| Effort | medium |
| Tools | — |
Keywords: art handoff, asset browser, asset catalog, export sprites, model renders, reskin catalog, screen sprites, sprite inventory, ui screenshots
How to invoke
Section titled “How to invoke”/t1k:unity:editor:reskin-catalog[ui|models|all] [-reskinLimit n]Reskin catalog (UI screens, sprites, models, web viewer)
Section titled “Reskin catalog (UI screens, sprites, models, web viewer)”Builds a browsable catalog for an art team reskinning a game. It holds a screenshot of every UI page and every tab on it, the exact sprites visible in each shot, renders of pets, eggs, trails, skins, weapons and the environment with their source FBX/PNG files, and a static web page that searches all of it and downloads any part as a zip.
Two passes, both batch runs without -nographics:
- PlayMode harness (
templates/PlayMode/ReskinCaptureTests.cs): boots the real game, opens each page through its presenter, switches every tab, seeds sample inventory, and shoots 1920x1080 frames with their visible-sprite lists intoLibrary/ReskinRuntime/runtime.json. - Edit-mode exporter (
templates/Editor/ReskinCatalog*.cs): renders the prefabs, models and environment, merges the runtime shots in, copies the source files, and writesdata.jsnext to the viewer inWeb~.
Decision Tree
Section titled “Decision Tree”| Intent | Path |
|---|---|
| First time in a project | Install then Adapt then Run |
| Pages look wrong (empty lists, wrong tab) | Pass 1 is missing or a tab needs a handler: references/adapt-points.md § Tabs |
| Only models or sprites changed | Re-run pass 2 alone; it reuses the last runtime.json |
| Quick smoke | Pass 2 with -reskinLimit 3 and -reskinOut <scratch dir> |
| Show the result | python -m http.server 8765 in the output folder, open http://localhost:8765/ |
Install
Section titled “Install”Copy templates/Editor/* to Assets/Editor/ReskinCatalog/ (keep Web~: the tilde stops Unity importing it) and
templates/PlayMode/ReskinCaptureTests.cs into a PlayMode test assembly that can reference the game’s runtime
assemblies. Rename the StealEgg namespaces and menu path to the project’s. Add the output folder (/ReskinCatalog/)
to .gitignore: it is hundreds of MB of generated files.
Every game-specific seam is listed with its StealEgg value in references/adapt-points.md: scene names, canvas
reference size, the Addressables UI group, page list, tab handlers, inventory seeding, factory configs per model
category, environment prop name patterns, and the save registry key. Read it before the first run.
Order matters: pass 1 first, pass 2 reads its output.
# Back up the editor save: pass 1 seeds inventory into it (Windows editor PlayerPrefs live in the registry).reg export "HKCU\Software\Unity\UnityEditor\<Company>\<Product>" "$SCRATCH/prefs.reg" /y
T1K_UNITY_RAW_LAUNCH_OK=1 "<Unity.exe>" -batchmode -projectPath <proj> -runTests -testPlatform PlayMode \ -testFilter <Namespace>.ReskinCaptureTests -logFile "$SCRATCH/pass1.log"
reg delete "HKCU\Software\Unity\UnityEditor\<Company>\<Product>" /freg import "$SCRATCH/prefs.reg"
T1K_UNITY_RAW_LAUNCH_OK=1 "<Unity.exe>" -batchmode -quit -projectPath <proj> \ -executeMethod <Namespace>.ReskinCatalog.Run [-reskinOut <dir>] [-reskinLimit n] -logFile "$SCRATCH/pass2.log"Success is the log line [Reskin] DONE out=… screens=… models=… sprites=… files=… failures=0. Each failed item logs
[Reskin] FAIL <what> and is counted, not fatal: grep for it before calling the run clean.
Hard rules
Section titled “Hard rules”- Never
-nographics. Both passes callCamera.Render; with no graphics device every PNG is black. Rendering is the stated reason for a non-headless run (unity-headless-by-default.md). No Editor may be open on the project. - Raw launches need
T1K_UNITY_RAW_LAUNCH_OK=1and a-logFile. Do not write the launch into a script file: the Unity guard hook blocks it. Keep the commands in the run log or the exporter’s doc comment. - Take the canvas scaler from the scene’s root UI instance, not the prefab. The StealEgg RootUI prefab said 1080x1920 while the scene instance is 1920x1080 match 1; reading the prefab shrank every page to 56%.
- Runtime output goes under
Library/, neverTemp/. Unity wipesTemp/on quit, before pass 2 can read it. - Back up and restore the save around pass 1. Seeding writes to the developer’s real editor save.
- Revert serialization churn after each run. Batch imports re-serialize some
.assetmeshes (float format only).git statusafter the run;git checkout --only the files the run changed, never files that were dirty before. - A blank tab is evidence, not a capture bug to hide. StealEgg’s Shop Skin tab stayed at alpha 0 (nested
BaseViewnever shown) and its Chest tab was never built. The harness reveals or builds them so the art is visible, and labels the shot (built from catalog: the game never builds it). Report such cases to the user as game bugs. - Read every model category from the live factory configs, not a folder glob. Folders hold legacy and
_0duplicate prefabs; the glob gave 191 pets where the game ships 111. - Frame models on mesh bounds without effects. Particle, trail and line renderers and far-off outliers made pets
render as dots.
TryBoundsdrops them unless nothing else exists. - Verify with eyes before handing over: contact-sheet the shots, run the vision role on a sample, and load the
viewer over http (zip needs http;
file://only browses).
Output
Section titled “Output”<out>/index.html, app.js, style.css, data.js (window.CATALOG), shots/ (screens, runtime,
models, environment), sprites/ (cropped PNGs), files/ (original sources, paths minus Assets/).
Executed by
Section titled “Executed by”Runs inline in the session that owns the Unity project (pass 1 and 2 need the one free Editor seat and
the save backup). Code adaptation to a new game is t1k-unity-base-developer; reviewing the rendered shots for
layout faults is t1k-unity-base-visual-director.
Related
Section titled “Related”t1k:unity:editor:headless-capture (gameplay video and frames, Linux/Xvfb) · t1k:unity:editor:cli ·
placeholder-first-handoff.md (ordering the reskinned assets back)