Instance Property


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


var loadingPolicy: SCNReferenceLoadingPolicy { get set }


If this property’s value is SCNReferenceLoadingPolicy.immediate (the default), instantiating a reference node from an archive (using the NSKeyedUnarchiver class) automatically loads the node’s external content. Set this property to SCNReferenceLoadingPolicy.onDemand before archiving an SCNReferenceNode object if you don’t want that reference node to automatically load its content when unarchived. In that case, call the load() method after unarchiving when you want to load the node’s content.

See Also

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.

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software