Conversation
- 在 ModEntry 中初始化 UpdateChecker,确保在启动时检查更新 - 新增 UpdateInfoConfig 类以存储更新信息 - 实现 UpdateChecker 类,定期检查更新并处理更新信息 - 更新 UI 组件以显示更新状态和信息,包括更新指示器和检查按钮 - 增强多语言支持,添加更新相关的本地化文本
- 在 ModEntry 中初始化 GameVersionDisplayPatches,确保在启动时显示游戏版本 - 新增 GameVersionDisplayPatches 类,负责创建和更新游戏版本显示 - 更新 UpdateChecker 以传递最新版本信息,确保 UI 组件正确显示更新状态 - 修改 ConfigWindow 和 SettingsTab 中的版本信息显示格式,统一版本前缀
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive version update detection system for the Duckov Custom Model mod (v1.8.8). The implementation includes automatic periodic update checks, manual update triggers, and user-facing notifications across multiple UI locations. Additionally, the PR performs a significant migration from Unity's legacy UI Text components to TextMeshPro (TMP) throughout the entire UI framework.
Key Changes:
- New UpdateChecker manager with periodic checking, retry logic, and semantic version comparison
- Update notifications integrated into settings panel, config window, and game version display
- Complete UI framework migration from Unity UI Text to TextMeshPro for improved text rendering
- Localization support for update-related strings across 4 languages (Chinese, English, Japanese, Traditional Chinese)
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| UpdateChecker.cs | New manager implementing version checking with retry logic, periodic updates, and semantic version comparison |
| UpdateInfoConfig.cs | Configuration class for persisting update check results and metadata |
| GameVersionDisplayPatches.cs | Harmony patch to display update notifications in the game's version display |
| SettingsTab.cs | Added update check panel with manual trigger button and status display; migrated to TMP |
| ConfigWindow.cs | Added update indicators in title bar and settings button; migrated to TMP |
| UIFactory.cs | Core migration to TextMeshPro with conversion helpers for text alignment and font styles |
| TargetSettingsPanel.cs | Migrated input fields from InputField to TMP_InputField |
| TargetListPanel.cs | Migrated text components to TextMeshProUGUI |
| TabSystem.cs | Migrated tab text components to TextMeshProUGUI |
| SearchField.cs | Migrated search input to TMP_InputField |
| ModelListPanel.cs | Migrated text overflow and wrapping properties to TMP equivalents |
| LocalizedText.cs | Updated to work with TextMeshProUGUI instead of Text |
| LocalizedDropdown.cs | Updated to work with TMP_Dropdown |
| Localization.cs | Added 10 new localization keys for update functionality |
| Chinese.json | Added Chinese translations for update strings |
| English.json | Added English translations for update strings |
| Japanese.json | Added Japanese translations for update strings |
| ChineseTraditional.json | Added Traditional Chinese translations for update strings |
| ModEntry.cs | Integrated UpdateChecker initialization and event handling |
| Constant.cs | Version bump to 1.8.8 |
| CHANGELOG.md | Documented v1.8.8 changes in Chinese |
| CHANGELOG_EN.md | Documented v1.8.8 changes in English |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 在 GameVersionDisplayPatches 中简化版本信息显示逻辑,使用三元运算符提高代码简洁性 - 在 LocalizedText 中优化文本初始化逻辑,减少嵌套层级 - 在 ConfigWindow 和 TargetSettingsPanel 中合并重复的配置保存逻辑,提升代码复用性 - 在 SettingsTab 中重构更新时间信息刷新逻辑,使用早期返回减少代码复杂度
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
更新内容
变更文件