文档

Unity Engine

Unity Engine

FindTerrainLayerIndex(Terrain, TerrainLayer)

Finds the index of a TerrainLayer in a Terrain tile.
阅读时间1 分钟最后更新于 1 个月前

Definition

public static int FindTerrainLayerIndex(Terrain terrain, TerrainLayer inputLayer)

Parameters

terrain

Terrain tile.

inputLayer

Terrain layer to search for.

Returns

Type

Description

intReturns the index of the terrain layer if it exists or -1 if it doesn't exist.