A scene graph node that serves as a placeholder for content to be loaded from a separate scene file.


class SCNReferenceNode : SCNNode


When you tell a reference node to load its content, SceneKit loads the referenced scene file and makes children of the scene file’s root node become children of the reference node.


Creating a Reference Node

init?(url: URL)

Initializes a node whose content is to be loaded from the referenced URL.

Loading and Unloading a Reference Node’s Content

var referenceURL: URL

The URL to a scene file from which to load content for the reference node.

var loadingPolicy: SCNReferenceLoadingPolicy

An option for whether to load the node’s content automatically.

func load()

Loads content into the node from its referenced external scene file.

var isLoaded: Bool

A Boolean value that indicates whether the reference node has already loaded its content.

func unload()

Removes the node’s children and marks the node as not loaded.


enum SCNReferenceLoadingPolicy

Options for when to load the reference node’s content, used by the loadingPolicy property.


Inherits From

Conforms To

See Also

Scene Structure

Organizing a Scene with Nodes

Use nodes to define the structure of a scene.

class SCNNode

A structural element of a scene graph, representing a position and transform in a 3D coordinate space, to which you can attach geometry, lights, cameras, or other displayable content.