Table of Contents

Samples

The samples described here ship with Grids. You can find them from the Package Manager once you imported Grids: #. From the Windows Menu, open the Package Manager, and set it to show the packages In Project. #. Select Grids from the Packages under the list. #. Depending on the version of Unity, you will either see the samples listed directly on the panel on the right, or a Samples panel - click on the Samples panel to see the samples.

Trouble shooting

We regularly test the samples in Unity 2019, 2021, and Unity 6000. However, it is possible that some or all samples may not work, for example, if the samples are empty, it may be that the package did not upload properly when we submitted it.

Please contact us (support@gameloggic.co.za) so we can fix it, and share a link with the samples to you directly.

List of samples

Shared Resources

This sample needs to be imported before importing any of the other samples.

Simple Grids

Shows how to use simple grids.

Grids Setup

Shows how to set up grids in code and the editor.

  • Basic Code
    • Block
    • Cube
    • Fat Hex
    • Hex
    • Line
    • Polar
    • Rect
  • Basic Editor
    • FlatHex
    • HexMesh
    • HexTile
    • RectMesh
    • RectTile
  • ComplexShape
  • Stress

3D Tile Grid

This example show using 3D tiles in a 2D hex grid.

3D Shapes

Show how to work with 3D shapes.

Triangular Grid

Shows how to set up a triangular grid.

Animation

Shows how to animate grids.

Games

Examples of simple games made with grids:

  • Lights Put
  • Lights Out with custom neighbors setup
  • Lines

Polyominoes

Show the polyomino grid shapes.

Algorithms

Show how to use various grid algorithms:

  • Diffusion: an example of using AggregateNeighborhood .
  • Pathfinding: an example of using AStar .
  • PointsInRange: an example of using GetPointsInRange .
  • PrimsAlgorithm: an example of how to use Grids 2 to implement Prim's Algorithm.

Space Filling Curves

Show how to use space filling curves with grids.

Hex Sphere Illusion

Show an example showing a sphere apparently tiled with hexagons.