Skip to content

Нормализация порога у автоматически созданной LODGroup для корректной генерации LOD'ов - #179

Closed
SashaRX wants to merge 1 commit into
mainfrom
codex/fix-lod-transition-heights-in-lodgenerationtool
Closed

Нормализация порога у автоматически созданной LODGroup для корректной генерации LOD'ов#179
SashaRX wants to merge 1 commit into
mainfrom
codex/fix-lod-transition-heights-in-lodgenerationtool

Conversation

@SashaRX

@SashaRX SashaRX commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Исправить регрессию: автоматическое создание LODGroup ставит единственный LOD с порогом 0.01, из которого последующая генерация вычитает новые пороги (0.005, 0.0025…), что делает сгенерированные LOD'ы практически неактивными и ломает ожидаемый рабочий поток.

Description

  • Добавлена утилитарная функция NormalizeSingleLodTransitionForGeneration(List<LOD> lods, int startLod) в Editor/Tools/LodGenerationTool.cs, которая при добавлении LOD1 проверяет случай автоматически созданной single-LOD группы с порогом 0.01 и восстанавливает её до 0.5.
  • Вызов нормализации вставлен перед формированием новых слотов и в LightmapTransferTool.GenerateLods для покрытия альтернативного пути генерации, чтобы оба инструмента использовали одинаковую логику.
  • Добавлены EditMode-юнит-тесты Tests/Editor/LodGenerationToolTests.cs с тремя сценариями: восстановление порога для авто‑группы, сохранение существующего порога и отсутствие нормализации при добавлении LOD не после LOD0.

Testing

  • Выполнены статические проверки: git diff --check и проверка .meta-sidecar для тестов — ошибок не обнаружено.
  • Выполнены локальные статические ассёрты через python3 для подтверждения вставки вызова нормализации и ожидаемой логики вычислений — прошли успешно.
  • Новые NUnit EditMode-тесты добавлены в Tests/Editor/LodGenerationToolTests.cs, однако контейнер не содержит Unity, поэтому их запуск невозможен в этой среде (тесты нужно прогнать в Unity EditMode на CI или локальной машине).

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: 45 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: 8d7a3431-bdaa-4094-aeb4-499beaa0ea4a

📥 Commits

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

📒 Files selected for processing (4)
  • Editor/Tools/LightmapTransferTool.cs
  • Editor/Tools/LodGenerationTool.cs
  • Tests/Editor/LodGenerationToolTests.cs
  • Tests/Editor/LodGenerationToolTests.cs.meta

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 коммитом 9d11d56. Адаптация: hunk мёртвого GenerateLods() в LightmapTransferTool отброшен, тесты слиты в общий LodGenerationToolTests.cs. Закрыт как superseded.


Generated by Claude Code

@SashaRX SashaRX closed this Aug 6, 2026
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