Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27d32681be
ℹ️ 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".
| if (_clip != null) | ||
| _frameRate = Mathf.Max(1, Mathf.RoundToInt(_clip.frameRate)); |
There was a problem hiding this comment.
Keep event frames on the runtime 30fps scale
When a loaded clip has a frame rate other than 30, this default changes the editor's frame numbers into the clip's FPS domain, but the runtime still converts Event.frame as 30fps in AnimationManager.Initialize (3333333 * animEvent.frame / 100000000). For example, adding a Fire event at 0.5s on a 60fps clip writes frame 30, which the runtime treats as 1.0s, so generated/updated AnimationData fires events at the wrong times unless the user manually notices and resets the FPS to 30.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Added a
RuntimeEventFrameRateconstant and initialized event-frame editing to the runtime 30fps scale used byAnimationManager, preventing clip sample rates like 60fps from changing exported event timing. - Changed the FPS control to a read-only “Runtime Event FPS” field with a tooltip explaining that event frames remain on the 30fps runtime scale regardless of the clip sample rate.
- Updated clip resets to restore the runtime 30fps scale instead of copying
AnimationClip.frameRate.
Testing
- ✅
git diff --check ⚠️ command -v Unity || command -v unity-editor || command -v dotnet || true(no local Unity/.NET CLI available in the environment for a compile run)
Committed the change with 20fa7b5 and created the follow-up PR: Fix animation event editor runtime FPS scale.
There was a problem hiding this comment.
@codex Merge the changes from the github-mention-dev-4.0 branch into the current branch
There was a problem hiding this comment.
Summary
- No new code changes were made because the current branch is already at merge commit
88ccac8, which includes the follow-up animation event FPS fix fromgithub-mention-dev-4.0. - Verified the target file already contains the runtime 30 FPS event-frame behavior:
RuntimeEventFrameRateis defined as30,_frameRateinitializes from it, the UI shows a disabled “Runtime Event FPS” field, and clip resets restore the runtime event frame rate. Assets/Editor/AnimationDataEventEditorWindow.csL14-L20 Assets/Editor/AnimationDataEventEditorWindow.csL181-L184 Assets/Editor/AnimationDataEventEditorWindow.csL475-L481 - No commit or PR was created because there were no file changes to commit.
Testing / Checks
- ✅
git diff --check - ✅
git status --short ⚠️ git merge github-mention-dev-4.0— the named branch ref is not present locally, but the current branch already contains the merge commit for that follow-up branch.⚠️ git merge codex/github-mention-dev-4.0 || true— also unavailable as a local ref; no working-tree changes resulted.
Fix animation event editor runtime FPS scale
1.删除不必要的文件
2.增加动画数据编辑器
3.增加启动服务器快速按钮