Articles, Code and Video Tutorials for ARKit, Sprite Kit & SceneKit

How to Find All Anchored Nodes in an ARSKView

Using ARKit and SpriteKit

At times you might want to search through every SKNode, SKSpriteNode or subclassed node in your SpriteKit / ARKit scene. You can do this using the usual ways of enumerating through all children. For example…

But if you’re only interested in SKNode thats are attached to anchors, we have this option…

And you can take this a step further by writing a function that can count how many of a particular subclass of SKNode or SKSpriteNode are anchored….

So using that function you could do something like this…