We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.8.4
android
后面附有可重现此问题的demo.
其核心代码 如下:
import { _decorator, Component, sp } from 'cc'; const { ccclass, property } = _decorator; @ccclass export class TestSpine extends Component { @property(sp.Skeleton) spine: sp.Skeleton progress: number = 0 speed: number = 0.5 start() { this.spine.clearAnimations(); this.spine.setToSetupPose(); this.spine.paused = false; this.updateSpineProgress(this.spine, 'Rotate', this.progress) } update(deltaTime: number) { this.progress += this.speed * deltaTime this.updateSpineProgress(this.spine, 'Rotate', this.progress) } updateSpineProgress(spine: sp.Skeleton, animName: string, progress: number, trackIndex: number = 0): void { progress = progress % 1; const trackEntry = spine.setAnimation(trackIndex, animName, false); const animation = trackEntry.animation; const duration = animation.duration; const time = duration * progress; trackEntry.animationStart = time; trackEntry.animationEnd = time; trackEntry.timeScale = 0; } }
代码意图: 不让动画自己播放, 而是程序控制它的播放进度.
该代码在 web 和 微信小游戏 抖音小游戏 中都正常运行 符合预期. 但是在 安卓原生平台, 代码无效, 也不报错.
demo 如下 native-spine-bug.zip
另外想咨询下, 有什么更好的方式 通过代码控制 spine的播放进度吗?
.
No response
如上
The text was updated successfully, but these errors were encountered:
好像把 timeScale = 0 去掉 原生和非原生就都能播放了. 但是 timeScale = 0 时, 原生和非原生 的行为不一致, 这种也算是bug吧. 到底哪边对 我也不知道了...
Sorry, something went wrong.
bofeng-song
No branches or pull requests
Cocos Creator version
3.8.4
System information
android
Issue description
后面附有可重现此问题的demo.
其核心代码 如下:
代码意图: 不让动画自己播放, 而是程序控制它的播放进度.
该代码在 web 和 微信小游戏 抖音小游戏 中都正常运行 符合预期.
但是在 安卓原生平台, 代码无效, 也不报错.
demo 如下
native-spine-bug.zip
另外想咨询下, 有什么更好的方式 通过代码控制 spine的播放进度吗?
.
Relevant error log output
No response
Steps to reproduce
如上
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: