文档

Unity Engine

Unity Engine

GetCellPoints(CellLayout)

Gets the points which outline a cell of the given GridLayout.CellLayout.
阅读时间1 分钟最后更新于 1 个月前

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()