Contributing
July 12, 2026 · View on GitHub
Thanks for considering a contribution. This project is small (~700 lines C# runtime) and intentionally so — every line earns its keep against the demo, against the live game, or against a documented Unity quirk.
Ground rules
- No editor-only behaviour in runtime code. This pipeline runs at runtime on shipped builds; no
#if UNITY_EDITORblocks inPrefabThumbnailRenderer.csor its helpers. - Comments answer "why", not "what". A reader can see
cam.depth = -20. The comment should explain why -20 — "render BEFORE main scene cameras so the pipeline doesn't pick up post-FX from the live game". - The demo is the test suite. API changes must keep
Assets/Demo/Scenes/PrefabThumbnailDemo.unityworking end-to-end (category-tab switch → tile lazy-renders → spinner fades → animated tile flips frames). PRs that break the demo get bounced. - No
using LeapOfLegends.*. Decoupled from the game by design. Runtime code lives underPrefabThumbnails(renderer + tile) andPrefabThumbnailDemo(demo project).
Areas
| Goal | File |
|---|---|
| Tweak the rendering loop | Assets/PrefabThumbnails/Runtime/PrefabThumbnailRenderer.cs |
| Add a request field or callback | Assets/PrefabThumbnails/Runtime/ThumbnailRequest.cs |
| Add a new animation mode | Assets/PrefabThumbnails/Runtime/PrefabThumbnailRenderer.cs (ApplyFrameState + ThumbnailAnimationMode enum) |
| Add a new post-process | Assets/PrefabThumbnails/Runtime/ThumbnailPostProcess.cs |
| Tweak the lazy-load tile | Assets/PrefabThumbnails/Runtime/ThumbnailTile.cs |
| Update the demo's catalog | Assets/Demo/Runtime/DemoCatalog.cs |
| Update the demo's UI | Assets/Demo/Runtime/DemoUI.cs + Assets/Demo/Resources/UI/DemoUI.{uxml,uss} |
| Update demo build pipeline | Tools/Build/Build-Demo.ps1 + Tools/.orchestrator submodule |
Working locally
git clone --recurse-submodules https://github.com/sinanata/unity-prefab-thumbnail-renderer
cd unity-prefab-thumbnail-renderer
# Windows: cmd /c mklink /J Assets\DesignSystem Vendor\unity-ui-toolkit-design-system\Assets\DesignSystem
# macOS / Linux: ln -s ../Vendor/unity-ui-toolkit-design-system/Assets/DesignSystem Assets/DesignSystem
Open in Unity 6000.3.8f1 and press Play in Assets/Demo/Scenes/PrefabThumbnailDemo.unity.
PR checklist
- Demo scene still works end-to-end (open
PrefabThumbnailDemo.unity, hit Play, tiles fill in with spinners then frames). - All three modes still render correctly (Characters animate, Ships spin, Props are still).
- Mobile reflow still works (set Game view to 360×640 — title / promo / tabs / panel stack in a single column).
- No new
using LeapOfLegends.*or other product-specific imports. - Comments answer why, not what.
- CHANGELOG.md updated under Unreleased.
- README updated if the public API or behaviour changed.
Reporting bugs
If thumbnails look wrong:
- Reproduce in the demo. Attach a prefab + screenshot, ideally with the renderer in the same mode (Static / YawRotation / AnimatorClip) you're using.
- Include Unity version, render pipeline (URP / HDRP / Built-in), and platform.
- Attach the readback output.
Application.persistentDataPath-saved PNG of the RT after a render — that pinpoints whether the bug is in the render (broken texture) or the post-process (broken pixels).
Licence
MIT. Contributions released under the same.