---
title: SCNScene
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scnscene
---

# SCNScene

A container for the node hierarchy and global properties that together form a displayable 3D scene.

## Declaration

```swift
class SCNScene
```

## Overview

Overview To display 3D content with SceneKit, you create a scene containing a hierarchy of the nodes and attributes that together represent your visual elements. Typically, you build your assets in a 3D visual editor, then assemble them into a scene using Xcode’s SceneKit Scene Editor, ready for SceneKit to render.

To display your scene, you need to load it at runtime, then set it as the scene property of an SCNView: guard let myScene = SCNScene(named: "MyScene")      else { fatalError("Unable to load scene file.") } scnView.scene = myScene // Your app's SCNView Creating a Scene The simplest way to create a scene is through Xcode’s SceneKit Scene Editor. Start by importing one or more assets from a 3D editor, such as Blender. Then you adjust the positions and attributes of the assets, and set global scene properties, such as lighting environment, to compose your scene. The scene editor creates a .scn file, which you save to a .scnassets folder in the app bundle. When you build your project, Xcode optimizes the scene file for your target platform.

## Topics

### Creating a Scene from a File

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

### Managing Animated Effects in a Scene

- [isPaused](scenekit/scnscene/ispaused.md)

### Accessing Scene Contents

- [rootNode](scenekit/scnscene/rootnode.md)
- [background](scenekit/scnscene/background.md)
- [lightingEnvironment](scenekit/scnscene/lightingenvironment.md)

### Managing Scene Attributes

- [attribute(forKey:)](scenekit/scnscene/attribute(forkey:).md)
- [setAttribute(_:forKey:)](scenekit/scnscene/setattribute(_:forkey:).md)
- [SCNScene.Attribute](scenekit/scnscene/attribute.md)

### Exporting a Scene File

- [write(to:options:delegate:progressHandler:)](scenekit/scnscene/write(to:options:delegate:progresshandler:).md)
- [SCNSceneExportDelegate](scenekit/scnsceneexportdelegate.md)

### Adding Fog to a Scene

- [fogStartDistance](scenekit/scnscene/fogstartdistance.md)
- [fogEndDistance](scenekit/scnscene/fogenddistance.md)
- [fogDensityExponent](scenekit/scnscene/fogdensityexponent.md)
- [fogColor](scenekit/scnscene/fogcolor.md)

### Working With Physics in the Scene

- [physicsWorld](scenekit/scnscene/physicsworld.md)

### Working with Particle Systems in the Scene

- [addParticleSystem(_:transform:)](scenekit/scnscene/addparticlesystem(_:transform:).md)
- [particleSystems](scenekit/scnscene/particlesystems.md)
- [removeParticleSystem(_:)](scenekit/scnscene/removeparticlesystem(_:).md)
- [removeAllParticleSystems()](scenekit/scnscene/removeallparticlesystems().md)

### Constants

- [Scene Attributes](scenekit/scene-attributes.md)
- [Scene Export Options](scenekit/scene-export-options.md)
- [SCNSceneExportProgressHandler](scenekit/scnsceneexportprogresshandler.md)

### Initializers

- [init(URL:options:)](scenekit/scnscene/init(url:options:)-2hc8n.md)
- [init(coder:)](scenekit/scnscene/init(coder:).md)

### Instance Properties

- [screenSpaceReflectionMaximumDistance](scenekit/scnscene/screenspacereflectionmaximumdistance.md)
- [screenSpaceReflectionSampleCount](scenekit/scnscene/screenspacereflectionsamplecount.md)
- [screenSpaceReflectionStride](scenekit/scnscene/screenspacereflectionstride.md)
- [wantsScreenSpaceReflection](scenekit/scnscene/wantsscreenspacereflection.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [GKSceneRootNodeType](gameplaykit/gkscenerootnodetype.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Essentials

- [SCNView](scenekit/scnview.md)
- [SceneView](scenekit/sceneview.md)
