cocos-engine
cocos-engine copied to clipboard
[3.7.2]"Tween" does not work properly in some cases
Cocos Creator version
3.7.2
System information
Windows10 Chrome
Issue description
"Tween" does not work properly in some cases.
Relevant error log output
[Action update]. override me
Steps to reproduce
import { _decorator, Component, tween, log } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('Test')
export class Test extends Component {
start() {
tween(this)
.call(() => { log('********** 0') })
.repeatForever(
tween(this)
.delay(1)
.call(() => { log('********** 1') })
)
.start();
}
}
Using Tween like this in any component will appear.
If remove the ".call(() => { log('********** 0') })
" line of code, it will work normally.
import { _decorator, Component, tween, log } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('Test')
export class Test extends Component {
start() {
tween(this)
.repeatForever(
tween(this)
.delay(1)
.call(() => { log('********** 1') })
)
.start();
}
}
Minimal reproduction project
No response
tween(this)
.delay(1)
.call(() => { log('********** 1') })
.repeatForever()
.start();
tween(this)
.repeatForever(
tween()
.delay(1)
.call(() => { log('********** 1') })
)
.start();
Doesn't work even when used like this.
tween(this)
.delay(1)
.call(() => { log('********** 1') })
.union()
.repeatForever()
.start();
Using like this works as expected.
Are those usages wrong? But I don't see anything special about "repeatForever" in the docs.
It was fixed at https://github.com/cocos/cocos-engine/pull/17088