---
title: "init(gridPosition:)"
framework: gameplaykit
role: symbol
role_heading: Initializer
path: "gameplaykit/gkgridgraphnode/init(gridposition:)"
---

# init(gridPosition:)

Initializes a graph node with the specified position on a grid.

## Declaration

```swift
init(gridPosition: vector_int2)
```

## Parameters

- `gridPosition`: The position for the node on a discrete integer grid.

## Return Value

Return Value A new graph node representing the specified grid position.

## Discussion

Discussion For more information, see GameplayKit Programming Guide.
