Version: 2022.2
public float[,] GetHeights (int xBase, int yBase, int width, int height);

参数

xBase First index of heightmap samples to retrieve along the Terrain's x axis.
yBase First index of heightmap samples to retrieve along the Terrain's z axis.
width Number of samples to retrieve along the Terrain's x axis.
height Number of samples to retrieve along the Terrain's z axis.

描述

Gets an array of heightmap samples.

返回一个二维的高度贴图样本数组。样本使用范围从 0 到 1 的浮点值表示。该数组具有维度 [height,width],其索引为 [y,x]。