How to enumerate ALL nodes in a Sprite Kit scene?

前端 未结 1 930
伪装坚强ぢ
伪装坚强ぢ 2020-12-03 08:48

I want to enumerate all the nodes in my scene. Not just the ones that are a child of the scene itself, but also the children of those, and the children of those etc... So I

相关标签:
1条回答
  • 2020-12-03 09:29

    Yep, use enumerateChildNodesWithName:usingBlock: and pass //* as the node name. You should be able to call that on any node.

    It's actually one of the examples in Apple's docs:

    //* This search string matches every node in the node tree.

    0 讨论(0)
提交回复
热议问题