如何抑制“SpriteKit 纹理图集生成器警告"? [英] How to suppress a "SpriteKit Texture Atlas Generator Warning"?

查看:38
本文介绍了如何抑制“SpriteKit 纹理图集生成器警告"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 报告以下警告:SpriteKit 纹理图集生成器警告由于输入纹理尺寸,将 'images.atlas' 拆分为 2 个纹理图集."尽管我将来会修改我的图像以避免 SpriteKit 生成此警告,但我想使用一些 pragma 指令暂时抑制此警告.有谁知道用于使用如下代码抑制此警告的警告标志?

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?

推荐答案

您将无法使用编译指示来实现这一点.纹理图集工具是一个单独的构建步骤,不涉及编译器.

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.

这篇关于如何抑制“SpriteKit 纹理图集生成器警告"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆