How to suppress a “SpriteKit Texture Atlas Generator Warning”?

不想你离开。 提交于 2019-12-11 03:15:52

问题


Xcode is reporting the following warning: "SpriteKit Texture Atlas Generator Warning Splitting 'images.atlas' into 2 texture atlases due to input texture dimensions." Although I will modified my images in the future to avoid SpriteKit from generating this warning, I would like to temporarily suppress this warning using some pragma directives. Does anyone know the warning flag to use to suppress this warning using code like the following?

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// my code
#pragma clang diagnostic pop

Or, can this specific warning be suppressed in the build settings?


回答1:


You won't be able to achieve this with pragmas. The texture atlas tool is a separate build step that doesn't involve the compiler.

You can either make the change to reduce your atlas size right now (good idea if you want to do that anyway, so why wait?) or ignore the warning. After all it's reminding you to do what you still need to do.




回答2:


Set "Enable Texture Atlas Generation" to Yes.

https://developer.apple.com/library/ios/recipes/xcode_help-texture_atlas/Art/EnableSetting_2x.png



来源:https://stackoverflow.com/questions/19638837/how-to-suppress-a-spritekit-texture-atlas-generator-warning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!