Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GridLayout

An abstract class that defines a grid layout.
Read time 6 minutesLast updated 3 days ago

Definition

[RequireComponent(typeof(Transform))]public class GridLayout : Behaviour

Remarks

Additional Resources: Grid

Properties

Property

Description

cellGapThe size of the gap between each cell in the layout.
cellLayoutCell shape and packing that this layout uses when converting between cell and local space.
cellSizeThe size of each cell in the layout.
cellSwizzleCell swizzle order that this layout applies when converting cell positions to local space.

Methods

Method

Description

CellToLocalConverts a cell position to local position space.
CellToLocalInterpolatedConverts an interpolated cell position in floats to local position space.
CellToWorldConverts a cell position to world position space.
GetBoundsLocalReturns the local bounds for the groups of cells at the location.
GetLayoutCellCenterGet the default center coordinate of a cell for the set layout of the Grid.
LocalToCellConverts a local position to cell position.
LocalToCellInterpolatedConverts a local position to cell position.
LocalToWorldConverts a local position to world position.
WorldToCellConverts a world position to cell position.
WorldToLocalConverts a world position to local position.

Enums

Enum

Description

GridLayout.CellLayoutThe layout of the GridLayout.
GridLayout.CellSwizzleSwizzles cell positions to other positions.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.