Version: 2020.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]。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961