A navigation graph for 2D game worlds where movement is constrained to an integer grid.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Gameplay
Kit
Declaration
class GKGridGraph<NodeType> : GKGraph where NodeType : GKGrid Graph Node
Overview
Use this class to generate a graph containing GKGrid
objects representing a specified grid. Then use methods of the superclass GKGraph
to find routes through the graph.
To learn more about graphs and pathfinding, see Pathfinding in GameplayKit Programming Guide.