Skip to content

update 中连续调用 spine的 setAnimation() 切换动作,会导致报错或者死循环 #18495

@l1000965431

Description

@l1000965431

Cocos Creator version

3.8.6

System information

chrome

Issue description

update 中调用 spine的 setAnimation() 切换动作,会导致报错或者死循环。

调用方式:

protected update(dt: number): void {
    if (!this.isStart) {
        return
    }

    this.eSpine.setAnimation(0, "run", false);
    this.eSpine.setAnimation(0, "attack1", false);
    
    // if (this.eSpine.animation === "idle") {
        
    // }
}

Relevant error log output

报错截图:
Image

Steps to reproduce

demo:

SpineDemo.zip

Minimal reproduction project

No response

Metadata

Metadata

Assignees

Labels

BugP1Must be finished in the milestone

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions