cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

[Spine] **供官方参考** 修复迄今为止我反馈的所有spine的 bug.

Open finscn opened this issue 8 months ago • 2 comments

Re: #

此 PR 并不奢望官方合并 , 只是提供参考. 从我开始用 cocos 3.x , 迄今为止, 反馈了大概 十几个 spine 的bug (有些 bug 的诱因可能是同样的).

经过最近一段时间通宵达旦的研究和学习, 我在自己的自定义引擎里, 尝试解决了目前我自己遇到的所有问题. 期间也合并了官方 一些关于的 spine PR (截止到 上周的 #18581)

最终整理出了这个 PR, 希望能帮助官方解决更多的 spine 的bug.

我的这些方案可能治标不治本 或者 会引出新的 bug.不敢保证百分百正确. 但是至少目前我们的项目运行还 ok .

注意 我们使用的是3.8, 4.2下没有测试, 而且没有使用 缓存模式. 所以 Cache相关的代码都没有改动过.所以我的这个 PR 可能在 4.2 或者 cache模式下有bug.


补充说明:

我们的项目是一个移植项目, 把一个原版用 c++自研引擎的游戏 用cocos 重写. 该项目重度依赖spine 3.8 , spine 动画数量700多个, 而且用法比较复杂, 各种融合、动态换肤、多track 同时播放、自定义播放顺序,自定义播放区间, 倒放, 变速播放 等等。 所以 我可能确实会遇到一些别人不太会遇到的 bug. 处于保密协议等原因, 有些 bug 我也很难提供重现 demo.

Changelog


Continuous Integration

This pull request:

  • [ ] needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • [ ] does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • [ ] changes public API, and have ensured backward compatibility with deprecated features.
  • [ ] affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • [ ] affects file structure of the build package or build configuration which requires user project upgrade.
  • [ ] introduces breaking changes, please list all changes, affected features and the scope of violation.

finscn avatar Apr 18 '25 09:04 finscn

@bofeng-song @dumganhar 请参考

finscn avatar Apr 18 '25 09:04 finscn

請問樓主有遇到 Cocos 3.8.7 + Spine 3.8.99 在手機 pro max 15 IOS 26.0.1 Chrome瀏覽器 和 Safari 瀏覽器上 Spine 頻繁 setAnimation 時 有機率導致 Spine消失 1秒後 才重新出現

我也有嘗試同步你的變更 也還是有 spine消失一下 的問題

我測試Iphone 6 IOS 15.6.1 老手機則"正常"沒有這問題

也不太清楚是不是最新 IOS 的問題導致的

jimmyy512 avatar Oct 14 '25 05:10 jimmyy512