---
title: SKReferenceNode
framework: spritekit
role: symbol
role_heading: Class
path: spritekit/skreferencenode
---

# SKReferenceNode

A node that’s defined in an archived .sks file.

## Declaration

```swift
class SKReferenceNode
```

## Mentioned in

Using Base Nodes to Lay Out SpriteKit Content

## Overview

Overview SKReferenceNode is used within an archived .sks file to refer to node defined in another .sks file without duplicating its definition. This way, a change to the referenced node propagates to all the references in other files. note: SKReferenceNode is mostly used in conjunction with Xcode’s SpriteKit Scene editor, but it’s possible to instantiate it yourself and use the resolve() function as a handy way to restore a node’s appearance. As an example, you might want to share an enemy ship across two different levels, Scene1.sks and Scene2.sks, in a level-based game. Reference nodes allow you to do that without creating copies of the shared node and its properties. To use a reference node: Create the shared content in a separate archive Add references to the shared archive within your scene archives When each scene is loaded, the reference nodes are resolved dynamically, and therefore you only need to configure a shared object in one place.

## Topics

### Initializers

- [init(url:)](spritekit/skreferencenode/init(url:)-3jryz.md)
- [init(url:)](spritekit/skreferencenode/init(url:)-429mo.md)
- [init(fileNamed:)](spritekit/skreferencenode/init(filenamed:)-77gs0.md)
- [init(fileNamed:)](spritekit/skreferencenode/init(filenamed:)-2yeh2.md)
- [init(coder:)](spritekit/skreferencenode/init(coder:).md)
- [init(URL:)](spritekit/skreferencenode/init(url:)-8glm0.md)
- [init(URL:)](spritekit/skreferencenode/init(url:)-8yn6r.md)

### Regenerating

- [resolve()](spritekit/skreferencenode/resolve().md)

### Loading Callback

- [didLoad(_:)](spritekit/skreferencenode/didload(_:).md)

## Relationships

### Inherits From

- [SKNode](spritekit/sknode.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Base Nodes

- [Using Base Nodes to Lay Out SpriteKit Content](spritekit/using-base-nodes-to-lay-out-spritekit-content.md)
- [SKNode](spritekit/sknode.md)
- [SKCameraNode](spritekit/skcameranode.md)
