mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
fix SpriteAtlas serialize (#4993)
This commit is contained in:
@@ -112,16 +112,10 @@ export class SpriteAtlas extends Asset {
|
||||
for (const key of Object.keys(this.spriteFrames)) {
|
||||
const spriteFrame = this.spriteFrames[key];
|
||||
let id = spriteFrame ? spriteFrame._uuid : '';
|
||||
const strs = id.split('@');
|
||||
const uuid = strs[0];
|
||||
const name = strs[1];
|
||||
if (id && exporting) {
|
||||
id = Editor.Utils.UuidUtils.compressUuid(uuid, true);
|
||||
if (name) {
|
||||
id = id + `@${name}`;
|
||||
}
|
||||
id = Editor.Utils.UuidUtils.compressUuid(id, true);
|
||||
}
|
||||
frames.push(name);
|
||||
frames.push(key);
|
||||
frames.push(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user