This package includes the following source code, all procedural:
- hexagon grid creation
- mesh generation (optimized for fast drawing) for a cell
- VERY fast drawing of the the grid: 1 draw call, direct OpenGL line list drawing, requires Unity 3 pro or Unity 4 (free or pro)
- mesh drawing
- 3D click cell selection (faster then using the unity built in colliders with raycasts is my experience)
The grid consist of cells, and each cell has a reference to their neighbors. This makes it very easy to add path finding like A* to this grid.
Please click here for a demo. Note that the demo uses very basic materials for the grid (only a color). You can add your own texture for different cell types if you want (water, sand, etc). Or simply use this simple grid for abstract games (hexagon chess anyone?). The grid is created in a full 3D plane, the demo just shows a top town view.
You get the full source code. If you have any questions, don't hesitate to ask!