Skip to content
New issue

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

SHARED_CACHE模式的spine释放资源后再次赋值资源会报错 #17984

Open
wangning618 opened this issue Nov 28, 2024 · 0 comments
Open
Assignees
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@wangning618
Copy link

Cocos Creator version

3.8.4

System information

Windows 11 专业版

Issue description

微信图片_20241128151144
当sp.Skeleton组件的AnimationCacheMode==SHARED_CACHE时候,先执行skeleton.skeletonData=null,然后再赋值回来skeleton.skeletonData=res_test,此时由于if (this.isAnimationCached())判断不成立,会导致this._skeleton没有赋值,下一次执行skeleton.setAnimation()就会报错.
微信图片_20241128151501

我自己的临时解决办法如图注释的代码:if (this.isAnimationCached())不成立也赋值回去...

Relevant error log output

No response

Steps to reproduce

微信图片_20241128151144

Minimal reproduction project

No response

@wangning618 wangning618 added Bug Needs Triage Needs to be assigned by the team labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants