Add Nodes Using the Object Library
Apple Game Frameworks and Technologies — by Tammy Coron (78 / 193)
👈 Add the Assets | TOC | Configure the View and Loa d the Scene 👉
In Add the Background, you added a background image to the game scene by creating a new background sprite node. You then added that node as a child node of the game scene; you did all of that in code.
However, this time around, you’ll create and add a background node to the node tree using the Object Library, and you’ll set its options using the Attributes Inspector. But first, it’s time for a quick tour.
Touring the Scene Editor
From within the Project Navigator, select the GameScene.sks file. Files with the sks file extension are known as SpriteKit scene files. This particular scene file is what gets loaded from the GameViewController.swift file. You’ll learn more about how that works in Configure the View and Load the Scene.
When you select the GameScene.sks file, it opens in the Scene Editor and looks something like the image.
To see the entire scene, you may need to zoom out depending on the size of your monitor. You can control the zoom level in a few ways: from Xcode’s App menu, select Editor ▶ Zoom In or Editor ▶ Zoom Out; you…