<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKTileSet/init(tileGroups:tileSetType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTileSet(im)initWithTileGroups:tileSetType:"
  },
  "title" : "init(tileGroups:tileSetType:)"
}
-->

# init(tileGroups:tileSetType:)

Initializes a new tile set with an array of tile groups and specified layout.

```
init(tileGroups: [SKTileGroup], tileSetType: SKTileSetType)
```

## Parameters

`tileGroups`

An array of [`SKTileGroup`](/documentation/SpriteKit/SKTileGroup) objects from which to create the tile set from.

`tileSetType`

The arrangement of the tiles.

## Return Value

A new tile set.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)