Initializes a scene source for reading the scene graph from a specified file.
SDKs
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Scene
Kit
Declaration
init?(url: URL, options: [SCNScene Source.Loading Option : Any]? = nil)
Parameters
url
The URL identifying the scene.
options
A dictionary containing options that affect scene loading. See Scene Loading Options for available keys and values. Pass
nil
to use default options.
Return Value
An initialized scene source object, or nil
if initialization was not successful.
Discussion
If you have the contents of a scene file but not the file itself (for example, if your app downloads scene files from the network), use the init(data:
method instead.