Conversation
- 新增 `ModelSoundStopTrigger` 组件,支持在动画状态机中停止音效播放 - 支持通过指定事件名称停止音效或停止所有正在播放的音效 - 提供 Unity 编辑器自定义界面,包含条件显示和警告提示 - 更新文档以反映新功能和使用说明 - 更新版本号至 v1.8.9
There was a problem hiding this comment.
Pull request overview
This PR adds a new ModelSoundStopTrigger component to provide sound stopping capabilities in animation state machines, complementing the existing ModelSoundTrigger component. The implementation refactors the event naming system to consistently use the CustomModelSoundTrigger:{eventName} format for custom triggers while allowing built-in event names (like idle) to be used directly.
Key Changes
- New
ModelSoundStopTriggercomponent with flexible stopping options (all sounds vs. specific events, built-in vs. custom event names, enter vs. exit timing) - Refactored event name handling in
ModelSoundTriggerto explicitly construct the prefixed format - Integrated the new trigger into
ModelHandlerwith proper event subscription/unsubscription
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| DuckovCustomModel.Core/MonoBehaviours/Animators/ModelSoundStopTrigger.cs | New component implementing sound stop functionality with support for multiple stop modes and event name formats |
| DuckovCustomModel.Core/MonoBehaviours/Animators/ModelSoundTrigger.cs | Refactored event name construction to explicitly build the CustomModelSoundTrigger:{eventName} format |
| DuckovCustomModel/MonoBehaviours/ModelHandler.cs | Added event subscription/unsubscription and handler for the new stop trigger |
| DuckovCustomModel/Constant.cs | Version bump to 1.8.9 |
| README.md, README_EN.md | Documentation for the new component with usage examples and notes |
| CHANGELOG.md, CHANGELOG_EN.md | Release notes for v1.8.9 describing the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
功能说明
相关文件
版本更新