Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

Grid.GetCellPoints

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static ReadOnlySpan<Vector3> GetCellPoints(CellLayout layout);

Parameters

Parameter Description
layout The layout of the cell.

Returns

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

Description

Gets the points which outline a cell of the given CellLayout.

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