Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Grid component reference

Explore the properties you can use to configure a grid GameObject.
Read time 1 minuteLast updated 12 days ago

Explore the properties you can use to customize the layout guide for tilemaps. For more information, refer to Painting tiles into the scene.

Property

Description

Cell SizeSets the size of the cells in the grid.
Cell GapSets the gap between cells.
Cell LayoutSets the layout of the cells. The options are:
  • Rectangle: Lays out the cells as a rectangular grid.
  • Hexagon: Lays out the cells as a hexagonal grid.
  • Isometric: Lays out the cells as an isometric grid.
  • Isometric Z as Y: Lays out the cells as an isometric grid, where each tile has a z value that represents its 3D height.
Cell SwizzleSets the orientation of the grid. The options are:
  • XYZ: Leaves the x, y, and z values unchanged. This usually means the grid faces the camera. This is the default.
  • XZY: Swaps the y and z values. This usually means the grid lies flat in 3D space.
  • YXZ: Swaps the x and y values. This usually means the grid faces the camera but is rotated 90°.
  • YZX: Shuffles all three values. This usually means the grid lies flat in 3D space.
  • ZXY: Shuffles all three values. This usually means the grid faces right.
  • ZYX: Reverses the values. This usually means the grid faces left.

Additional resources