Dynamic atlas bug when use PersistRootNode Cocos 3.0

Hi, I have problem with dynamic atlas in cocos 3.0.0 and 3.0.1 also. If I use PersistRootNode and keep some UI use on different scene ( like popup, dialog …) It will display wrong or not show texture when change scene. Is it a bug? Any solution to make it work right? Thank you

1 Like

hi,temporarily avoid it by checking CLEANUP_IMAGE_CACHE.
the setting method is as follows:
image

1 Like

Just find the problem, the sprite renderData doesn’t clean when the Atlas change. So I try refresh all sprite renderData UV to make it update again. Hope this problem fix on next version.

@mrcapu86 Yup! i also found this error last few days ago. Now it’s clear thanks man for showing me right path. :slightly_smiling_face: :slightly_smiling_face:

This will be fixed in version 3.1
For the time being, you can also avoid this situation by modifying the engine source code.
Modify the file: \resources\resources\3d\engine\cocos\2d\components\sprite.ts
Add code in the onEnable method:

this._markForUpdateUvDirty();

remember to compile the engine after modification.As shown:
image

1 Like