Skip to content

format

typescript
NavMeshObstacle.height

class: 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_nametypedescription

reture

typedescription
numberHeight 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);