Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetCellPoints(CellLayout)

Gets the points which outline a cell of the given GridLayout.CellLayout.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.GridModule
public static ReadOnlySpan<Vector3> GetCellPoints(GridLayout.CellLayout layout)

Parameters

The layout of the cell.

Returns

Type

Description

ReadOnlySpan<Vector3>The points which outline a cell, in cell space.

Remarks

The points are in cell space, so they describe a cell before any cell size is applied. They trace the cell's outline clockwise, so consecutive points are the cell's edges. The same points serve every cell of the layout, so they are read straight from the engine and nothing is copied or allocated.
Additional Resources: GridLayout.GetCellPoints()