Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to include a SpriteKit scene in a SceneKit Scene?

I am wondering if it is possible to include a SpriteKit scene in a SceneKit scene, and if it is, how to do that ?

like image 429
Pop Flamingo Avatar asked Nov 28 '14 15:11

Pop Flamingo


People also ask

How do I create a SpriteKit scene in Xcode?

First, add a new scene file to your project through Xcode's File menu > New... > File > (choose your platform tab) > SpriteKit Scene. You configure your scene in the scene editor by clicking on the .sks file in Xcode's file navigator pane, then adjusting properties in the Utility pane.

How do you make a room in SpriteKit?

Choose the SpriteKit Scene file template, click Next, name the new file Room.sks and save it in the project’s folder. Next, set the scene’s size to be 400 x 400 pixels. Now, instead of selecting Color Sprite, select a Reference from the Object Library.

Why import the SpriteKit framework?

Import the SpriteKit framework, so you have access to everything it has to offer. Without it you won’t be able to have access to the SKScene class, for example, and you wouldn’t be able to create your GameScene object. Create a variable to host your GameScene object, which will be where your game is in the future.

How do I host a gamescene in a spriteview?

Create a variable to host your GameScene object, which will be where your game is in the future. Use the SpriteView (scene:) view to host your GameScene object and show it in your application.


1 Answers

Yes there is!

You can assign a Sprite Kit scene (SKScene) as the contents of a material property (SCNMaterialProperty) in Scene Kit.

like image 150
David Rönnqvist Avatar answered Sep 24 '22 21:09

David Rönnqvist