问题
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