How to load hd textures using addSpriteFramesWithFile()

How to load hd textures using addSpriteFramesWithFile()
0.0 0


Is possible to load hd textures using sprite sheets?
I am trying to find some solution for that but I am unsuccessful so far. Can I use hd suffix when I am loading sprite sheet plist with retina enabled takes buttons-hd.plist which will containshd version of textures)?

Thanks for help.



It is so in theory.

If the plist file doesn’t specify “textureFileName” value. Then it will find the png file with the same name of plist.

For example, the parameter of addSpriteFramesWithFile() is “XXX.plist”.
If you enabled retina, the plist named “XXX-hd.plst” will be loaded. And it will load the png file which named “XXX-hd.png”.

By the way, the retina is only used on ios. On the other platforms, it’s all the same with retina enabled or not.



So I will have two sets of sheets and textures. One set will be for all devices and ios with the low resolution. The second one will be only for ios with retina and will has hd suffix. Then when I enable retina, automaticallyhd versions of the sheets will be loaded on iphone with retina…? Is that true?



If you encounter problems, welcome your feedback!