SCNSceneSource
An object that manages the data-reading tasks associated with loading scene contents from a file or data.
Declaration
class SCNSceneSourceMentioned 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 |
| macOS 10.8 and later |
Alembic |
| macOS 10.10 and later |
SceneKit compressed scene |
| macOS 10.10 and later [Image] iOS 8.0 and later |
SceneKit archive |
| 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
SCNSceneSource.LoadingOptionScene Source PropertiesContributor KeysUnit Dictionary KeysScene Loading Error KeysScene File Consistency Error KeysScene File Consistency Check Error CodesSCNSceneSourceStatusHandlerSCNSceneSourceStatus