How to access Atlas property of Sprite listed in Editor

How to access Atlas property of Sprite listed in Editor
0

Hello. I can not find out how to access Atlas property which is listed in Editor for Sprite component.
fire*%202019-09-01%2014-42-13

I know how to load atlas using cc.loader.loadRes, but it looks i should not load is twice if it already was loaded.

Thank you in advance.

i don’t think it’s possible (or maybe there’s some hidden API?). the only thing you can do is access the spriteFrame and set it:

this.getComponent(cc.Sprite).spriteFrame = someOtherSpriteFrame;

maybe it would be possible to cc.SpriteFrame.getTexture() and compare Texture2D#name or url to existing ones to somehow reverse lookup.