How do I convert a PNG with alpha to RGBA4444 for using it in SpriteKit SKTexture?

[亡魂溺海] 提交于 2019-12-06 06:06:56
Luca Angeletti

I just tried and in Xcode 8 the option Output Texture Atlas described here is no longer available into Build Settings.

I suspect (but I could be wrong) the control has been now moved inside Compression as you can see in the following image.

I circumvented this by using TexturePacker to generate a texture atlas (.atlasc) file. With TexturePacker you can set adjust the compression and then access the texture atlas in your project as follows:

let atlas = SKTextureAtlas(named: "Atlas") // Atlas.atlasc in your project
let texture = atlas.textureNamed("original_texture_001.png")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!