【发布时间】:2015-08-11 20:29:14
【问题描述】:
在带有 SpriteKit 的 Xcode 中,在每个项目中,我都将 showNodeCount 设置为 true,但我只看到 fps。这太奇怪了。我无法弄清楚是什么导致了问题。
if let scene = GameScene(fileNamed:"GameScene") {
// Configure the view.
let skView = self.view as! SKView
skView.showsFPS = true
skView.showsNodeCount = true
/* Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = true
/* Set the scale mode to scale to fit the window */
scene.size = skView.bounds.size
skView.presentScene(scene)
}
也许是因为我使用的是 Xcode 7 beta 3? (即使是旧的测试版也有同样的问题)。
【问题讨论】:
-
仍处于测试阶段。节点计数、绘制计数等不显示。甚至一些与绘图相关的仪器调试工具也无法正常工作。我猜这可能与同时使用 OpenGL 和 Metal 的 Sprite Kit 有关? Apple 肯定意识到这一点,应该尽快修复。
-
@EpicByte 哦,谢谢您的回复。我快疯了哈哈:)
标签: swift sprite-kit