format
typescript
NavMeshObstacle.heightclass: NavMeshObstacle
description
Height of the cylinder.
When the shape is set to Cylinder, the height property represents the height of the cylinder. It is not a valid operation to read or write the height property when the shape is set to Box.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
number | Height of the cylinder |
code example
typescript
let obj = new GameObject();
let com = obj.AddComponent<NavMeshObstacle>(NavMeshObstacle);
com.shape = NavMeshObstacleShape.Cylinder;
com.height = 1;
Debug.Log("NavMeshObstacle: height = ", com.height);