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

  1. No editor-only behaviour in runtime code. This pipeline runs at runtime on shipped builds; no #if UNITY_EDITOR blocks in PrefabThumbnailRenderer.cs or its helpers.
  2. 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".
  3. The demo is the test suite. API changes must keep Assets/Demo/Scenes/PrefabThumbnailDemo.unity working end-to-end (category-tab switch → tile lazy-renders → spinner fades → animated tile flips frames). PRs that break the demo get bounced.
  4. No using LeapOfLegends.*. Decoupled from the game by design. Runtime code lives under PrefabThumbnails (renderer + tile) and PrefabThumbnailDemo (demo project).

Areas

GoalFile
Tweak the rendering loopAssets/PrefabThumbnails/Runtime/PrefabThumbnailRenderer.cs
Add a request field or callbackAssets/PrefabThumbnails/Runtime/ThumbnailRequest.cs
Add a new animation modeAssets/PrefabThumbnails/Runtime/PrefabThumbnailRenderer.cs (ApplyFrameState + ThumbnailAnimationMode enum)
Add a new post-processAssets/PrefabThumbnails/Runtime/ThumbnailPostProcess.cs
Tweak the lazy-load tileAssets/PrefabThumbnails/Runtime/ThumbnailTile.cs
Update the demo's catalogAssets/Demo/Runtime/DemoCatalog.cs
Update the demo's UIAssets/Demo/Runtime/DemoUI.cs + Assets/Demo/Resources/UI/DemoUI.{uxml,uss}
Update demo build pipelineTools/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:

  1. Reproduce in the demo. Attach a prefab + screenshot, ideally with the renderer in the same mode (Static / YawRotation / AnimatorClip) you're using.
  2. Include Unity version, render pipeline (URP / HDRP / Built-in), and platform.
  3. 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.