【问题标题】:SpriteKit not showing node countSpriteKit 不显示节点数
【发布时间】: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


【解决方案1】:

您可能已经发现,这是一个测试版问题并已得到修复。它适用于 Xcode 7 beta 5。draw 和 quad 计数也返回了! :)

【讨论】:

    猜你喜欢
    • 2018-01-13
    • 2013-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多