Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce52cfba5c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Assert.IsTrue(false, | ||
| $"[{nameof(FloatingTextAnimator)}] {GetType().Name} is using managed fallback in {nameof(ScheduleEvaluateBatch)}(). " + | ||
| "Override ScheduleEvaluateBatch() and provide a Burst-compatible job for production use."); |
There was a problem hiding this comment.
Gate fallback assertion to avoid per-frame assertion storms
The new fallback path asserts unconditionally on every ScheduleEvaluateBatch call in UNITY_ASSERTIONS builds, so any custom animator that doesn’t override this method now triggers repeated assertion failures every frame; in Editor configurations where assertions raise exceptions this can also abort the fallback execution and prevent animation output for that frame. This contradicts the intended "warn once" behavior and makes development runs noisy/unusable until fixed, so the assert should be emitted once (or downgraded) instead of firing on every update.
Useful? React with 👍 / 👎.
PR 평가: 7/10 ✅타당한 이유
참고 사항
|
Motivation
FloatingTextAnimator가 메인스레드에서 느린 managed 루프에 빠지는 것을 방지하고, 배치(Burst) 경로 미구현을 런타임에 빠르게 감지하기 위해 변경했습니다.UNITY_ASSERTIONS환경에서는 assert로 구현 누락을 즉시 발견하도록 합니다.Description
Packages/.../Runtime/FloatingTextAnimator.cs: 기본 구현의ScheduleEvaluateBatch에UNITY_ASSERTIONS기반 런타임 assert를 추가해 미구현 시 실패를 노출하고,DEVELOPMENT_BUILD || UNITY_EDITOR조건으로 관리되는 한 번만 출력되는 경고 로그(Debug.LogWarning)를 추가했습니다.Packages/.../Runtime/FloatingTextManager.cs:_animator.ScheduleEvaluateBatch(...)호출 직전Assert.IsNotNull(_animator)를 추가하고 호출 의도를 설명하는 주석을 보강했습니다.Packages/.../Runtime/DefaultFloatingTextAnimator.cs: 기본 구현이 배치 경로(예:IJobParallelFor/ Burst) 패턴임을 명시하는 주석을 추가했습니다.README.md: 커스텀 animator 작성 규칙 섹션을 추가해Evaluate(...)/ScheduleEvaluateBatch(...)역할,ScheduleEvaluateBatch의 필수성(Burst job 제공) 및 fallback 동작(경고/assert 정책)을 문서화했습니다.Testing
git diff --check를 실행했으며 에러 없음(성공).rg -n "ScheduleEvaluateBatch|Evaluate\(|_animator.ScheduleEvaluateBatch|UNITY_ASSERTIONS"로 관련 위치를 확인했고 의도한 파일들(FloatingTextAnimator.cs,FloatingTextManager.cs,DefaultFloatingTextAnimator.cs,README.md)이 수정된 것을 확인했습니다 (성공).Codex Task