---
title: "init(fileNamed:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/sknode/init(filenamed:)"
---

# init(fileNamed:)

Creates a new node by loading an archive file from the game’s main bundle.

## Declaration

```swift
convenience init?(fileNamed filename: String)
```

## Parameters

- `filename`: The name of the file, without a file extension. The file must be in the app’s main bundle and have a .sks filename extension.

## Mentioned in

Creating a Scene from a File

## Return Value

Return Value The unarchived node object.

## Discussion

Discussion If you call this method on a subclass of the SKScene class and the object in the archive is an SKScene object, the returned object is initialized as if it is a member of the subclass. You use this behavior to create scene layouts in the Xcode Editor and provide custom behaviors in your subclass.

## See Also

### First Steps

- [Getting Started with Nodes](spritekit/getting-started-with-nodes.md)
- [init()](spritekit/sknode/init().md)
- [init(coder:)](spritekit/sknode/init(coder:).md)
- [init(fileNamed:securelyWithClasses:)](spritekit/sknode/init(filenamed:securelywithclasses:).md)
