---
title: "init(toStayOnPath:maxPredictionTime:)"
framework: gameplaykit
role: symbol
role_heading: Initializer
path: "gameplaykit/gkgoal/init(tostayonpath:maxpredictiontime:)"
---

# init(toStayOnPath:maxPredictionTime:)

## Declaration

```swift
convenience init(toStayOnPath path: GKPath, maxPredictionTime: TimeInterval)
```
