Search code examples
iosobjective-csprite-kitskscene

Skscene within skscene


Is it possible to properly present a small scene within the standard, full-screen scene we get when working with SpriteKit? Since an SKScene is essentially a UIView, it should be possible no?


Solution

  • No. You can't have two scenes in one scene. A scene is similar to the root view controller . You can't have two root view controllers. Similarly you can't have two scenes. You can add as many nodes to the scenes as you can. They are all considered as the children of the scene i.e you can add a simple view as a subview to the scene.

    From the Documentation:

    An SKScene object represents a scene of content in Sprite Kit. A scene is the root node in a tree of Sprite Kit nodes (SKNode).