Grids 2

Hills with hexagons imposed.

Grids 2 is a library for working with all kinds of grids in Unity.

Getting Started

The best way to get started is to look at the examples that ship with Grids 2, and reading this documentation. The page Key Concepts introduces the most important grid concepts], and is especially important for working with Grids in code.

If you want to browse the API, this page will guide you through the most important types.

For mathematical background on grid points, see Hex Geometry for Game Developers (PDF). Although this document covers hex grids specifically, the concepts should also be useful for rect grids. Amit Patel's Hexagonal Grids also has a lot of useful information about hex grids. You can see how you do everything describe in that guide in Amit Patel's Guide for Hex Grids and Gamelogic Grids.

Relation to Grids 1

Grids 1 is an earlier version of this library. Grids 2 is conceptually based on Grids 1, but the libraries are not compatible. Grids 2 refines many of the ideas used in Grids 1, and for new games, it is the library you should use. However, Grids 1 is used in many games, and therefore we still ship the old library with the occasional bug fix, and still host all the examples made for Grids 1 for those still using it. When you look at an article or tutorial, make sure it is for the right version of Grids!


In addition to .Net and the Unity API, Grids 2 also depends on the Extensions library, which is documented separately here.