Contents

SCNSceneSource

An object that manages the data-reading tasks associated with loading scene contents from a file or data.

Declaration

class SCNSceneSource

Mentioned in

Overview

You can also use a scene source to examine the contents of a scene file or to selectively extract certain elements of a scene without keeping the entire scene and all the assets it contains.

SceneKit can read scene contents from a file in a supported format, or from an NSData object holding the contents of such a file. Supported formats include the following:

Format

Filename Extension

Supported in

Digital Asset Exchange

.dae

macOS 10.8 and later

Alembic

.abc

macOS 10.10 and later

SceneKit compressed scene

.dae or .abc

macOS 10.10 and later [Image] iOS 8.0 and later

SceneKit archive

.scn

macOS 10.10 and later [Image] iOS 8.0 and later

When you include a scene file in DAE or Alembic format in your Xcode project, Xcode automatically converts the file to SceneKit’s compressed scene format for use in the built app. The compressed file retains its original .dae or .abc extension.

The SCNSceneSource class can also load SceneKit archive files, which you create in the Xcode scene editor or programmatically by using the NSKeyedArchiver class to serialize an SCNScene object and the scene graph it contains.

Topics

Creating a Scene Source

Loading a Complete Scene

Loading and Inspecting Scene Elements

Getting Information about the Scene

Constants

Initializers