Skip to content

Restore Apply UV2 for source-only repacks - #170

Closed
SashaRX wants to merge 1 commit into
mainfrom
codex/propose-fix-for-apply-uv2-issue
Closed

Restore Apply UV2 for source-only repacks#170
SashaRX wants to merge 1 commit into
mainfrom
codex/propose-fix-for-apply-uv2-issue

Conversation

@SashaRX

@SashaRX SashaRX commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Исправить регрессию, при которой source-only прогон (только repack без target LOD) оставлял ctx.HasRepack = true и ctx.HasTransfer = false, из‑за чего UI скрывал кнопку применения результата UV2.

Description

  • Добавлена утилитарная проверка CanApplyUv2(bool hasRepack, bool hasTransfer) и логика показа кнопок Apply/Reset, которая теперь рендерит их при hasRepack || hasTransfer вместо зависимости только от ctx.HasTransfer.
  • Изменён LightmapTransferTool UI: Apply UV2 и сопутствующие действия доступны после source-only repack без включённых target LODs, при этом отчёты качества и Validation Overlay остаются видимыми только по завершённому transfer.
  • Добавлен EditMode-регрессионный тест ApplyUv2_IsAvailable_AfterSourceOnlyRepack в Tests/Editor/XatlasRepackGroupMergeTests.cs, покрывающий комбинации состояния HasRepack/HasTransfer.
  • Обновлена документация Documentation~/EXPERIMENTS.md с описанием проблемы и внесённых изменений.

Testing

  • Запущены статические/локальные проверки: git diff --check прошёл успешно and package.json успешно распарсен через python3 (проверка JSON), и проверка наличия Unity .meta‑файлов прошла успешно.
  • Добавлен тест ApplyUv2_IsAvailable_AfterSourceOnlyRepack (EditMode) в тестовый набор, однако фактический запуск EditMode NUnit тестов не выполнялся потому что Unity Editor отсутствует в контейнере; тест компилируется и расположен в Tests/Editor/.
  • Коммит с изменениями: Expose Apply UV2 after source-only repack (файлы: Editor/Tools/LightmapTransferTool.cs, Tests/Editor/XatlasRepackGroupMergeTests.cs, Documentation~/EXPERIMENTS.md).

Codex Task

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6b526ef9-6a8a-4a6f-b60b-9df1e4bfd439

📥 Commits

Reviewing files that changed from the base of the PR and between 21d382e and 80cefc1.

📒 Files selected for processing (3)
  • Documentation~/EXPERIMENTS.md
  • Editor/Tools/LightmapTransferTool.cs
  • Tests/Editor/XatlasRepackGroupMergeTests.cs

Comment @coderabbitai help to get the list of available commands.

SashaRX commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Фикс вошёл в консолидированную ветку claude/security-pr-analysis-fmpzf0 коммитом fbd797d. Закрыт как superseded.


Generated by Claude Code

@SashaRX SashaRX closed this Aug 6, 2026
SashaRX pushed a commit that referenced this pull request Aug 6, 2026
…es (PR #191 review)

ExecRepackCoreImpl set ctx.HasRepack = true after the result loop regardless
of outcome, and left each entry's previous repackedMesh in place when the new
run failed. Since #170 the Apply UV2 section is drawn purely off that flag, so
after a failed or cancelled repack the user could apply a stale result — or,
with no prior repack, the original UV2 (GetResultMesh falls back to
originalMesh).

Now each run clears its entries' repack output up front (destroying the old
mesh, which the success path used to overwrite and leak), and HasRepack is
derived from whether any entry currently holds a repacked mesh. Deriving it
rather than assigning false keeps per-mesh grouping correct: that path calls
this method once per group, and a later failing group must not erase an
earlier group's success.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0195YC4HWo1rQqEdFBb8p8jE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant