<!--
{
  "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/SKTileMapNode/enableAutomapping",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTileMapNode(py)enableAutomapping"
  },
  "title" : "enableAutomapping"
}
-->

# enableAutomapping

When creating a tile map node programmatically, specifies whether the tile map uses automapping behavior like the scene editor.

```
var enableAutomapping: Bool { get set }
```

## Discussion

This function is for use when you’re creating a tile map programmatically, versus creating it ahead of time with the scene editor.

Set this value to `true` when you want automapping behavior (equivalent to using the paint brush in the scene editor) when using the [`fill(with:)`](/documentation/SpriteKit/SKTileMapNode/fill(with:)), and [`setTileGroup(_:andTileDefinition:forColumn:row:)`](/documentation/SpriteKit/SKTileMapNode/setTileGroup(_:andTileDefinition:forColumn:row:)) functions.

---

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)