---
title: "init(url:options:)"
framework: scenekit
role: symbol
role_heading: Initializer
path: "scenekit/scnscene/init(url:options:)-7ugvv"
---

# init(url:options:)

Loads a scene from the specified URL.

## Declaration

```swift
convenience init(url: URL, options: [SCNSceneSource.LoadingOption : Any]? = nil) throws
```

## Parameters

- `url`: The URL to the scene file to load.
- `options`: A dictionary of options affecting scene loading, or nil for default options. For available keys, see Scene Loading Options.

## Return Value

Return Value A new scene object, or nil if no scene could be loaded.

## Discussion

Discussion This method provides a convenient way to load a complete scene from a file at an arbitrary URL. For more detailed options or to load only part of a file’s scene graph, use the SCNSceneSource class. note: In Swift, this method returns a nonoptional result and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters. When creating a scene using Xcode’s Scene Editor or an external tool, you should copy your scene file into a directory with the .scnassets extension inside your app bundle. You should also place any image files referenced as textures from that scene in an Asset Catalog. Xcode will optimize the scene and texture resources for best performance on each target device, and prepare your texture resources for delivery features such as App Thinning and On-Demand Resources.

## See Also

### Creating a Scene from a File

- [init(named:)](scenekit/scnscene/init(named:).md)
- [init(named:inDirectory:options:)](scenekit/scnscene/init(named:indirectory:options:).md)
